![]() |
ATLAS Offline Software
|
#include <TruthHitSummaryAlg.h>
Classes | |
struct | summaryDecors |
Public Types | |
using | ChamberIdMap = std::map< Muon::MuonStationIndex::ChIndex, std::vector< Identifier > > |
This map contains all the hits corresponding to truth muons classified by chamber layer that recorded them. More... | |
Public Member Functions | |
virtual StatusCode | initialize () override |
virtual StatusCode | execute (const EventContext &ctx) const override |
virtual StatusCode | sysInitialize () override |
Override sysInitialize. More... | |
virtual bool | isClonable () const override |
Specify if the algorithm is clonable. More... | |
virtual unsigned int | cardinality () const override |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More... | |
virtual StatusCode | sysExecute (const EventContext &ctx) override |
Execute an algorithm. More... | |
virtual const DataObjIDColl & | extraOutputDeps () const override |
Return the list of extra output dependencies. More... | |
virtual bool | filterPassed (const EventContext &ctx) const |
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
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 | 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, V, H > &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 |
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 | |
using | WriteDecor_uint8_t = std::unique_ptr< SG::WriteDecorHandle< xAOD::TruthParticleContainer, uint8_t > > |
Struct object encapsulating all write-decorators. More... | |
using | llvec = std::vector< unsigned long long > |
using | WriteDecor_llvec = std::unique_ptr< SG::WriteDecorHandle< xAOD::TruthParticleContainer, llvec > > |
using | WriteDecorKey_t = SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > |
Key for each write-decorator. More... | |
typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
StatusCode | addHitCounts (const EventContext &ctx, const xAOD::TruthParticle &truthParticle, ChamberIdMap &ids, summaryDecors &myDecors) const |
This is the actual function that decorates truth muons with hit counts. More... | |
StatusCode | addHitIDVectors (const xAOD::TruthParticle &truthParticle, const ChamberIdMap &ids, summaryDecors &myDecors) const |
This function collapses the information given by the ChamberIdMap, which contains all hits from a truth muon classified by chamber, into 6 vectors carrying these hits categorized by detector technology (MDT, TGC, RPC, sTGC, CSC, MM). More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
specialization for handling Gaudi::Property<SG::VarHandleKey> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
specialization for handling Gaudi::Property<SG::VarHandleBase> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More... | |
Private Attributes | |
SG::ReadHandleKey< xAOD::TruthParticleContainer > | m_muonTruth {this, "muonTruth", "MuonTruthParticles"} |
Key of the container of truth muons. More... | |
SG::ReadHandleKeyArray< PRD_MultiTruthCollection > | m_PRD_TruthNames |
Keys for the containers of truth hits, grouped by detector technology. More... | |
WriteDecorKey_t | m_nprecLayersKey {this, "nprecLayersKey", m_muonTruth, "nprecLayers", ""} |
WriteDecorKey_t | m_nphiLayersKey {this, "nphiLayersKey", m_muonTruth, "nphiLayers", ""} |
WriteDecorKey_t | m_ntrigEtaLayersKey {this, "ntrigEtaLayersKey", m_muonTruth, "ntrigEtaLayers", ""} |
WriteDecorKey_t | m_innerSmallHitsKey {this, "innerSmallHitsKey", m_muonTruth, "innerSmallHits", ""} |
WriteDecorKey_t | m_innerLargeHitsKey {this, "innerLargeHitsKey", m_muonTruth, "innerLargeHits", ""} |
WriteDecorKey_t | m_middleSmallHitsKey {this, "middleSmallHitsKey", m_muonTruth, "middleSmallHits", ""} |
WriteDecorKey_t | m_middleLargeHitsKey {this, "middleLargeHitsKey", m_muonTruth, "middleLargeHits", ""} |
WriteDecorKey_t | m_outerSmallHitsKey {this, "outerSmallHitsKey", m_muonTruth, "outerSmallHits", ""} |
WriteDecorKey_t | m_outerLargeHitsKey {this, "outerLargeHitsKey", m_muonTruth, "outerLargeHits", ""} |
WriteDecorKey_t | m_extendedSmallHitsKey {this, "extendedSmallHitsKey", m_muonTruth, "extendedSmallHits", ""} |
WriteDecorKey_t | m_extendedLargeHitsKey {this, "extendedLargeHitsKey", m_muonTruth, "extendedLargeHits", ""} |
WriteDecorKey_t | m_phiLayer1HitsKey {this, "phiLayer1HitsKey", m_muonTruth, "phiLayer1Hits", ""} |
WriteDecorKey_t | m_phiLayer2HitsKey {this, "phiLayer2HitsKey", m_muonTruth, "phiLayer2Hits", ""} |
WriteDecorKey_t | m_phiLayer3HitsKey {this, "phiLayer3HitsKey", m_muonTruth, "phiLayer3Hits", ""} |
WriteDecorKey_t | m_phiLayer4HitsKey {this, "phiLayer4HitsKey", m_muonTruth, "phiLayer4Hits", ""} |
WriteDecorKey_t | m_etaLayer1HitsKey {this, "etaLayer1HitsKey", m_muonTruth, "etaLayer1Hits", ""} |
WriteDecorKey_t | m_etaLayer2HitsKey {this, "etaLayer2HitsKey", m_muonTruth, "etaLayer2Hits", ""} |
WriteDecorKey_t | m_etaLayer3HitsKey {this, "etaLayer3HitsKey", m_muonTruth, "etaLayer3Hits", ""} |
WriteDecorKey_t | m_etaLayer4HitsKey {this, "etaLayer4HitsKey", m_muonTruth, "etaLayer4Hits", ""} |
WriteDecorKey_t | m_truthMdtHitsKey {this, "truthMdtHitsKey", m_muonTruth, "truthMdtHits", ""} |
WriteDecorKey_t | m_truthTgcHitsKey {this, "truthTgcHitsKey", m_muonTruth, "truthTgcHits", ""} |
WriteDecorKey_t | m_truthRpcHitsKey {this, "truthRpcHitsKey", m_muonTruth, "truthRpcHits", ""} |
WriteDecorKey_t | m_truthCscHitsKey {this, "truthCscHitskey", m_muonTruth, "truthCscHits", ""} |
WriteDecorKey_t | m_truthStgcHitsKey {this, "truthStgcHitsKey", m_muonTruth, "truthStgcHits", ""} |
WriteDecorKey_t | m_truthMMHitsKey {this, "truthMMHitsKey", m_muonTruth, "truthMMHits", ""} |
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
Handle for muonIdHelper service. More... | |
DataObjIDColl | m_extendedExtraObjects |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More... | |
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 |
Friends | |
struct | summaryDecors |
Definition at line 29 of file TruthHitSummaryAlg.h.
using Muon::TruthHitSummaryAlg::ChamberIdMap = std::map<Muon::MuonStationIndex::ChIndex, std::vector<Identifier> > |
This map contains all the hits corresponding to truth muons classified by chamber layer that recorded them.
ChIndex is the chamber layer index (e.g. BMS, BOL,...), while Identifier is the hit ID, which represents the channel where the hit has been recorded.
Definition at line 43 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 53 of file TruthHitSummaryAlg.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
|
private |
Definition at line 54 of file TruthHitSummaryAlg.h.
|
private |
Struct object encapsulating all write-decorators.
See the keys declaration below for the full list of decorators. As WriteDecor do not have default empty constructor, we cannot decouple declaration and population of this object. Therefore we define a constuctor taking
parent | alg instance, needed for the decorator keys, and |
ctx | event context. In this way when we build a struct instance we automatically retrieve all write-decorators for that event context. |
Definition at line 52 of file TruthHitSummaryAlg.h.
|
private |
Key for each write-decorator.
List of decorators: nprecLayers counts coincidences between chamber layers (> 2-3)
considering hits from precision chambers; nphiLayers counts coincidences between phi chamber layers (> 0-2-3) considering hits with phi-measurement; ntrigEtaLayers counts coincidences between phi chamber layers (> 0-2-3) considering hits from trigger chambers with only-eta measurement; innerSmallHits, innerLargeHits, middleSmallHits, middleLargeHits, outerSmallHits, outerLargeHits, extendedSmallHits, extendedLargeHits count hits from precision chambers classified by inner/middle/outer/extended stations and small/large sectors; phiLayerjHits j=1,2,3,4 count hits with phi-measurment classified by 1/2/3/4 phi chamber layers; etaLayerjHits j=1,2,3,4 count hits from trigger chambers with only-eta measurement classified by 1/2/3/4 phi chamber layers; truthMdtHits, truthTgcHits, truthRpcHits, truthCscHits, truthStgcHits, truthMMHits are vectors carrying hit IDs categorized by detector technology (MDT, TGC, RPC, sTGC, CSC, MM).
Definition at line 151 of file TruthHitSummaryAlg.h.
|
private |
This is the actual function that decorates truth muons with hit counts.
For each truth muon, we loop over the detector technologies and over the recorded hits. If a hit originated by that muon is found, we store the hit ID into a map (=ids), which contains all hits corresponding to truth muons classified by the chamber that recorded them. In addition, we update the following counters: -* nprecHitsPerChamberLayer[] counts the hits recorded by precision chambers (MDTs, MM, sTGCs with no phi
measurement), classified by chamber layer (eg. BIS, BML, ...); -* nphiHitsPerChamberLayer[] counts the hits recorded by chambers providing phi-measurement (sSTGs+trigger+others chambers with phi measurement), classified by phi chamber layer (e.g. BM1, BM2, BO1, ...); -* ntrigEtaHitsPerChamberLayer[] counts the hits recorded by trigger chambers (RPC, TGC) with only eta measurement, classified by phi chamber layer. At the end, we use this information to perfom further classification and save results (i.e. resulting counters) to decorators: – hits from precision chambers classified by inner/middle/outer/extended stations and small/large sectors – hits with phi-measurment classified by 1/2/3/4 phi chamber layers – hits from trigger chambers with only-eta measurement classified by 1/2/3/4 phi chamber layers – coincidences between chamber layers (> 2-3) considering hits from precision chambers – coincidences between phi chamber layers (> 0-2-3) considering hits with phi-measurement – coincidences between phi chamber layers (> 0-2-3) considering hits from trigger chambers with only-eta measurement
ctx | tells in which event we are |
truthParticle | reference to truth muon |
ids | reference to the empty chamberIdMap object that is going to be populated with truth muons'hits |
myDecors | reference to the summary write-decorator object |
Definition at line 66 of file TruthHitSummaryAlg.cxx.
|
private |
This function collapses the information given by the ChamberIdMap, which contains all hits from a truth muon classified by chamber, into 6 vectors carrying these hits categorized by detector technology (MDT, TGC, RPC, sTGC, CSC, MM).
truthParticle | reference to truth muon |
ids | reference to the previously populated chamberIdMap object |
myDecors | reference to the summary write-decorator object |
Definition at line 284 of file TruthHitSummaryAlg.cxx.
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
|
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.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
|
inlineinherited |
Definition at line 259 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
|
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.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 85 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 90 of file AthCommonDataStore.h.
|
overridevirtual |
Definition at line 50 of file TruthHitSummaryAlg.cxx.
|
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
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
|
inlinevirtualinherited |
Definition at line 96 of file AthCommonReentrantAlgorithm.h.
|
overridevirtual |
Definition at line 15 of file TruthHitSummaryAlg.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.
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 27 of file AthCommonMsg.h.
|
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.
|
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.
|
inlinevirtualinherited |
Definition at line 100 of file AthCommonReentrantAlgorithm.h.
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
|
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 308 of file AthCommonDataStore.h.
|
friend |
Definition at line 55 of file TruthHitSummaryAlg.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
Definition at line 167 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 168 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 169 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 170 of file TruthHitSummaryAlg.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
|
private |
Definition at line 162 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 161 of file TruthHitSummaryAlg.h.
|
private |
Handle for muonIdHelper service.
Definition at line 180 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 156 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 155 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 158 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 157 of file TruthHitSummaryAlg.h.
|
private |
Key of the container of truth muons.
Definition at line 133 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 153 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 152 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 154 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 160 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 159 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 163 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 164 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 165 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 166 of file TruthHitSummaryAlg.h.
|
private |
Keys for the containers of truth hits, grouped by detector technology.
Each element of the container has a hit ("sensor" or "channel") ID, representing the detector channel where the hit has been recorded, and a link to the MC particle that generated the hit
Definition at line 139 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 175 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 172 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 177 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 174 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 176 of file TruthHitSummaryAlg.h.
|
private |
Definition at line 173 of file TruthHitSummaryAlg.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.