CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/HLTriggerOffline/Higgs/interface/HLTHiggsSubAnalysis.h

Go to the documentation of this file.
00001 #ifndef HLTriggerOffline_Higgs_HLTHiggsSubAnalysis_H
00002 #define HLTriggerOffline_Higgs_HLTHiggsSubAnalysis_H
00003 
00017 #include "FWCore/Framework/interface/EDAnalyzer.h"
00018 #include "FWCore/Framework/interface/Frameworkfwd.h"
00019 #include "FWCore/Framework/interface/Event.h"
00020 #include "FWCore/Framework/interface/MakerMacros.h"
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022 #include "FWCore/Utilities/interface/InputTag.h"
00023 
00024 #include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h"
00025 #include "DataFormats/MuonReco/interface/Muon.h"
00026 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00027 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00028 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00029 #include "DataFormats/METReco/interface/CaloMET.h"
00030 #include "DataFormats/METReco/interface/CaloMETFwd.h"
00031 #include "DataFormats/TauReco/interface/PFTau.h"
00032 #include "DataFormats/TauReco/interface/PFTauFwd.h"
00033 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00034 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00035 #include "DataFormats/TrackReco/interface/Track.h"
00036 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00037 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00038 #include "CommonTools/Utils/interface/StringCutObjectSelector.h"
00039 
00040 #include "DQMServices/Core/interface/DQMStore.h"
00041 #include "DQMServices/Core/interface/MonitorElement.h"
00042 
00043 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
00044 
00045 #include "HLTriggerOffline/Higgs/interface/HLTHiggsPlotter.h"
00046 
00047 
00048 #include<vector>
00049 #include<set>
00050 #include<map>
00051 #include<cstring>
00052 
00053 class EVTColContainer;
00054 
00055 class HLTHiggsSubAnalysis 
00056 {       
00057         public:
00058                 enum
00059                 {
00060                         GEN,
00061                         RECO
00062                 };
00063 
00064                 HLTHiggsSubAnalysis(const edm::ParameterSet & pset, 
00065                                 const std::string & analysisname );
00066                 ~HLTHiggsSubAnalysis();
00067                 void beginJob();
00068                 void beginRun(const edm::Run & iRun, const edm::EventSetup & iEventSetup);
00069                 void analyze(const edm::Event & iEvent, const edm::EventSetup & iEventSetup, EVTColContainer * cols);
00070 
00072                 const std::vector<unsigned int> getObjectsType(const std::string & hltpath) const;
00073 
00074                 
00075         private:
00076                 void bookobjects(const edm::ParameterSet & anpset);
00077                 void initobjects(const edm::Event & iEvent, EVTColContainer * col);
00078                 void InitSelector(const unsigned int & objtype);
00079                 void insertcandidates(const unsigned int & objtype, const EVTColContainer * col,
00080                                 std::vector<MatchStruct> * matches);
00081 
00082                 void bookHist(const std::string & source, const std::string & objType,
00083                                 const std::string & variable);
00084                 void fillHist(const std::string & source,const std::string & objType, 
00085                                 const std::string & variable, const float & value );
00086 
00087                 edm::ParameterSet _pset;
00088 
00089                 std::string _analysisname;
00090 
00092                 unsigned int _minCandidates;
00093 
00094                 std::string _hltProcessName;
00095                 
00097                 std::vector<std::string> _hltPathsToCheck;
00099                 std::set<std::string> _hltPaths;
00100 
00102                 std::map<std::string,std::string> _shortpath2long;
00103 
00104                 // The name of the object collections to be used in this
00105                 // analysis. 
00106                 std::string _genParticleLabel;
00107                 std::map<unsigned int,std::string> _recLabels;
00108                 
00110                 std::vector<double> _parametersEta;
00111                 std::vector<double> _parametersPhi;
00112                 std::vector<double> _parametersTurnOn;
00113                 
00114                 std::map<unsigned int,double> _cutMinPt;   
00115                 std::map<unsigned int,double> _cutMaxEta;
00116                 std::map<unsigned int,unsigned int> _cutMotherId;    //TO BE DEPRECATED (HLTMATCH)
00117                 std::map<unsigned int,std::vector<double> > _cutsDr; // TO BE DEPRECATED (HLTMATCH)
00119                 std::map<unsigned int,std::string> _genCut;
00120                 std::map<unsigned int,std::string> _recCut;
00121 
00124                 std::map<unsigned int,StringCutObjectSelector<reco::GenParticle> *> _genSelectorMap;
00125                 StringCutObjectSelector<reco::Muon>        * _recMuonSelector;
00126                 StringCutObjectSelector<reco::GsfElectron> * _recElecSelector;
00127                 StringCutObjectSelector<reco::CaloMET>     * _recCaloMETSelector;
00128                 StringCutObjectSelector<reco::PFTau>       * _recPFTauSelector;
00129                 StringCutObjectSelector<reco::Photon>      * _recPhotonSelector;
00130                 StringCutObjectSelector<reco::Track>       * _recTrackSelector;
00131                 
00132                 // The plotters: managers of each hlt path where the plots are done
00133                 std::vector<HLTHiggsPlotter> _analyzers;
00134                 
00135                 HLTConfigProvider _hltConfig;
00136                 
00137                 DQMStore* _dbe;
00138                 std::map<std::string, MonitorElement *> _elements;              
00139 };
00140 
00141 
00142 #endif