ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
DerivationFramework::DiLepFilters Class Reference

#include <DiLepFilters.h>

Inheritance diagram for DerivationFramework::DiLepFilters:
Collaboration diagram for DerivationFramework::DiLepFilters:

Public Member Functions

 DiLepFilters (const std::string &t, const std::string &n, const IInterface *p)
 
virtual ~DiLepFilters ()=default
 
virtual StatusCode initialize () override
 
bool GetTriggers (uint32_t &passFlags) const override
 
bool PassSiEl (const uint32_t passFlags, const xAOD::Electron &el) const override
 
bool PassSiPhX (const uint32_t passFlags, const xAOD::Photon &ph, const xAOD::Electron &el) const override
 
bool PassSiPhX (const uint32_t passFlags, const xAOD::Photon &ph1, const xAOD::Photon &ph2) const override
 
bool PassSiPhX (const uint32_t passFlags, const xAOD::Photon &ph, const xAOD::Muon &mu) const override
 
bool PassSiMu (const uint32_t passFlags, const xAOD::Muon &mu) const override
 
bool PassSiMuBa (const uint32_t passFlags, const xAOD::Muon &mu) const override
 
bool PassDiEl (const uint32_t passFlags, const xAOD::Electron &el1, const xAOD::Electron &el2) const override
 
bool PassDiPh (const uint32_t passFlags, const xAOD::Photon &ph1, const xAOD::Photon &ph2) const override
 
bool PassDiElPh (const uint32_t passFlags, const xAOD::Electron &el, const xAOD::Photon &ph) const override
 
bool PassDiLoElPh (const uint32_t passFlags, const xAOD::Electron &el, const xAOD::Photon &ph) const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

enum  PassFlags { PASS_SIPH = 1, PASS_DIPH = 2, PASS_SIMU = 4, PASS_SIMUBA = 8 }
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool PassEta (const xAOD::IParticle &part, double eta_cut) const
 
bool Passd0 (const xAOD::Electron &el, double d0_cut) const
 
bool Passd0 (const xAOD::Muon &mu, double d0_cut) const
 
bool IsLoose (const xAOD::Egamma &eg) const
 
bool SameCluster (const xAOD::Egamma &eg1, const xAOD::Egamma &eg2) const
 
bool IsGood (const xAOD::Muon &mu) const
 
bool PassCuts (const xAOD::Electron &el, double pt_cut, bool loose=false) const
 
bool PassCuts (const xAOD::Photon &ph, double pt_cut) const
 
bool PassCuts (const xAOD::Muon &mu, double pt_cut, double eta_cut) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< Trig::TrigDecisionToolm_tdt
 
std::vector< std::string > m_trig_siph
 
std::vector< std::string > m_trig_diph
 
std::vector< std::string > m_trig_simu
 
std::vector< std::string > m_trig_simuba
 
double m_el_eta
 
double m_ph_eta
 
double m_mu_eta
 
double m_mu_beta
 
double m_el_d0
 
double m_mu_d0
 
double m_siel_pt
 
double m_siph_pt
 
double m_siph_xpt
 
double m_simu_pt
 
double m_simuba_pt
 
double m_diel_pt
 
double m_diph_pt
 
double m_dielph_pt
 
double m_diloelph_pt
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static constexpr double m_GeVtoMeV = 1000.
 

Detailed Description

Definition at line 28 of file DiLepFilters.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ PassFlags

Enumerator
PASS_SIPH 
PASS_DIPH 
PASS_SIMU 
PASS_SIMUBA 

Definition at line 73 of file DiLepFilters.h.

73  {
74  PASS_SIPH = 1,
75  PASS_DIPH = 2,
76  PASS_SIMU = 4,
77  PASS_SIMUBA = 8
78  };

Constructor & Destructor Documentation

◆ DiLepFilters()

DerivationFramework::DiLepFilters::DiLepFilters ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 17 of file DiLepFilters.cxx.

