![]() |
ATLAS Offline Software
|
Work around MCTruthClassifier brain-damage. More...
#include <D3PDMCTruthClassifier.h>
Public Member Functions | |
| D3PDMCTruthClassifier (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard Gaudi tool constructor. | |
| virtual StatusCode | initialize () |
| Standard Gaudi initialize method. | |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Electron *el) |
| Run the classifier for an electron. | |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Photon *el) |
| Run the classifier for a photon. | |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Muon *mu) |
| Run the classifier for a muon. | |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Electron *, MCTruthPartClassifier::Info *info=nullptr) const override final |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Photon *, MCTruthPartClassifier::Info *info=nullptr) const override final |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Jet *, bool DR, MCTruthPartClassifier::Info *info=nullptr) const override final |
| virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleHepMCTruthClassifier (const HepMcParticleLink &theLink, MCTruthPartClassifier::Info *info=nullptr) const override final |
| virtual const xAOD::TruthParticle * | getGenPart (const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final |
| virtual const xAOD::TruthParticle * | egammaClusMatch (const xAOD::CaloCluster *, bool, MCTruthPartClassifier::Info *info) const override final |
| 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 Member Functions | |
| 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 | get_tptruth_name (const std::string &tp_name, std::string &tptruth_name) |
| Try to find a TrackParticleTruthCollection pointing at TP_NAME. | |
| void | getProperty1 (const std::string &pname, std::string &value) |
| Helper to retrieve the value of a Gaudi property. | |
| void | setProperty1 (const std::string &pname, const std::string &value) |
| Helper to set the value of a Gaudi property. | |
| double | detEta (double x, double y) const |
| double | detPhi (double x, double y) const |
| bool | TruthLoopDetectionMethod1 (const xAOD::TruthVertex *childOrigVtx, const xAOD::TruthParticle *parent) const |
| bool | TruthLoopDetectionMethod2 (const xAOD::TruthParticle *child, const xAOD::TruthParticle *parent) const |
| bool | TruthLoopDetectionMethod3 (const xAOD::TruthVertex *childOrigVtx, const xAOD::TruthParticle *parent) const |
| MCTruthPartClassifier::ParticleOrigin | defOrigOfElectron (const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const |
| MCTruthPartClassifier::ParticleOrigin | defOrigOfMuon (const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const |
| MCTruthPartClassifier::ParticleOrigin | defOrigOfTau (const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, int motherPDG, MCTruthPartClassifier::Info &info) const |
| MCTruthPartClassifier::ParticleOrigin | defOrigOfPhoton (const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const |
| MCTruthPartClassifier::ParticleOrigin | defOrigOfNeutrino (const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const |
| bool | genPartToCalo (const EventContext &ctx, const xAOD::CaloCluster *clus, const xAOD::TruthParticle *thePart, bool isFwrdEle, double &dRmatch, bool &isNarrowCone, const CaloDetDescrManager &caloDDMgr) const |
| double | fracParticleInJet (const xAOD::TruthParticle *, const xAOD::Jet *, bool DR, bool nparts) const |
| void | findJetConstituents (const xAOD::Jet *, std::set< const xAOD::TruthParticle * > &constituents, bool DR) const |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Work around MCTruthClassifier brain-damage.
This avoids having to specify the container names during configuration.
MCTruthClassifier requires specifying, at configuration time, the names of the TrackParticleContainer and TrackParticleTruthCollection objects to use for the mapping. This is painful in for electrons in the case where one may have several different track containers.
What we do to make this easier is to search through SG to find a truth collection that points at the TrackParticleContainer that contains the tracks for the electron we're looking at.
Definition at line 41 of file D3PDMCTruthClassifier.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
| D3PD::D3PDMCTruthClassifier::D3PDMCTruthClassifier | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Standard Gaudi tool constructor.
| type | The name of the tool type. |
| name | The tool name. |
| parent | The tool's Gaudi parent. |
Definition at line 39 of file D3PDMCTruthClassifier.cxx.
|
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.
|
privateinherited |
Definition at line 247 of file MCTruthClassifierGen.cxx.
|
privateinherited |
Definition at line 523 of file MCTruthClassifierGen.cxx.
|
privateinherited |
Definition at line 1177 of file MCTruthClassifierGen.cxx.
|
privateinherited |
Definition at line 914 of file MCTruthClassifierGen.cxx.
|
privateinherited |
Definition at line 741 of file MCTruthClassifierGen.cxx.
|
inlineprivateinherited |
|
inlineprivateinherited |
Definition at line 160 of file MCTruthClassifier.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
finaloverridevirtualinherited |
Implements IMCTruthClassifier.
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
|
privateinherited |
Definition at line 278 of file MCRecoToTruth.cxx.
|
privateinherited |
Definition at line 310 of file MCRecoToTruth.cxx.
|
privateinherited |
Definition at line 237 of file MCTruthClassifierAthena.cxx.
|
private |
Try to find a TrackParticleTruthCollection pointing at TP_NAME.
| tp_name | The name of a TrackParticleContainer. |
| tptruth_name[out] | The name of a TrackParticleTruthCollection pointing at it. |
Definition at line 174 of file D3PDMCTruthClassifier.cxx.
|
finaloverridevirtualinherited |
Implements IMCTruthClassifier.
Definition at line 181 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::TEvent 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.
|
inherited |
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::TEvent 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.
|
inherited |
Get one of the tool's properties.
|
private |
Helper to retrieve the value of a Gaudi property.
| pname | The name of the property. param value[out] The value of the property. |
Definition at line 214 of file D3PDMCTruthClassifier.cxx.
|
virtual |
Standard Gaudi initialize method.
Reimplemented from MCTruthClassifier.
Definition at line 51 of file D3PDMCTruthClassifier.cxx.
|
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.
|
finaloverridevirtualinherited |
Implements IMCTruthClassifier.
Definition at line 25 of file MCTruthClassifierGen.cxx.
|
finaloverridevirtual |
Reimplemented from MCTruthClassifier.
Definition at line 143 of file MCRecoToTruth.cxx.
|
virtual |
Run the classifier for an electron.
| el | The input electron. |
Definition at line 65 of file D3PDMCTruthClassifier.cxx.
|
finaloverridevirtual |
Reimplemented from MCTruthClassifier.
Definition at line 155 of file MCRecoToTruth.cxx.
|
virtual |
Run the classifier for a muon.
This function is here to avoid a problem on the mc12 validation samples.
| el | The input photon. |
Definition at line 155 of file D3PDMCTruthClassifier.cxx.
|
finaloverridevirtual |
Reimplemented from MCTruthClassifier.
Definition at line 146 of file MCRecoToTruth.cxx.
|
virtual |
Run the classifier for a photon.
| el | The input photon. |
Definition at line 107 of file D3PDMCTruthClassifier.cxx.
|
finaloverridevirtual |
Reimplemented from MCTruthClassifier.
Definition at line 140 of file MCRecoToTruth.cxx.
|
finaloverridevirtual |
Reimplemented from MCTruthClassifier.
Definition at line 122 of file MCTruthClassifierGen.cxx.
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in AsgHelloTool, HI::HIPileupTool, JetBottomUpSoftDrop, JetConstituentsRetriever, JetDumper, JetFinder, JetFromPseudojet, JetModifiedMassDrop, JetPileupLabelingTool, JetPruner, JetPseudojetRetriever, JetReclusterer, JetReclusteringTool, JetRecTool, JetRecursiveSoftDrop, JetSoftDrop, JetSplitter, JetSubStructureMomentToolsBase, JetToolRunner, JetTrimmer, JetTruthLabelingTool, KtDeltaRTool, and LundVariablesTool.
Definition at line 131 of file AsgTool.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
private |
Helper to set the value of a Gaudi property.
| pname | The name of the property. param value The new value of the property. |
Definition at line 228 of file D3PDMCTruthClassifier.cxx.
|
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 >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
privateinherited |
Definition at line 190 of file MCTruthClassifierGen.cxx.
|
privateinherited |
Definition at line 211 of file MCTruthClassifierGen.cxx.
|
privateinherited |
Definition at line 233 of file MCTruthClassifierGen.cxx.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 226 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 227 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 254 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 253 of file MCTruthClassifier.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 232 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 233 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 231 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 240 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 245 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 256 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 255 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 234 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 235 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 238 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 237 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 239 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 243 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 244 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 241 of file MCTruthClassifier.h.
|
private |
The StoreGate service.
Definition at line 119 of file D3PDMCTruthClassifier.h.
|
privateinherited |
Definition at line 229 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 250 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 223 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 236 of file MCTruthClassifier.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.