CMS 3D CMS Logo

TrackBuildingAnalyzer.h
Go to the documentation of this file.
1 #ifndef TrackBuildingAnalyzer_H
2 #define TrackBuildingAnalyzer_H
3 // -*- C++ -*-
4 //
5 //
9 // Original Author: Ryan Kelley
10 // Created: Sat 28 13;30:00 CEST 2009
11 //
12 
13 #include <memory>
14 #include <fstream>
22 
33 
35 
37 public:
40  using MVACollection = std::vector<float>;
41  using QualityMaskCollection = std::vector<unsigned char>;
42 
44  ~TrackBuildingAnalyzer() = default;
45  void initHisto(DQMStore::IBooker& ibooker, const edm::ParameterSet&);
46  void analyze(const edm::Event& iEvent,
47  const edm::EventSetup& iSetup,
48  const TrajectorySeed& seed,
49  const SeedStopInfo& stopInfo,
50  const reco::BeamSpot& bs,
51  const MagneticField& theMF,
52  const TransientTrackingRecHitBuilder& theTTRHBuilder);
53  void analyze(const edm::Event& iEvent,
54  const edm::EventSetup& iSetup,
55  const TrackCandidate& candidate,
56  const reco::BeamSpot& bs,
57  const MagneticField& theMF,
58  const TransientTrackingRecHitBuilder& theTTRHBuilder);
60  const std::vector<const MVACollection*>& mvaCollections,
61  const std::vector<const QualityMaskCollection*>& qualityMaskCollections);
62  void analyze(const reco::CandidateView& regionCandidates);
65 
66 private:
67  void fillHistos(const edm::EventSetup& iSetup, const reco::Track& track, std::string sname);
68  void bookHistos(std::string sname, DQMStore::IBooker& ibooker);
69 
70  template <typename T>
71  void analyzeRegions(const T& regions);
72 
73  // ----------member data ---------------------------
74 
75  // Regions covered by tracking regions
79  double etaBinWidth = 0.;
80  double phiBinWidth = 0.;
81  // Candidates used for tracking regions
86 
87  // Track Seeds
88  MonitorElement* SeedPt = nullptr;
89  MonitorElement* SeedEta = nullptr;
90  MonitorElement* SeedPhi = nullptr;
93  MonitorElement* SeedQ = nullptr;
94  MonitorElement* SeedDxy = nullptr;
95  MonitorElement* SeedDz = nullptr;
99 
103 
107 
109 
110  // Track Candidate
122 
126 
127  std::vector<MonitorElement*> trackMVAs;
128  std::vector<MonitorElement*> trackMVAsHP;
129  std::vector<MonitorElement*> trackMVAsVsPtProfile;
130  std::vector<MonitorElement*> trackMVAsHPVsPtProfile;
131  std::vector<MonitorElement*> trackMVAsVsEtaProfile;
132  std::vector<MonitorElement*> trackMVAsHPVsEtaProfile;
133 
134  std::string histname; //for naming the histograms according to algorithm used
135 
136  //to disable some plots
137  const bool doAllPlots;
138  const bool doAllSeedPlots;
139  const bool doTCPlots;
140  const bool doAllTCPlots;
141  const bool doPT;
142  const bool doETA;
143  const bool doPHI;
144  const bool doPHIVsETA;
145  const bool doTheta;
146  const bool doQ;
147  const bool doDxy;
148  const bool doDz;
149  const bool doNRecHits;
150  const bool doProfPHI;
151  const bool doProfETA;
152  const bool doStopSource;
153  const bool doMVAPlots;
154  const bool doRegionPlots;
156 };
157 #endif
TrackBuildingAnalyzer::fillHistos
void fillHistos(const edm::EventSetup &iSetup, const reco::Track &track, std::string sname)
TrackBuildingAnalyzer::SeedPhi
MonitorElement * SeedPhi
Definition: TrackBuildingAnalyzer.h:90
TrackBuildingAnalyzer::MVACollection
std::vector< float > MVACollection
Definition: TrackBuildingAnalyzer.h:40
TrackBuildingAnalyzer::TrackingRegionCandidateEta
MonitorElement * TrackingRegionCandidateEta
Definition: TrackBuildingAnalyzer.h:83
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
TrackBuildingAnalyzer::doAllPlots
const bool doAllPlots
Definition: TrackBuildingAnalyzer.h:137
TrackBuildingAnalyzer::doDxy
const bool doDxy
Definition: TrackBuildingAnalyzer.h:147
TrackBuildingAnalyzer::TrackCandPt
MonitorElement * TrackCandPt
Definition: TrackBuildingAnalyzer.h:111
TrackCandidateCollection.h
TrackBuildingAnalyzer::TrackCandDxy
MonitorElement * TrackCandDxy
Definition: TrackBuildingAnalyzer.h:117
TrackBuildingAnalyzer::NumberOfRecHitsPerTrackCand
MonitorElement * NumberOfRecHitsPerTrackCand
Definition: TrackBuildingAnalyzer.h:119
TrackingRegionsSeedingLayerSets
Definition: TrackingRegionsSeedingLayerSets.h:10
TrackBuildingAnalyzer::seedStoppingSourceVsEta
MonitorElement * seedStoppingSourceVsEta
Definition: TrackBuildingAnalyzer.h:102
TrackBuildingAnalyzer::phiBinWidth
double phiBinWidth
Definition: TrackBuildingAnalyzer.h:80
TrackBuildingAnalyzer::doQ
const bool doQ
Definition: TrackBuildingAnalyzer.h:146
TrackBuildingAnalyzer::seedStoppingSourceVsPhi
MonitorElement * seedStoppingSourceVsPhi
Definition: TrackBuildingAnalyzer.h:101
TrackBuildingAnalyzer::doNRecHits
const bool doNRecHits
Definition: TrackBuildingAnalyzer.h:149
TrackBuildingAnalyzer::etaBinWidth
double etaBinWidth
Definition: TrackBuildingAnalyzer.h:79
TrackBuildingAnalyzer::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: TrackBuildingAnalyzer.h:38
DQMStore.h
TrackBuildingAnalyzer::histname
std::string histname
Definition: TrackBuildingAnalyzer.h:134
TrackBuildingAnalyzer::TrackingRegionPhiVsEta
MonitorElement * TrackingRegionPhiVsEta
Definition: TrackBuildingAnalyzer.h:78
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
TrackBuildingAnalyzer::doRegionPlots
const bool doRegionPlots
Definition: TrackBuildingAnalyzer.h:154
TrackBuildingAnalyzer::NumberOfRecHitsPerSeedVsPhiProfile
MonitorElement * NumberOfRecHitsPerSeedVsPhiProfile
Definition: TrackBuildingAnalyzer.h:97
EDAnalyzer.h
TrackBuildingAnalyzer::QualityMaskCollection
std::vector< unsigned char > QualityMaskCollection
Definition: TrackBuildingAnalyzer.h:41
TrackBuildingAnalyzer::trackMVAsVsEtaProfile
std::vector< MonitorElement * > trackMVAsVsEtaProfile
Definition: TrackBuildingAnalyzer.h:131
TrackBuildingAnalyzer::TrackingRegionEta
MonitorElement * TrackingRegionEta
Definition: TrackBuildingAnalyzer.h:76
TransientTrack.h
TrackBuildingAnalyzer::doPHIVsETA
const bool doPHIVsETA
Definition: TrackBuildingAnalyzer.h:144
SeedStopInfo
Definition: SeedStopInfo.h:6
TrackBuildingAnalyzer::bookHistos
void bookHistos(std::string sname, DQMStore::IBooker &ibooker)
TrackBuildingAnalyzer::NumberOfRecHitsPerSeedVsEtaProfile
MonitorElement * NumberOfRecHitsPerSeedVsEtaProfile
Definition: TrackBuildingAnalyzer.h:98
CandidateFwd.h
fileCollector.seed
seed
Definition: fileCollector.py:127
TrackBuildingAnalyzer::doTCPlots
const bool doTCPlots
Definition: TrackBuildingAnalyzer.h:139
MakerMacros.h
cms::cuda::bs
bs
Definition: HistoContainer.h:127
TrackBuildingAnalyzer::trackMVAsVsPtProfile
std::vector< MonitorElement * > trackMVAsVsPtProfile
Definition: TrackBuildingAnalyzer.h:129
TrackBuildingAnalyzer::NumberOfRecHitsPerTrackCandVsPhiProfile
MonitorElement * NumberOfRecHitsPerTrackCandVsPhiProfile
Definition: TrackBuildingAnalyzer.h:120
TrackBuildingAnalyzer::SeedPt
MonitorElement * SeedPt
Definition: TrackBuildingAnalyzer.h:88
dqm::legacy::DQMStore
Definition: DQMStore.h:727
TrackBuildingAnalyzer::TrackCandDz
MonitorElement * TrackCandDz
Definition: TrackBuildingAnalyzer.h:118
TrackBuildingAnalyzer::numberOfTrajCandsPerSeedVsPhi
MonitorElement * numberOfTrajCandsPerSeedVsPhi
Definition: TrackBuildingAnalyzer.h:105
TrackBuildingAnalyzer::doStopSource
const bool doStopSource
Definition: TrackBuildingAnalyzer.h:152
TrackBuildingAnalyzer::doAllTCPlots
const bool doAllTCPlots
Definition: TrackBuildingAnalyzer.h:140
Service.h
TrackBuildingAnalyzer::TrackingRegionPhi
MonitorElement * TrackingRegionPhi
Definition: TrackBuildingAnalyzer.h:77
reco::BeamSpot
Definition: BeamSpot.h:21
reco::Track
Definition: Track.h:27
TrackBuildingAnalyzer::TrackingRegionCandidatePhiVsEta
MonitorElement * TrackingRegionCandidatePhiVsEta
Definition: TrackBuildingAnalyzer.h:85
TrackBuildingAnalyzer::TrackingRegionCandidatePt
MonitorElement * TrackingRegionCandidatePt
Definition: TrackBuildingAnalyzer.h:82
TrackBuildingAnalyzer::SeedTheta
MonitorElement * SeedTheta
Definition: TrackBuildingAnalyzer.h:92
TrackBuildingAnalyzer::doDz
const bool doDz
Definition: TrackBuildingAnalyzer.h:148
TrackBuildingAnalyzer
Definition: TrackBuildingAnalyzer.h:36
TrackBuildingAnalyzer::stoppingSourceVSeta
MonitorElement * stoppingSourceVSeta
Definition: TrackBuildingAnalyzer.h:124
TrackBuildingAnalyzer::doProfETA
const bool doProfETA
Definition: TrackBuildingAnalyzer.h:151
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackBuildingAnalyzer::~TrackBuildingAnalyzer
~TrackBuildingAnalyzer()=default
edm::View
Definition: CaloClusterFwd.h:14
TrackingRegionsSeedingLayerSets.h
TrackBuildingAnalyzer::SeedQ
MonitorElement * SeedQ
Definition: TrackBuildingAnalyzer.h:93
TransientTrackBuilder.h
edm::ParameterSet
Definition: ParameterSet.h:47
TrackBuildingAnalyzer::SeedPhiVsEta
MonitorElement * SeedPhiVsEta
Definition: TrackBuildingAnalyzer.h:91
TrackBuildingAnalyzer::TrackCandEta
MonitorElement * TrackCandEta
Definition: TrackBuildingAnalyzer.h:112
TrackBuildingAnalyzer::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: TrackBuildingAnalyzer.h:39
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
Event.h
TrackCandidate
Definition: TrackCandidate.h:24
TrackBuildingAnalyzer::doProfPHI
const bool doProfPHI
Definition: TrackBuildingAnalyzer.h:150
TrackBuildingAnalyzer::trackMVAsHP
std::vector< MonitorElement * > trackMVAsHP
Definition: TrackBuildingAnalyzer.h:128
TrackBuildingAnalyzer::trackMVAsHPVsPtProfile
std::vector< MonitorElement * > trackMVAsHPVsPtProfile
Definition: TrackBuildingAnalyzer.h:130
TrackBuildingAnalyzer::doAllSeedPlots
const bool doAllSeedPlots
Definition: TrackBuildingAnalyzer.h:138
TrackBuildingAnalyzer::TrackCandPhiVsEta
MonitorElement * TrackCandPhiVsEta
Definition: TrackBuildingAnalyzer.h:114
TrackBuildingAnalyzer::numberOfTrajCandsPerSeed
MonitorElement * numberOfTrajCandsPerSeed
Definition: TrackBuildingAnalyzer.h:104
iEvent
int iEvent
Definition: GenABIO.cc:224
TrackBuildingAnalyzer::seedStoppingSourceVsNumberOfTrajCandsPerSeed
MonitorElement * seedStoppingSourceVsNumberOfTrajCandsPerSeed
Definition: TrackBuildingAnalyzer.h:108
TrackBuildingAnalyzer::TrackingRegionCandidatePhi
MonitorElement * TrackingRegionCandidatePhi
Definition: TrackBuildingAnalyzer.h:84
TrackBuildingAnalyzer::NumberOfRecHitsPerSeed
MonitorElement * NumberOfRecHitsPerSeed
Definition: TrackBuildingAnalyzer.h:96
TrackBuildingAnalyzer::doPHI
const bool doPHI
Definition: TrackBuildingAnalyzer.h:143
edm::EventSetup
Definition: EventSetup.h:58
TransientTrackRecord.h
TrackBuildingAnalyzer::SeedEta
MonitorElement * SeedEta
Definition: TrackBuildingAnalyzer.h:89
TrajectorySeedCollection.h
TrackBuildingAnalyzer::doETA
const bool doETA
Definition: TrackBuildingAnalyzer.h:142
TrackBuildingAnalyzer::trackMVAs
std::vector< MonitorElement * > trackMVAs
Definition: TrackBuildingAnalyzer.h:127
TrackBuildingAnalyzer::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrajectorySeed &seed, const SeedStopInfo &stopInfo, const reco::BeamSpot &bs, const MagneticField &theMF, const TransientTrackingRecHitBuilder &theTTRHBuilder)
Definition: TrackBuildingAnalyzer.cc:493
SeedStopInfo.h
Frameworkfwd.h
T
long double T
Definition: Basic3DVectorLD.h:48
TrackBuildingAnalyzer::doMVAPlots
const bool doMVAPlots
Definition: TrackBuildingAnalyzer.h:153
TrackBuildingAnalyzer::SeedDz
MonitorElement * SeedDz
Definition: TrackBuildingAnalyzer.h:95
TrajectorySeed
Definition: TrajectorySeed.h:18
TrackBuildingAnalyzer::seedStoppingSource
MonitorElement * seedStoppingSource
Definition: TrackBuildingAnalyzer.h:100
TrackBuildingAnalyzer::TrackCandPhi
MonitorElement * TrackCandPhi
Definition: TrackBuildingAnalyzer.h:113
TrackBuildingAnalyzer::doTheta
const bool doTheta
Definition: TrackBuildingAnalyzer.h:145
dqm::implementation::IBooker
Definition: DQMStore.h:43
TrackBuildingAnalyzer::NumberOfRecHitsPerTrackCandVsEtaProfile
MonitorElement * NumberOfRecHitsPerTrackCandVsEtaProfile
Definition: TrackBuildingAnalyzer.h:121
TransientTrackingRecHitBuilder.h
TrackBuildingAnalyzer::TrackCandQ
MonitorElement * TrackCandQ
Definition: TrackBuildingAnalyzer.h:116
AlignmentPI::regions
regions
Definition: AlignmentPayloadInspectorHelper.h:76
TrackingRegion.h
ParameterSet.h
TrackCandidate.h
TrackBuildingAnalyzer::stoppingSourceVSphi
MonitorElement * stoppingSourceVSphi
Definition: TrackBuildingAnalyzer.h:125
TrackBuildingAnalyzer::stoppingSource
MonitorElement * stoppingSource
Definition: TrackBuildingAnalyzer.h:123
TrackBuildingAnalyzer::TrackBuildingAnalyzer
TrackBuildingAnalyzer(const edm::ParameterSet &)
Definition: TrackBuildingAnalyzer.cc:23
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
TransientTrackingRecHitBuilder
Definition: TransientTrackingRecHitBuilder.h:6
TrackBuildingAnalyzer::trackMVAsHPVsEtaProfile
std::vector< MonitorElement * > trackMVAsHPVsEtaProfile
Definition: TrackBuildingAnalyzer.h:132
TrackBuildingAnalyzer::numberOfTrajCandsPerSeedVsEta
MonitorElement * numberOfTrajCandsPerSeedVsEta
Definition: TrackBuildingAnalyzer.h:106
TrackBuildingAnalyzer::doPT
const bool doPT
Definition: TrackBuildingAnalyzer.h:141
TrackBuildingAnalyzer::doRegionCandidatePlots
const bool doRegionCandidatePlots
Definition: TrackBuildingAnalyzer.h:155
edm::OwnVector< TrackingRegion >
TrackBuildingAnalyzer::analyzeRegions
void analyzeRegions(const T &regions)
Definition: TrackBuildingAnalyzer.cc:729
TrackBuildingAnalyzer::initHisto
void initHisto(DQMStore::IBooker &ibooker, const edm::ParameterSet &)
Definition: TrackBuildingAnalyzer.cc:44
TrackBuildingAnalyzer::SeedDxy
MonitorElement * SeedDxy
Definition: TrackBuildingAnalyzer.h:94
TrackBuildingAnalyzer::TrackCandTheta
MonitorElement * TrackCandTheta
Definition: TrackBuildingAnalyzer.h:115