ATLAS Offline Software
TrackAnalysisDefinitionSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETTRACKPERFMON_TRACKANALYSISDEFINITIONSVC_H
6 #define INDETTRACKPERFMON_TRACKANALYSISDEFINITIONSVC_H
7 
16 #include "AsgServices/AsgService.h"
18 
21 
23 #include <string>
24 #include <vector>
25 
27  public extends<asg::AsgService, ITrackAnalysisDefinitionSvc> {
28 
29 public:
30  using extends::extends; // base class constructor
31  virtual ~TrackAnalysisDefinitionSvc() = default;
32 
33  virtual StatusCode initialize() override final;
34 
35  virtual StatusCode finalize() override final;
36 
37  virtual const std::vector< std::string >& configuredChains() const override { return m_configuredChains; }
38  virtual const std::string& subFolder() const override { return m_subFolder; };
39  virtual const std::string& anaTag() const override { return m_trkAnaTag; };
40  virtual std::string plotsFullDir( std::string chain="" ) const override;
41 
42  virtual bool useTrigger() const override { return m_useTrigger; }
43  virtual bool useEFTrigger() const override { return m_useEFTrigger; }
44  virtual bool useTruth() const override { return m_useTruth; }
45  virtual bool useOffline() const override { return m_useOffline; }
46 
47  virtual bool isTestTrigger() const override { return m_isTestTrigger; }
48  virtual bool isTestEFTrigger() const override { return m_isTestEFTrigger; }
49  virtual bool isTestTruth() const override { return m_isTestTruth; }
50  virtual bool isTestOffline() const override { return m_isTestOffline; }
51  virtual bool isReferenceTrigger() const override { return m_isRefTrigger; }
52  virtual bool isReferenceEFTrigger() const override { return m_isRefEFTrigger; }
53  virtual bool isReferenceTruth() const override { return m_isRefTruth; }
54  virtual bool isReferenceOffline() const override { return m_isRefOffline; }
55 
56  virtual const std::string& testType() const override { return m_testTypeStr.value(); };
57  virtual const std::string& referenceType() const override { return m_refTypeStr.value(); };
58  virtual const std::string& testTag() const override { return m_testTag.value(); };
59  virtual const std::string& referenceTag() const override { return m_refTag.value(); };
60  virtual const std::string& matchingType() const override { return m_matchingType.value(); };
61  virtual float truthProbCut() const override { return m_truthProbCut.value(); };
62 
63  virtual const std::vector<float>& etaBins() const override { return m_etaBins; };
64  virtual const std::vector<unsigned int>& minSilHits() const override { return m_minSilHits; };
65  virtual const std::string& pileupSwitch() const override { return m_pileupSwitch; };
66  virtual bool hasFullPileupTruth() const override { return m_hasFullPileupTruth.value(); };
67 
68  virtual bool plotTrackParameters() const override { return m_plotTrackParameters.value(); };
69  virtual bool plotTrackMultiplicities() const override { return m_plotTrackMultiplicities.value(); };
70  virtual bool plotEfficiencies() const override { return m_plotEfficiencies.value(); };
71  virtual bool plotTechnicalEfficiencies() const override { return m_plotTechnicalEfficiencies.value(); };
72  virtual bool plotResolutions() const override { return m_plotResolutions.value(); };
73  virtual bool plotFakeRates() const override { return m_plotFakeRates.value(); };
74  virtual bool unlinkedAsFakes() const override { return m_unlinkedAsFakes.value(); };
75  virtual bool plotDuplicateRates() const override { return m_plotDuplicateRates.value(); };
76  virtual bool plotHitsOnTracks() const override { return m_plotHitsOnTracks.value(); };
77  virtual bool plotHitsOnTracksReference() const override { return m_plotHitsOnTracksReference.value(); };
78  virtual bool plotHitsOnMatchedTracks() const override { return m_plotHitsOnMatchedTracks.value(); };
79  virtual bool plotHitsOnFakeTracks() const override { return m_plotHitsOnFakeTracks.value(); };
80  virtual bool plotVertexParameters() const override { return m_plotVertexParameters.value(); };
81  virtual bool useSelectedVertexTracks() const override { return m_useSelectedVertexTracks.value(); };
82  virtual bool plotOfflineElectrons() const override { return m_plotOfflineElectrons.value(); };
83  virtual unsigned int resolutionMethod() const override;
84  virtual bool isITk() const override { return m_isITk.value(); };
85 
86 private:
87 
88  StringArrayProperty m_chainNames { this, "ChainNames", {}, "Vector of trigger chain names to process" };
89  StringProperty m_dirName{ this, "DirName", "InDetTrackPerfMonPlots/", "Top level directory to write histograms into" };
90  StringProperty m_subFolder { this, "SubFolder", "", "Subfolder to add for plots in. Used when working with multiple IDTPM tool instances and initialised by default to TrkAnaName/" };
91  StringProperty m_trkAnaTag { this, "TrkAnaTag", "", "Track analysis tag name" };
92 
93  StringProperty m_testTypeStr { this, "TestType", "Offline", "Type of track collection to be used as test" };
94  StringProperty m_refTypeStr { this, "RefType", "Truth", "Type of track collection to be used as reference" };
95 
99 
100  StringProperty m_testTag { this, "TestTag", "offl", "Short label for test track type, used in histo booking" };
101  StringProperty m_refTag { this, "RefTag", "truth", "Short label for reference track type, used in histo booking" };
102 
103  StringProperty m_matchingType { this, "MatchingType", "DeltaRMatch", "Type of test-reference matching performed" };
104  FloatProperty m_truthProbCut { this, "MatchingTruthProb", 0.5, "Minimal truthProbability for valid matching" };
105 
106  std::vector< std::string > m_configuredChains;
107 
108  FloatArrayProperty m_etaBins { this, "EtaBins", {}, "Eta bins for determination of reconstructable particle" };
109  UnsignedIntegerArrayProperty m_minSilHits { this, "MinSilHits", {}, "Minimum number of Si hits for determination of reconstructable particle" };
110  StringProperty m_pileupSwitch { this, "pileupSwitch", "HardScatter", "Type of truth particles to consider (HardScatter, PileUp, All)" };
111  BooleanProperty m_hasFullPileupTruth { this, "hasFullPileupTruth", false, "Is full PileUp truth information available" };
112 
114  BooleanProperty m_sortPlotsByChain { this, "sortPlotsByChain", false, "Save plots in <mainDir>/<chain>/<subDir/TrkAnaName>/... instead of the default <mainDir>/<subDir/TrkAnaName>/<chain>/..." };
115  BooleanProperty m_plotTrackParameters { this, "plotTrackParameters", true, "Book/fill track parameters histograms" };
116  BooleanProperty m_plotTrackMultiplicities { this, "plotTrackMultiplicities", true, "Book/fill track multiplicities histograms" };
117  BooleanProperty m_plotEfficiencies { this, "plotEfficiencies", true, "Book/fill track efficiencies histograms" };
118  BooleanProperty m_plotTechnicalEfficiencies { this, "plotTechnicalEfficiencies", true, "Book/fill track technical efficiencies histograms" };
119  BooleanProperty m_plotResolutions { this, "plotResolutions", true, "Book/fill track resolutions histograms" };
120  BooleanProperty m_plotFakeRates { this, "plotFakeRates", true, "Book/fill fake rate histograms" };
121  BooleanProperty m_unlinkedAsFakes { this, "unlinkedAsFakes", false, "Consider non-truth-linked tracks as fakes" };
122  BooleanProperty m_plotDuplicateRates { this, "plotDuplicateRates", false, "Book/fill duplicate rate histograms" };
123  BooleanProperty m_plotHitsOnTracks { this, "plotHitsOnTracks", true, "Book/fill hits on tracks histograms" };
124  BooleanProperty m_plotHitsOnTracksReference { this, "plotHitsOnTracksReference", false, "Book/fill hits on reference tracks histograms" };
125  BooleanProperty m_plotHitsOnMatchedTracks { this, "plotHitsOnMatchedTracks", false, "Book/fill hits on matched tracks histograms" };
126  BooleanProperty m_plotHitsOnFakeTracks { this, "plotHitsOnFakeTracks", false, "Book/fill hits on fake and unlinked tracks histograms" };
127  BooleanProperty m_plotVertexParameters { this, "plotVertexParameters", true, "Book/fill vertex parameters histograms" };
128  BooleanProperty m_useSelectedVertexTracks { this, "useSelectedVertexTracks", false, "Get only vertex-associated tracks which pass the track selection" };
129  BooleanProperty m_plotOfflineElectrons { this, "plotOfflineElectrons", false, "Book/fill reference offline electrons histograms" };
130  StringProperty m_resolMethod { this, "ResolutionMethod", "iterRMS", "Type of computation method for resolutions" };
131  BooleanProperty m_isITk { this, "isITk", true, "Use ITk configuration for plots, etc." };
132 };
133 
134 #endif // > !INDETTRACKPERFMON_TRACKANALYSISDEFINITIONSVC_H
TrackAnalysisDefinitionSvc::pileupSwitch
virtual const std::string & pileupSwitch() const override
Definition: TrackAnalysisDefinitionSvc.h:65
TrackAnalysisDefinitionSvc::hasFullPileupTruth
virtual bool hasFullPileupTruth() const override
Definition: TrackAnalysisDefinitionSvc.h:66
TrackAnalysisDefinitionSvc::m_resolMethod
StringProperty m_resolMethod
Definition: TrackAnalysisDefinitionSvc.h:130
TrackAnalysisDefinitionSvc::m_useTrigger
bool m_useTrigger
Definition: TrackAnalysisDefinitionSvc.h:96
TrackAnalysisDefinitionSvc::testType
virtual const std::string & testType() const override
Definition: TrackAnalysisDefinitionSvc.h:56
TrackAnalysisDefinitionSvc::isTestOffline
virtual bool isTestOffline() const override
Definition: TrackAnalysisDefinitionSvc.h:50
ITrackAnalysisDefinitionSvc.h
TrackAnalysisDefinitionSvc::m_plotVertexParameters
BooleanProperty m_plotVertexParameters
Definition: TrackAnalysisDefinitionSvc.h:127
TrackAnalysisDefinitionSvc::m_plotHitsOnTracksReference
BooleanProperty m_plotHitsOnTracksReference
Definition: TrackAnalysisDefinitionSvc.h:124
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
AsgService.h
TrackAnalysisDefinitionSvc::m_isTestTruth
bool m_isTestTruth
Definition: TrackAnalysisDefinitionSvc.h:97
TrackAnalysisDefinitionSvc::isTestTruth
virtual bool isTestTruth() const override
Definition: TrackAnalysisDefinitionSvc.h:49
TrackAnalysisDefinitionSvc::configuredChains
virtual const std::vector< std::string > & configuredChains() const override
Definition: TrackAnalysisDefinitionSvc.h:37
TrackAnalysisDefinitionSvc::m_isRefTrigger
bool m_isRefTrigger
Definition: TrackAnalysisDefinitionSvc.h:98
TrackAnalysisDefinitionSvc::m_dirName
StringProperty m_dirName
Definition: TrackAnalysisDefinitionSvc.h:89
TrackAnalysisDefinitionSvc::m_isRefTruth
bool m_isRefTruth
Definition: TrackAnalysisDefinitionSvc.h:98
TrackAnalysisDefinitionSvc::m_trkAnaTag
StringProperty m_trkAnaTag
Definition: TrackAnalysisDefinitionSvc.h:91
TrackAnalysisDefinitionSvc::isReferenceEFTrigger
virtual bool isReferenceEFTrigger() const override
Definition: TrackAnalysisDefinitionSvc.h:52
TrackAnalysisDefinitionSvc::finalize
virtual StatusCode finalize() override final
Definition: TrackAnalysisDefinitionSvc.cxx:72
TrackAnalysisDefinitionSvc::referenceTag
virtual const std::string & referenceTag() const override
Definition: TrackAnalysisDefinitionSvc.h:59
TrackAnalysisDefinitionSvc::plotOfflineElectrons
virtual bool plotOfflineElectrons() const override
Definition: TrackAnalysisDefinitionSvc.h:82
TrackAnalysisDefinitionSvc::m_useOffline
bool m_useOffline
Definition: TrackAnalysisDefinitionSvc.h:96
TrackAnalysisDefinitionSvc::plotResolutions
virtual bool plotResolutions() const override
Definition: TrackAnalysisDefinitionSvc.h:72
TrackAnalysisDefinitionSvc::resolutionMethod
virtual unsigned int resolutionMethod() const override
Definition: TrackAnalysisDefinitionSvc.cxx:109
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
TrackAnalysisDefinitionSvc::m_plotResolutions
BooleanProperty m_plotResolutions
Definition: TrackAnalysisDefinitionSvc.h:119
TrackAnalysisDefinitionSvc::useTrigger
virtual bool useTrigger() const override
Definition: TrackAnalysisDefinitionSvc.h:42
TrackAnalysisDefinitionSvc::m_matchingType
StringProperty m_matchingType
Definition: TrackAnalysisDefinitionSvc.h:103
TrackAnalysisDefinitionSvc::plotHitsOnTracksReference
virtual bool plotHitsOnTracksReference() const override
Definition: TrackAnalysisDefinitionSvc.h:77
TrackAnalysisDefinitionSvc::plotsFullDir
virtual std::string plotsFullDir(std::string chain="") const override
Definition: TrackAnalysisDefinitionSvc.cxx:79
TrackAnalysisDefinitionSvc::m_isRefEFTrigger
bool m_isRefEFTrigger
Definition: TrackAnalysisDefinitionSvc.h:98
TrackAnalysisDefinitionSvc::subFolder
virtual const std::string & subFolder() const override
Definition: TrackAnalysisDefinitionSvc.h:38
TrackAnalysisDefinitionSvc::m_isITk
BooleanProperty m_isITk
Definition: TrackAnalysisDefinitionSvc.h:131
TrackAnalysisDefinitionSvc::m_hasFullPileupTruth
BooleanProperty m_hasFullPileupTruth
Definition: TrackAnalysisDefinitionSvc.h:111
TrackAnalysisDefinitionSvc::anaTag
virtual const std::string & anaTag() const override
Definition: TrackAnalysisDefinitionSvc.h:39
TrackAnalysisDefinitionSvc::m_plotOfflineElectrons
BooleanProperty m_plotOfflineElectrons
Definition: TrackAnalysisDefinitionSvc.h:129
TrackAnalysisDefinitionSvc::useOffline
virtual bool useOffline() const override
Definition: TrackAnalysisDefinitionSvc.h:45
TrackAnalysisDefinitionSvc::m_truthProbCut
FloatProperty m_truthProbCut
Definition: TrackAnalysisDefinitionSvc.h:104
TrackAnalysisDefinitionSvc::unlinkedAsFakes
virtual bool unlinkedAsFakes() const override
Definition: TrackAnalysisDefinitionSvc.h:74
TrackAnalysisDefinitionSvc::m_chainNames
StringArrayProperty m_chainNames
Definition: TrackAnalysisDefinitionSvc.h:88
TrackAnalysisDefinitionSvc::m_pileupSwitch
StringProperty m_pileupSwitch
Definition: TrackAnalysisDefinitionSvc.h:110
TrackAnalysisDefinitionSvc::isReferenceTrigger
virtual bool isReferenceTrigger() const override
Definition: TrackAnalysisDefinitionSvc.h:51
TrackAnalysisDefinitionSvc::isReferenceTruth
virtual bool isReferenceTruth() const override
Definition: TrackAnalysisDefinitionSvc.h:53
TrackAnalysisDefinitionSvc::etaBins
virtual const std::vector< float > & etaBins() const override
Definition: TrackAnalysisDefinitionSvc.h:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackAnalysisDefinitionSvc::m_useEFTrigger
bool m_useEFTrigger
Definition: TrackAnalysisDefinitionSvc.h:96
vector
Definition: MultiHisto.h:13
TrackAnalysisDefinitionSvc::plotHitsOnTracks
virtual bool plotHitsOnTracks() const override
Definition: TrackAnalysisDefinitionSvc.h:76
TrackAnalysisDefinitionSvc::m_plotEfficiencies
BooleanProperty m_plotEfficiencies
Definition: TrackAnalysisDefinitionSvc.h:117
TrackAnalysisDefinitionSvc::m_subFolder
StringProperty m_subFolder
Definition: TrackAnalysisDefinitionSvc.h:90
TrackAnalysisDefinitionSvc::m_plotDuplicateRates
BooleanProperty m_plotDuplicateRates
Definition: TrackAnalysisDefinitionSvc.h:122
TrackAnalysisDefinitionSvc::m_unlinkedAsFakes
BooleanProperty m_unlinkedAsFakes
Definition: TrackAnalysisDefinitionSvc.h:121
TrackAnalysisDefinitionSvc::plotVertexParameters
virtual bool plotVertexParameters() const override
Definition: TrackAnalysisDefinitionSvc.h:80
TrackAnalysisDefinitionSvc::m_isTestOffline
bool m_isTestOffline
Definition: TrackAnalysisDefinitionSvc.h:97
TrackAnalysisDefinitionSvc::isTestTrigger
virtual bool isTestTrigger() const override
Definition: TrackAnalysisDefinitionSvc.h:47
TrackAnalysisDefinitionSvc::useSelectedVertexTracks
virtual bool useSelectedVertexTracks() const override
Definition: TrackAnalysisDefinitionSvc.h:81
TrackAnalysisDefinitionSvc::plotHitsOnFakeTracks
virtual bool plotHitsOnFakeTracks() const override
Definition: TrackAnalysisDefinitionSvc.h:79
TrackAnalysisDefinitionSvc::m_isTestTrigger
bool m_isTestTrigger
Definition: TrackAnalysisDefinitionSvc.h:97
TrackAnalysisDefinitionSvc::useTruth
virtual bool useTruth() const override
Definition: TrackAnalysisDefinitionSvc.h:44
TrackAnalysisDefinitionSvc::plotHitsOnMatchedTracks
virtual bool plotHitsOnMatchedTracks() const override
Definition: TrackAnalysisDefinitionSvc.h:78
TrackAnalysisDefinitionSvc::plotTrackParameters
virtual bool plotTrackParameters() const override
Definition: TrackAnalysisDefinitionSvc.h:68
TrackAnalysisDefinitionSvc::plotEfficiencies
virtual bool plotEfficiencies() const override
Definition: TrackAnalysisDefinitionSvc.h:70
TrackAnalysisDefinitionSvc::m_testTypeStr
StringProperty m_testTypeStr
Definition: TrackAnalysisDefinitionSvc.h:93
TrackAnalysisDefinitionSvc::m_isRefOffline
bool m_isRefOffline
Definition: TrackAnalysisDefinitionSvc.h:98
TrackAnalysisDefinitionSvc::m_plotTrackMultiplicities
BooleanProperty m_plotTrackMultiplicities
Definition: TrackAnalysisDefinitionSvc.h:116
TrackAnalysisDefinitionSvc::m_isTestEFTrigger
bool m_isTestEFTrigger
Definition: TrackAnalysisDefinitionSvc.h:97
TrackAnalysisDefinitionSvc
Athena includes.
Definition: TrackAnalysisDefinitionSvc.h:27
TrackAnalysisDefinitionSvc::matchingType
virtual const std::string & matchingType() const override
Definition: TrackAnalysisDefinitionSvc.h:60
TrackAnalysisDefinitionSvc::m_sortPlotsByChain
BooleanProperty m_sortPlotsByChain
histogram properties
Definition: TrackAnalysisDefinitionSvc.h:114
TrackAnalysisDefinitionSvc::plotDuplicateRates
virtual bool plotDuplicateRates() const override
Definition: TrackAnalysisDefinitionSvc.h:75
TrackAnalysisDefinitionSvc::m_minSilHits
UnsignedIntegerArrayProperty m_minSilHits
Definition: TrackAnalysisDefinitionSvc.h:109
TrackAnalysisDefinitionSvc::plotFakeRates
virtual bool plotFakeRates() const override
Definition: TrackAnalysisDefinitionSvc.h:73
TrackAnalysisDefinitionSvc::~TrackAnalysisDefinitionSvc
virtual ~TrackAnalysisDefinitionSvc()=default
TrackAnalysisDefinitionSvc::isITk
virtual bool isITk() const override
Definition: TrackAnalysisDefinitionSvc.h:84
TrackAnalysisDefinitionSvc::plotTrackMultiplicities
virtual bool plotTrackMultiplicities() const override
Definition: TrackAnalysisDefinitionSvc.h:69
TrackAnalysisDefinitionSvc::m_testTag
StringProperty m_testTag
Definition: TrackAnalysisDefinitionSvc.h:100
TrackAnalysisDefinitionSvc::m_etaBins
FloatArrayProperty m_etaBins
Definition: TrackAnalysisDefinitionSvc.h:108
TrackAnalysisDefinitionSvc::m_useTruth
bool m_useTruth
Definition: TrackAnalysisDefinitionSvc.h:96
TrackAnalysisDefinitionSvc::m_configuredChains
std::vector< std::string > m_configuredChains
Definition: TrackAnalysisDefinitionSvc.h:106
TrackAnalysisDefinitionSvc::truthProbCut
virtual float truthProbCut() const override
Definition: TrackAnalysisDefinitionSvc.h:61
TrackAnalysisDefinitionSvc::m_refTypeStr
StringProperty m_refTypeStr
Definition: TrackAnalysisDefinitionSvc.h:94
TrackAnalysisDefinitionSvc::m_refTag
StringProperty m_refTag
Definition: TrackAnalysisDefinitionSvc.h:101
TrackAnalysisDefinitionSvc::m_plotHitsOnMatchedTracks
BooleanProperty m_plotHitsOnMatchedTracks
Definition: TrackAnalysisDefinitionSvc.h:125
TrackAnalysisDefinitionSvc::isReferenceOffline
virtual bool isReferenceOffline() const override
Definition: TrackAnalysisDefinitionSvc.h:54
TrackAnalysisDefinitionSvc::useEFTrigger
virtual bool useEFTrigger() const override
Definition: TrackAnalysisDefinitionSvc.h:43
TrackAnalysisDefinitionSvc::m_plotHitsOnFakeTracks
BooleanProperty m_plotHitsOnFakeTracks
Definition: TrackAnalysisDefinitionSvc.h:126
TrackAnalysisDefinitionSvc::isTestEFTrigger
virtual bool isTestEFTrigger() const override
Definition: TrackAnalysisDefinitionSvc.h:48
TrackAnalysisDefinitionSvc::plotTechnicalEfficiencies
virtual bool plotTechnicalEfficiencies() const override
Definition: TrackAnalysisDefinitionSvc.h:71
TrackAnalysisDefinitionSvc::minSilHits
virtual const std::vector< unsigned int > & minSilHits() const override
Definition: TrackAnalysisDefinitionSvc.h:64
TrackAnalysisDefinitionSvc::testTag
virtual const std::string & testTag() const override
Definition: TrackAnalysisDefinitionSvc.h:58
TrackAnalysisDefinitionSvc::m_plotHitsOnTracks
BooleanProperty m_plotHitsOnTracks
Definition: TrackAnalysisDefinitionSvc.h:123
TrackAnalysisDefinitionSvc::m_plotTechnicalEfficiencies
BooleanProperty m_plotTechnicalEfficiencies
Definition: TrackAnalysisDefinitionSvc.h:118
TrackAnalysisDefinitionSvc::referenceType
virtual const std::string & referenceType() const override
Definition: TrackAnalysisDefinitionSvc.h:57
TrackAnalysisDefinitionSvc::initialize
virtual StatusCode initialize() override final
local includes
Definition: TrackAnalysisDefinitionSvc.cxx:26
TrackAnalysisDefinitionSvc::m_useSelectedVertexTracks
BooleanProperty m_useSelectedVertexTracks
Definition: TrackAnalysisDefinitionSvc.h:128
TrackAnalysisDefinitionSvc::m_plotFakeRates
BooleanProperty m_plotFakeRates
Definition: TrackAnalysisDefinitionSvc.h:120
TrackAnalysisDefinitionSvc::m_plotTrackParameters
BooleanProperty m_plotTrackParameters
Definition: TrackAnalysisDefinitionSvc.h:115