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 
168  int nmuons_;
169  bool tnp_;
170  int L3_;
171  int trOrMu_;
172  int Jpsi_;
173  int Upsilon_;
174  int enum_;
175  int seagull_;
176  double maxmass_;
177  double minmass_;
178  double maxmassJpsi;
179  double minmassJpsi;
182  double maxmassTkTk;
183  double minmassTkTk;
186  double kaon_mass;
187  double mu_mass;
188  double min_dR;
189 
190  double minprob;
191  double mincos;
192  double minDS;
195  std::vector<std::string> hltpaths_num;
196  std::vector<std::string> hltpaths_den;
200 };
201 
202 #endif // METMONITOR_H
MEbinning z0_binning_
Definition: BPHMonitor.h:114
int seagull_
Definition: BPHMonitor.h:175
MonitorElement * numerator
Definition: BPHMonitor.h:60
METME mu2Phi_
Definition: BPHMonitor.h:133
int Upsilon_
Definition: BPHMonitor.h:173
METME DiMuDCA_
Definition: BPHMonitor.h:155
METME phEta_
Definition: BPHMonitor.h:147
StringCutObjectSelector< reco::Muon, true > muoSelection_tag
Definition: BPHMonitor.h:166
METME phPt_
Definition: BPHMonitor.h:148
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
Definition: BPHMonitor.h:199
std::string histoSuffix_
Definition: BPHMonitor.h:103
double maxmassJpsiTk
Definition: BPHMonitor.h:184
double kaon_mass
Definition: BPHMonitor.h:186
METME mu2Pt_
Definition: BPHMonitor.h:135
METME muPt_
Definition: BPHMonitor.h:124
METME mu1Eta_
Definition: BPHMonitor.h:129
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
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
MEbinning eta_binning_
Definition: BPHMonitor.h:112
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
Definition: BPHMonitor.h:194
double maxmassTkTk
Definition: BPHMonitor.h:182
edm::EDGetTokenT< reco::TrackCollection > trToken_
Definition: BPHMonitor.h:107
double minmass_
Definition: BPHMonitor.h:177
double minprob
Definition: BPHMonitor.h:190
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:191
double maxmassJpsi
Definition: BPHMonitor.h:178
MEbinning dR_binning_
Definition: BPHMonitor.h:115
double mu_mass
Definition: BPHMonitor.h:187
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:163
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: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:193
StringCutObjectSelector< reco::Track, true > trSelection_
Definition: BPHMonitor.h:197
double maxmass_
Definition: BPHMonitor.h:176
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:196
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.h:164
METME muz0_
Definition: BPHMonitor.h:126
METME DiMuProb_
Definition: BPHMonitor.h:153
MEbinning d0_binning_
Definition: BPHMonitor.h:113
double minmassJpsiTk
Definition: BPHMonitor.h:185
edm::EDGetTokenT< reco::PhotonCollection > phToken_
Definition: BPHMonitor.h:108
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.h:106
double minDS
Definition: BPHMonitor.h:192
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.h:165
double minmassUpsilon
Definition: BPHMonitor.h:181
StringCutObjectSelector< reco::Muon, true > muoSelection_probe
Definition: BPHMonitor.h:167
double maxmassUpsilon
Definition: BPHMonitor.h:180
METME mu1d0_
Definition: BPHMonitor.h:131
double minmassTkTk
Definition: BPHMonitor.h:183
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:195
METME mu3z0_
Definition: BPHMonitor.h:142
METME mu3Eta_
Definition: BPHMonitor.h:139
double minmassJpsi
Definition: BPHMonitor.h:179
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:198
Definition: Run.h:43
METME mu3d0_
Definition: BPHMonitor.h:141
double min_dR
Definition: BPHMonitor.h:188