CMS 3D CMS Logo

BPHMonitor.h
Go to the documentation of this file.
1 #ifndef BPHMONITOR_H
2 #define BPHMONITOR_H
3 
4 #include <string>
5 #include <vector>
6 #include <map>
7 
23 //DataFormats
40 
47 
49 
50 struct MEbinning {
51  MEbinning(int n, double min, double max) : nbins(n), xmin(min), xmax(max) {}
52  MEbinning(std::vector<double> e) : edges(std::move(e)) {}
53  int nbins;
54  double xmin;
55  double xmax;
56  std::vector<double> edges;
57 };
58 
59 struct METME{
62 };
63 
64 //
65 // class declaration
66 //
67 
68 class BPHMonitor : public DQMEDAnalyzer
69 {
70 public:
71  BPHMonitor( const edm::ParameterSet& );
72  ~BPHMonitor() override;
73  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
74  static void fillHistoPSetDescription(edm::ParameterSetDescription & pset);
75  static void fillHistoLSPSetDescription(edm::ParameterSetDescription & pset);
76 
77  void case11_selection(const float & dimuonCL, const float & jpsi_cos, const GlobalPoint & displacementFromBeamspotJpsi, const GlobalError & jerr, const edm::Handle<reco::TrackCollection> & trHandle, const std::string & hltpath, const edm::Handle<trigger::TriggerEvent> & handleTriggerEvent, const reco::Muon& m, const reco::Muon& m1, const edm::ESHandle<MagneticField> & bFieldHandle, const reco::BeamSpot & vertexBeamSpot, MonitorElement* phi1, MonitorElement* eta1, MonitorElement* pT1, MonitorElement* phi2, MonitorElement* eta2, MonitorElement* pT2);
78 
79 
80 protected:
81 
82  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
83  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, int& nbins, double& xmin, double& xmax);
84  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX);
85  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, int& nbinsX, double& xmin, double& xmax, double& ymin, double& ymax);
86  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, int& nbinsX, double& xmin, double& xmax, int& nbinsY, double& ymin, double& ymax);
87  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX, std::vector<double> binningY);
88  void bookME(DQMStore::IBooker &, METME& me, std::string &histname, std::string &histtitle, /*const*/ MEbinning& binning);
89 
90  void setMETitle(METME& me, std::string titleX, std::string titleY);
91 
92  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
93  template <typename T>
94  bool matchToTrigger(const std::string &theTriggerName ,T t, edm::Handle<trigger::TriggerEvent> handleTriggerEvent);
95  //bool matchToTrigger(std::string theTriggerName,T t, edm::Handle<trigger::TriggerEventWithRefs> handleTriggerEvent);
96 
97 
98 private:
99  static MEbinning getHistoPSet (edm::ParameterSet pset);
100  // static MEbinning getHistoLSPSet (edm::ParameterSet pset);
101 
104 
109 
110  MEbinning phi_binning_;
111  MEbinning pt_binning_;
112  MEbinning eta_binning_;
113  MEbinning d0_binning_;
114  MEbinning z0_binning_;
115  MEbinning dR_binning_;
116  MEbinning mass_binning_;
117  MEbinning dca_binning_;
118  MEbinning ds_binning_;
119  MEbinning cos_binning_;
120  MEbinning prob_binning_;
121 
127 
143 
144 
158 
159 
160 //
161 
169  int nmuons_;
170  bool tnp_;
171  int L3_;
172  int trOrMu_;
173  int Jpsi_;
174  int Upsilon_;
175  int enum_;
176  int seagull_;
177  double maxmass_;
178  double minmass_;
179  double maxmassJpsi;
180  double minmassJpsi;
183  double maxmassTkTk;
184  double minmassTkTk;
187  double kaon_mass;
188  double mu_mass;
189  double min_dR;
190 
191  double minprob;
192  double mincos;
193  double minDS;
196  std::vector<std::string> hltpaths_num;
197  std::vector<std::string> hltpaths_den;
201 
202 };
203 
204 #endif // METMONITOR_H
MEbinning z0_binning_
Definition: BPHMonitor.h:114
int seagull_
Definition: BPHMonitor.h:176
MonitorElement * numerator
Definition: BPHMonitor.h:60
METME mu2Phi_
Definition: BPHMonitor.h:133
int Upsilon_
Definition: BPHMonitor.h:174
METME DiMuDCA_
Definition: BPHMonitor.h:155
METME phEta_
Definition: BPHMonitor.h:147
StringCutObjectSelector< reco::Muon, true > muoSelection_tag
Definition: BPHMonitor.h:167
METME phPt_
Definition: BPHMonitor.h:148
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
Definition: BPHMonitor.h:200
std::string histoSuffix_
Definition: BPHMonitor.h:103
double maxmassJpsiTk
Definition: BPHMonitor.h:185
double kaon_mass
Definition: BPHMonitor.h:187
METME mu2Pt_
Definition: BPHMonitor.h:135
METME muPt_
Definition: BPHMonitor.h:124
METME mu1Eta_
Definition: BPHMonitor.h:129
def analyze(function, filename, filter=None)
Definition: Profiling.py:11
METME phPhi_
Definition: BPHMonitor.h:146
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.h:105
METME mu2d0_
Definition: BPHMonitor.h:136
std::string folderName_
Definition: BPHMonitor.h:102
MEbinning(int n, double min, double max)
Definition: BPHMonitor.h:51
METME mu2z0_
Definition: BPHMonitor.h:137
METME mu2Eta_
Definition: BPHMonitor.h:134
METME DiMuPhi_
Definition: BPHMonitor.h:149
METME mu3Pt_
Definition: BPHMonitor.h:140
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::vector< double > edges
Definition: BPHMonitor.h:56
PrescaleWeightProvider * prescaleWeightProvider_
Definition: BPHMonitor.h:164
MEbinning eta_binning_
Definition: BPHMonitor.h:112
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
Definition: BPHMonitor.h:195
double maxmassTkTk
Definition: BPHMonitor.h:183
edm::EDGetTokenT< reco::TrackCollection > trToken_
Definition: BPHMonitor.h:107
double minmass_
Definition: BPHMonitor.h:178
void bookHistograms(fwlite::EventContainer &eventCont)
double minprob
Definition: BPHMonitor.h:191
METME mu1Phi_
Definition: BPHMonitor.h:128
METME DiMuEta_
Definition: BPHMonitor.h:150
MEbinning dca_binning_
Definition: BPHMonitor.h:117
int iEvent
Definition: GenABIO.cc:230
MEbinning pt_binning_
Definition: BPHMonitor.h:111
double mincos
Definition: BPHMonitor.h:192
double maxmassJpsi
Definition: BPHMonitor.h:179
MEbinning dR_binning_
Definition: BPHMonitor.h:115
double mu_mass
Definition: BPHMonitor.h:188
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:163
MonitorElement * denominator
Definition: BPHMonitor.h:61
METME DiMuDS_
Definition: BPHMonitor.h:154
MEbinning phi_binning_
Definition: BPHMonitor.h:110
T min(T a, T b)
Definition: MathUtil.h:58
MEbinning ds_binning_
Definition: BPHMonitor.h:118
edm::EDGetTokenT< edm::TriggerResults > hltTrigResTag_
Definition: BPHMonitor.h:194
StringCutObjectSelector< reco::Track, true > trSelection_
Definition: BPHMonitor.h:198
double maxmass_
Definition: BPHMonitor.h:177
MEbinning prob_binning_
Definition: BPHMonitor.h:120
MEbinning cos_binning_
Definition: BPHMonitor.h:119
METME mu1z0_
Definition: BPHMonitor.h:132
std::vector< std::string > hltpaths_den
Definition: BPHMonitor.h:197
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.h:165
METME muz0_
Definition: BPHMonitor.h:126
METME DiMuProb_
Definition: BPHMonitor.h:153
MEbinning d0_binning_
Definition: BPHMonitor.h:113
double minmassJpsiTk
Definition: BPHMonitor.h:186
edm::EDGetTokenT< reco::PhotonCollection > phToken_
Definition: BPHMonitor.h:108
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.h:106
double minDS
Definition: BPHMonitor.h:193
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.h:166
This class takes a vector of HLT paths and returns a weight based on their HLT and L1 prescales...
double minmassUpsilon
Definition: BPHMonitor.h:182
StringCutObjectSelector< reco::Muon, true > muoSelection_probe
Definition: BPHMonitor.h:168
double maxmassUpsilon
Definition: BPHMonitor.h:181
METME mu1d0_
Definition: BPHMonitor.h:131
double minmassTkTk
Definition: BPHMonitor.h:184
METME muEta_
Definition: BPHMonitor.h:123
METME DiMuMass_
Definition: BPHMonitor.h:156
METME DiMuPt_
Definition: BPHMonitor.h:151
MEbinning mass_binning_
Definition: BPHMonitor.h:116
METME mud0_
Definition: BPHMonitor.h:125
METME mu1Pt_
Definition: BPHMonitor.h:130
MEbinning(std::vector< double > e)
Definition: BPHMonitor.h:52
METME mu3Phi_
Definition: BPHMonitor.h:138
std::vector< std::string > hltpaths_num
Definition: BPHMonitor.h:196
METME mu3z0_
Definition: BPHMonitor.h:142
METME mu3Eta_
Definition: BPHMonitor.h:139
double minmassJpsi
Definition: BPHMonitor.h:180
METME DiMuPVcos_
Definition: BPHMonitor.h:152
long double T
METME DiMudR_
Definition: BPHMonitor.h:157
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:162
METME muPhi_
Definition: BPHMonitor.h:122
def move(src, dest)
Definition: eostools.py:510
StringCutObjectSelector< reco::Track, true > trSelection_ref
Definition: BPHMonitor.h:199
Definition: Run.h:43
METME mu3d0_
Definition: BPHMonitor.h:141
double min_dR
Definition: BPHMonitor.h:189