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 // user include files
20 
21 // system include files
22 #include <memory>
23 #include <iostream>
24 #include <sstream>
25 #include <string>
26 
27 //
28 // class declaration
29 //
30 class DQMStore;
31 namespace reco {
32  class Track;
33  class BeamSpot;
34  class Vertex;
35 } // namespace reco
36 class DQMStore;
38 
40 public:
41  struct generalME {
47  };
48 
49  struct matchingME {
53  };
54 
55  typedef std::vector<std::pair<int, std::map<double, int> > > idx2idxByDoubleColl;
56 
59 
60  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
62 
63 protected:
64  void beginJob(const edm::EventSetup& iSetup);
65  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
66  void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override;
67 
69 
70  void initialize_parameter(const edm::ParameterSet& iConfig);
71  void bookHistos(DQMStore::IBooker& ibooker, generalME& mes, TString label, std::string& dir);
74 
76  reco::Track* trk,
79  unsigned int ls,
80  double onlinelumi,
81  double PU,
82  bool requirePlateau = true);
85 
87 
90 
91  //these are used by MTVGenPs
100 
101 private:
102  // edm::ParameterSet conf_;
104  double dRmin_;
107  double dzWRTPvCut_;
109  bool hltPathsAreValid_ = false;
110  std::unique_ptr<GenericTriggerEventFlag> genTriggerEventFlag_;
111 
112  // reference tracks All and matched
115 
116  // monitored tracks All and unmatched
119 
120  // Track matching statistics
122 
124  unsigned int Eta_nbin;
126  unsigned int Pt_nbin; //bool useInvPt; bool useLogPt;
128  unsigned int Phi_nbin;
130  unsigned int Dxy_nbin;
132  unsigned int Dz_nbin;
133 
135  unsigned int ptRes_nbin;
137  unsigned int phiRes_nbin;
139  unsigned int etaRes_nbin;
141  unsigned int dxyRes_nbin;
143  unsigned int dzRes_nbin;
144  unsigned int ls_rangeMin, ls_rangeMax;
145  unsigned int ls_nbin;
147  unsigned int PU_nbin;
149  unsigned int onlinelumi_nbin;
150 };
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_
edm::EDGetTokenT< OnlineLuminosityRecord > onlineMetaDataDigisToken_
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 fill_generic_tracks_histos(generalME &mes, reco::Track *trk, reco::BeamSpot *bs, reco::Vertex *pv, unsigned int ls, double onlinelumi, double PU, bool requirePlateau=true)
def ls(path, rec=False)
Definition: eostools.py:349
edm::EDGetTokenT< LumiScalersCollection > lumiScalersToken_
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)
fixed size matrix
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 &)