ATLAS Offline Software
DetailedMuonPatternTruthBuilder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DETAILEDMUONPATTERNTRUTHBUILDER_H
6 #define DETAILEDMUONPATTERNTRUTHBUILDER_H
7 
8 #include <string>
9 #include <vector>
10 
11 #include "AthLinks/ElementLink.h"
14 #include "GaudiKernel/ServiceHandle.h"
15 #include "GaudiKernel/ToolHandle.h"
35 #include "TrkTrack/Track.h"
42 
43 namespace Trk {
44 
46  public:
47  DetailedMuonPatternTruthBuilder(const std::string& type, const std::string& name, const IInterface* parent);
48 
49  virtual StatusCode initialize();
50 
54  const std::vector<const PRD_MultiTruthCollection*>& prdTruth);
55 
56  virtual void buildDetailedTrackTruth(std::vector<DetailedTrackTruth>* output, const Muon::MuonPatternCombination& pattern,
57  const std::vector<const PRD_MultiTruthCollection*>& prdTruth);
58 
59  void buildDetailedTrackTruthFromSegments(std::vector<DetailedSegmentTruth>* output, const Muon::MuonSegment& segment,
60  const std::vector<const PRD_MultiTruthCollection*>& prdTruth);
61 
62  private:
64 
65  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
66 
67  ToolHandle<Trk::ITruthTrajectoryBuilder> m_truthTrackBuilder{this, "TruthTrajectoryTool", "Trk::ElasticTruthTrajectoryBuilder"};
68  ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> m_mdtCreator{this, "MdtDriftCircleCreator",
69  "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"};
70  ToolHandle<Muon::IMuonClusterOnTrackCreator> m_muonClusterCreator{this, "MuonClusterCreator",
71  "Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator"};
72 
74 
76  const Identifier& id);
77  const MuonSimDataCollection* retrieveTruthCollection(const std::string& colName);
78 
80  const std::vector<const PRD_MultiTruthCollection*>& orderedPRD_Truth, const PRD_InverseTruth& inverseTruth);
81 
82  void addDetailedTrackTruth(std::vector<DetailedTrackTruth>* output, const Muon::MuonPatternCombination& pattern,
83  const std::vector<const PRD_MultiTruthCollection*>& orderedPRD_Truth,
84  const PRD_InverseTruth& inverseTruth);
85 
87  std::set<Muon::MuonStationIndex::ChIndex> chIndices);
88 
89  Amg::Vector3D getPRDTruthPosition(const Muon::MuonSegment& segment, std::list<HepMC::ConstGenParticlePtr> genPartList, int truthPos,
90  std::set<Muon::MuonStationIndex::ChIndex> chIndices);
91 
92  void addDetailedTrackTruthFromSegment(std::vector<DetailedSegmentTruth>* output, const Muon::MuonSegment& segment,
93  const std::vector<const PRD_MultiTruthCollection*>& orderedPRD_Truth,
94  const PRD_InverseTruth& inverseTruth);
95  };
96 
97 } // end namespace Trk
98 
99 #endif
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
SubDetHitStatistics::SubDetType
SubDetType
Definition: SubDetHitStatistics.h:74
MuonSimData::Deposit
std::pair< HepMcParticleLink, MuonMCData > Deposit
Definition: MuonSimData.h:66
Trk::DetailedMuonPatternTruthBuilder::addTrack
void addTrack(DetailedMuonPatternTruthCollection *output, const ElementLink< DataVector< Muon::MuonPatternCombination > > &track, const std::vector< const PRD_MultiTruthCollection * > &orderedPRD_Truth, const PRD_InverseTruth &inverseTruth)
Definition: DetailedMuonPatternTruthBuilder.cxx:270
TrackParameters.h
MeasurementBase.h
ITruthTrajectoryBuilder.h
CompetingRIOsOnTrack.h
Trk::DetailedMuonPatternTruthBuilder::initialize
virtual StatusCode initialize()
Definition: DetailedMuonPatternTruthBuilder.cxx:119
DetailedSegmentTruth.h
CscSimDataCollection.h
SubDetHitStatistics
Definition: SubDetHitStatistics.h:34
Trk::DetailedMuonPatternTruthBuilder::m_muonClusterCreator
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_muonClusterCreator
Definition: DetailedMuonPatternTruthBuilder.h:70
DetailedMuonPatternTruthCollection
Definition: DetailedMuonPatternTruthCollection.h:21
Trk::DetailedMuonPatternTruthBuilder::m_truthTrackBuilder
ToolHandle< Trk::ITruthTrajectoryBuilder > m_truthTrackBuilder
Definition: DetailedMuonPatternTruthBuilder.h:67
DetailedMuonPatternTruthCollection.h
Trk::DetailedMuonPatternTruthBuilder::DetailedMuonPatternTruthBuilder
DetailedMuonPatternTruthBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: DetailedMuonPatternTruthBuilder.cxx:112
Trk::DetailedMuonPatternTruthBuilder::addDetailedTrackTruth
void addDetailedTrackTruth(std::vector< DetailedTrackTruth > *output, const Muon::MuonPatternCombination &pattern, const std::vector< const PRD_MultiTruthCollection * > &orderedPRD_Truth, const PRD_InverseTruth &inverseTruth)
Definition: DetailedMuonPatternTruthBuilder.cxx:729
IDetailedMuonPatternTruthBuilder.h
PrepRawData.h
Trk::DetailedMuonPatternTruthBuilder::addDetailedTrackTruthFromSegment
void addDetailedTrackTruthFromSegment(std::vector< DetailedSegmentTruth > *output, const Muon::MuonSegment &segment, const std::vector< const PRD_MultiTruthCollection * > &orderedPRD_Truth, const PRD_InverseTruth &inverseTruth)
Definition: DetailedMuonPatternTruthBuilder.cxx:943
Trk::DetailedMuonPatternTruthBuilder::findSubDetType
SubDetHitStatistics::SubDetType findSubDetType(Identifier id)
Definition: DetailedMuonPatternTruthBuilder.cxx:241
Track.h
Trk::DetailedMuonPatternTruthBuilder::m_mdtCreator
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: DetailedMuonPatternTruthBuilder.h:68
Trk::DetailedMuonPatternTruthBuilder::buildDetailedTrackTruthFromSegments
void buildDetailedTrackTruthFromSegments(std::vector< DetailedSegmentTruth > *output, const Muon::MuonSegment &segment, const std::vector< const PRD_MultiTruthCollection * > &prdTruth)
Definition: DetailedMuonPatternTruthBuilder.cxx:900
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
DetailedTrackTruthCollection.h
Trk::DetailedMuonPatternTruthBuilder::PRD_InverseTruth
InverseMultiMap< PRD_MultiTruthCollection > PRD_InverseTruth
Definition: DetailedMuonPatternTruthBuilder.h:63
Trk::DetailedMuonPatternTruthBuilder::countPRDsOnTruth
SubDetHitStatistics countPRDsOnTruth(const TruthTrajectory &traj, const PRD_InverseTruth &inverseTruth, std::set< Muon::MuonStationIndex::ChIndex > chIndices)
Definition: DetailedMuonPatternTruthBuilder.cxx:443
Trk::DetailedMuonPatternTruthBuilder::buildDetailedTrackTruth
virtual void buildDetailedTrackTruth(std::vector< DetailedTrackTruth > *output, const Muon::MuonPatternCombination &pattern, const std::vector< const PRD_MultiTruthCollection * > &prdTruth)
Definition: DetailedMuonPatternTruthBuilder.cxx:191
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonSimDataCollection
Definition: MuonSimDataCollection.h:21
IMuonClusterOnTrackCreator.h
AthAlgTool.h
MuonPatternCombination.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonPatternCombinationCollection.h
DetailedTrackTruth.h
Trk::DetailedMuonPatternTruthBuilder
Definition: DetailedMuonPatternTruthBuilder.h:45
DataVector< Muon::MuonPatternCombination >
merge.output
output
Definition: merge.py:17
TrackRecord.h
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
TruthTrajectory
Definition: TruthTrajectory.h:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
RIO_OnTrack.h
IMdtDriftCircleOnTrackCreator.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SubDetHitStatistics.h
Trk::DetailedMuonPatternTruthBuilder::getPRDTruthPosition
Amg::Vector3D getPRDTruthPosition(const Muon::MuonSegment &segment, std::list< HepMC::ConstGenParticlePtr > genPartList, int truthPos, std::set< Muon::MuonStationIndex::ChIndex > chIndices)
Definition: DetailedMuonPatternTruthBuilder.cxx:465
Trk::IDetailedMuonPatternTruthBuilder
Provides interface for tool to return a "detailed" track truth map.
Definition: IDetailedMuonPatternTruthBuilder.h:31
MuonPatternCollection.h
Trk::DetailedMuonPatternTruthBuilder::getDeposit
const MuonSimData::Deposit * getDeposit(const MuonSimDataCollection &simCol, const HepMC::ConstGenParticlePtr &genPart, const Identifier &id)
Definition: DetailedMuonPatternTruthBuilder.cxx:1113
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::DetailedMuonPatternTruthBuilder::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: DetailedMuonPatternTruthBuilder.h:65
Trk::DetailedMuonPatternTruthBuilder::buildDetailedMuonPatternTruth
virtual void buildDetailedMuonPatternTruth(DetailedMuonPatternTruthCollection *output, const MuonPatternCombinationCollection &tracks, const std::vector< const PRD_MultiTruthCollection * > &prdTruth)
See description for IDetailedMuonPatternTruthBuilder::buildDetailedTrackTruth()
Definition: DetailedMuonPatternTruthBuilder.cxx:128
PRD_MultiTruthCollection.h
TruthTrajectory.h
Trk::InverseMultiMap
Definition: InverseMultiMap.h:45
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
AthAlgTool
Definition: AthAlgTool.h:26
Muon::MuonPatternCombination
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
Definition: MuonPatternCombination.h:29
MuonSimDataCollection.h
IMuonIdHelperSvc.h
SegmentCollection.h
Trk::DetailedMuonPatternTruthBuilder::retrieveTruthCollection
const MuonSimDataCollection * retrieveTruthCollection(const std::string &colName)
Definition: DetailedMuonPatternTruthBuilder.cxx:1140
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
InverseMultiMap.h
ServiceHandle< Muon::IMuonIdHelperSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14