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 
68  void fillMap(const edm::View<reco::Track>& tracks1,
69  const edm::View<reco::Track>& tracks2,
71  float dRMin);
72 
73  void initialize_parameter(const edm::ParameterSet& iConfig);
74  void bookHistos(DQMStore::IBooker& ibooker, generalME& mes, TString label, std::string& dir);
77 
79  reco::Track* trk,
82  unsigned int ls,
83  double onlinelumi,
84  double PU,
85  bool requirePlateau = true);
88 
90 
93 
94  //these are used by MTVGenPs
103 
104 private:
105  // edm::ParameterSet conf_;
107  double dRmin_;
110  double dzWRTPvCut_;
112  bool hltPathsAreValid_ = false;
113  std::unique_ptr<GenericTriggerEventFlag> genTriggerEventFlag_;
114 
115  // reference tracks All and matched
118 
119  // monitored tracks All and unmatched
122 
123  // Track matching statistics
125 
127  unsigned int Eta_nbin;
129  unsigned int Pt_nbin; //bool useInvPt; bool useLogPt;
131  unsigned int Phi_nbin;
133  unsigned int Dxy_nbin;
135  unsigned int Dz_nbin;
136 
138  unsigned int ptRes_nbin;
140  unsigned int phiRes_nbin;
142  unsigned int etaRes_nbin;
144  unsigned int dxyRes_nbin;
146  unsigned int dzRes_nbin;
147  unsigned int ls_rangeMin, ls_rangeMax;
148  unsigned int ls_nbin;
150  unsigned int PU_nbin;
152  unsigned int onlinelumi_nbin;
153 };
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
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 fillMap(const edm::View< reco::Track > &tracks1, const edm::View< reco::Track > &tracks2, idx2idxByDoubleColl &map, float dRMin)
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_
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)
edm::EDGetTokenT< edm::View< reco::Track > > referenceTrackToken_
edm::EDGetTokenT< edm::View< reco::Track > > monitoredTrackToken_
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 &)