CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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 };
edm::EDGetTokenT< reco::TrackCollection > monitoredTrackToken_
void beginJob(const edm::EventSetup &iSetup)
edm::EDGetTokenT< reco::BeamSpot > referenceBSToken_
edm::EDGetTokenT< reco::VertexCollection > monitoredPVToken_
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
edm::EDGetTokenT< reco::TrackCollection > referenceTrackToken_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
char const * label
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_
void fill_generic_tracks_histos(generalME &mes, reco::Track *trk, reco::BeamSpot *bs, reco::Vertex *pv, bool requirePlateau=true)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::vector< std::pair< int, std::map< double, int > > > idx2idxByDoubleColl
void initialize_parameter(const edm::ParameterSet &iConfig)
void fill_matching_tracks_histos(matchingME &mes, reco::Track *mon, reco::Track *ref, reco::BeamSpot *bs, reco::Vertex *pv)
edm::EDGetTokenT< reco::BeamSpot > monitoredBSToken_
edm::EDGetTokenT< reco::VertexCollection > referencePVToken_
void fillMap(reco::TrackCollection tracks1, reco::TrackCollection tracks2, idx2idxByDoubleColl &map, float dRMin)
void book_matching_tracks_histos(DQMStore::IBooker &ibooker, matchingME &mes, TString label, std::string &dir)
void book_generic_tracks_histos(DQMStore::IBooker &ibooker, generalME &mes, TString label, std::string &dir)
void bookHistos(DQMStore::IBooker &ibooker, generalME &mes, TString label, std::string &dir)
Definition: Run.h:45
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrackToTrackComparisonHists(const edm::ParameterSet &)