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 
114 
115  MEbinning phi_binning_;
116  MEbinning pt_binning_;
117  MEbinning eta_binning_;
118  MEbinning d0_binning_;
119  MEbinning z0_binning_;
120  MEbinning dR_binning_;
121  MEbinning mass_binning_;
122  MEbinning dca_binning_;
123  MEbinning ds_binning_;
124  MEbinning cos_binning_;
125  MEbinning prob_binning_;
126 
132 
148 
149 
163 
164 
165 //
166 
173  int nmuons_;
174  bool tnp_;
175  int L3_;
176  int trOrMu_;
177  int Jpsi_;
178  int Upsilon_;
179  int enum_;
180  int seagull_;
181  double maxmass_;
182  double minmass_;
183  double maxmassJpsi;
184  double minmassJpsi;
187  double maxmassTkTk;
188  double minmassTkTk;
191  double kaon_mass;
192  double mu_mass;
193  double min_dR;
194 
195  double minprob;
196  double mincos;
197  double minDS;
200  std::vector<std::string> hltpaths_num;
201  std::vector<std::string> hltpaths_den;
205 
206  std::vector<bool> warningPrinted4token_;
207 };
208 
209 #endif // METMONITOR_H
MEbinning z0_binning_
Definition: BPHMonitor.h:119
int seagull_
Definition: BPHMonitor.h:180
MonitorElement * numerator
Definition: BPHMonitor.h:60
METME mu2Phi_
Definition: BPHMonitor.h:138
int Upsilon_
Definition: BPHMonitor.h:178
METME DiMuDCA_
Definition: BPHMonitor.h:160
METME phEta_
Definition: BPHMonitor.h:152
StringCutObjectSelector< reco::Muon, true > muoSelection_tag
Definition: BPHMonitor.h:171
METME phPt_
Definition: BPHMonitor.h:153
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
Definition: BPHMonitor.h:204
std::string histoSuffix_
Definition: BPHMonitor.h:103
double maxmassJpsiTk
Definition: BPHMonitor.h:189
double kaon_mass
Definition: BPHMonitor.h:191
METME mu2Pt_
Definition: BPHMonitor.h:140
METME muPt_
Definition: BPHMonitor.h:129
METME mu1Eta_
Definition: BPHMonitor.h:134
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
METME phPhi_
Definition: BPHMonitor.h:151
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.h:110
METME mu2d0_
Definition: BPHMonitor.h:141
edm::InputTag bsInputTag_
Definition: BPHMonitor.h:106
std::string folderName_
Definition: BPHMonitor.h:102
MEbinning(int n, double min, double max)
Definition: BPHMonitor.h:51
METME mu2z0_
Definition: BPHMonitor.h:142
METME mu2Eta_
Definition: BPHMonitor.h:139
METME DiMuPhi_
Definition: BPHMonitor.h:154
METME mu3Pt_
Definition: BPHMonitor.h:145
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
MEbinning eta_binning_
Definition: BPHMonitor.h:117
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
Definition: BPHMonitor.h:199
double maxmassTkTk
Definition: BPHMonitor.h:187
edm::EDGetTokenT< reco::TrackCollection > trToken_
Definition: BPHMonitor.h:112
double minmass_
Definition: BPHMonitor.h:182
double minprob
Definition: BPHMonitor.h:195
METME mu1Phi_
Definition: BPHMonitor.h:133
METME DiMuEta_
Definition: BPHMonitor.h:155
MEbinning dca_binning_
Definition: BPHMonitor.h:122
int iEvent
Definition: GenABIO.cc:230
MEbinning pt_binning_
Definition: BPHMonitor.h:116
double mincos
Definition: BPHMonitor.h:196
double maxmassJpsi
Definition: BPHMonitor.h:183
std::vector< bool > warningPrinted4token_
Definition: BPHMonitor.h:206
edm::InputTag muoInputTag_
Definition: BPHMonitor.h:105
MEbinning dR_binning_
Definition: BPHMonitor.h:120
double mu_mass
Definition: BPHMonitor.h:192
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:168
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
MonitorElement * denominator
Definition: BPHMonitor.h:61
METME DiMuDS_
Definition: BPHMonitor.h:159
MEbinning phi_binning_
Definition: BPHMonitor.h:115
T min(T a, T b)
Definition: MathUtil.h:58
MEbinning ds_binning_
Definition: BPHMonitor.h:123
edm::EDGetTokenT< edm::TriggerResults > hltTrigResTag_
Definition: BPHMonitor.h:198
StringCutObjectSelector< reco::Track, true > trSelection_
Definition: BPHMonitor.h:202
double maxmass_
Definition: BPHMonitor.h:181
MEbinning prob_binning_
Definition: BPHMonitor.h:125
MEbinning cos_binning_
Definition: BPHMonitor.h:124
METME mu1z0_
Definition: BPHMonitor.h:137
std::vector< std::string > hltpaths_den
Definition: BPHMonitor.h:201
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.h:169
METME muz0_
Definition: BPHMonitor.h:131
METME DiMuProb_
Definition: BPHMonitor.h:158
MEbinning d0_binning_
Definition: BPHMonitor.h:118
double minmassJpsiTk
Definition: BPHMonitor.h:190
edm::EDGetTokenT< reco::PhotonCollection > phToken_
Definition: BPHMonitor.h:113
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.h:111
double minDS
Definition: BPHMonitor.h:197
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.h:170
double minmassUpsilon
Definition: BPHMonitor.h:186
StringCutObjectSelector< reco::Muon, true > muoSelection_probe
Definition: BPHMonitor.h:172
double maxmassUpsilon
Definition: BPHMonitor.h:185
METME mu1d0_
Definition: BPHMonitor.h:136
double minmassTkTk
Definition: BPHMonitor.h:188
METME muEta_
Definition: BPHMonitor.h:128
edm::InputTag trInputTag_
Definition: BPHMonitor.h:107
METME DiMuMass_
Definition: BPHMonitor.h:161
METME DiMuPt_
Definition: BPHMonitor.h:156
MEbinning mass_binning_
Definition: BPHMonitor.h:121
METME mud0_
Definition: BPHMonitor.h:130
METME mu1Pt_
Definition: BPHMonitor.h:135
MEbinning(std::vector< double > e)
Definition: BPHMonitor.h:52
METME mu3Phi_
Definition: BPHMonitor.h:143
std::vector< std::string > hltpaths_num
Definition: BPHMonitor.h:200
METME mu3z0_
Definition: BPHMonitor.h:147
METME mu3Eta_
Definition: BPHMonitor.h:144
double minmassJpsi
Definition: BPHMonitor.h:184
edm::InputTag phInputTag_
Definition: BPHMonitor.h:108
METME DiMuPVcos_
Definition: BPHMonitor.h:157
long double T
METME DiMudR_
Definition: BPHMonitor.h:162
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:167
METME muPhi_
Definition: BPHMonitor.h:127
def move(src, dest)
Definition: eostools.py:510
StringCutObjectSelector< reco::Track, true > trSelection_ref
Definition: BPHMonitor.h:203
Definition: Run.h:44
METME mu3d0_
Definition: BPHMonitor.h:146
double min_dR
Definition: BPHMonitor.h:193