Go to the documentation of this file.00001 #ifndef HLTriggerOffline_Egamma_EmDQMReco_H
00002 #define HLTriggerOffline_Egamma_EmDQMReco_H
00003
00004
00005
00006 #include "DataFormats/Common/interface/Handle.h"
00007 #include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h"
00008 #include "FWCore/Framework/interface/EDAnalyzer.h"
00009 #include "FWCore/Framework/interface/Frameworkfwd.h"
00010 #include "FWCore/Framework/interface/Event.h"
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 #include "FWCore/Utilities/interface/InputTag.h"
00013 #include "DataFormats/Common/interface/RefToBase.h"
00014 #include "DQMServices/Core/interface/DQMStore.h"
00015 #include "DQMServices/Core/interface/MonitorElement.h"
00016 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00017 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00018 #include <vector>
00019 #include "TDirectory.h"
00020 #include "HepMC/GenParticle.h"
00021 #include "CommonTools/Utils/interface/PtComparator.h"
00022 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
00023
00024 #include <boost/ptr_container/ptr_vector.hpp>
00025
00026 class EmDQMReco : public edm::EDAnalyzer{
00027
00028
00029
00033 class FourVectorMonitorElements
00034 {
00035
00036 public:
00043 FourVectorMonitorElements(EmDQMReco *_parent,
00044 const std::string &histogramNameTemplate,
00045 const std::string &histogramTitleTemplate);
00046
00047 void fill(const math::XYZTLorentzVector &momentum);
00048
00049 private:
00051 EmDQMReco *parent;
00052
00054 MonitorElement* etMonitorElement;
00055 MonitorElement* etaMonitorElement;
00056 MonitorElement* phiMonitorElement;
00057
00058 };
00059
00060
00061 public:
00062
00063
00065 explicit EmDQMReco(const edm::ParameterSet& pset);
00066
00068 ~EmDQMReco();
00069
00070
00071
00072 void analyze(const edm::Event & event, const edm::EventSetup&);
00073 void beginJob();
00074 void endJob();
00075 void beginRun( const edm::Run&, const edm::EventSetup& );
00076
00077 private:
00078
00079
00081 std::vector<edm::InputTag> theHLTCollectionLabels;
00082
00083 unsigned int numOfHLTCollectionLabels;
00084
00085 bool useHumanReadableHistTitles;
00086 std::vector<std::string> theHLTCollectionHumanNames;
00087 edm::InputTag theL1Seed;
00088 std::vector<int> theHLTOutputTypes;
00089 std::vector<bool> plotiso;
00090 std::vector<std::vector<edm::InputTag> > isoNames;
00091 std::vector<std::pair<double,double> > plotBounds;
00092 std::string theHltName;
00093 HLTConfigProvider hltConfig_;
00094 bool isHltConfigInitialized_;
00095
00097
00099
00100 unsigned int reqNum;
00101 int pdgGen;
00102 double recoEtaAcc;
00103 double recoEtAcc;
00104
00105 double plotEtaMax;
00106 double plotPtMin ;
00107 double plotPtMax ;
00108 double plotPhiMax;
00109
00111 unsigned int plotBins ;
00112
00113
00114 edm::InputTag recocutCollection_;
00115 unsigned int recocut_;
00116
00119 std::string triggerNameRecoMonPath;
00120
00124 std::string processNameRecoMonPath;
00125
00129 edm::InputTag recoElectronsInputTag;
00130
00132
00134
00137
00138
00139
00140
00141 boost::ptr_vector<FourVectorMonitorElements> standardHist;
00142
00143
00144
00145
00146 boost::ptr_vector<FourVectorMonitorElements> histMatchReco;
00147
00148
00149
00150
00151 boost::ptr_vector<FourVectorMonitorElements> histMatchRecoMonPath;
00152
00153
00154
00155
00156
00157 boost::ptr_vector<FourVectorMonitorElements> histHltObjMatchToReco;
00158
00163 std::vector<MonitorElement*> etahistiso;
00164 std::vector<MonitorElement*> ethistiso;
00165 std::vector<MonitorElement*> phiHistIso;
00166
00167 std::vector<MonitorElement*> etahistisomatchreco;
00168 std::vector<MonitorElement*> ethistisomatchreco;
00169 std::vector<MonitorElement*> phiHistIsoMatchReco;
00170
00171 std::vector<MonitorElement*> histEtIsoOfHltObjMatchToReco;
00172 std::vector<MonitorElement*> histEtaIsoOfHltObjMatchToReco;
00173 std::vector<MonitorElement*> histPhiIsoOfHltObjMatchToReco;
00178 MonitorElement* totalreco;
00179 MonitorElement* totalmatchreco;
00180
00183
00184
00185
00186 boost::scoped_ptr<FourVectorMonitorElements> histReco;
00187
00188
00189
00190
00191 boost::scoped_ptr<FourVectorMonitorElements> histRecoMonpath;
00192
00193
00194
00195
00196 boost::scoped_ptr<FourVectorMonitorElements> histMonpath;
00199 int eventnum;
00200
00201
00202
00203 DQMStore * dbe;
00204 std::string dirname_;
00205
00206 template <class T> void fillHistos(edm::Handle<trigger::TriggerEventWithRefs>&,const edm::Event& ,unsigned int, std::vector<reco::Particle>&, bool, bool);
00207 GreaterByPt<reco::Particle> pTComparator_;
00208 GreaterByPt<reco::GsfElectron> pTRecoComparator_;
00209
00210
00211
00212 };
00213 #endif