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
20 #include "HepMC/GenParticle.h"
21 #include "TDirectory.h"
22 #include <vector>
23 
24 #include <boost/ptr_container/ptr_vector.hpp>
25 #include <boost/scoped_ptr.hpp>
26 
27 class EmDQMReco;
28 
29 template <class T>
31 public:
34 
36  const edm::Event &iEvent,
37  unsigned int n,
38  std::vector<reco::Particle> &sortedReco,
39  bool plotReco,
40  bool plotMonpath);
41  std::vector<edm::EDGetTokenT<edm::AssociationMap<edm::OneToValue<T, float>>>> isoNameTokens_;
42 
43 private:
45 };
46 
47 class EmDQMReco : public DQMEDAnalyzer {
48  //----------------------------------------
49 
54  public:
64  DQMStore::IBooker &iBooker,
65  const std::string &histogramNameTemplate,
66  const std::string &histogramTitleTemplate);
67 
68  void fill(const math::XYZTLorentzVector &momentum);
69 
70  private:
73 
78  };
79  //----------------------------------------
80 
81 public:
83  friend class HistoFillerReco<reco::RecoEcalCandidateCollection>;
84  friend class HistoFillerReco<l1extra::L1EmParticleCollection>;
85 
87  explicit EmDQMReco(const edm::ParameterSet &pset);
88 
90  ~EmDQMReco() override;
91 
92  // Operations
93  void analyze(const edm::Event &event, const edm::EventSetup &) override;
94  void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override;
95  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
96 
97 private:
98  // Input from cfg file
99 
101  std::vector<edm::InputTag> theHLTCollectionLabels;
102 
103  unsigned int numOfHLTCollectionLabels; // Will be size of above vector
104 
106  std::vector<std::string> theHLTCollectionHumanNames; // Human-readable names for the collections
107  // edm::InputTag theL1Seed;
108  std::vector<int> theHLTOutputTypes;
109  std::vector<bool> plotiso;
110  std::vector<std::vector<edm::InputTag>> isoNames; // there has to be a better solution
111  std::vector<std::pair<double, double>> plotBounds;
115 
117  // Read from configuration file //
119  // parameters for generator study
120  unsigned int reqNum;
122  double recoEtaAcc;
123  double recoEtAcc;
124  // plotting paramters
125  double plotEtaMax;
126  double plotPtMin;
127  double plotPtMax;
128  double plotPhiMax;
129 
131  unsigned int plotBins;
132 
133  // preselction cuts
134  // edm::InputTag recocutCollection_;
135  unsigned int recocut_;
136 
140 
145 
149  edm::EDGetTokenT<reco::GsfElectronCollection> recoElectronsInput;
150  edm::EDGetTokenT<std::vector<reco::SuperCluster>> recoObjectsEBT;
151  edm::EDGetTokenT<std::vector<reco::SuperCluster>> recoObjectsEET;
152  edm::EDGetTokenT<edm::TriggerResults> hltResultsT;
153  edm::EDGetTokenT<trigger::TriggerEventWithRefs> triggerObjT;
155  // Create Histograms //
157 
160  // std::vector<MonitorElement*> etahist;
161  // std::vector<MonitorElement*> ethist;
162  // std::vector<MonitorElement*> phiHist;
163 
164  boost::ptr_vector<FourVectorMonitorElements> standardHist;
165 
166  // std::vector<MonitorElement*> etahistmatchreco;
167  // std::vector<MonitorElement*> ethistmatchreco;
168  // std::vector<MonitorElement*> phiHistMatchReco;
169  boost::ptr_vector<FourVectorMonitorElements> histMatchReco;
170 
171  // std::vector<MonitorElement*> etahistmatchrecomonpath;
172  // std::vector<MonitorElement*> ethistmatchrecomonpath;
173  // std::vector<MonitorElement*> phiHistMatchRecoMonPath;
174  boost::ptr_vector<FourVectorMonitorElements> histMatchRecoMonPath;
175 
176  // std::vector<MonitorElement*> histEtOfHltObjMatchToReco;
177  // std::vector<MonitorElement*> histEtaOfHltObjMatchToReco;
178  // std::vector<MonitorElement*> histPhiOfHltObjMatchToReco;
179  boost::ptr_vector<FourVectorMonitorElements> histHltObjMatchToReco;
180 
185  std::vector<MonitorElement *> etahistiso;
186  std::vector<MonitorElement *> ethistiso;
187  std::vector<MonitorElement *> phiHistIso;
188 
189  std::vector<MonitorElement *> etahistisomatchreco;
190  std::vector<MonitorElement *> ethistisomatchreco;
191  std::vector<MonitorElement *> phiHistIsoMatchReco;
192 
193  std::vector<MonitorElement *> histEtIsoOfHltObjMatchToReco;
194  std::vector<MonitorElement *> histEtaIsoOfHltObjMatchToReco;
195  std::vector<MonitorElement *> histPhiIsoOfHltObjMatchToReco;
202 
205  // MonitorElement* etreco;
206  // MonitorElement* etareco;
207  // MonitorElement* phiReco;
208  boost::scoped_ptr<FourVectorMonitorElements> histReco;
209 
210  // MonitorElement* etrecomonpath;
211  // MonitorElement* etarecomonpath;
212  // MonitorElement* phiRecoMonPath;
213  boost::scoped_ptr<FourVectorMonitorElements> histRecoMonpath;
214 
215  // MonitorElement* etahistmonpath;
216  // MonitorElement* ethistmonpath;
217  // MonitorElement* phiHistMonPath;
218  boost::scoped_ptr<FourVectorMonitorElements> histMonpath;
222  // int prescale;
223 
224  // interface to DQM framework
226 
227  HistoFillerReco<reco::ElectronCollection> *histoFillerEle;
228  HistoFillerReco<reco::RecoEcalCandidateCollection> *histoFillerClu;
229  HistoFillerReco<l1extra::L1EmParticleCollection> *histoFillerL1NonIso;
230  HistoFillerReco<reco::RecoEcalCandidateCollection> *histoFillerPho;
231  HistoFillerReco<l1extra::L1EmParticleCollection> *histoFillerL1Iso;
232 
233  // template <class T> void
234  // fillHistos(edm::Handle<trigger::TriggerEventWithRefs>&,const edm::Event&
235  // ,unsigned int, std::vector<reco::Particle>&, bool, bool);
236  GreaterByPt<reco::Particle> pTComparator_;
237  GreaterByPt<reco::GsfElectron> pTRecoComparator_;
238 
239  //----------------------------------------
240 };
241 #endif
EmDQMReco::ethistisomatchreco
std::vector< MonitorElement * > ethistisomatchreco
Definition: EmDQMReco.h:190
EmDQMReco::FourVectorMonitorElements::fill
void fill(const math::XYZTLorentzVector &momentum)
Definition: EmDQMReco.cc:78
EmDQMReco::plotEtaMax
double plotEtaMax
Definition: EmDQMReco.h:125
EmDQMReco::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: EmDQMReco.cc:199
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
Handle.h
electrons_cff.bool
bool
Definition: electrons_cff.py:372
GreaterByPt
Definition: PtComparator.h:24
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
EmDQMReco::pTComparator_
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQMReco.h:236
EmDQMReco::histEtaIsoOfHltObjMatchToReco
std::vector< MonitorElement * > histEtaIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:194
edm::EDGetTokenT
Definition: EDGetToken.h:33
AssociationMap.h
TriggerEventWithRefs.h
EmDQMReco::phiHistIsoMatchReco
std::vector< MonitorElement * > phiHistIsoMatchReco
Definition: EmDQMReco.h:191
EmDQMReco::recoObjectsEBT
edm::EDGetTokenT< std::vector< reco::SuperCluster > > recoObjectsEBT
Definition: EmDQMReco.h:150
EmDQMReco::etahistisomatchreco
std::vector< MonitorElement * > etahistisomatchreco
Definition: EmDQMReco.h:189
EmDQMReco::analyze
void analyze(const edm::Event &event, const edm::EventSetup &) override
Definition: EmDQMReco.cc:589
EmDQMReco
Definition: EmDQMReco.h:47
DQMStore.h
EmDQMReco::totalmatchreco
MonitorElement * totalmatchreco
Definition: EmDQMReco.h:201
PtComparator.h
EmDQMReco::recoEtaAcc
double recoEtaAcc
Definition: EmDQMReco.h:122
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
EDAnalyzer.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
EmDQMReco::processNameRecoMonPath
std::string processNameRecoMonPath
Definition: EmDQMReco.h:144
EmDQMReco::FourVectorMonitorElements
Definition: EmDQMReco.h:53
HistoFillerReco::~HistoFillerReco
~HistoFillerReco()
Definition: EmDQMReco.h:33
edm::Handle< trigger::TriggerEventWithRefs >
HistoFillerReco::isoNameTokens_
std::vector< edm::EDGetTokenT< edm::AssociationMap< edm::OneToValue< T, float > > > > isoNameTokens_
Definition: EmDQMReco.h:41
EmDQMReco::FourVectorMonitorElements::phiMonitorElement
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:77
EmDQMReco::ethistiso
std::vector< MonitorElement * > ethistiso
Definition: EmDQMReco.h:186
HistoFillerReco::fillHistos
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:778
EmDQMReco::eventnum
int eventnum
Definition: EmDQMReco.h:221
GenParticle.h
EmDQMReco::histEtIsoOfHltObjMatchToReco
std::vector< MonitorElement * > histEtIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:193
EmDQMReco::pdgGen
int pdgGen
Definition: EmDQMReco.h:121
EmDQMReco::histoFillerL1Iso
HistoFillerReco< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQMReco.h:231
EmDQMReco::totalreco
MonitorElement * totalreco
Definition: EmDQMReco.h:200
EmDQMReco::theHLTOutputTypes
std::vector< int > theHLTOutputTypes
Definition: EmDQMReco.h:108
EmDQMReco::FourVectorMonitorElements::parent
EmDQMReco * parent
Definition: EmDQMReco.h:72
EmDQMReco::recoObjectsEET
edm::EDGetTokenT< std::vector< reco::SuperCluster > > recoObjectsEET
Definition: EmDQMReco.h:151
EmDQMReco::FourVectorMonitorElements::etMonitorElement
MonitorElement * etMonitorElement
Definition: EmDQMReco.h:75
EmDQMReco::histoFillerEle
HistoFillerReco< reco::ElectronCollection > * histoFillerEle
Definition: EmDQMReco.h:227
EmDQMReco::phiHistIso
std::vector< MonitorElement * > phiHistIso
Definition: EmDQMReco.h:187
EmDQMReco::recocut_
unsigned int recocut_
Definition: EmDQMReco.h:135
EmDQMReco::isHltConfigInitialized_
bool isHltConfigInitialized_
Definition: EmDQMReco.h:114
GsfElectron.h
EmDQMReco::pTRecoComparator_
GreaterByPt< reco::GsfElectron > pTRecoComparator_
Definition: EmDQMReco.h:237
RefToBase.h
EmDQMReco::plotiso
std::vector< bool > plotiso
Definition: EmDQMReco.h:109
EmDQMReco::useHumanReadableHistTitles
bool useHumanReadableHistTitles
Definition: EmDQMReco.h:105
DQMEDAnalyzer.h
EmDQMReco::plotPhiMax
double plotPhiMax
Definition: EmDQMReco.h:128
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EmDQMReco::histoFillerL1NonIso
HistoFillerReco< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQMReco.h:229
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
EmDQMReco::recoEtAcc
double recoEtAcc
Definition: EmDQMReco.h:123
EmDQMReco::plotPtMin
double plotPtMin
Definition: EmDQMReco.h:126
EmDQMReco::reqNum
unsigned int reqNum
Definition: EmDQMReco.h:120
EmDQMReco::histRecoMonpath
boost::scoped_ptr< FourVectorMonitorElements > histRecoMonpath
Definition: EmDQMReco.h:213
EmDQMReco::etahistiso
std::vector< MonitorElement * > etahistiso
Definition: EmDQMReco.h:185
EmDQMReco::plotPtMax
double plotPtMax
Definition: EmDQMReco.h:127
Event.h
EmDQMReco::numOfHLTCollectionLabels
unsigned int numOfHLTCollectionLabels
Definition: EmDQMReco.h:103
EmDQMReco::histHltObjMatchToReco
boost::ptr_vector< FourVectorMonitorElements > histHltObjMatchToReco
Definition: EmDQMReco.h:179
HistoFillerReco::HistoFillerReco
HistoFillerReco(EmDQMReco *d)
Definition: EmDQMReco.h:32
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
EmDQMReco::plotBins
unsigned int plotBins
Definition: EmDQMReco.h:131
EmDQMReco::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EmDQMReco.cc:207
EmDQMReco::histReco
boost::scoped_ptr< FourVectorMonitorElements > histReco
Definition: EmDQMReco.h:208
HistoFillerReco::dqm
EmDQMReco * dqm
Definition: EmDQMReco.h:44
HistoFillerReco
Definition: EmDQMReco.h:30
EmDQMReco::hltConfig_
HLTConfigProvider hltConfig_
Definition: EmDQMReco.h:113
EmDQMReco::hltResultsT
edm::EDGetTokenT< edm::TriggerResults > hltResultsT
Definition: EmDQMReco.h:152
HLTConfigProvider.h
reco::ElectronCollection
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
EmDQMReco::histMatchRecoMonPath
boost::ptr_vector< FourVectorMonitorElements > histMatchRecoMonPath
Definition: EmDQMReco.h:174
InputTag.h
EmDQMReco::standardHist
boost::ptr_vector< FourVectorMonitorElements > standardHist
Definition: EmDQMReco.h:164
EmDQMReco::isoNames
std::vector< std::vector< edm::InputTag > > isoNames
Definition: EmDQMReco.h:110
EmDQMReco::recoElectronsInput
edm::EDGetTokenT< reco::GsfElectronCollection > recoElectronsInput
Definition: EmDQMReco.h:149
EmDQMReco::theHLTCollectionHumanNames
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQMReco.h:106
EmDQMReco::triggerObjT
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObjT
Definition: EmDQMReco.h:153
HLTConfigProvider
Definition: HLTConfigProvider.h:28
Frameworkfwd.h
EmDQMReco::theHltName
std::string theHltName
Definition: EmDQMReco.h:112
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
EmDQMReco::FourVectorMonitorElements::FourVectorMonitorElements
FourVectorMonitorElements(EmDQMReco *_parent, DQMStore::IBooker &iBooker, const std::string &histogramNameTemplate, const std::string &histogramTitleTemplate)
Definition: EmDQMReco.cc:48
EmDQMReco::FourVectorMonitorElements::etaMonitorElement
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:76
EmDQMReco::dirname_
std::string dirname_
Definition: EmDQMReco.h:225
EmDQMReco::histMatchReco
boost::ptr_vector< FourVectorMonitorElements > histMatchReco
Definition: EmDQMReco.h:169
dqm::implementation::IBooker
Definition: DQMStore.h:43
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:29
EmDQMReco::theHLTCollectionLabels
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQMReco.h:101
ztail.d
d
Definition: ztail.py:151
EmDQMReco::histPhiIsoOfHltObjMatchToReco
std::vector< MonitorElement * > histPhiIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:195
EmDQMReco::histoFillerClu
HistoFillerReco< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQMReco.h:228
dqm
Definition: DQMStore.h:18
ParameterSet.h
EmDQMReco::triggerNameRecoMonPath
std::string triggerNameRecoMonPath
Definition: EmDQMReco.h:139
EmDQMReco::plotBounds
std::vector< std::pair< double, double > > plotBounds
Definition: EmDQMReco.h:111
edm::Event
Definition: Event.h:73
EmDQMReco::histoFillerPho
HistoFillerReco< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQMReco.h:230
EmDQMReco::histMonpath
boost::scoped_ptr< FourVectorMonitorElements > histMonpath
Definition: EmDQMReco.h:218