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 {
78 public:
79  BPHMonitor( const edm::ParameterSet& );
80  ~BPHMonitor() override;
81  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
82  static void fillHistoPSetDescription(edm::ParameterSetDescription & pset);
83  static void fillHistoLSPSetDescription(edm::ParameterSetDescription & pset);
84 
85  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);
86 
87 
88 protected:
89 
90  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
91  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, int& nbins, double& xmin, double& xmax);
92  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX);
93  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, int& nbinsX, double& xmin, double& xmax, double& ymin, double& ymax);
94  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, int& nbinsX, double& xmin, double& xmax, int& nbinsY, double& ymin, double& ymax);
95  void bookME(DQMStore::IBooker &, METME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX, std::vector<double> binningY);
96  void bookME(DQMStore::IBooker &, METME& me, std::string &histname, std::string &histtitle, /*const*/ MEbinning& binning);
97 
98  void setMETitle(METME& me, std::string titleX, std::string titleY);
99 
100  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
101 
102  template <typename T>
103  bool matchToTrigger(const std::string &theTriggerName , T t);
104 
105  double Prescale(const std::string num, const std::string den, edm::Event const& iEvent, edm::EventSetup const& iSetup, HLTPrescaleProvider* hltPrescale_);
106 
107 
108 private:
109  static MEbinning getHistoPSet (edm::ParameterSet pset);
110  // static MEbinning getHistoLSPSet (edm::ParameterSet pset);
111 
114 
120 
126  MEbinning phi_binning_;
127  MEbinning pt_binning_;
128  MEbinning dMu_pt_binning_;
129  MEbinning eta_binning_;
130  MEbinning d0_binning_;
131  MEbinning z0_binning_;
132  MEbinning dR_binning_;
133  MEbinning mass_binning_;
134  MEbinning Bmass_binning_;
135  MEbinning dca_binning_;
136  MEbinning ds_binning_;
137  MEbinning cos_binning_;
138  MEbinning prob_binning_;
139 
145 
161 
162 
176 
177 
185  int nmuons_;
186  bool tnp_;
187  int L3_;
188  int ptCut_;
190  int trOrMu_;
191  int Jpsi_;
192  int Upsilon_;
193  int enum_;
194  int seagull_;
195  double maxmass_;
196  double minmass_;
197  double maxmassJpsi;
198  double minmassJpsi;
201  double maxmassTkTk;
202  double minmassTkTk;
205  double kaon_mass;
206  double mu_mass;
207  double min_dR;
208  double max_dR;
209 
210  double minprob;
211  double mincos;
212  double minDS;
216  std::vector<std::string> hltpaths_num;
217  std::vector<std::string> hltpaths_den;
221 
223 
226  std::string getTriggerName(std::string partialName);
227 
228  std::vector<bool> warningPrinted4token_;
229 };
230 
231 #endif // METMONITOR_H
MEbinning z0_binning_
Definition: BPHMonitor.h:131
int seagull_
Definition: BPHMonitor.h:194
MonitorElement * numerator
Definition: BPHMonitor.h:68
METME mu2Phi_
Definition: BPHMonitor.h:151
int Upsilon_
Definition: BPHMonitor.h:192
METME DiMuDCA_
Definition: BPHMonitor.h:172
double max_dR
Definition: BPHMonitor.h:208
METME phEta_
Definition: BPHMonitor.h:164
StringCutObjectSelector< reco::Muon, true > muoSelection_tag
Definition: BPHMonitor.h:183
METME phPt_
Definition: BPHMonitor.h:165
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
Definition: BPHMonitor.h:220
std::string histoSuffix_
Definition: BPHMonitor.h:113
double maxmassJpsiTk
Definition: BPHMonitor.h:203
double kaon_mass
Definition: BPHMonitor.h:205
METME mu2Pt_
Definition: BPHMonitor.h:153
METME muPt_
Definition: BPHMonitor.h:142
HLTPrescaleProvider * hltPrescale_
Definition: BPHMonitor.h:180
METME mu1Eta_
Definition: BPHMonitor.h:147
METME phPhi_
Definition: BPHMonitor.h:163
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.h:121
METME mu2d0_
Definition: BPHMonitor.h:154
edm::InputTag bsInputTag_
Definition: BPHMonitor.h:116
std::string folderName_
Definition: BPHMonitor.h:112
MEbinning(int n, double min, double max)
Definition: BPHMonitor.h:59
METME mu2z0_
Definition: BPHMonitor.h:155
METME mu2Eta_
Definition: BPHMonitor.h:152
METME DiMuPhi_
Definition: BPHMonitor.h:166
METME mu3Pt_
Definition: BPHMonitor.h:158
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:129
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
Definition: BPHMonitor.h:215
double maxmassTkTk
Definition: BPHMonitor.h:201
edm::EDGetTokenT< reco::TrackCollection > trToken_
Definition: BPHMonitor.h:123
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
double minmass_
Definition: BPHMonitor.h:196
double minprob
Definition: BPHMonitor.h:210
METME mu1Phi_
Definition: BPHMonitor.h:146
METME DiMuEta_
Definition: BPHMonitor.h:167
MEbinning dca_binning_
Definition: BPHMonitor.h:135
int displaced_
Definition: BPHMonitor.h:189
int iEvent
Definition: GenABIO.cc:224
MEbinning pt_binning_
Definition: BPHMonitor.h:127
double mincos
Definition: BPHMonitor.h:211
double maxmassJpsi
Definition: BPHMonitor.h:197
std::vector< bool > warningPrinted4token_
Definition: BPHMonitor.h:228
edm::InputTag muoInputTag_
Definition: BPHMonitor.h:115
MEbinning dR_binning_
Definition: BPHMonitor.h:132
edm::InputTag vtxInputTag_
Definition: BPHMonitor.h:119
edm::Handle< edm::TriggerResults > HLTR
Definition: BPHMonitor.h:225
double mu_mass
Definition: BPHMonitor.h:206
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: BPHMonitor.h:125
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:179
HLTConfigProvider hltConfig_
Definition: BPHMonitor.h:224
MonitorElement * denominator
Definition: BPHMonitor.h:69
METME DiMuDS_
Definition: BPHMonitor.h:171
MEbinning phi_binning_
Definition: BPHMonitor.h:126
T min(T a, T b)
Definition: MathUtil.h:58
MEbinning ds_binning_
Definition: BPHMonitor.h:136
edm::EDGetTokenT< edm::TriggerResults > hltTrigResTag_
Definition: BPHMonitor.h:213
StringCutObjectSelector< reco::Track, true > trSelection_
Definition: BPHMonitor.h:218
double maxmass_
Definition: BPHMonitor.h:195
MEbinning prob_binning_
Definition: BPHMonitor.h:138
MEbinning cos_binning_
Definition: BPHMonitor.h:137
METME mu1z0_
Definition: BPHMonitor.h:150
std::vector< std::string > hltpaths_den
Definition: BPHMonitor.h:217
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.h:181
METME muz0_
Definition: BPHMonitor.h:144
METME DiMuProb_
Definition: BPHMonitor.h:170
MEbinning d0_binning_
Definition: BPHMonitor.h:130
double minmassJpsiTk
Definition: BPHMonitor.h:204
edm::EDGetTokenT< reco::PhotonCollection > phToken_
Definition: BPHMonitor.h:124
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.h:122
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double minDS
Definition: BPHMonitor.h:212
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.h:182
double minmassUpsilon
Definition: BPHMonitor.h:200
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
edm::Handle< trigger::TriggerEvent > handleTriggerEvent
Definition: BPHMonitor.h:222
MEbinning dMu_pt_binning_
Definition: BPHMonitor.h:128
edm::InputTag hltInputTag_1
Definition: BPHMonitor.h:214
StringCutObjectSelector< reco::Muon, true > muoSelection_probe
Definition: BPHMonitor.h:184
double maxmassUpsilon
Definition: BPHMonitor.h:199
METME mu1d0_
Definition: BPHMonitor.h:149
double minmassTkTk
Definition: BPHMonitor.h:202
METME muEta_
Definition: BPHMonitor.h:141
edm::InputTag trInputTag_
Definition: BPHMonitor.h:117
METME BMass_
Definition: BPHMonitor.h:174
METME DiMuMass_
Definition: BPHMonitor.h:173
METME DiMuPt_
Definition: BPHMonitor.h:168
MEbinning mass_binning_
Definition: BPHMonitor.h:133
METME mud0_
Definition: BPHMonitor.h:143
METME mu1Pt_
Definition: BPHMonitor.h:148
MEbinning(std::vector< double > e)
Definition: BPHMonitor.h:60
METME mu3Phi_
Definition: BPHMonitor.h:156
std::vector< std::string > hltpaths_num
Definition: BPHMonitor.h:216
METME mu3z0_
Definition: BPHMonitor.h:160
METME mu3Eta_
Definition: BPHMonitor.h:157
double minmassJpsi
Definition: BPHMonitor.h:198
edm::InputTag phInputTag_
Definition: BPHMonitor.h:118
METME DiMuPVcos_
Definition: BPHMonitor.h:169
long double T
METME DiMudR_
Definition: BPHMonitor.h:175
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:178
METME muPhi_
Definition: BPHMonitor.h:140
MEbinning Bmass_binning_
Definition: BPHMonitor.h:134
def move(src, dest)
Definition: eostools.py:511
StringCutObjectSelector< reco::Track, true > trSelection_ref
Definition: BPHMonitor.h:219
Definition: Run.h:45
METME mu3d0_
Definition: BPHMonitor.h:159
double min_dR
Definition: BPHMonitor.h:207