CMS 3D CMS Logo

HLTHiggsSubAnalysis.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Higgs_HLTHiggsSubAnalysis_H
2 #define HLTriggerOffline_Higgs_HLTHiggsSubAnalysis_H
3 
22 
45 
48 
50 
52 
53 
54 #include<vector>
55 #include<set>
56 #include<map>
57 #include<cstring>
58 
59 class EVTColContainer;
60 
62 {
63  public:
64  enum
65  {
66  GEN,
68  };
69 
71  const std::string & analysisname,
74  void beginJob();
75  void beginRun(const edm::Run & iRun, const edm::EventSetup & iEventSetup);
76  void analyze(const edm::Event & iEvent, const edm::EventSetup & iEventSetup, EVTColContainer * cols);
78 
80  const std::vector<unsigned int> getObjectsType(const std::string & hltpath) const;
81 
82 
83  private:
84  void bookobjects(const edm::ParameterSet & anpset, edm::ConsumesCollector& iC);
86  void InitSelector(const unsigned int & objtype);
87  void initAndInsertJets(const edm::Event & iEvent, EVTColContainer * cols,
88  std::vector<MatchStruct> * matches);
89  void passJetCuts(std::vector<MatchStruct> * matches, std::map<std::string,bool> & jetCutResult,
90  float & dEtaqq, float & mqq, float & dPhibb, float & CSV1, float & CSV2, float & CSV3);
91  void passOtherCuts(const std::vector<MatchStruct> & matches, std::map<std::string,bool> & jetCutResult);
92  void insertcandidates(const unsigned int & objtype, const EVTColContainer * col,
93  std::vector<MatchStruct> * matches);
94 
95  void bookHist(const std::string & source, const std::string & objType,
97  void fillHist(const std::string & source,const std::string & objType,
98  const std::string & variable, const float & value );
99 
101 
103 
105  unsigned int _minCandidates;
106 
107  double _HtJetPtMin;
108  double _HtJetEtaMax;
109 
111 
114 
116  std::vector<std::string> _hltPathsToCheck;
118  std::set<std::string> _hltPaths;
119 
121  std::map<std::string,std::string> _shortpath2long;
122 
123  // The name of the object collections to be used in this
124  // analysis.
128 
129  std::map<unsigned int,std::string> _recLabels;
139 
141  std::vector<double> _parametersEta;
142  std::vector<double> _parametersPhi;
143  std::vector<double> _parametersPu;
144  std::vector<double> _parametersHt;
145  std::vector<double> _parametersTurnOn;
147 
148  std::map<unsigned int,double> _cutMinPt;
149  std::map<unsigned int,double> _cutMaxEta;
150  std::map<unsigned int,unsigned int> _cutMotherId; //TO BE DEPRECATED (HLTMATCH)
151  std::map<unsigned int,std::vector<double> > _cutsDr; // TO BE DEPRECATED (HLTMATCH)
153  std::map<unsigned int,std::string> _genCut;
154  std::map<unsigned int,std::string> _recCut;
155 
158  std::map<unsigned int,StringCutObjectSelector<reco::GenParticle> *> _genSelectorMap;
168 
169  //N-1 cut values
170  std::vector<double> _NminOneCuts;
172  unsigned int NptPlots;
173 
174  // The plotters: managers of each hlt path where the plots are done
175  std::vector<HLTHiggsPlotter> _analyzers;
176 
178  std::map<std::string, MonitorElement *> _elements;
179 };
180 #endif
std::vector< double > _parametersTurnOn
void InitSelector(const unsigned int &objtype)
std::map< std::string, std::string > _shortpath2long
Relation between the short version of a path.
StringCutObjectSelector< reco::CaloMET > * _recCaloMETSelector
edm::EDGetTokenT< reco::PFMETCollection > _recLabelsPFMET
edm::EDGetTokenT< reco::PFJetCollection > _recLabelsPFJet
edm::EDGetTokenT< reco::GenParticleCollection > _genParticleLabel
void passJetCuts(std::vector< MatchStruct > *matches, std::map< std::string, bool > &jetCutResult, float &dEtaqq, float &mqq, float &dPhibb, float &CSV1, float &CSV2, float &CSV3)
std::map< unsigned int, std::string > _genCut
gen/rec objects cuts
void initobjects(const edm::Event &iEvent, EVTColContainer *col)
edm::EDGetTokenT< reco::PFJetCollection > _recoHtJetLabel
edm::EDGetTokenT< reco::PFTauCollection > _recLabelsPFTau
unsigned int _minCandidates
The minimum number of reco/gen candidates needed by the analysis.
std::map< std::string, MonitorElement * > _elements
std::vector< double > _NminOneCuts
edm::ParameterSet _pset
std::set< std::string > _hltPaths
the hlt paths found in the hltConfig
container with all the objects needed
StringCutObjectSelector< reco::PFMET > * _recPFMETSelector
edm::EDGetTokenT< reco::GenJetCollection > _genJetLabel
HLTConfigProvider _hltConfig
std::map< unsigned int, unsigned int > _cutMotherId
edm::EDGetTokenT< reco::JetTagCollection > _recTagPFJet
void bookHistograms(DQMStore::IBooker &)
std::vector< double > _parametersPu
edm::EDGetTokenT< reco::PhotonCollection > _recLabelsPhoton
edm::EDGetTokenT< reco::CaloMETCollection > _recLabelsCaloMET
StringCutObjectSelector< reco::Track > * _recTrackSelector
std::map< unsigned int, std::string > _recCut
void passOtherCuts(const std::vector< MatchStruct > &matches, std::map< std::string, bool > &jetCutResult)
std::map< unsigned int, StringCutObjectSelector< reco::GenParticle > * > _genSelectorMap
int iEvent
Definition: GenABIO.cc:230
StringCutObjectSelector< reco::GenJet > * _genJetSelector
void initAndInsertJets(const edm::Event &iEvent, EVTColContainer *cols, std::vector< MatchStruct > *matches)
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > _puSummaryInfo
std::vector< HLTHiggsPlotter > _analyzers
std::map< unsigned int, std::string > _recLabels
void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols)
Definition: value.py:1
std::map< unsigned int, double > _cutMinPt
StringCutObjectSelector< reco::PFTau > * _recPFTauSelector
void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup)
edm::EDGetTokenT< edm::TriggerResults > _trigResultsTag
void bookHist(const std::string &source, const std::string &objType, const std::string &variable, DQMStore::IBooker &)
std::vector< double > _parametersHt
edm::EDGetTokenT< reco::GsfElectronCollection > _recLabelsElec
HLTHiggsSubAnalysis(const edm::ParameterSet &pset, const std::string &analysisname, edm::ConsumesCollector &&iC)
StringCutObjectSelector< reco::Muon > * _recMuonSelector
void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value)
const std::vector< unsigned int > getObjectsType(const std::string &hltpath) const
Extract what objects need this analysis.
void insertcandidates(const unsigned int &objtype, const EVTColContainer *col, std::vector< MatchStruct > *matches)
edm::EDGetTokenT< reco::MuonCollection > _recLabelsMuon
std::vector< double > _parametersPhi
std::vector< std::string > _hltPathsToCheck
the hlt paths with regular expressions
std::vector< double > _parametersEta
Some kinematical parameters.
std::map< unsigned int, double > _cutMaxEta
col
Definition: cuy.py:1008
void bookobjects(const edm::ParameterSet &anpset, edm::ConsumesCollector &iC)
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
StringCutObjectSelector< reco::PFJet > * _recPFJetSelector
std::map< unsigned int, std::vector< double > > _cutsDr
static std::string const source
Definition: EdmProvDump.cc:43
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
Definition: Run.h:42