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