![]() |
ATLAS Offline Software
|
#include <TruthSegmentMaker.h>
Classes | |
| struct | WriteDecorHolder |
| Helper struct to ship the write DecorHandles and the reference to the output segment container through the class methods. More... | |
Public Member Functions | |
| ~TruthSegmentMaker ()=default | |
| StatusCode | initialize () override final |
| StatusCode | execute (const EventContext &ctx) const override |
| virtual StatusCode | sysInitialize () override |
| Override sysInitialize. | |
| virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. | |
| virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. | |
| virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. | |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. | |
| 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. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| 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 |
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 | |
| using | HitPosTuple_t = std::tuple<const xAOD::MuonSimHit*, Amg::Vector3D, Amg::Vector3D> |
| Tuple consisting out of pointer to the sim hit and the position & direction expressed in the chamber's frame. | |
| using | SimHitVec_t = std::vector<HitPosTuple_t> |
| using | EleLink_t = ElementLink<xAOD::MuonSimHitContainer> |
| using | HitLinkVec_t = std::vector<EleLink_t> |
| using | LinkDecor_t = SG::WriteDecorHandle<xAOD::MuonSegmentContainer, HitLinkVec_t> |
| using | FloatDecor_t = SG::WriteDecorHandle<xAOD::MuonSegmentContainer, float> |
| using | SegPars_t = xAOD::MeasVector<Acts::toUnderlying(SegmentFit::ParamDefs::nPars)> |
| using | SegParDecor_t = SG::WriteDecorHandle<xAOD::MuonSegmentContainer, SegPars_t> |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
| Amg::Transform3D | toChamber (const ActsTrk::GeometryContext &gctx, const Identifier &chanId) const |
| Returns the transform from the local simHit frame -> chamber frame. | |
| xAOD::MuonSegment * | constructSegmentFromHits (const EventContext &ctx, const Amg::Transform3D &locToGlob, const SimHitVec_t &hits, WriteDecorHolder &writeShip) const |
| Takes a list of related sim hits and transforms them into a truth segment. | |
| void | buildSegmentsFromBkg (const EventContext &ctx, const Amg::Transform3D &locToGlob, const SimHitVec_t &simHits, WriteDecorHolder &writeShip) const |
| Attempts to assemble truth segments from a list of loose sim hits, i.e., the hits are stemming from a muon but due to the pile-up truth record, no HepMCParticles are recorded. | |
| float | muonPt (const xAOD::MuonSimHit &hit, const Amg::Vector3D &globDir) const |
| Returns the muon pt from the sim hit. | |
| float | hitUncertainty (const EventContext &ctx, const xAOD::MuonSimHit &hit) const |
| Evaluates the hit uncertainty. | |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Private Attributes | |
| ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
| IdHelperSvc to decode the Identifiers. | |
| SG::ReadHandleKeyArray< xAOD::MuonSimHitContainer > | m_readKeys {this, "SimHitKeys", {}} |
| List of sim hit containers from which the truth segments shall be retrieved. | |
| SG::ReadHandleKey< ActsTrk::GeometryContext > | m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"} |
| Key to the geometry context. | |
| SG::WriteHandleKey< xAOD::MuonSegmentContainer > | m_segmentKey {this, "WriteKey", "MuonTruthSegments"} |
| Key under which the segment Container will be recorded in StoreGate. | |
| SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > | m_eleLinkKey {this, "SimHitLink", m_segmentKey, "simHitLinks"} |
| Decoration key of the associated sim hit links. | |
| SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > | m_ptKey {this, "PtKey", m_segmentKey, "pt"} |
| Decoration key of the associated particle pt. | |
| SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > | m_locParKey {this, "LocParKey", m_segmentKey,"localSegPars"} |
| Decoration key of the local parameters. | |
| SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > | m_qKey {this, "qKey", m_segmentKey, "charge"} |
| Decoration key of the muon charge. | |
| Gaudi::Property< bool > | m_useOnlyMuonHits {this, "useOnlyMuonHits", true} |
| Build segments from muon hits only. | |
| Gaudi::Property< bool > | m_includePileUpHits {this, "includePileUpHits", true} |
| Construct segments from pile-up hits without GenParticleLink. | |
| Gaudi::Property< float > | m_pileUpHitMinE {this, "energyThresholdPileUp", 1.*Gaudi::Units::GeV} |
| Minimum energy threshold for pile up hits to be converted. | |
| Gaudi::Property< float > | m_pileUpHitELoss {this, "pileUpHitELoss", 5.*Gaudi::Units::MeV} |
| Maximum energy loss between two pile-up hits. | |
| Gaudi::Property< float > | m_pileUpHitAngleCone {this, "pileUpHitAngleCone", 1.*Gaudi::Units::deg} |
| Maximum scattering angle between two pile-up hits. | |
| Gaudi::Property< float > | m_pileUpHitDistance {this, "pileUpHitDistance", 2.*Gaudi::Units::m} |
| Maximum separation between two pile-up hits. | |
| Gaudi::Property< float > | m_idCylinderR {this, "IdCylinderR", 1.1*Gaudi::Units::m} |
| ID / ITk cylinder radius. | |
| Gaudi::Property< float > | m_idCylinderHalfZ {this, "IdCylinderHalfZ", 3.2*Gaudi::Units::m} |
| ID / Itk cylinder half length. | |
| const MuonGMR4::MuonDetectorManager * | m_detMgr {nullptr} |
| Pointer to the muon readout geometry. | |
| SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > | m_mdtCalibKey |
| Data dependency on the Mdt calibration container to calculate the uncertainty. | |
| SG::ReadCondHandleKey< NswErrorCalibData > | m_nswUncertKey |
| Data dependency on the Nsw calibration container to estimate the uncertaintys. | |
| DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. | |
| 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 32 of file TruthSegmentMaker.h.
|
private |
Definition at line 55 of file TruthSegmentMaker.h.
|
private |
Definition at line 58 of file TruthSegmentMaker.h.
|
private |
Definition at line 56 of file TruthSegmentMaker.h.
|
private |
Tuple consisting out of pointer to the sim hit and the position & direction expressed in the chamber's frame.
Definition at line 50 of file TruthSegmentMaker.h.
|
private |
Definition at line 57 of file TruthSegmentMaker.h.
|
private |
Definition at line 61 of file TruthSegmentMaker.h.
|
private |
Definition at line 60 of file TruthSegmentMaker.h.
|
private |
Definition at line 51 of file TruthSegmentMaker.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
|
default |
|
private |
Attempts to assemble truth segments from a list of loose sim hits, i.e., the hits are stemming from a muon but due to the pile-up truth record, no HepMCParticles are recorded.
Hits are paired based on kinetic energy, and line compatibility
| ctx | EventContext to access the uncertainty conditions data during segment building |
| locToGlob | Transform from the sector -> global frame |
| simHits | Collection of all sim hits in the sector without truth link |
| writeShip | Helper struct carrying the output segment container & the associated decorators |
Closest beam spot approach
First compare the energies
Calculate the approach to the cylinder
Definition at line 111 of file TruthSegmentMaker.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.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
|
private |
Takes a list of related sim hits and transforms them into a truth segment.
If there're less than 3 precision hits, then no segment is created.
| ctx | EventContext to fetch the hit uncertainties from store gate |
| locToGlob | Coordinate transform from sector frame -> global frame |
| hits | List of hits to be combined onto a single segment |
| writeShip | Helper struct carrying the output segment container & the associated decorators |
Find the hit which is closest to the refernce plane to express the segment at the centre plane
Express the simulated hit in the center of the chamber
Associate the hits to the segment and calculate the expected hits
Definition at line 176 of file TruthSegmentMaker.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.
|
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.
|
override |
Definition at line 281 of file TruthSegmentMaker.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.
|
private |
Evaluates the hit uncertainty.
For the precision detectors, the uncertainties are fetched from the COOL DB. For the remaining detectors, the uncertainties are based on the strip pitch
| ctx | EventContext to fetch the constants from store gate |
| hit | Reference to the sim hit |
Definition at line 52 of file TruthSegmentMaker.cxx.
|
finaloverride |
Definition at line 31 of file TruthSegmentMaker.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.
Reimplemented in InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ITkPixelCablingAlg, ITkStripCablingAlg, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, and Simulation::BeamEffectsAlg.
Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
private |
Returns the muon pt from the sim hit.
Definition at line 93 of file TruthSegmentMaker.cxx.
|
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 HypoBase, and InputMakerBase.
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.
|
private |
Returns the transform from the local simHit frame -> chamber frame.
| gctx | Geometry context to align the chambers within ATLAS |
| chanId | Identifier of the channel for which the transform shall be fetched |
Definition at line 101 of file TruthSegmentMaker.cxx.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
Pointer to the muon readout geometry.
Definition at line 155 of file TruthSegmentMaker.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
|
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 |
Key to the geometry context.
Needed to align the hits inside ATLAS
Definition at line 127 of file TruthSegmentMaker.h.
|
private |
ID / Itk cylinder half length.
Definition at line 153 of file TruthSegmentMaker.h.
|
private |
Definition at line 151 of file TruthSegmentMaker.h.
|
private |
IdHelperSvc to decode the Identifiers.
Definition at line 123 of file TruthSegmentMaker.h.
|
private |
Construct segments from pile-up hits without GenParticleLink.
Definition at line 141 of file TruthSegmentMaker.h.
|
private |
|
private |
Data dependency on the Mdt calibration container to calculate the uncertainty.
Definition at line 157 of file TruthSegmentMaker.h.
|
private |
Data dependency on the Nsw calibration container to estimate the uncertaintys.
Definition at line 160 of file TruthSegmentMaker.h.
|
private |
Maximum scattering angle between two pile-up hits.
Definition at line 147 of file TruthSegmentMaker.h.
|
private |
Maximum separation between two pile-up hits.
Definition at line 149 of file TruthSegmentMaker.h.
|
private |
Maximum energy loss between two pile-up hits.
Definition at line 145 of file TruthSegmentMaker.h.
|
private |
Minimum energy threshold for pile up hits to be converted.
Definition at line 143 of file TruthSegmentMaker.h.
|
private |
|
private |
|
private |
List of sim hit containers from which the truth segments shall be retrieved.
Definition at line 125 of file TruthSegmentMaker.h.
|
private |
Key under which the segment Container will be recorded in StoreGate.
Definition at line 129 of file TruthSegmentMaker.h.
|
private |
Build segments from muon hits only.
Definition at line 139 of file TruthSegmentMaker.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.