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 
21 
22 //DataFormats
43 
53 
54 #include "TLorentzVector.h"
55 
57 
58 struct MEbinning {
59  MEbinning(int n, double min, double max) : nbins(n), xmin(min), xmax(max) {}
60  MEbinning(std::vector<double> e) : edges(std::move(e)) {}
61  int nbins;
62  double xmin;
63  double xmax;
64  std::vector<double> edges;
65 };
66 
67 struct METME {
70 };
71 
72 //
73 // class declaration
74 //
75 
76 class BPHMonitor : public DQMEDAnalyzer {
77 public:
79  ~BPHMonitor() override;
80  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
81  static void fillHistoPSetDescription(edm::ParameterSetDescription& pset);
82  static void fillHistoLSPSetDescription(edm::ParameterSetDescription& pset);
83 
84  void case11_selection(const float& dimuonCL,
85  const float& jpsi_cos,
86  const GlobalPoint& displacementFromBeamspotJpsi,
87  const GlobalError& jerr,
88  const edm::Handle<reco::TrackCollection>& trHandle,
89  const std::string& hltpath,
90  const edm::Handle<trigger::TriggerEvent>& handleTriggerEvent,
91  const reco::Muon& m,
92  const reco::Muon& m1,
93  const edm::ESHandle<MagneticField>& bFieldHandle,
94  const reco::BeamSpot& vertexBeamSpot,
95  MonitorElement* phi1,
98  MonitorElement* phi2,
101 
102 protected:
103  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
104  void bookME(DQMStore::IBooker&,
105  METME& me,
106  std::string& histname,
107  std::string& histtitle,
108  int& nbins,
109  double& xmin,
110  double& xmax);
111  void bookME(
112  DQMStore::IBooker&, METME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX);
113  void bookME(DQMStore::IBooker&,
114  METME& me,
115  std::string& histname,
116  std::string& histtitle,
117  int& nbinsX,
118  double& xmin,
119  double& xmax,
120  double& ymin,
121  double& ymax);
122  void bookME(DQMStore::IBooker&,
123  METME& me,
124  std::string& histname,
125  std::string& histtitle,
126  int& nbinsX,
127  double& xmin,
128  double& xmax,
129  int& nbinsY,
130  double& ymin,
131  double& ymax);
132  void bookME(DQMStore::IBooker&,
133  METME& me,
134  std::string& histname,
135  std::string& histtitle,
136  std::vector<double> binningX,
137  std::vector<double> binningY);
138  void bookME(
139  DQMStore::IBooker&, METME& me, std::string& histname, std::string& histtitle, /*const*/ MEbinning& binning);
140 
141  void setMETitle(METME& me, std::string titleX, std::string titleY);
142 
143  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
144 
145  template <typename T>
146  bool matchToTrigger(const std::string& theTriggerName, T t);
147 
148  double Prescale(const std::string num,
149  const std::string den,
150  edm::Event const& iEvent,
151  edm::EventSetup const& iSetup,
152  HLTPrescaleProvider* hltPrescale_);
153 
154 private:
155  static MEbinning getHistoPSet(edm::ParameterSet pset);
156  // static MEbinning getHistoLSPSet (edm::ParameterSet pset);
157 
160 
166 
172  MEbinning phi_binning_;
173  MEbinning pt_binning_;
174  MEbinning dMu_pt_binning_;
175  MEbinning eta_binning_;
176  MEbinning d0_binning_;
177  MEbinning z0_binning_;
178  MEbinning dR_binning_;
179  MEbinning mass_binning_;
180  MEbinning Bmass_binning_;
181  MEbinning dca_binning_;
182  MEbinning ds_binning_;
183  MEbinning cos_binning_;
184  MEbinning prob_binning_;
185 
191 
207 
221 
229  int nmuons_;
230  bool tnp_;
231  int L3_;
232  int ptCut_;
234  int trOrMu_;
235  int Jpsi_;
236  int Upsilon_;
237  int enum_;
238  int seagull_;
239  double maxmass_;
240  double minmass_;
241  double maxmassJpsi;
242  double minmassJpsi;
245  double maxmassTkTk;
246  double minmassTkTk;
249  double kaon_mass;
250  double mu_mass;
251  double min_dR;
252  double max_dR;
253 
254  double minprob;
255  double mincos;
256  double minDS;
260  std::vector<std::string> hltpaths_num;
261  std::vector<std::string> hltpaths_den;
265 
267 
270  std::string getTriggerName(std::string partialName);
271 
272  std::vector<bool> warningPrinted4token_;
273 };
274 
275 #endif // METMONITOR_H
MEbinning z0_binning_
Definition: BPHMonitor.h:177
int seagull_
Definition: BPHMonitor.h:238
METME mu2Phi_
Definition: BPHMonitor.h:197
int Upsilon_
Definition: BPHMonitor.h:236
METME DiMuDCA_
Definition: BPHMonitor.h:217
double max_dR
Definition: BPHMonitor.h:252
METME phEta_
Definition: BPHMonitor.h:209
METME phPt_
Definition: BPHMonitor.h:210
std::string histoSuffix_
Definition: BPHMonitor.h:159
double maxmassJpsiTk
Definition: BPHMonitor.h:247
double kaon_mass
Definition: BPHMonitor.h:249
METME mu2Pt_
Definition: BPHMonitor.h:199
METME muPt_
Definition: BPHMonitor.h:188
HLTPrescaleProvider * hltPrescale_
Definition: BPHMonitor.h:224
METME mu1Eta_
Definition: BPHMonitor.h:193
StringCutObjectSelector< reco::Track, true > trSelection_
Definition: BPHMonitor.h:262
METME phPhi_
Definition: BPHMonitor.h:208
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
Definition: BPHMonitor.h:264
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.h:167
METME mu2d0_
Definition: BPHMonitor.h:200
dqm::reco::MonitorElement * denominator
Definition: BPHMonitor.h:69
edm::InputTag bsInputTag_
Definition: BPHMonitor.h:162
std::string folderName_
Definition: BPHMonitor.h:158
MEbinning(int n, double min, double max)
Definition: BPHMonitor.h:59
METME mu2z0_
Definition: BPHMonitor.h:201
METME mu2Eta_
Definition: BPHMonitor.h:198
dqm::reco::MonitorElement * numerator
Definition: BPHMonitor.h:68
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.h:226
METME DiMuPhi_
Definition: BPHMonitor.h:211
METME mu3Pt_
Definition: BPHMonitor.h:204
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:64
MEbinning eta_binning_
Definition: BPHMonitor.h:175
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
Definition: BPHMonitor.h:259
double maxmassTkTk
Definition: BPHMonitor.h:245
edm::EDGetTokenT< reco::TrackCollection > trToken_
Definition: BPHMonitor.h:169
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
double minmass_
Definition: BPHMonitor.h:240
double minprob
Definition: BPHMonitor.h:254
METME mu1Phi_
Definition: BPHMonitor.h:192
METME DiMuEta_
Definition: BPHMonitor.h:212
MEbinning dca_binning_
Definition: BPHMonitor.h:181
int displaced_
Definition: BPHMonitor.h:233
int iEvent
Definition: GenABIO.cc:224
MEbinning pt_binning_
Definition: BPHMonitor.h:173
double mincos
Definition: BPHMonitor.h:255
double maxmassJpsi
Definition: BPHMonitor.h:241
std::vector< bool > warningPrinted4token_
Definition: BPHMonitor.h:272
edm::InputTag muoInputTag_
Definition: BPHMonitor.h:161
MEbinning dR_binning_
Definition: BPHMonitor.h:178
edm::InputTag vtxInputTag_
Definition: BPHMonitor.h:165
edm::Handle< edm::TriggerResults > HLTR
Definition: BPHMonitor.h:269
StringCutObjectSelector< reco::Track, true > trSelection_ref
Definition: BPHMonitor.h:263
double mu_mass
Definition: BPHMonitor.h:250
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: BPHMonitor.h:171
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:223
HLTConfigProvider hltConfig_
Definition: BPHMonitor.h:268
METME DiMuDS_
Definition: BPHMonitor.h:216
MEbinning phi_binning_
Definition: BPHMonitor.h:172
T min(T a, T b)
Definition: MathUtil.h:58
MEbinning ds_binning_
Definition: BPHMonitor.h:182
edm::EDGetTokenT< edm::TriggerResults > hltTrigResTag_
Definition: BPHMonitor.h:257
double maxmass_
Definition: BPHMonitor.h:239
MEbinning prob_binning_
Definition: BPHMonitor.h:184
MEbinning cos_binning_
Definition: BPHMonitor.h:183
METME mu1z0_
Definition: BPHMonitor.h:196
std::vector< std::string > hltpaths_den
Definition: BPHMonitor.h:261
METME muz0_
Definition: BPHMonitor.h:190
METME DiMuProb_
Definition: BPHMonitor.h:215
MEbinning d0_binning_
Definition: BPHMonitor.h:176
double minmassJpsiTk
Definition: BPHMonitor.h:248
edm::EDGetTokenT< reco::PhotonCollection > phToken_
Definition: BPHMonitor.h:170
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.h:168
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double minDS
Definition: BPHMonitor.h:256
double minmassUpsilon
Definition: BPHMonitor.h:244
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
StringCutObjectSelector< reco::Muon, true > muoSelection_probe
Definition: BPHMonitor.h:228
edm::Handle< trigger::TriggerEvent > handleTriggerEvent
Definition: BPHMonitor.h:266
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.h:225
MEbinning dMu_pt_binning_
Definition: BPHMonitor.h:174
edm::InputTag hltInputTag_1
Definition: BPHMonitor.h:258
double maxmassUpsilon
Definition: BPHMonitor.h:243
METME mu1d0_
Definition: BPHMonitor.h:195
double minmassTkTk
Definition: BPHMonitor.h:246
METME muEta_
Definition: BPHMonitor.h:187
edm::InputTag trInputTag_
Definition: BPHMonitor.h:163
StringCutObjectSelector< reco::Muon, true > muoSelection_tag
Definition: BPHMonitor.h:227
METME BMass_
Definition: BPHMonitor.h:219
METME DiMuMass_
Definition: BPHMonitor.h:218
METME DiMuPt_
Definition: BPHMonitor.h:213
MEbinning mass_binning_
Definition: BPHMonitor.h:179
METME mud0_
Definition: BPHMonitor.h:189
METME mu1Pt_
Definition: BPHMonitor.h:194
MEbinning(std::vector< double > e)
Definition: BPHMonitor.h:60
METME mu3Phi_
Definition: BPHMonitor.h:202
std::vector< std::string > hltpaths_num
Definition: BPHMonitor.h:260
METME mu3z0_
Definition: BPHMonitor.h:206
METME mu3Eta_
Definition: BPHMonitor.h:203
double minmassJpsi
Definition: BPHMonitor.h:242
edm::InputTag phInputTag_
Definition: BPHMonitor.h:164
METME DiMuPVcos_
Definition: BPHMonitor.h:214
long double T
METME DiMudR_
Definition: BPHMonitor.h:220
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:222
METME muPhi_
Definition: BPHMonitor.h:186
MEbinning Bmass_binning_
Definition: BPHMonitor.h:180
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45
METME mu3d0_
Definition: BPHMonitor.h:205
double min_dR
Definition: BPHMonitor.h:251