CMS 3D CMS Logo

EmDQMReco.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Egamma_EmDQMReco_H
2 #define HLTriggerOffline_Egamma_EmDQMReco_H
3 
4 // Base Class Headers
19 #include "HepMC/GenParticle.h"
20 #include "TDirectory.h"
21 
22 #include <memory>
23 #include <vector>
24 
25 class EmDQMReco;
26 
27 template <class T>
29 public:
32 
34  const edm::Event &iEvent,
35  unsigned int n,
36  std::vector<reco::Particle> &sortedReco,
37  bool plotReco,
38  bool plotMonpath);
39  std::vector<edm::EDGetTokenT<edm::AssociationMap<edm::OneToValue<T, float>>>> isoNameTokens_;
40 
41 private:
43 };
44 
45 class EmDQMReco : public DQMEDAnalyzer {
46  //----------------------------------------
47 
52  public:
62  DQMStore::IBooker &iBooker,
63  const std::string &histogramNameTemplate,
64  const std::string &histogramTitleTemplate);
65 
66  void fill(const math::XYZTLorentzVector &momentum);
67 
68  private:
71 
76  };
77  //----------------------------------------
78 
79 public:
81  friend class HistoFillerReco<reco::RecoEcalCandidateCollection>;
82  friend class HistoFillerReco<l1extra::L1EmParticleCollection>;
83 
85  explicit EmDQMReco(const edm::ParameterSet &pset);
86 
88  ~EmDQMReco() override;
89 
90  // Operations
91  void analyze(const edm::Event &event, const edm::EventSetup &) override;
92  void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override;
93  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
94 
95 private:
96  // Input from cfg file
97 
100 
101  unsigned int numOfHLTCollectionLabels; // Will be size of above vector
102 
104  std::vector<std::string> theHLTCollectionHumanNames; // Human-readable names for the collections
105  // edm::InputTag theL1Seed;
108  std::vector<std::vector<edm::InputTag>> isoNames; // there has to be a better solution
109  std::vector<std::pair<double, double>> plotBounds;
113 
115  // Read from configuration file //
117  // parameters for generator study
118  unsigned int reqNum;
120  double recoEtaAcc;
121  double recoEtAcc;
122  // plotting paramters
123  double plotEtaMax;
124  double plotPtMin;
125  double plotPtMax;
126  double plotPhiMax;
127 
129  unsigned int plotBins;
130 
131  // preselction cuts
132  // edm::InputTag recocutCollection_;
133  unsigned int recocut_;
134 
138 
143 
147  edm::EDGetTokenT<reco::GsfElectronCollection> recoElectronsInput;
148  edm::EDGetTokenT<std::vector<reco::SuperCluster>> recoObjectsEBT;
149  edm::EDGetTokenT<std::vector<reco::SuperCluster>> recoObjectsEET;
150  edm::EDGetTokenT<edm::TriggerResults> hltResultsT;
151  edm::EDGetTokenT<trigger::TriggerEventWithRefs> triggerObjT;
153  // Create Histograms //
155 
158  // std::vector<MonitorElement*> etahist;
159  // std::vector<MonitorElement*> ethist;
160  // std::vector<MonitorElement*> phiHist;
161 
162  std::vector<std::unique_ptr<FourVectorMonitorElements>> standardHist;
163 
164  // std::vector<MonitorElement*> etahistmatchreco;
165  // std::vector<MonitorElement*> ethistmatchreco;
166  // std::vector<MonitorElement*> phiHistMatchReco;
167  std::vector<std::unique_ptr<FourVectorMonitorElements>> histMatchReco;
168 
169  // std::vector<MonitorElement*> etahistmatchrecomonpath;
170  // std::vector<MonitorElement*> ethistmatchrecomonpath;
171  // std::vector<MonitorElement*> phiHistMatchRecoMonPath;
172  std::vector<std::unique_ptr<FourVectorMonitorElements>> histMatchRecoMonPath;
173 
174  // std::vector<MonitorElement*> histEtOfHltObjMatchToReco;
175  // std::vector<MonitorElement*> histEtaOfHltObjMatchToReco;
176  // std::vector<MonitorElement*> histPhiOfHltObjMatchToReco;
177  std::vector<std::unique_ptr<FourVectorMonitorElements>> histHltObjMatchToReco;
178 
183  std::vector<MonitorElement *> etahistiso;
184  std::vector<MonitorElement *> ethistiso;
185  std::vector<MonitorElement *> phiHistIso;
186 
187  std::vector<MonitorElement *> etahistisomatchreco;
188  std::vector<MonitorElement *> ethistisomatchreco;
189  std::vector<MonitorElement *> phiHistIsoMatchReco;
190 
200 
203  // MonitorElement* etreco;
204  // MonitorElement* etareco;
205  // MonitorElement* phiReco;
206  std::unique_ptr<FourVectorMonitorElements> histReco;
207 
208  // MonitorElement* etrecomonpath;
209  // MonitorElement* etarecomonpath;
210  // MonitorElement* phiRecoMonPath;
211  std::unique_ptr<FourVectorMonitorElements> histRecoMonpath;
212 
213  // MonitorElement* etahistmonpath;
214  // MonitorElement* ethistmonpath;
215  // MonitorElement* phiHistMonPath;
216  std::unique_ptr<FourVectorMonitorElements> histMonpath;
220  // int prescale;
221 
222  // interface to DQM framework
224 
225  HistoFillerReco<reco::ElectronCollection> *histoFillerEle;
226  HistoFillerReco<reco::RecoEcalCandidateCollection> *histoFillerClu;
227  HistoFillerReco<l1extra::L1EmParticleCollection> *histoFillerL1NonIso;
228  HistoFillerReco<reco::RecoEcalCandidateCollection> *histoFillerPho;
229  HistoFillerReco<l1extra::L1EmParticleCollection> *histoFillerL1Iso;
230 
231  // template <class T> void
232  // fillHistos(edm::Handle<trigger::TriggerEventWithRefs>&,const edm::Event&
233  // ,unsigned int, std::vector<reco::Particle>&, bool, bool);
234  GreaterByPt<reco::Particle> pTComparator_;
235  GreaterByPt<reco::GsfElectron> pTRecoComparator_;
236 
237  //----------------------------------------
238 };
239 #endif
std::vector< MonitorElement * > histEtIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:191
int pdgGen
Definition: EmDQMReco.h:119
void fill(const math::XYZTLorentzVector &momentum)
Definition: EmDQMReco.cc:77
std::vector< std::unique_ptr< FourVectorMonitorElements > > histMatchReco
Definition: EmDQMReco.h:167
std::vector< std::vector< edm::InputTag > > isoNames
Definition: EmDQMReco.h:108
std::vector< std::unique_ptr< FourVectorMonitorElements > > standardHist
Definition: EmDQMReco.h:162
std::unique_ptr< FourVectorMonitorElements > histReco
Definition: EmDQMReco.h:206
std::vector< MonitorElement * > etahistisomatchreco
Definition: EmDQMReco.h:187
HistoFillerReco< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQMReco.h:228
std::string theHltName
Definition: EmDQMReco.h:110
HistoFillerReco< reco::ElectronCollection > * histoFillerEle
Definition: EmDQMReco.h:225
std::string dirname_
Definition: EmDQMReco.h:223
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: EmDQMReco.cc:198
int eventnum
Definition: EmDQMReco.h:219
std::vector< MonitorElement * > etahistiso
Definition: EmDQMReco.h:183
std::vector< int > theHLTOutputTypes
Definition: EmDQMReco.h:106
void fillHistos(edm::Handle< trigger::TriggerEventWithRefs > &triggerObj, const edm::Event &iEvent, unsigned int n, std::vector< reco::Particle > &sortedReco, bool plotReco, bool plotMonpath)
Definition: EmDQMReco.cc:776
std::vector< edm::EDGetTokenT< edm::AssociationMap< edm::OneToValue< T, float > > > > isoNameTokens_
Definition: EmDQMReco.h:39
edm::EDGetTokenT< std::vector< reco::SuperCluster > > recoObjectsEET
Definition: EmDQMReco.h:149
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
unsigned int plotBins
Definition: EmDQMReco.h:129
std::vector< MonitorElement * > phiHistIsoMatchReco
Definition: EmDQMReco.h:189
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
double recoEtaAcc
Definition: EmDQMReco.h:120
bool isHltConfigInitialized_
Definition: EmDQMReco.h:112
HLTConfigProvider hltConfig_
Definition: EmDQMReco.h:111
FourVectorMonitorElements(EmDQMReco *_parent, DQMStore::IBooker &iBooker, const std::string &histogramNameTemplate, const std::string &histogramTitleTemplate)
Definition: EmDQMReco.cc:47
std::unique_ptr< FourVectorMonitorElements > histRecoMonpath
Definition: EmDQMReco.h:211
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::vector< std::unique_ptr< FourVectorMonitorElements > > histMatchRecoMonPath
Definition: EmDQMReco.h:172
double recoEtAcc
Definition: EmDQMReco.h:121
std::vector< MonitorElement * > ethistiso
Definition: EmDQMReco.h:184
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQMReco.h:234
int iEvent
Definition: GenABIO.cc:224
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQMReco.h:104
unsigned int numOfHLTCollectionLabels
Definition: EmDQMReco.h:101
HistoFillerReco< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQMReco.h:229
MonitorElement * totalreco
Definition: EmDQMReco.h:198
std::vector< std::unique_ptr< FourVectorMonitorElements > > histHltObjMatchToReco
Definition: EmDQMReco.h:177
EmDQMReco * dqm
Definition: EmDQMReco.h:42
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:74
edm::EDGetTokenT< std::vector< reco::SuperCluster > > recoObjectsEBT
Definition: EmDQMReco.h:148
void analyze(const edm::Event &event, const edm::EventSetup &) override
Definition: EmDQMReco.cc:587
HistoFillerReco(EmDQMReco *d)
Definition: EmDQMReco.h:30
MonitorElement * totalmatchreco
Definition: EmDQMReco.h:199
std::vector< MonitorElement * > histPhiIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:193
std::vector< MonitorElement * > phiHistIso
Definition: EmDQMReco.h:185
unsigned int recocut_
Definition: EmDQMReco.h:133
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
std::string triggerNameRecoMonPath
Definition: EmDQMReco.h:137
d
Definition: ztail.py:151
std::vector< bool > plotiso
Definition: EmDQMReco.h:107
edm::EDGetTokenT< reco::GsfElectronCollection > recoElectronsInput
Definition: EmDQMReco.h:147
bool useHumanReadableHistTitles
Definition: EmDQMReco.h:103
double plotPhiMax
Definition: EmDQMReco.h:126
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObjT
Definition: EmDQMReco.h:151
HistoFillerReco< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQMReco.h:227
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:75
unsigned int reqNum
Definition: EmDQMReco.h:118
std::vector< MonitorElement * > ethistisomatchreco
Definition: EmDQMReco.h:188
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQMReco.h:99
std::vector< std::pair< double, double > > plotBounds
Definition: EmDQMReco.h:109
GreaterByPt< reco::GsfElectron > pTRecoComparator_
Definition: EmDQMReco.h:235
edm::EDGetTokenT< edm::TriggerResults > hltResultsT
Definition: EmDQMReco.h:150
fixed size matrix
std::vector< MonitorElement * > histEtaIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:192
double plotPtMin
Definition: EmDQMReco.h:124
double plotPtMax
Definition: EmDQMReco.h:125
double plotEtaMax
Definition: EmDQMReco.h:123
Definition: DQMStore.h:18
std::string processNameRecoMonPath
Definition: EmDQMReco.h:142
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EmDQMReco.cc:206
std::unique_ptr< FourVectorMonitorElements > histMonpath
Definition: EmDQMReco.h:216
HistoFillerReco< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQMReco.h:226