CMS 3D CMS Logo

TrackToTrackComparisonHists.h
Go to the documentation of this file.
1 //
2 // Original Author: John Alison, Mia Tosi
3 // Created: 27 July 2020
4 //
5 //
6 
7 // system include files
9 #include <memory>
10 
11 // user include files
14 
17 
19 
21 
24 
27 
28 #include <iostream>
29 #include <sstream>
30 #include <string>
31 
32 //
33 // class declaration
34 //
35 class DQMStore;
36 namespace reco {
37  class Track;
38  class BeamSpot;
39  class Vertex;
40 } // namespace reco
41 class DQMStore;
43 
45 public:
46  struct generalME {
51  };
52 
53  struct matchingME {
57  };
58 
59  typedef std::vector<std::pair<int, std::map<double, int> > > idx2idxByDoubleColl;
60 
63 
64  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
66 
67 protected:
68  void beginJob(const edm::EventSetup& iSetup);
69  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
70  void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override;
71 
73 
74  void initialize_parameter(const edm::ParameterSet& iConfig);
75  void bookHistos(DQMStore::IBooker& ibooker, generalME& mes, TString label, std::string& dir);
78 
80  generalME& mes, reco::Track* trk, reco::BeamSpot* bs, reco::Vertex* pv, bool requirePlateau = true);
83 
85 
88 
89  //these are used by MTVGenPs
96 
97 private:
98  // edm::ParameterSet conf_;
100  double dRmin_;
103  double dzWRTPvCut_;
105  bool hltPathsAreValid_ = false;
106  std::unique_ptr<GenericTriggerEventFlag> genTriggerEventFlag_;
107 
108  // reference tracks All and matched
111 
112  // monitored tracks All and unmatched
115 
116  // Track matching statistics
118 
120  unsigned int Eta_nbin;
122  unsigned int Pt_nbin; //bool useInvPt; bool useLogPt;
124  unsigned int Phi_nbin;
126  unsigned int Dxy_nbin;
128  unsigned int Dz_nbin;
129 
131  unsigned int ptRes_nbin;
133  unsigned int phiRes_nbin;
135  unsigned int etaRes_nbin;
137  unsigned int dxyRes_nbin;
139  unsigned int dzRes_nbin;
140 };
TrackToTrackComparisonHists::matchingME::h_eta_vs_eta
MonitorElement * h_eta_vs_eta
Definition: TrackToTrackComparisonHists.h:55
TrackToTrackComparisonHists::matchingME::label
std::string label
Definition: TrackToTrackComparisonHists.h:54
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
TrackToTrackComparisonHists::Pt_nbin
unsigned int Pt_nbin
Definition: TrackToTrackComparisonHists.h:122
TrackToTrackComparisonHists::initialize_parameter
void initialize_parameter(const edm::ParameterSet &iConfig)
Definition: TrackToTrackComparisonHists.cc:525
TrackToTrackComparisonHists::bookHistos
void bookHistos(DQMStore::IBooker &ibooker, generalME &mes, TString label, std::string &dir)
Definition: TrackToTrackComparisonHists.cc:358
TrackToTrackComparisonHists::generalME::h_dxyWRTpv
MonitorElement * h_dxyWRTpv
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::~TrackToTrackComparisonHists
~TrackToTrackComparisonHists() override
Definition: TrackToTrackComparisonHists.cc:48
TrackToTrackComparisonHists::bookHistograms
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
Definition: TrackToTrackComparisonHists.cc:245
TrackToTrackComparisonHists::matchedReferenceTracksMEs_
generalME matchedReferenceTracksMEs_
Definition: TrackToTrackComparisonHists.h:110
TrackToTrackComparisonHists::generalME::h_pt
MonitorElement * h_pt
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::dzWRTPvCut_
double dzWRTPvCut_
Definition: TrackToTrackComparisonHists.h:103
align::BeamSpot
Definition: StructureType.h:95
TrackToTrackComparisonHists::dzRes_nbin
unsigned int dzRes_nbin
Definition: TrackToTrackComparisonHists.h:139
TrackToTrackComparisonHists::Dxy_rangeMin
double Dxy_rangeMin
Definition: TrackToTrackComparisonHists.h:125
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< reco::TrackCollection >
TrackToTrackComparisonHists::generalME::label
std::string label
Definition: TrackToTrackComparisonHists.h:47
TrackToTrackComparisonHists::etaRes_nbin
unsigned int etaRes_nbin
Definition: TrackToTrackComparisonHists.h:135
TrackToTrackComparisonHists::referenceBSToken_
edm::EDGetTokenT< reco::BeamSpot > referenceBSToken_
Definition: TrackToTrackComparisonHists.h:93
TrackToTrackComparisonHists::etaRes_rangeMax
double etaRes_rangeMax
Definition: TrackToTrackComparisonHists.h:134
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TrackToTrackComparisonHists::Phi_rangeMax
double Phi_rangeMax
Definition: TrackToTrackComparisonHists.h:123
TrackToTrackComparisonHists::generalME::h_hits
MonitorElement * h_hits
Definition: TrackToTrackComparisonHists.h:48
DQMStore.h
TrackToTrackComparisonHists::unMatchedMonitoredTracksMEs_
generalME unMatchedMonitoredTracksMEs_
Definition: TrackToTrackComparisonHists.h:114
TrackToTrackComparisonHists::phiRes_rangeMin
double phiRes_rangeMin
Definition: TrackToTrackComparisonHists.h:132
EDAnalyzer.h
TrackToTrackComparisonHists::monitoredPVToken_
edm::EDGetTokenT< reco::VertexCollection > monitoredPVToken_
Definition: TrackToTrackComparisonHists.h:94
TrackToTrackComparisonHists::monitoredTracksMEs_
generalME monitoredTracksMEs_
Definition: TrackToTrackComparisonHists.h:113
HLT_FULL_cff.dRMin
dRMin
Definition: HLT_FULL_cff.py:8664
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
TrackToTrackComparisonHists::generalME::h_dz
MonitorElement * h_dz
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::referenceTrackInputTag_
edm::InputTag referenceTrackInputTag_
Definition: TrackToTrackComparisonHists.h:87
TrackToTrackComparisonHists::matchingME::h_pt_vs_pt
MonitorElement * h_pt_vs_pt
Definition: TrackToTrackComparisonHists.h:55
TrackToTrackComparisonHists::book_generic_tracks_histos
void book_generic_tracks_histos(DQMStore::IBooker &ibooker, generalME &mes, TString label, std::string &dir)
Definition: TrackToTrackComparisonHists.cc:365
TrackToTrackComparisonHists::fillMap
void fillMap(reco::TrackCollection tracks1, reco::TrackCollection tracks2, idx2idxByDoubleColl &map, float dRMin)
Definition: TrackToTrackComparisonHists.cc:315
TrackToTrackComparisonHists::topDirName_
std::string topDirName_
Definition: TrackToTrackComparisonHists.h:99
TrackToTrackComparisonHists::genTriggerEventFlag_
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_
Definition: TrackToTrackComparisonHists.h:106
TrackToTrackComparisonHists::generalME::h_phi
MonitorElement * h_phi
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::Phi_rangeMin
double Phi_rangeMin
Definition: TrackToTrackComparisonHists.h:123
TrackToTrackComparisonHists::Pt_rangeMax
double Pt_rangeMax
Definition: TrackToTrackComparisonHists.h:121
TrackToTrackComparisonHists::generalME::h_charge
MonitorElement * h_charge
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::fill_matching_tracks_histos
void fill_matching_tracks_histos(matchingME &mes, reco::Track *mon, reco::Track *ref, reco::BeamSpot *bs, reco::Vertex *pv)
Definition: TrackToTrackComparisonHists.cc:487
MakerMacros.h
TrackToTrackComparisonHists::Pt_rangeMin
double Pt_rangeMin
Definition: TrackToTrackComparisonHists.h:121
TrackToTrackComparisonHists::matchingME::h_dDzWRTpv
MonitorElement * h_dDzWRTpv
Definition: TrackToTrackComparisonHists.h:56
cms::cuda::bs
bs
Definition: HistoContainer.h:127
TrackToTrackComparisonHists::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: TrackToTrackComparisonHists.cc:55
TrackFwd.h
TrackToTrackComparisonHists::dxyRes_nbin
unsigned int dxyRes_nbin
Definition: TrackToTrackComparisonHists.h:137
TrackToTrackComparisonHists::referencePVToken_
edm::EDGetTokenT< reco::VertexCollection > referencePVToken_
Definition: TrackToTrackComparisonHists.h:95
dqm::legacy::DQMStore
Definition: DQMStore.h:727
TrackToTrackComparisonHists::book_matching_tracks_histos
void book_matching_tracks_histos(DQMStore::IBooker &ibooker, matchingME &mes, TString label, std::string &dir)
Definition: TrackToTrackComparisonHists.cc:396
TrackToTrackComparisonHists::monitoredBSToken_
edm::EDGetTokenT< reco::BeamSpot > monitoredBSToken_
Definition: TrackToTrackComparisonHists.h:92
TrackToTrackComparisonHists::generalME::h_pt_vs_eta
MonitorElement * h_pt_vs_eta
Definition: TrackToTrackComparisonHists.h:50
TrackToTrackComparisonHists::phiRes_nbin
unsigned int phiRes_nbin
Definition: TrackToTrackComparisonHists.h:133
reco::BeamSpot
Definition: BeamSpot.h:21
TrackToTrackComparisonHists::Eta_rangeMax
double Eta_rangeMax
Definition: TrackToTrackComparisonHists.h:119
reco::Track
Definition: Track.h:27
TrackToTrackComparisonHists::dxyCutForPlateau_
double dxyCutForPlateau_
Definition: TrackToTrackComparisonHists.h:102
TrackToTrackComparisonHists::Eta_nbin
unsigned int Eta_nbin
Definition: TrackToTrackComparisonHists.h:120
EDGetToken.h
TrackToTrackComparisonHists::matchingME::h_phi_vs_phi
MonitorElement * h_phi_vs_phi
Definition: TrackToTrackComparisonHists.h:55
LaserDQM_cfi.mon
mon
Definition: LaserDQM_cfi.py:3
DQMEDAnalyzer.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackToTrackComparisonHists::matchingME::h_dDxy
MonitorElement * h_dDxy
Definition: TrackToTrackComparisonHists.h:56
TrackToTrackComparisonHists::monitoredTrackInputTag_
edm::InputTag monitoredTrackInputTag_
Definition: TrackToTrackComparisonHists.h:86
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
TrackToTrackComparisonHists::requireValidHLTPaths_
bool requireValidHLTPaths_
Definition: TrackToTrackComparisonHists.h:104
TrackToTrackComparisonHists::pTCutForPlateau_
double pTCutForPlateau_
Definition: TrackToTrackComparisonHists.h:101
TrackToTrackComparisonHists::Dxy_nbin
unsigned int Dxy_nbin
Definition: TrackToTrackComparisonHists.h:126
TrackToTrackComparisonHists
Definition: TrackToTrackComparisonHists.h:44
TrackToTrackComparisonHists::referenceTrackToken_
edm::EDGetTokenT< reco::TrackCollection > referenceTrackToken_
Definition: TrackToTrackComparisonHists.h:91
MonitorElement.h
TrackToTrackComparisonHists::matchingME::h_dPhi
MonitorElement * h_dPhi
Definition: TrackToTrackComparisonHists.h:56
TrackToTrackComparisonHists::matchingME::h_dDxyWRTpv
MonitorElement * h_dDxyWRTpv
Definition: TrackToTrackComparisonHists.h:56
edm::ParameterSet
Definition: ParameterSet.h:47
TrackToTrackComparisonHists::generalME::h_dRmin
MonitorElement * h_dRmin
Definition: TrackToTrackComparisonHists.h:49
Event.h
GenericTriggerEventFlag
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
Definition: GenericTriggerEventFlag.h:42
TrackToTrackComparisonHists::Dz_nbin
unsigned int Dz_nbin
Definition: TrackToTrackComparisonHists.h:128
TrackToTrackComparisonHists::dqmStore_
DQMStore * dqmStore_
Definition: TrackToTrackComparisonHists.h:84
TrackToTrackComparisonHists::dxyRes_rangeMin
double dxyRes_rangeMin
Definition: TrackToTrackComparisonHists.h:136
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
TrackToTrackComparisonHists::generalME::h_dzWRTpv
MonitorElement * h_dzWRTpv
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::matchingME::h_dHits
MonitorElement * h_dHits
Definition: TrackToTrackComparisonHists.h:56
TrackToTrackComparisonHists::Dz_rangeMin
double Dz_rangeMin
Definition: TrackToTrackComparisonHists.h:127
TrackToTrackComparisonHists::idx2idxByDoubleColl
std::vector< std::pair< int, std::map< double, int > > > idx2idxByDoubleColl
Definition: TrackToTrackComparisonHists.h:59
TrackToTrackComparisonHists::dzRes_rangeMax
double dzRes_rangeMax
Definition: TrackToTrackComparisonHists.h:138
TrackToTrackComparisonHists::dzRes_rangeMin
double dzRes_rangeMin
Definition: TrackToTrackComparisonHists.h:138
edm::EventSetup
Definition: EventSetup.h:58
TrackToTrackComparisonHists::generalME::h_dRmin_l
MonitorElement * h_dRmin_l
Definition: TrackToTrackComparisonHists.h:49
TrackToTrackComparisonHists::generalME::h_dxy
MonitorElement * h_dxy
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::ptRes_nbin
unsigned int ptRes_nbin
Definition: TrackToTrackComparisonHists.h:131
VertexFwd.h
TrackToTrackComparisonHists::matchingME::h_hits_vs_hits
MonitorElement * h_hits_vs_hits
Definition: TrackToTrackComparisonHists.h:55
TrackToTrackComparisonHists::Dxy_rangeMax
double Dxy_rangeMax
Definition: TrackToTrackComparisonHists.h:125
TrackToTrackComparisonHists::ptRes_rangeMin
double ptRes_rangeMin
Definition: TrackToTrackComparisonHists.h:130
HltBtagValidation_cff.Vertex
Vertex
Definition: HltBtagValidation_cff.py:32
TrackToTrackComparisonHists::dxyRes_rangeMax
double dxyRes_rangeMax
Definition: TrackToTrackComparisonHists.h:136
TrackToTrackComparisonHists::fill_generic_tracks_histos
void fill_generic_tracks_histos(generalME &mes, reco::Track *trk, reco::BeamSpot *bs, reco::Vertex *pv, bool requirePlateau=true)
Definition: TrackToTrackComparisonHists.cc:451
Frameworkfwd.h
TrackToTrackComparisonHists::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TrackToTrackComparisonHists.cc:273
TrackToTrackComparisonHists::generalME::h_tracks
MonitorElement * h_tracks
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::beginJob
void beginJob(const edm::EventSetup &iSetup)
Definition: TrackToTrackComparisonHists.cc:53
TrackToTrackComparisonHists::phiRes_rangeMax
double phiRes_rangeMax
Definition: TrackToTrackComparisonHists.h:132
TrackToTrackComparisonHists::Eta_rangeMin
double Eta_rangeMin
Definition: TrackToTrackComparisonHists.h:119
TrackToTrackComparisonHists::matchingME
Definition: TrackToTrackComparisonHists.h:53
dqm::implementation::IBooker
Definition: DQMStore.h:43
TrackToTrackComparisonHists::ptRes_rangeMax
double ptRes_rangeMax
Definition: TrackToTrackComparisonHists.h:130
TrackToTrackComparisonHists::matchingME::h_dCharge
MonitorElement * h_dCharge
Definition: TrackToTrackComparisonHists.h:56
TrackToTrackComparisonHists::matchingME::h_dDz
MonitorElement * h_dDz
Definition: TrackToTrackComparisonHists.h:56
genParticles_cff.map
map
Definition: genParticles_cff.py:11
ParameterSet.h
TrackToTrackComparisonHists::referenceTracksMEs_
generalME referenceTracksMEs_
Definition: TrackToTrackComparisonHists.h:109
TrackToTrackComparisonHists::matchTracksMEs_
matchingME matchTracksMEs_
Definition: TrackToTrackComparisonHists.h:117
edm::Event
Definition: Event.h:73
TrackToTrackComparisonHists::hltPathsAreValid_
bool hltPathsAreValid_
Definition: TrackToTrackComparisonHists.h:105
TrackToTrackComparisonHists::TrackToTrackComparisonHists
TrackToTrackComparisonHists(const edm::ParameterSet &)
Definition: TrackToTrackComparisonHists.cc:16
TrackToTrackComparisonHists::matchingME::h_dEta
MonitorElement * h_dEta
Definition: TrackToTrackComparisonHists.h:56
TrackToTrackComparisonHists::etaRes_rangeMin
double etaRes_rangeMin
Definition: TrackToTrackComparisonHists.h:134
TrackToTrackComparisonHists::generalME
Definition: TrackToTrackComparisonHists.h:46
TrackToTrackComparisonHists::Dz_rangeMax
double Dz_rangeMax
Definition: TrackToTrackComparisonHists.h:127
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
label
const char * label
Definition: PFTauDecayModeTools.cc:11
TrackToTrackComparisonHists::matchingME::h_dPt
MonitorElement * h_dPt
Definition: TrackToTrackComparisonHists.h:56
TrackToTrackComparisonHists::generalME::h_eta
MonitorElement * h_eta
Definition: TrackToTrackComparisonHists.h:48
TrackToTrackComparisonHists::monitoredTrackToken_
edm::EDGetTokenT< reco::TrackCollection > monitoredTrackToken_
Definition: TrackToTrackComparisonHists.h:90
TrackToTrackComparisonHists::dRmin_
double dRmin_
Definition: TrackToTrackComparisonHists.h:100
reco::Vertex
Definition: Vertex.h:35
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
TrackToTrackComparisonHists::Phi_nbin
unsigned int Phi_nbin
Definition: TrackToTrackComparisonHists.h:124
TrackToTrackComparisonHists::fillHistoPSetDescription
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: TrackToTrackComparisonHists.cc:569