![]() |
ATLAS Offline Software
|
#include <MCTruthClassifier.h>
Public Member Functions | |
| MCTruthClassifier (const std::string &type) | |
| virtual | ~MCTruthClassifier ()=default |
| virtual StatusCode | initialize () override |
| Dummy implementation of the initialisation function. | |
| const xAOD::TruthParticle * | getGenPart (const xAOD::TrackParticle *) const |
| const xAOD::TruthParticle * | egammaClusMatch (const EventContext &ctx, const xAOD::CaloCluster *, bool isFwrdEle) const |
| template<typename T> | |
| std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const T *p, std::optional< std::reference_wrapper< const EventContext > > ctx=std::nullopt) const |
| template<typename T> | |
| Result | particleTruthClassifier_full (const T *p, std::optional< std::reference_wrapper< const EventContext > > ctx=std::nullopt) const |
| Returns more info than the particleTruthClassifier. | |
| virtual void | print () const |
| Print the state of the tool. | |
| ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. | |
| virtual StatusCode | sysStart () override |
| Handle START transition. | |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. | |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. | |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
Additional helper functions, not directly mimicking Athena | |
| template<class T> | |
| const T * | getProperty (const std::string &name) const |
| Get one of the tool's properties. | |
| const std::string & | msg_level_name () const __attribute__((deprecated)) |
| A deprecated function for getting the message level's name. | |
| const std::string & | getName (const void *ptr) const |
| Get the name of an object that is / should be in the event store. | |
| SG::sgkey_t | getKey (const void *ptr) const |
| Get the (hashed) key of an object that is in the event store. | |
Protected Types | |
| using | Result |
Protected Member Functions | |
| virtual Result | particleTruthClassifier (const EventContext &ctx, const xAOD::TruthParticle *thePart) const override final |
| virtual Result | particleTruthClassifier (const EventContext &ctx, const xAOD::TrackParticle *) const override final |
| virtual Result | particleTruthClassifier (const EventContext &ctx, const xAOD::Electron *) const override final |
| virtual Result | particleTruthClassifier (const EventContext &ctx, const xAOD::Photon *) const override final |
| virtual Result | particleTruthClassifier (const EventContext &ctx, const xAOD::Muon *) const override final |
| virtual Result | particleTruthClassifier (const EventContext &ctx, const xAOD::CaloCluster *) const override final |
| void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution | |
| 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. | |
Private Types | |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
| bool | genPartToCalo (const EventContext &ctx, const xAOD::CaloCluster *clus, const xAOD::TruthParticle *thePart, bool isFwrdEle, double &dRmatch, bool &isNarrowCone, const CaloDetDescrManager &caloDDMgr) const |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Private Attributes | |
| SG::ReadHandleKey< xAOD::TruthParticleContainer > | m_truthParticleContainerKey {this,"xAODTruthParticleContainerName","TruthParticles","ReadHandleKey for xAOD::TruthParticleContainer"} |
| Key of the xAOD truth particle container that is searched when classifying (ancestors, decay products, ...). | |
| ToolHandle< Trk::IParticleCaloExtensionTool > | m_caloExtensionTool {this,"ParticleCaloExtensionTool",""} |
| Extrapolates truth particles to the calorimeter (egammaClusMatch); optional, disabled if empty. | |
| SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this,"CaloDetDescrManager",""} |
| Calorimeter detector description, needed together with the extension tool; optional, may be empty. | |
| ToolHandle< xAOD::ITruthParticlesInConeTool > | m_truthInConeTool {this,"TruthInConeTool","xAOD::TruthParticlesInConeTool/TruthParticlesInConeTool"} |
| Finds the truth particles in a cone around a cluster (egammaClusMatch); optional, disabled if empty. | |
| bool | m_FwdElectronUseG4Sel |
| skip Geant4 particles also for forward electrons | |
| float | m_FwdElectronTruthExtrEtaCut |
| forward electrons: truth particles with |eta| below this are not extrapolated | |
| float | m_FwdElectronTruthExtrEtaWindowCut |
| forward electrons: max |delta eta| to the cluster for a truth particle to be extrapolated | |
| float | m_partExtrConeEta |
| eta half-width of the cone in which truth particles are extrapolated | |
| float | m_partExtrConePhi |
| phi half-width of the cone in which truth particles are extrapolated | |
| float | m_phtClasConePhi |
| phi half-width of the narrow cone around the cluster (not forward electrons) | |
| float | m_phtClasConeEta |
| eta half-width of the narrow cone around the cluster (not forward electrons) | |
| float | m_phtdRtoTrCut |
| max dR cluster - extrapolated truth particle (not forward electrons) | |
| float | m_fwrdEledRtoTrCut |
| max dR cluster - extrapolated truth particle (forward electrons) | |
| bool | m_ROICone |
| only extrapolate truth particles inside the partExtrCone ellipse | |
| float | m_pTChargePartCut |
| minimum pT of charged truth particles considered | |
| float | m_pTNeutralPartCut |
| minimum pT of neutral truth particles considered | |
| bool | m_inclG4part |
| also try Geant4 particles if no generator particle matched | |
| SG::ReadHandleKey< xAODTruthParticleLinkVector > | m_truthLinkVecReadHandleKey {this,"xAODTruthLinkVector","xAODTruthLinks", "ReadHandleKey for xAODTruthParticleLinkVector"} |
| float | m_deltaRMatchCut |
| max dR track - truth particle if the track has more than NumOfSiHitsCut Si hits | |
| float | m_deltaPhiMatchCut |
| max delta phi track - truth particle if the track has at most NumOfSiHitsCut Si hits | |
| int | m_NumOfSiHitsCut |
| Si (pixel + SCT) hit count selecting between deltaRMatchCut and deltaPhiMatchCut. | |
| StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default). | |
| StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default). | |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| bool | m_varHandleArraysDeclared |
Definition at line 56 of file MCTruthClassifier.h.
|
protectedinherited |
Definition at line 40 of file IMCTruthClassifier.h.
|
privateinherited |
Definition at line 376 of file AthCommonDataStore.h.
|
inline |
Definition at line 61 of file MCTruthClassifier.h.
|
virtualdefault |
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
| const xAOD::TruthParticle * MCTruthClassifier::egammaClusMatch | ( | const EventContext & | ctx, |
| const xAOD::CaloCluster * | clus, | ||
| bool | isFwrdEle ) const |
Definition at line 44 of file MCTruthClassifierAthena.cxx.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
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
|
private |
Definition at line 215 of file MCTruthClassifierAthena.cxx.
| const xAOD::TruthParticle * MCTruthClassifier::getGenPart | ( | const xAOD::TrackParticle * | trk | ) | const |
Definition at line 98 of file MCRecoToTruth.cxx.
|
inherited |
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
| ptr | The bare pointer to the object that the event store should know about |
Definition at line 119 of file AsgTool.cxx.
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
| ptr | The bare pointer to the object that the event store should know about |
Definition at line 106 of file AsgTool.cxx.
Get one of the tool's properties.
|
inlineoverridevirtual |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented from asg::AsgTool.
Reimplemented in D3PD::D3PDMCTruthClassifier.
Definition at line 126 of file MCTruthClassifier.h.
|
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.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
Definition at line 101 of file AsgTool.cxx.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
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.
|
finaloverrideprotectedvirtual |
Implements IMCTruthClassifier.
Reimplemented in D3PD::D3PDMCTruthClassifier.
|
finaloverrideprotectedvirtual |
Implements IMCTruthClassifier.
Reimplemented in D3PD::D3PDMCTruthClassifier.
Definition at line 21 of file MCRecoToTruth.cxx.
|
finaloverrideprotectedvirtual |
Implements IMCTruthClassifier.
Reimplemented in D3PD::D3PDMCTruthClassifier.
|
finaloverrideprotectedvirtual |
Implements IMCTruthClassifier.
Reimplemented in D3PD::D3PDMCTruthClassifier.
Definition at line 48 of file MCRecoToTruth.cxx.
|
finaloverrideprotectedvirtual |
Implements IMCTruthClassifier.
Reimplemented in D3PD::D3PDMCTruthClassifier.
Definition at line 11 of file MCRecoToTruth.cxx.
|
inlinefinaloverrideprotectedvirtual |
Implements IMCTruthClassifier.
Reimplemented in D3PD::D3PDMCTruthClassifier.
Definition at line 155 of file MCTruthClassifier.h.
|
inline |
Definition at line 69 of file IMCTruthClassifier.h.
|
inlineinherited |
Returns more info than the particleTruthClassifier.
Definition at line 64 of file IMCTruthClassifier.h.
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in AsgHelloTool, HI::HIPileupTool, JetFromPseudojet, JetPileupLabelingTool, JetPseudojetRetriever, JetSubStructureMomentToolsBase, JetTruthLabelingTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
|
inlineprotectedinherited |
Definition at line 368 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 352 of file AthCommonDataStore.h.
|
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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 298 of file AthCommonDataStore.h.
|
private |
Extrapolates truth particles to the calorimeter (egammaClusMatch); optional, disabled if empty.
Definition at line 215 of file MCTruthClassifier.h.
|
private |
Calorimeter detector description, needed together with the extension tool; optional, may be empty.
Definition at line 217 of file MCTruthClassifier.h.
|
private |
max delta phi track - truth particle if the track has at most NumOfSiHitsCut Si hits
Definition at line 247 of file MCTruthClassifier.h.
|
private |
max dR track - truth particle if the track has more than NumOfSiHitsCut Si hits
Definition at line 246 of file MCTruthClassifier.h.
|
privateinherited |
Pointer to StoreGate (detector store by default).
Definition at line 381 of file AthCommonDataStore.h.
|
privateinherited |
Pointer to StoreGate (event store by default).
Definition at line 378 of file AthCommonDataStore.h.
|
private |
forward electrons: truth particles with |eta| below this are not extrapolated
Definition at line 225 of file MCTruthClassifier.h.
|
private |
forward electrons: max |delta eta| to the cluster for a truth particle to be extrapolated
Definition at line 226 of file MCTruthClassifier.h.
|
private |
skip Geant4 particles also for forward electrons
Definition at line 224 of file MCTruthClassifier.h.
|
private |
max dR cluster - extrapolated truth particle (forward electrons)
Definition at line 232 of file MCTruthClassifier.h.
|
private |
also try Geant4 particles if no generator particle matched
Definition at line 237 of file MCTruthClassifier.h.
|
private |
Si (pixel + SCT) hit count selecting between deltaRMatchCut and deltaPhiMatchCut.
Definition at line 248 of file MCTruthClassifier.h.
|
private |
eta half-width of the cone in which truth particles are extrapolated
Definition at line 227 of file MCTruthClassifier.h.
|
private |
phi half-width of the cone in which truth particles are extrapolated
Definition at line 228 of file MCTruthClassifier.h.
|
private |
eta half-width of the narrow cone around the cluster (not forward electrons)
Definition at line 230 of file MCTruthClassifier.h.
|
private |
phi half-width of the narrow cone around the cluster (not forward electrons)
Definition at line 229 of file MCTruthClassifier.h.
|
private |
max dR cluster - extrapolated truth particle (not forward electrons)
Definition at line 231 of file MCTruthClassifier.h.
|
private |
minimum pT of charged truth particles considered
Definition at line 235 of file MCTruthClassifier.h.
|
private |
minimum pT of neutral truth particles considered
Definition at line 236 of file MCTruthClassifier.h.
|
private |
only extrapolate truth particles inside the partExtrCone ellipse
Definition at line 233 of file MCTruthClassifier.h.
|
private |
Finds the truth particles in a cone around a cluster (egammaClusMatch); optional, disabled if empty.
Definition at line 220 of file MCTruthClassifier.h.
|
private |
Definition at line 242 of file MCTruthClassifier.h.
|
private |
Key of the xAOD truth particle container that is searched when classifying (ancestors, decay products, ...).
Definition at line 211 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 387 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 386 of file AthCommonDataStore.h.