ATLAS Offline Software
Loading...
Searching...
No Matches
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
43namespace 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
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
DataVector< Muon::MuonPatternCombination > MuonPatternCombinationCollection
This typedef represents a collection of MuonPatternCombination objects.
A struture to keep per-subdetector numbers of hits for truth matching.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Derived DataVector<T>.
Definition DataVector.h:795
std::pair< HepMcParticleLink, MuonMCData > Deposit
Definition MuonSimData.h:66
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
This is the common class for 3D segments used in the muon spectrometer.
virtual void buildDetailedMuonPatternTruth(DetailedMuonPatternTruthCollection *output, const MuonPatternCombinationCollection &tracks, const std::vector< const PRD_MultiTruthCollection * > &prdTruth)
See description for IDetailedMuonPatternTruthBuilder::buildDetailedTrackTruth()
InverseMultiMap< PRD_MultiTruthCollection > PRD_InverseTruth
const MuonSimDataCollection * retrieveTruthCollection(const std::string &colName)
SubDetHitStatistics::SubDetType findSubDetType(Identifier id)
void addDetailedTrackTruth(std::vector< DetailedTrackTruth > *output, const Muon::MuonPatternCombination &pattern, const std::vector< const PRD_MultiTruthCollection * > &orderedPRD_Truth, const PRD_InverseTruth &inverseTruth)
Amg::Vector3D getPRDTruthPosition(const Muon::MuonSegment &segment, std::list< HepMC::ConstGenParticlePtr > genPartList, int truthPos, std::set< Muon::MuonStationIndex::ChIndex > chIndices)
void addTrack(DetailedMuonPatternTruthCollection *output, const ElementLink< DataVector< Muon::MuonPatternCombination > > &track, const std::vector< const PRD_MultiTruthCollection * > &orderedPRD_Truth, const PRD_InverseTruth &inverseTruth)
void buildDetailedTrackTruthFromSegments(std::vector< DetailedSegmentTruth > *output, const Muon::MuonSegment &segment, const std::vector< const PRD_MultiTruthCollection * > &prdTruth)
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_muonClusterCreator
SubDetHitStatistics countPRDsOnTruth(const TruthTrajectory &traj, const PRD_InverseTruth &inverseTruth, std::set< Muon::MuonStationIndex::ChIndex > chIndices)
ToolHandle< Trk::ITruthTrajectoryBuilder > m_truthTrackBuilder
void addDetailedTrackTruthFromSegment(std::vector< DetailedSegmentTruth > *output, const Muon::MuonSegment &segment, const std::vector< const PRD_MultiTruthCollection * > &orderedPRD_Truth, const PRD_InverseTruth &inverseTruth)
DetailedMuonPatternTruthBuilder(const std::string &type, const std::string &name, const IInterface *parent)
virtual void buildDetailedTrackTruth(std::vector< DetailedTrackTruth > *output, const Muon::MuonPatternCombination &pattern, const std::vector< const PRD_MultiTruthCollection * > &prdTruth)
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtCreator
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
const MuonSimData::Deposit * getDeposit(const MuonSimDataCollection &simCol, const HepMC::ConstGenParticlePtr &genPart, const Identifier &id)
Provides interface for tool to return a "detailed" track truth map.
An InverseMultiMap object built from a generic map or multimap allows for quick lookup of original (m...
A TruthTrajectory is a chain of charged MC particles connected through the mother-daughter relationsh...
Eigen::Matrix< double, 3, 1 > Vector3D
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38
Ensure that the ATLAS eigen extensions are properly loaded.