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
18 
19 // system include files
20 #include <memory>
21 #include <iostream>
22 #include <sstream>
23 #include <string>
24 
25 //
26 // class declaration
27 //
28 class DQMStore;
29 namespace reco {
30  class Track;
31  class BeamSpot;
32  class Vertex;
33 } // namespace reco
34 class DQMStore;
36 
38 public:
39  struct generalME {
44  };
45 
46  struct matchingME {
50  };
51 
52  typedef std::vector<std::pair<int, std::map<double, int> > > idx2idxByDoubleColl;
53 
56 
57  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
59 
60 protected:
61  void beginJob(const edm::EventSetup& iSetup);
62  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
63  void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override;
64 
66 
67  void initialize_parameter(const edm::ParameterSet& iConfig);
68  void bookHistos(DQMStore::IBooker& ibooker, generalME& mes, TString label, std::string& dir);
71 
73  generalME& mes, reco::Track* trk, reco::BeamSpot* bs, reco::Vertex* pv, bool requirePlateau = true);
76 
78 
81 
82  //these are used by MTVGenPs
89 
90 private:
91  // edm::ParameterSet conf_;
93  double dRmin_;
96  double dzWRTPvCut_;
98  bool hltPathsAreValid_ = false;
99  std::unique_ptr<GenericTriggerEventFlag> genTriggerEventFlag_;
100 
101  // reference tracks All and matched
104 
105  // monitored tracks All and unmatched
108 
109  // Track matching statistics
111 
113  unsigned int Eta_nbin;
115  unsigned int Pt_nbin; //bool useInvPt; bool useLogPt;
117  unsigned int Phi_nbin;
119  unsigned int Dxy_nbin;
121  unsigned int Dz_nbin;
122 
124  unsigned int ptRes_nbin;
126  unsigned int phiRes_nbin;
128  unsigned int etaRes_nbin;
130  unsigned int dxyRes_nbin;
132  unsigned int dzRes_nbin;
133 };
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)
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 &)