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 
21 
44 
46 
48 
49 #include "HLTHiggsPlotter.h"
50 
51 #include <vector>
52 #include <set>
53 #include <map>
54 #include <cstring>
55 
56 struct EVTColContainer;
57 
59 public:
62 
63  enum { GEN, RECO };
64 
67  void beginJob();
68  void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup);
69  void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols);
71 
73  const std::vector<unsigned int> getObjectsType(const std::string &hltpath) const;
74 
75 private:
76  void bookobjects(const edm::ParameterSet &anpset, edm::ConsumesCollector &iC);
78  void InitSelector(const unsigned int &objtype);
79  void initAndInsertJets(const edm::Event &iEvent, EVTColContainer *cols, std::vector<MatchStruct> *matches);
80  void passJetCuts(std::vector<MatchStruct> *matches,
81  std::map<std::string, bool> &jetCutResult,
82  float &dEtaqq,
83  float &mqq,
84  float &dPhibb,
85  float &CSV1,
86  float &CSV2,
87  float &CSV3);
88  void passOtherCuts(const std::vector<MatchStruct> &matches, std::map<std::string, bool> &jetCutResult);
89  void insertcandidates(const unsigned int &objtype, const EVTColContainer *col, std::vector<MatchStruct> *matches);
90 
92  void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value);
93 
95 
97 
99  unsigned int _minCandidates;
100 
101  double _HtJetPtMin;
102  double _HtJetEtaMax;
103 
105 
108 
110  std::vector<std::string> _hltPathsToCheck;
112  std::set<std::string> _hltPaths;
113 
115  std::map<std::string, std::string> _shortpath2long;
116 
117  // The name of the object collections to be used in this
118  // analysis.
122 
123  std::map<unsigned int, std::string> _recLabels;
133 
135  std::vector<double> _parametersEta;
136  std::vector<double> _parametersPhi;
137  std::vector<double> _parametersPu;
138  std::vector<double> _parametersHt;
139  std::vector<double> _parametersTurnOn;
141 
142  std::map<unsigned int, double> _cutMinPt;
143  std::map<unsigned int, double> _cutMaxEta;
144  std::map<unsigned int, unsigned int> _cutMotherId; //TO BE DEPRECATED (HLTMATCH)
145  std::map<unsigned int, std::vector<double> > _cutsDr; // TO BE DEPRECATED (HLTMATCH)
147  std::map<unsigned int, std::string> _genCut;
148  std::map<unsigned int, std::string> _recCut;
149 
152  std::map<unsigned int, StringCutObjectSelector<reco::GenParticle> *> _genSelectorMap;
162 
163  //N-1 cut values
164  std::vector<double> _NminOneCuts;
166  unsigned int NptPlots;
167 
168  // The plotters: managers of each hlt path where the plots are done
169  std::vector<HLTHiggsPlotter> _analyzers;
170 
172  std::map<std::string, MonitorElement *> _elements;
173 };
174 #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.
std::map< unsigned int, std::vector< double > > _cutsDr
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)
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::map< unsigned int, unsigned int > _cutMotherId
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
std::map< unsigned int, StringCutObjectSelector< reco::GenParticle > * > _genSelectorMap
HLTConfigProvider _hltConfig
edm::EDGetTokenT< reco::JetTagCollection > _recTagPFJet
void bookHistograms(DQMStore::IBooker &)
std::map< unsigned int, std::string > _recCut
std::vector< double > _parametersPu
edm::EDGetTokenT< reco::PhotonCollection > _recLabelsPhoton
edm::EDGetTokenT< reco::CaloMETCollection > _recLabelsCaloMET
StringCutObjectSelector< reco::Track > * _recTrackSelector
void passOtherCuts(const std::vector< MatchStruct > &matches, std::map< std::string, bool > &jetCutResult)
int iEvent
Definition: GenABIO.cc:224
StringCutObjectSelector< reco::GenJet > * _genJetSelector
std::map< unsigned int, std::string > _genCut
gen/rec objects cuts
void initAndInsertJets(const edm::Event &iEvent, EVTColContainer *cols, std::vector< MatchStruct > *matches)
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > _puSummaryInfo
dqm::legacy::MonitorElement MonitorElement
std::vector< HLTHiggsPlotter > _analyzers
dqm::legacy::DQMStore DQMStore
std::map< unsigned int, double > _cutMaxEta
void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols)
Definition: value.py:1
StringCutObjectSelector< reco::PFTau > * _recPFTauSelector
std::map< unsigned int, double > _cutMinPt
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)
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.
col
Definition: cuy.py:1009
void bookobjects(const edm::ParameterSet &anpset, edm::ConsumesCollector &iC)
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
std::map< unsigned int, std::string > _recLabels
StringCutObjectSelector< reco::PFJet > * _recPFJetSelector
const std::vector< unsigned int > getObjectsType(const std::string &hltpath) const
Extract what objects need this analysis.
static std::string const source
Definition: EdmProvDump.cc:46
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
Definition: Run.h:45