18  : AthAlgTool(t, n, p), m_tdt("Trig::TrigDecisionTool/TrigDecisionTool"),
19  m_el_eta(0.), m_ph_eta(0.), m_mu_eta(0.), m_mu_beta(0.),
20  m_el_d0(0.), m_mu_d0(0.),
21  m_siel_pt(0.), m_siph_pt(0.), m_siph_xpt(0.), m_simu_pt(0.),
22  m_diel_pt(0.), m_diph_pt(0.), m_dielph_pt(0.), m_diloelph_pt(0.)
23 {
24  declareInterface<IDiLepFilters>(this);
25 
26  declareProperty("TrigDecisionTool", m_tdt);
27 
28  declareProperty("SiPhTriggers", m_trig_siph);
29  declareProperty("DiPhTriggers", m_trig_diph);
30  declareProperty("SiMuTriggers", m_trig_simu);
31  declareProperty("SiMuBaTriggers", m_trig_simuba);
32 
33  declareProperty("ElEtaMax", m_el_eta);
34  declareProperty("PhEtaMax", m_ph_eta);
35  declareProperty("MuEtaMax", m_mu_eta);
36  declareProperty("MuBaEtaMax", m_mu_beta);
37 
38  declareProperty("ElD0Min", m_el_d0);
39  declareProperty("MuD0Min", m_mu_d0);
40 
41  declareProperty("SiElPtMin", m_siel_pt);
42  declareProperty("SiPhPtMin", m_siph_pt);
43  declareProperty("SiPhXPtMin", m_siph_xpt);
44  declareProperty("SiMuPtMin", m_simu_pt);
45  declareProperty("SiMuBaPtMin", m_simuba_pt);
46  declareProperty("DiElPtMin", m_diel_pt);
47  declareProperty("DiPhPtMin", m_diph_pt);
48  declareProperty("DiElPhPtMin", m_dielph_pt);
49  declareProperty("DiLoElPhPtMin", m_diloelph_pt);
50 }

◆ ~DiLepFilters()

virtual DerivationFramework::DiLepFilters::~DiLepFilters ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ GetTriggers()

bool DerivationFramework::DiLepFilters::GetTriggers ( uint32_t &  passFlags) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 61 of file DiLepFilters.cxx.

62 {
63  passFlags = 0;
64 
65  for(const std::string& tn: m_trig_siph)
66  {
67  if(m_tdt->isPassed(tn))
68  {
69  passFlags |= PASS_SIPH;
70  break;
71  }
72  }
73  for(const std::string& tn: m_trig_diph)
74  {
75  if(m_tdt->isPassed(tn))
76  {
77  passFlags |= PASS_DIPH;
78  break;
79  }
80  }
81  for(const std::string& tn: m_trig_simu)
82  {
83  if(m_tdt->isPassed(tn))
84  {
85  passFlags |= PASS_SIMU;
86  break;
87  }
88  }
89  for(const std::string& tn: m_trig_simuba)
90  {
91  if(m_tdt->isPassed(tn))
92  {
93  passFlags |= PASS_SIMUBA;
94  break;
95  }
96  }
97 
98  return passFlags != 0;
99 }

◆ initialize()

StatusCode DerivationFramework::DiLepFilters::initialize ( )
overridevirtual

Definition at line 52 of file DiLepFilters.cxx.

