![]() |
ATLAS Offline Software
|
AlgTool that converts, on the fly, on demand, each GenParticle to a TruthParticle and builds the TruthParticleContainer. More...
#include <TruthParticleCnvTool.h>
Public Member Functions | |
| TruthParticleCnvTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| Constructor with parameters: | |
| virtual | ~TruthParticleCnvTool () |
| Destructor: | |
| virtual StatusCode | initialize () override |
| Athena Algorithm's Hooks. | |
| virtual StatusCode | execute () const override |
| virtual StatusCode | execute (const EventContext &ctx) const override |
| StatusCode | convert (const McEventCollection *mcEvts, const unsigned int genEvtIndex, TruthParticleContainer *mcParts, const ITruthParticleVisitor *visitor) const override |
Converts a McEventCollection into an TruthParticleContainer (ie: converts it into an AOD compliant collection). | |
| void | setDataType (const int type) |
| Inline methods: | |
| void | setVxCandidateName (const std::string &name) |
Protected Types | |
| typedef ToolHandle< ITruthIsolationTool > | IsolTool_t |
Protected Attributes | |
| BooleanProperty | m_doEtIsolation |
Switch to compute or not the Et-isolations for TruthParticle (and their underlying HepMC::GenParticle). | |
| IsolTool_t | m_isolationTool |
| Pointer to the ITruthIsolationTool to be able to retrieve the previously computed transverse energy isolations. | |
Private Attributes | |
| ParticleDataType::DataType | m_dataType |
| Type of data we are dealing with (Full/Fast/Truth/...) | |
| int | m_dataType_int |
| std::string | m_vxCandidatesName |
| SG::ReadHandleKey< McEventCollection > | m_mcEventsReadHandleKey {this,"McEvents","GEN_AOD","ReadHandleKey for the input McEventCollection, from which the TruthParticles will be made from"} |
| ReadHandleKey for the McEventCollection the TruthParticles will be made from. | |
| SG::WriteHandleKey< TruthParticleContainer > | m_mcPartsOutputWriteHandleKey {this,"TruthParticlesOutput","SpclMC","WriteHandleKey for the output truth particles (built from the McEventCollection)"} |
| Output TruthParticle WriteHandleKey (built from the McEventCollection) | |
| const HepPDT::ParticleDataTable * | m_pdt |
| Particle Property service. | |
| PileUpClassification::PileuType_t | m_selectSignalType |
| Type of truth particle we want to create. | |
| int | m_selectSignalTypeProp |
| Type of truth particle we want to create (property to be set by jobO) | |
AlgTool that converts, on the fly, on demand, each GenParticle to a TruthParticle and builds the TruthParticleContainer.
So the GEN_AOD and TruthParticleContainer are identical in contents, only the interfaces are different: the TruthParticle class has the same interface as other AOD particles. Hence the analysis tools can operate on all the AOD particles (ie: including Mc Truth). When the AOD is created, the TruthParticleContainer is empty. When the user requests the TruthParticleContainer in his/her analysis code, a custom converter is triggered where by the GEN_AOD is convertered into the TruthParticleContainer using the TruthParticleCnvTool.
In pile-up events, the many GenEvent are grouped into 5 TruthParticleContainer according to the classification of : https://twiki.cern.ch/twiki/bin/viewauth/Atlas/PileupDigitization#Arrangement_of_Truth_Information
Definition at line 59 of file TruthParticleCnvTool.h.
|
protected |
Definition at line 149 of file TruthParticleCnvTool.h.
| TruthParticleCnvTool::TruthParticleCnvTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Constructor with parameters:
Public methods:
Constructors
Definition at line 48 of file TruthParticleCnvTool.cxx.
|
virtual |
|
override |
Converts a McEventCollection into an TruthParticleContainer (ie: converts it into an AOD compliant collection).
Const methods:
@in mcEvts the McEventCollection holding the HepMC::GenEvent we want to convert into a TruthParticleContainer @in genEvtIndex the index to the HepMC::GenEvent to be converted @out mcParts a valid pointer to a TruthParticleContainer which will be filled with adaptors to HepMC::GenParticles.
Get GenEvent from McEventCollection
Create a map to enhance access between GenParticles and TruthParticles
Definition at line 224 of file TruthParticleCnvTool.cxx.
|
overridevirtual |
Definition at line 146 of file TruthParticleCnvTool.cxx.
|
overridevirtual |
Definition at line 152 of file TruthParticleCnvTool.cxx.
|
overridevirtual |
Athena Algorithm's Hooks.
Definition at line 100 of file TruthParticleCnvTool.cxx.
|
inline |
|
inline |
Definition at line 166 of file TruthParticleCnvTool.h.
|
private |
Type of data we are dealing with (Full/Fast/Truth/...)
Definition at line 110 of file TruthParticleCnvTool.h.
|
private |
Definition at line 111 of file TruthParticleCnvTool.h.
|
protected |
Switch to compute or not the Et-isolations for TruthParticle (and their underlying HepMC::GenParticle).
Default is to not compute these Et-isolations (and save CPU)
Definition at line 147 of file TruthParticleCnvTool.h.
|
protected |
Pointer to the ITruthIsolationTool to be able to retrieve the previously computed transverse energy isolations.
Definition at line 154 of file TruthParticleCnvTool.h.
|
private |
ReadHandleKey for the McEventCollection the TruthParticles will be made from.
Definition at line 117 of file TruthParticleCnvTool.h.
|
private |
Output TruthParticle WriteHandleKey (built from the McEventCollection)
Definition at line 121 of file TruthParticleCnvTool.h.
|
private |
Particle Property service.
Definition at line 125 of file TruthParticleCnvTool.h.
|
private |
Type of truth particle we want to create.
Definition at line 129 of file TruthParticleCnvTool.h.
|
private |
Type of truth particle we want to create (property to be set by jobO)
Definition at line 133 of file TruthParticleCnvTool.h.
|
private |
Definition at line 113 of file TruthParticleCnvTool.h.