![]() |
ATLAS Offline Software
|
Tool to calculate track truth. More...
#include <MuonTrackTruthTool.h>
Classes | |
| struct | SortResultByMatchedHits |
Public Member Functions | |
| ~MuonTrackTruthTool ()=default | |
| destructor | |
| StatusCode | initialize () |
| AlgTool initilize. | |
| ResultVec | match (const TruthTree &truth_tree, const TrackCollection &tracks) const |
| perform truth matching for a given set of tracks | |
| SegmentResultVec | match (const TruthTree &truth_tree, const std::vector< const MuonSegment * > &segments) const |
| perform truth matching for a given set of segments | |
| MuonTrackTruth | getTruth (const TruthTree &truth_tree, const Trk::Track &track, bool restrictedTruth=false) const |
| get track truth | |
| MuonTrackTruth | getTruth (const TruthTree &truth_tree, const std::vector< const MuonSegment * > &segments, bool restrictedTruth=false) const |
| get segment truth for a list of segments, the segments will be considered to belong to the same muon | |
| MuonTrackTruth | getTruth (const TruthTree &truth_tree, const Muon::MuonSegment &segment) const |
| get segment truth | |
| MuonTrackTruth | getTruth (const TruthTree &truth_tree, const std::vector< const Trk::MeasurementBase * > &measurements, bool restrictedTruth=false) const |
| get truth for a give set of hits. | |
| const TruthTree | createTruthTree (const TrackRecordCollection *truthTrackCol, const McEventCollection *mcEventCollection, const std::vector< const MuonSimDataCollection * > &muonSimData, const CscSimDataCollection *cscSimDataMap) const |
| create truth tree from sim data | |
| HepMC::ConstGenParticlePtr | getMother (const TruthTrajectory &traj, const int barcodeIn) const |
| Returns the mother particle of the particle with barcodeIn if it is found in the truth trajectory. | |
| HepMC::ConstGenParticlePtr | getAncestor (const TruthTrajectory &traj, const int barcodeIn) const |
| Returns the ancestor particle of the particle with barcodeIn if it is found in the truth trajectory. | |
| HepMC::ConstGenParticlePtr | getInitial (const TruthTrajectory &traj, const int barcodeIn) const |
| Returns the initial particle of the particle with barcodeIn if it is found in the truth trajectory. | |
| unsigned int | getNumberOfScatters (const TruthTrajectory &traj, const int barcodeIn) const |
| Returns the number of steps a particle took while maintaining its PDG ID. | |
Private Member Functions | |
| MuonTrackTruth | getTruth (const std::vector< const Trk::MeasurementBase * > &measurements, const TruthTreeEntry &truthEntry, bool restrictedTruth) const |
| void | addSimDataToTree (TruthTree &truth_tree, std::map< int, int > &barcode_map, const MuonSimDataCollection *simDataCol) const |
| void | addCscSimDataToTree (TruthTree &truth_tree, std::map< int, int > &barcode_map, const CscSimDataCollection *simDataCol) const |
| void | addMdtTruth (MuonTechnologyTruth &trackTruth, const Identifier &id, const Trk::MeasurementBase &meas, const MuonSimDataCollection &simCol) const |
| void | addClusterTruth (MuonTechnologyTruth &trackTruth, const Identifier &id, const Trk::MeasurementBase &meas, const MuonSimDataCollection &simCol) const |
| void | addClusterTruth (MuonTechnologyTruth &trackTruth, const Identifier &id, const Trk::MeasurementBase &meas, const CscSimDataCollection &simCol) const |
| void | addMissedHits (MuonTechnologyTruth &truth, const std::set< Identifier > &ids, const std::set< Identifier > &chids, const MuonSimDataCollection &simCol, bool restrictedTruth) const |
| void | addMissedHits (MuonTechnologyTruth &truth, const std::set< Identifier > &ids, const std::set< Identifier > &chids, const CscSimDataCollection &simCol, bool restrictedTruth) const |
| int | manipulateBarCode (int barcode) const |
| bool | selectPdg (int pdg) const |
| const std::pair< HepMC::ConstGenParticlePtr, unsigned int > | getInitialPair (const TruthTrajectory &traj, const int barcodeIn) const |
| Returns the initial particle of the particle with barcodeIn if it is found in the truth trajectory. | |
Private Attributes | |
| ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
| PublicToolHandle< Muon::MuonEDMPrinterTool > | m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"} |
| ToolHandle< Trk::ITruthTrajectoryBuilder > | m_truthTrajectoryBuilder |
| Gaudi::Property< bool > | m_manipulateBarCode {this, "ManipulateBarCode", false} |
| Gaudi::Property< bool > | m_doSummary {this, "DoSummary", false} |
| Gaudi::Property< bool > | m_matchAllParticles {this, "MatchAllParticles", true} |
| Gaudi::Property< unsigned int > | m_minHits {this, "MinHits", 4} |
| Gaudi::Property< std::vector< int > > | m_pdgsToBeConsidered {this, "ConsideredPDGs", {}} |
| std::set< int > | m_selectedPdgs |
Tool to calculate track truth.
Definition at line 43 of file MuonTrackTruthTool.h.
|
default |
destructor
|
private |
Definition at line 616 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 560 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 319 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 525 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 498 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 469 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 266 of file MuonTrackTruthTool.cxx.
| const MuonTrackTruthTool::TruthTree Muon::MuonTrackTruthTool::createTruthTree | ( | const TrackRecordCollection * | truthTrackCol, |
| const McEventCollection * | mcEventCollection, | ||
| const std::vector< const MuonSimDataCollection * > & | muonSimData, | ||
| const CscSimDataCollection * | cscSimDataMap ) const |
create truth tree from sim data
Definition at line 108 of file MuonTrackTruthTool.cxx.
| HepMC::ConstGenParticlePtr Muon::MuonTrackTruthTool::getAncestor | ( | const TruthTrajectory & | traj, |
| const int | barcodeIn ) const |
Returns the ancestor particle of the particle with barcodeIn if it is found in the truth trajectory.
Ancestor here means the last particle at generator level that has a status code different from final state, e.g. Z
Definition at line 658 of file MuonTrackTruthTool.cxx.
| HepMC::ConstGenParticlePtr Muon::MuonTrackTruthTool::getInitial | ( | const TruthTrajectory & | traj, |
| const int | barcodeIn ) const |
Returns the initial particle of the particle with barcodeIn if it is found in the truth trajectory.
For example a mu undergoing a mubrem would create a second mu, in which case this method returns the mu prior to bremsstrahlung. This interface calls the method getInitialPair.
Definition at line 737 of file MuonTrackTruthTool.cxx.
|
private |
Returns the initial particle of the particle with barcodeIn if it is found in the truth trajectory.
For example a mu undergoing a mubrem would create a second mu, in which case this method returns the mu prior to bremsstrahlung. The number of such scatters is returned in the .second.
Definition at line 677 of file MuonTrackTruthTool.cxx.
| HepMC::ConstGenParticlePtr Muon::MuonTrackTruthTool::getMother | ( | const TruthTrajectory & | traj, |
| const int | barcodeIn ) const |
Returns the mother particle of the particle with barcodeIn if it is found in the truth trajectory.
It traces the decay chain until if finds the first particle that is different flavor from the starting one.
Definition at line 636 of file MuonTrackTruthTool.cxx.
| unsigned int Muon::MuonTrackTruthTool::getNumberOfScatters | ( | const TruthTrajectory & | traj, |
| const int | barcodeIn ) const |
Returns the number of steps a particle took while maintaining its PDG ID.
This method calls getInitialPair for calculating this number.
Definition at line 741 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 421 of file MuonTrackTruthTool.cxx.
| MuonTrackTruth Muon::MuonTrackTruthTool::getTruth | ( | const TruthTree & | truth_tree, |
| const Muon::MuonSegment & | segment ) const |
get segment truth
Definition at line 357 of file MuonTrackTruthTool.cxx.
| MuonTrackTruth Muon::MuonTrackTruthTool::getTruth | ( | const TruthTree & | truth_tree, |
| const std::vector< const MuonSegment * > & | segments, | ||
| bool | restrictedTruth = false ) const |
get segment truth for a list of segments, the segments will be considered to belong to the same muon
Definition at line 366 of file MuonTrackTruthTool.cxx.
| MuonTrackTruth Muon::MuonTrackTruthTool::getTruth | ( | const TruthTree & | truth_tree, |
| const std::vector< const Trk::MeasurementBase * > & | measurements, | ||
| bool | restrictedTruth = false ) const |
get truth for a give set of hits.
If restrictedTruth is set to true only missed hits in chambers with hits will be counted.
Definition at line 393 of file MuonTrackTruthTool.cxx.
| MuonTrackTruth Muon::MuonTrackTruthTool::getTruth | ( | const TruthTree & | truth_tree, |
| const Trk::Track & | track, | ||
| bool | restrictedTruth = false ) const |
get track truth
Definition at line 361 of file MuonTrackTruthTool.cxx.
| StatusCode Muon::MuonTrackTruthTool::initialize | ( | ) |
AlgTool initilize.
Definition at line 25 of file MuonTrackTruthTool.cxx.
|
private |
Definition at line 42 of file MuonTrackTruthTool.cxx.
| MuonTrackTruthTool::SegmentResultVec Muon::MuonTrackTruthTool::match | ( | const TruthTree & | truth_tree, |
| const std::vector< const MuonSegment * > & | segments ) const |
perform truth matching for a given set of segments
Definition at line 89 of file MuonTrackTruthTool.cxx.
| MuonTrackTruthTool::ResultVec Muon::MuonTrackTruthTool::match | ( | const TruthTree & | truth_tree, |
| const TrackCollection & | tracks ) const |
perform truth matching for a given set of tracks
Definition at line 66 of file MuonTrackTruthTool.cxx.
|
inlineprivate |
Definition at line 127 of file MuonTrackTruthTool.h.
|
private |
Definition at line 141 of file MuonTrackTruthTool.h.
|
private |
Definition at line 134 of file MuonTrackTruthTool.h.
|
private |
Definition at line 140 of file MuonTrackTruthTool.h.
|
private |
Definition at line 142 of file MuonTrackTruthTool.h.
|
private |
Definition at line 143 of file MuonTrackTruthTool.h.
|
private |
Definition at line 144 of file MuonTrackTruthTool.h.
|
private |
Definition at line 136 of file MuonTrackTruthTool.h.
|
private |
Definition at line 146 of file MuonTrackTruthTool.h.
|
private |
Definition at line 137 of file MuonTrackTruthTool.h.