CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EmDQMReco.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Egamma_EmDQMReco_H
2 #define HLTriggerOffline_Egamma_EmDQMReco_H
3 
4 
5 // Base Class Headers
18 #include <vector>
19 #include "TDirectory.h"
20 #include "HepMC/GenParticle.h"
24 
25 #include <boost/ptr_container/ptr_vector.hpp>
26 
27 class EmDQMReco;
28 
29 template <class T>
31  public:
34 
35  void fillHistos(edm::Handle<trigger::TriggerEventWithRefs>& triggerObj,const edm::Event& iEvent ,unsigned int n, std::vector<reco::Particle>& sortedReco, bool plotReco, bool plotMonpath);
36  std::vector<edm::EDGetTokenT<edm::AssociationMap<edm::OneToValue< T , float>>>> isoNameTokens_;
37 
38  private:
40 };
41 
42 class EmDQMReco : public edm::EDAnalyzer{
43 
44  //----------------------------------------
45 
50  {
51 
52  public:
60  const std::string &histogramNameTemplate,
61  const std::string &histogramTitleTemplate);
62 
63  void fill(const math::XYZTLorentzVector &momentum);
64 
65  private:
68 
73 
74  };
75  //----------------------------------------
76 
77 public:
78 
80  friend class HistoFillerReco<reco::RecoEcalCandidateCollection>;
81  friend class HistoFillerReco<l1extra::L1EmParticleCollection>;
82 
84  explicit EmDQMReco(const edm::ParameterSet& pset);
85 
87  ~EmDQMReco();
88 
89  // Operations
90 
91  void analyze(const edm::Event & event, const edm::EventSetup&);
92  void beginJob();
93  void endJob();
94  void beginRun( const edm::Run&, const edm::EventSetup& );
95 
96 private:
97  // Input from cfg file
98 
100  std::vector<edm::InputTag> theHLTCollectionLabels;
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;
107  std::vector<int> theHLTOutputTypes;
108  std::vector<bool> plotiso;
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;
120  int pdgGen;
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  boost::ptr_vector<FourVectorMonitorElements> standardHist;
164 
165 // std::vector<MonitorElement*> etahistmatchreco;
166 // std::vector<MonitorElement*> ethistmatchreco;
167 // std::vector<MonitorElement*> phiHistMatchReco;
168  boost::ptr_vector<FourVectorMonitorElements> histMatchReco;
169 
170 // std::vector<MonitorElement*> etahistmatchrecomonpath;
171 // std::vector<MonitorElement*> ethistmatchrecomonpath;
172 // std::vector<MonitorElement*> phiHistMatchRecoMonPath;
173  boost::ptr_vector<FourVectorMonitorElements> histMatchRecoMonPath;
174 
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;
221  int eventnum;
222  // int prescale;
223 
224  // interface to DQM framework
227 
228  HistoFillerReco<reco::ElectronCollection>* histoFillerEle;
229  HistoFillerReco<reco::RecoEcalCandidateCollection>* histoFillerClu;
230  HistoFillerReco<l1extra::L1EmParticleCollection>* histoFillerL1NonIso;
231  HistoFillerReco<reco::RecoEcalCandidateCollection>* histoFillerPho;
232  HistoFillerReco<l1extra::L1EmParticleCollection>* histoFillerL1Iso;
233 
234  //template <class T> void fillHistos(edm::Handle<trigger::TriggerEventWithRefs>&,const edm::Event& ,unsigned int, std::vector<reco::Particle>&, bool, bool);
235  GreaterByPt<reco::Particle> pTComparator_;
236  GreaterByPt<reco::GsfElectron> pTRecoComparator_;
237 
238 
239  //----------------------------------------
240 };
241 #endif
int pdgGen
Definition: EmDQMReco.h:120
void fill(const math::XYZTLorentzVector &momentum)
Definition: EmDQMReco.cc:89
boost::ptr_vector< FourVectorMonitorElements > standardHist
Definition: EmDQMReco.h:163
std::vector< std::vector< edm::InputTag > > isoNames
Definition: EmDQMReco.h:109
void analyze(const edm::Event &event, const edm::EventSetup &)
Definition: EmDQMReco.cc:525
HistoFillerReco< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQMReco.h:231
std::string theHltName
Definition: EmDQMReco.h:111
HistoFillerReco< reco::ElectronCollection > * histoFillerEle
Definition: EmDQMReco.h:228
std::string dirname_
Definition: EmDQMReco.h:226
boost::ptr_vector< FourVectorMonitorElements > histMatchReco
Definition: EmDQMReco.h:168
int eventnum
Definition: EmDQMReco.h:221
void endJob()
Definition: EmDQMReco.cc:923
std::vector< MonitorElement * > histEtIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:193
std::vector< int > theHLTOutputTypes
Definition: EmDQMReco.h:107
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:727
edm::EDGetTokenT< std::vector< reco::SuperCluster > > recoObjectsEET
Definition: EmDQMReco.h:150
std::vector< MonitorElement * > phiHistIso
Definition: EmDQMReco.h:187
unsigned int plotBins
Definition: EmDQMReco.h:130
std::vector< MonitorElement * > histEtaIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:194
double recoEtaAcc
Definition: EmDQMReco.h:121
bool isHltConfigInitialized_
Definition: EmDQMReco.h:113
HLTConfigProvider hltConfig_
Definition: EmDQMReco.h:112
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void beginRun(const edm::Run &, const edm::EventSetup &)
Definition: EmDQMReco.cc:210
boost::ptr_vector< FourVectorMonitorElements > histMatchRecoMonPath
Definition: EmDQMReco.h:173
double recoEtAcc
Definition: EmDQMReco.h:122
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQMReco.h:235
int iEvent
Definition: GenABIO.cc:243
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQMReco.h:105
unsigned int numOfHLTCollectionLabels
Definition: EmDQMReco.h:102
HistoFillerReco< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQMReco.h:232
MonitorElement * totalreco
Definition: EmDQMReco.h:200
EmDQMReco * dqm
Definition: EmDQMReco.h:39
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:71
edm::EDGetTokenT< std::vector< reco::SuperCluster > > recoObjectsEBT
Definition: EmDQMReco.h:149
HistoFillerReco(EmDQMReco *d)
Definition: EmDQMReco.h:32
MonitorElement * totalmatchreco
Definition: EmDQMReco.h:201
FourVectorMonitorElements(EmDQMReco *_parent, const std::string &histogramNameTemplate, const std::string &histogramTitleTemplate)
Definition: EmDQMReco.cc:48
DQMStore * dbe
Definition: EmDQMReco.h:225
unsigned int recocut_
Definition: EmDQMReco.h:134
std::vector< MonitorElement * > ethistisomatchreco
Definition: EmDQMReco.h:190
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
std::string triggerNameRecoMonPath
Definition: EmDQMReco.h:138
std::vector< bool > plotiso
Definition: EmDQMReco.h:108
edm::EDGetTokenT< reco::GsfElectronCollection > recoElectronsInput
Definition: EmDQMReco.h:148
bool useHumanReadableHistTitles
Definition: EmDQMReco.h:104
double plotPhiMax
Definition: EmDQMReco.h:127
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObjT
Definition: EmDQMReco.h:152
HistoFillerReco< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQMReco.h:230
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:72
unsigned int reqNum
Definition: EmDQMReco.h:119
boost::scoped_ptr< FourVectorMonitorElements > histRecoMonpath
Definition: EmDQMReco.h:213
std::vector< MonitorElement * > etahistiso
Definition: EmDQMReco.h:185
boost::scoped_ptr< FourVectorMonitorElements > histMonpath
Definition: EmDQMReco.h:218
std::vector< MonitorElement * > etahistisomatchreco
Definition: EmDQMReco.h:189
std::vector< std::pair< double, double > > plotBounds
Definition: EmDQMReco.h:110
std::vector< edm::EDGetTokenT< edm::AssociationMap< edm::OneToValue< T, float > > > > isoNameTokens_
Definition: EmDQMReco.h:36
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQMReco.h:100
GreaterByPt< reco::GsfElectron > pTRecoComparator_
Definition: EmDQMReco.h:236
edm::EDGetTokenT< edm::TriggerResults > hltResultsT
Definition: EmDQMReco.h:151
double plotPtMin
Definition: EmDQMReco.h:125
double plotPtMax
Definition: EmDQMReco.h:126
boost::ptr_vector< FourVectorMonitorElements > histHltObjMatchToReco
Definition: EmDQMReco.h:179
double plotEtaMax
Definition: EmDQMReco.h:124
std::vector< MonitorElement * > ethistiso
Definition: EmDQMReco.h:186
std::string processNameRecoMonPath
Definition: EmDQMReco.h:143
boost::scoped_ptr< FourVectorMonitorElements > histReco
Definition: EmDQMReco.h:208
std::vector< MonitorElement * > phiHistIsoMatchReco
Definition: EmDQMReco.h:191
void beginJob()
Definition: EmDQMReco.cc:225
std::vector< MonitorElement * > histPhiIsoOfHltObjMatchToReco
Definition: EmDQMReco.h:195
HistoFillerReco< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQMReco.h:229