53 {
54  ATH_MSG_VERBOSE("initialize() ...");
55 
56  CHECK(m_tdt.retrieve());
57 
58  return StatusCode::SUCCESS;
59 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& DerivationFramework::IDiLepFilters::interfaceID ( )
inlinestaticinherited

Definition at line 27 of file IDiLepFilters.h.

27 { return IID_DerivationFramework_IDiLepFilters; }

◆ IsGood()

bool DerivationFramework::DiLepFilters::IsGood ( const xAOD::Muon mu) const
inlineprivate

Definition at line 270 of file DiLepFilters.cxx.

271 {
272  if(mu.muonType() != xAOD::Muon::Combined) return false;
273 
274  float chi2 = 0.;
275  if(!mu.parameter(chi2, xAOD::Muon::msInnerMatchChi2)) return false;
276 
277  int dof = 1;
278  if(!mu.parameter(dof, xAOD::Muon::msInnerMatchDOF)) return false;
279  if(dof == 0) dof = 1;
280 
281  return (chi2 / static_cast<float>(dof)) < 5.;
282 }

◆ IsLoose()

bool DerivationFramework::DiLepFilters::IsLoose ( const xAOD::Egamma eg) const
inlineprivate

Definition at line 250 of file DiLepFilters.cxx.

251 {
252  bool isLoose = false;
253  eg.passSelection(isLoose, "Loose");
254  return isLoose;
255 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ PassCuts() [1/3]

bool DerivationFramework::DiLepFilters::PassCuts ( const xAOD::Electron el,
double  pt_cut,
bool  loose = false 
) const
inlineprivate

Definition at line 284 of file DiLepFilters.cxx.

285 {
286  if(el.pt() < pt_cut * m_GeVtoMeV) return false;
287  if(!PassEta(el, m_el_eta)) return false;
288 
289  if(loose)
290  {
291  if(!IsLoose(el)) return false;
292  }
293  else
294  {
295  if(!Passd0(el, m_el_d0)) return false;
296  }
297 
298  return true;
299 }

◆ PassCuts() [2/3]

bool DerivationFramework::DiLepFilters::PassCuts ( const xAOD::Muon mu,
double  pt_cut,
double  eta_cut 
) const
inlineprivate

Definition at line 310 of file DiLepFilters.cxx.

311 {
312  const xAOD::IParticle* mu_ip = nullptr;
313 
314  if(IsGood(mu))
315  {
316  if(!Passd0(mu, m_mu_d0)) return false;
317 
318  mu_ip = &mu;
319  }
320  else
321  {
322  const xAOD::TrackParticle* mu_mstr = mu.trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
323  if(mu_mstr == nullptr) return false;
324 
325  mu_ip = mu_mstr;
326  }
327 
328  if(mu_ip->pt() < pt_cut * m_GeVtoMeV) return false;
329  if(!PassEta(*mu_ip, eta_cut)) return false;
330 
331  return true;
332 }

◆ PassCuts() [3/3]

bool DerivationFramework::DiLepFilters::PassCuts ( const xAOD::Photon ph,
double  pt_cut 
) const
inlineprivate

Definition at line 301 of file DiLepFilters.cxx.

302 {
303  if(ph.pt() < pt_cut * m_GeVtoMeV) return false;
304  if(!PassEta(ph, m_ph_eta)) return false;
305  if(!IsLoose(ph)) return false;
306 
307  return true;
308 }

◆ Passd0() [1/2]

bool DerivationFramework::DiLepFilters::Passd0 ( const xAOD::Electron el,
double  d0_cut 
) const
inlineprivate

Definition at line 226 of file DiLepFilters.cxx.

227 {
229  if(el_tr == nullptr)
230  {
231  ATH_MSG_WARNING("Could not retrieve electron ID track!");
232  return false;
233  }
234 
235  return std::fabs(el_tr->d0()) > d0_cut;
236 }

◆ Passd0() [2/2]

bool DerivationFramework::DiLepFilters::Passd0 ( const xAOD::Muon mu,
double  d0_cut 
) const
inlineprivate

Definition at line 238 of file DiLepFilters.cxx.

239 {
240  const xAOD::TrackParticle* mu_tr = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
241  if(mu_tr == nullptr)
242  {
243  ATH_MSG_WARNING("Could not retrieve muon ID track!");
244  return false;
245  }
246 
247  return std::fabs(mu_tr->d0()) > d0_cut;
248 }

◆ PassDiEl()

bool DerivationFramework::DiLepFilters::PassDiEl ( const uint32_t  passFlags,
const xAOD::Electron el1,
const xAOD::Electron el2 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 165 of file DiLepFilters.cxx.

168 {
169  if (! (passFlags&PASS_DIPH) ) return false;
170 
171  if(SameCluster(el1, el2)) return false;
172 
173  if(!PassCuts(el1, m_diel_pt)) return false;
174  if(!PassCuts(el2, m_diel_pt)) return false;
175 
176  return true;
177 }

◆ PassDiElPh()

bool DerivationFramework::DiLepFilters::PassDiElPh ( const uint32_t  passFlags,
const xAOD::Electron el,
const xAOD::Photon ph 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 193 of file DiLepFilters.cxx.

196 {
197  if (! (passFlags&PASS_DIPH) ) return false;
198 
199  if(SameCluster(el, ph)) return false;
200 
201  if(!PassCuts(el, m_dielph_pt)) return false;
202  if(!PassCuts(ph, m_dielph_pt)) return false;
203 
204  return true;
205 }

◆ PassDiLoElPh()

bool DerivationFramework::DiLepFilters::PassDiLoElPh ( const uint32_t  passFlags,
const xAOD::Electron el,
const xAOD::Photon ph 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 207 of file DiLepFilters.cxx.

210 {
211  if (! (passFlags&PASS_DIPH) ) return false;
212 
213  if(SameCluster(el, ph)) return false;
214 
215  if(!PassCuts(el, m_diloelph_pt, true)) return false;
216  if(!PassCuts(ph, m_diloelph_pt)) return false;
217 
218  return true;
219 }

◆ PassDiPh()

bool DerivationFramework::DiLepFilters::PassDiPh ( const uint32_t  passFlags,
const xAOD::Photon ph1,
const xAOD::Photon ph2 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 179 of file DiLepFilters.cxx.

182 {
183  if (! (passFlags&PASS_DIPH) ) return false;
184 
185  if(SameCluster(ph1, ph2)) return false;
186 
187  if(!PassCuts(ph1, m_diph_pt)) return false;
188  if(!PassCuts(ph2, m_diph_pt)) return false;
189 
190  return true;
191 }

◆ PassEta()

bool DerivationFramework::DiLepFilters::PassEta ( const xAOD::IParticle part,
double  eta_cut 
) const
inlineprivate

Definition at line 221 of file DiLepFilters.cxx.

222 {
223  return std::fabs(part.eta()) < eta_cut;
224 }

◆ PassSiEl()

bool DerivationFramework::DiLepFilters::PassSiEl ( const uint32_t  passFlags,
const xAOD::Electron el 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 101 of file DiLepFilters.cxx.

103 {
104  if (! (passFlags&PASS_SIPH) ) return false;
105 
106  return PassCuts(el, m_siel_pt);
107 }

◆ PassSiMu()

bool DerivationFramework::DiLepFilters::PassSiMu ( const uint32_t  passFlags,
const xAOD::Muon mu 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 149 of file DiLepFilters.cxx.

151 {
152  if (! (passFlags&PASS_SIMU) ) return false;
153 
154  return PassCuts(mu, m_simu_pt, m_mu_eta);
155 }

◆ PassSiMuBa()

bool DerivationFramework::DiLepFilters::PassSiMuBa ( const uint32_t  passFlags,
const xAOD::Muon mu 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 157 of file DiLepFilters.cxx.

159 {
160  if (! (passFlags&PASS_SIMUBA) ) return false;
161 
162  return PassCuts(mu, m_simuba_pt, m_mu_beta);
163 }

◆ PassSiPhX() [1/3]

bool DerivationFramework::DiLepFilters::PassSiPhX ( const uint32_t  passFlags,
const xAOD::Photon ph,
const xAOD::Electron el 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 109 of file DiLepFilters.cxx.

112 {
113  if (! (passFlags&PASS_SIPH) ) return false;
114 
115  if(SameCluster(ph, el)) return false;
116 
117  if(!PassCuts(ph, m_siph_pt)) return false;
118  if(!PassCuts(el, m_siph_xpt)) return false;
119 
120  return true;
121 }

◆ PassSiPhX() [2/3]

bool DerivationFramework::DiLepFilters::PassSiPhX ( const uint32_t  passFlags,
const xAOD::Photon ph,
const xAOD::Muon mu 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 137 of file DiLepFilters.cxx.

140 {
141  if (! (passFlags&PASS_SIPH) ) return false;
142 
143  if(!PassCuts(ph, m_siph_pt)) return false;
144  if(!PassCuts(mu, m_siph_xpt, m_mu_eta)) return false;
145 
146  return true;
147 }

◆ PassSiPhX() [3/3]

bool DerivationFramework::DiLepFilters::PassSiPhX ( const uint32_t  passFlags,
const xAOD::Photon ph1,
const xAOD::Photon ph2 
) const
overridevirtual

Implements DerivationFramework::IDiLepFilters.

Definition at line 123 of file DiLepFilters.cxx.

126 {
127  if (! (passFlags&PASS_SIPH) ) return false;
128 
129  if(SameCluster(ph1, ph2)) return false;
130 
131  if(PassCuts(ph1, m_siph_pt) && PassCuts(ph2, m_siph_xpt)) return true;
132  if(PassCuts(ph2, m_siph_pt) && PassCuts(ph1, m_siph_xpt)) return true;
133 
134  return false;
135 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ SameCluster()

bool DerivationFramework::DiLepFilters::SameCluster ( const xAOD::Egamma eg1,
const xAOD::Egamma eg2 
) const
inlineprivate

Definition at line 257 of file DiLepFilters.cxx.

258 {
259  const xAOD::CaloCluster* calo1 = eg1.caloCluster();
260  const xAOD::CaloCluster* calo2 = eg2.caloCluster();
261  if(calo1 == nullptr || calo2 == nullptr)
262  {
263  ATH_MSG_WARNING("Could not retrieve CaloCluster!");
264  return false;
265  }
266 
267  return calo1->p4().DeltaR(calo2->p4()) < 0.01;
268 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_diel_pt

double DerivationFramework::DiLepFilters::m_diel_pt
private

Definition at line 102 of file DiLepFilters.h.

◆ m_dielph_pt

double DerivationFramework::DiLepFilters::m_dielph_pt
private

Definition at line 104 of file DiLepFilters.h.

◆ m_diloelph_pt

double DerivationFramework::DiLepFilters::m_diloelph_pt
private

Definition at line 105 of file DiLepFilters.h.

◆ m_diph_pt

double DerivationFramework::DiLepFilters::m_diph_pt
private

Definition at line 103 of file DiLepFilters.h.

◆ m_el_d0

double DerivationFramework::DiLepFilters::m_el_d0
private

Definition at line 94 of file DiLepFilters.h.

◆ m_el_eta

double DerivationFramework::DiLepFilters::m_el_eta
private

Definition at line 89 of file DiLepFilters.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_GeVtoMeV

constexpr double DerivationFramework::DiLepFilters::m_GeVtoMeV = 1000.
staticconstexprprivate

Definition at line 107 of file DiLepFilters.h.

◆ m_mu_beta

double DerivationFramework::DiLepFilters::m_mu_beta
private

Definition at line 92 of file DiLepFilters.h.

◆ m_mu_d0

double DerivationFramework::DiLepFilters::m_mu_d0
private

Definition at line 95 of file DiLepFilters.h.

◆ m_mu_eta

double DerivationFramework::DiLepFilters::m_mu_eta
private

Definition at line 91 of file DiLepFilters.h.

◆ m_ph_eta

double DerivationFramework::DiLepFilters::m_ph_eta
private

Definition at line 90 of file DiLepFilters.h.

◆ m_siel_pt

double DerivationFramework::DiLepFilters::m_siel_pt
private

Definition at line 97 of file DiLepFilters.h.

◆ m_simu_pt

double DerivationFramework::DiLepFilters::m_simu_pt
private

Definition at line 100 of file DiLepFilters.h.

◆ m_simuba_pt

double DerivationFramework::DiLepFilters::m_simuba_pt
private

Definition at line 101 of file DiLepFilters.h.

◆ m_siph_pt

double DerivationFramework::DiLepFilters::m_siph_pt
private

Definition at line 98 of file DiLepFilters.h.

◆ m_siph_xpt

double DerivationFramework::DiLepFilters::m_siph_xpt
private

Definition at line 99 of file DiLepFilters.h.

◆ m_tdt

ToolHandle<Trig::TrigDecisionTool> DerivationFramework::DiLepFilters::m_tdt
private

Definition at line 80 of file DiLepFilters.h.

◆ m_trig_diph

std::vector<std::string> DerivationFramework::DiLepFilters::m_trig_diph
private

Definition at line 84 of file DiLepFilters.h.

◆ m_trig_simu

std::vector<std::string> DerivationFramework::DiLepFilters::m_trig_simu
private

Definition at line 85 of file DiLepFilters.h.

◆ m_trig_simuba

std::vector<std::string> DerivationFramework::DiLepFilters::m_trig_simuba
private

Definition at line 86 of file DiLepFilters.h.

◆ m_trig_siph

std::vector<std::string> DerivationFramework::DiLepFilters::m_trig_siph
private

Definition at line 83 of file DiLepFilters.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
DerivationFramework::DiLepFilters::Passd0
bool Passd0(const xAOD::Electron &el, double d0_cut) const
Definition: DiLepFilters.cxx:226
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DerivationFramework::DiLepFilters::PASS_SIPH
@ PASS_SIPH
Definition: DiLepFilters.h:74
DerivationFramework::DiLepFilters::m_ph_eta
double m_ph_eta
Definition: DiLepFilters.h:90
ParticleTest.eg
eg
Definition: ParticleTest.py:29
DerivationFramework::DiLepFilters::m_trig_simu
std::vector< std::string > m_trig_simu
Definition: DiLepFilters.h:85
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DerivationFramework::DiLepFilters::IsLoose
bool IsLoose(const xAOD::Egamma &eg) const
Definition: DiLepFilters.cxx:250
DerivationFramework::DiLepFilters::PASS_SIMUBA
@ PASS_SIMUBA
Definition: DiLepFilters.h:77
DerivationFramework::DiLepFilters::m_simuba_pt
double m_simuba_pt
Definition: DiLepFilters.h:101
DerivationFramework::DiLepFilters::SameCluster
bool SameCluster(const xAOD::Egamma &eg1, const xAOD::Egamma &eg2) const
Definition: DiLepFilters.cxx:257
DerivationFramework::DiLepFilters::m_dielph_pt
double m_dielph_pt
Definition: DiLepFilters.h:104
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
DerivationFramework::DiLepFilters::m_siph_xpt
double m_siph_xpt
Definition: DiLepFilters.h:99
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
DerivationFramework::DiLepFilters::m_tdt
ToolHandle< Trig::TrigDecisionTool > m_tdt
Definition: DiLepFilters.h:80
DerivationFramework::DiLepFilters::PASS_DIPH
@ PASS_DIPH
Definition: DiLepFilters.h:75
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
DerivationFramework::DiLepFilters::m_mu_eta
double m_mu_eta
Definition: DiLepFilters.h:91
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::DiLepFilters::m_el_d0
double m_el_d0
Definition: DiLepFilters.h:94
beamspotman.n
n
Definition: beamspotman.py:731
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: Egamma_v1.cxx:388
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
DerivationFramework::DiLepFilters::PASS_SIMU
@ PASS_SIMU
Definition: DiLepFilters.h:76
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
DerivationFramework::DiLepFilters::m_trig_simuba
std::vector< std::string > m_trig_simuba
Definition: DiLepFilters.h:86
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
DerivationFramework::DiLepFilters::m_trig_siph
std::vector< std::string > m_trig_siph
Definition: DiLepFilters.h:83
DerivationFramework::DiLepFilters::m_siph_pt
double m_siph_pt
Definition: DiLepFilters.h:98
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
xAOD::CaloCluster_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CaloCluster_v1.cxx:465
xAOD::IParticle::pt
virtual double pt() const =0
The transverse momentum ( ) of the particle.
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
DerivationFramework::DiLepFilters::m_simu_pt
double m_simu_pt
Definition: DiLepFilters.h:100
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
DerivationFramework::DiLepFilters::m_mu_beta
double m_mu_beta
Definition: DiLepFilters.h:92
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DerivationFramework::DiLepFilters::m_siel_pt
double m_siel_pt
Definition: DiLepFilters.h:97
DerivationFramework::DiLepFilters::m_trig_diph
std::vector< std::string > m_trig_diph
Definition: DiLepFilters.h:84
DerivationFramework::DiLepFilters::PassCuts
bool PassCuts(const xAOD::Electron &el, double pt_cut, bool loose=false) const
Definition: DiLepFilters.cxx:284
DerivationFramework::DiLepFilters::IsGood
bool IsGood(const xAOD::Muon &mu) const
Definition: DiLepFilters.cxx:270
a
TList * a
Definition: liststreamerinfos.cxx:10
DerivationFramework::DiLepFilters::m_mu_d0
double m_mu_d0
Definition: DiLepFilters.h:95
DerivationFramework::DiLepFilters::m_GeVtoMeV
static constexpr double m_GeVtoMeV
Definition: DiLepFilters.h:107
h
DerivationFramework::DiLepFilters::PassEta
bool PassEta(const xAOD::IParticle &part, double eta_cut) const
Definition: DiLepFilters.cxx:221
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
xAOD::Egamma_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: Egamma_v1.cxx:65
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::EgammaHelpers::getOriginalTrackParticle
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.
Definition: ElectronxAODHelpers.cxx:11
DerivationFramework::DiLepFilters::m_diel_pt
double m_diel_pt
Definition: DiLepFilters.h:102
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DerivationFramework::DiLepFilters::m_diph_pt
double m_diph_pt
Definition: DiLepFilters.h:103
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DerivationFramework::DiLepFilters::m_diloelph_pt
double m_diloelph_pt
Definition: DiLepFilters.h:105
DerivationFramework::DiLepFilters::m_el_eta
double m_el_eta
Definition: DiLepFilters.h:89
fitman.k
k
Definition: fitman.py:528