CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/HLTriggerOffline/Higgs/interface/HLTHiggsPlotter.h

Go to the documentation of this file.
00001 #ifndef HLTriggerOffline_Higgs_HLTHiggsPlotter_H
00002 #define HLTriggerOffline_Higgs_HLTHiggsPlotter_H
00003 
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 #include "DataFormats/Common/interface/Handle.h"
00020 
00021 #include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h"
00022 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
00023 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
00024 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
00025 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
00026 #include "CommonTools/Utils/interface/StringCutObjectSelector.h"
00027 #include "DataFormats/Candidate/interface/Candidate.h"
00028 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00029 #include "DataFormats/MuonReco/interface/Muon.h"
00030 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00031 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00032 
00033 #include "DQMServices/Core/interface/DQMStore.h"
00034 #include "DQMServices/Core/interface/MonitorElement.h"
00035 
00036 #include "HLTriggerOffline/Higgs/src/MatchStruct.cc"
00037 
00038 #include <vector>
00039 #include <cstring>
00040 #include <map>
00041 #include <set>
00042 
00043 const unsigned int kNull = (unsigned int) -1;
00044 
00045 class EVTColContainer;
00046 
00047 class HLTHiggsPlotter 
00048 {
00049         public:
00050                 HLTHiggsPlotter(const edm::ParameterSet & pset, const std::string & hltPath,
00051                                 //const std::string & lastFilter,
00052                                 const std::vector<unsigned int> & objectsType,
00053                                 DQMStore * dbe);
00054                 ~HLTHiggsPlotter();
00055                 void beginJob();
00056                 void beginRun(const edm::Run &, const edm::EventSetup &);
00057                 void analyze(const bool & isPassTrigger,const std::string & source,
00058                                 const std::vector<MatchStruct> & matches);
00059                 
00060                 inline const std::string gethltpath() const { return _hltPath; }
00061                 
00062         private:
00063                 void bookHist(const std::string & source, const std::string & objType, const std::string & variable);
00064                 void fillHist(const bool & passTrigger, const std::string & source, 
00065                                 const std::string & objType, const std::string & var, 
00066                                 const float & value);
00067                 
00068                 std::string _hltPath;
00069                 //std::string _lastFilter;
00070                 std::string _hltProcessName;
00071 
00072                 std::set<unsigned int> _objectsType;
00073                 // Number of objects (elec,muons, ...) needed in the hlt path
00074                 unsigned int _nObjects; 
00075                 
00076                 std::vector<double> _parametersEta;
00077                 std::vector<double> _parametersPhi;
00078                 std::vector<double> _parametersTurnOn;
00079                 
00080                 std::map<unsigned int,double> _cutMinPt;
00081                 std::map<unsigned int,double> _cutMaxEta;
00082                 std::map<unsigned int,unsigned int> _cutMotherId;
00083                 std::map<unsigned int,std::vector<double> > _cutsDr;
00084                 
00085                 
00086                 DQMStore* _dbe;
00087                 std::map<std::string, MonitorElement *> _elements;              
00088 };
00089 #endif