CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLTHiggsSubAnalysis.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Higgs_HLTHiggsSubAnalysis_H
2 #define HLTriggerOffline_Higgs_HLTHiggsSubAnalysis_H
3 
22 
45 
47 
49 
50 #include "HLTHiggsPlotter.h"
51 
52 #include <vector>
53 #include <set>
54 #include <map>
55 #include <cstring>
56 
57 struct EVTColContainer;
58 
60 public:
63 
64  enum { GEN, RECO };
65 
68  void beginJob();
69  void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup);
70  void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols);
72 
74  const std::vector<unsigned int> getObjectsType(const std::string &hltpath) const;
75 
76 private:
77  void bookobjects(const edm::ParameterSet &anpset, edm::ConsumesCollector &iC);
79  void InitSelector(const unsigned int &objtype);
80  void initAndInsertJets(const edm::Event &iEvent, EVTColContainer *cols, std::vector<MatchStruct> *matches);
81  void passJetCuts(std::vector<MatchStruct> *matches,
82  std::map<std::string, bool> &jetCutResult,
83  float &dEtaqq,
84  float &mqq,
85  float &dPhibb,
86  float &CSV1,
87  float &CSV2,
88  float &CSV3);
89  void passOtherCuts(const std::vector<MatchStruct> &matches, std::map<std::string, bool> &jetCutResult);
90  void insertcandidates(const unsigned int &objtype, const EVTColContainer *col, std::vector<MatchStruct> *matches);
91 
92  void bookHist(const std::string &source, const std::string &objType, const std::string &variable, DQMStore::IBooker &);
93  void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value);
94 
96 
98 
100  unsigned int _minCandidates;
101 
102  double _HtJetPtMin;
103  double _HtJetEtaMax;
104 
106 
109 
111  std::vector<std::string> _hltPathsToCheck;
113  std::set<std::string> _hltPaths;
114 
116  std::map<std::string, std::string> _shortpath2long;
117 
118  // The name of the object collections to be used in this
119  // analysis.
123 
124  std::map<unsigned int, std::string> _recLabels;
134 
136  std::vector<double> _parametersEta;
137  std::vector<double> _parametersPhi;
138  std::vector<double> _parametersPu;
139  std::vector<double> _parametersHt;
140  std::vector<double> _parametersTurnOn;
142 
143  std::map<unsigned int, double> _cutMinPt;
144  std::map<unsigned int, double> _cutMaxEta;
145  std::map<unsigned int, unsigned int> _cutMotherId; //TO BE DEPRECATED (HLTMATCH)
146  std::map<unsigned int, std::vector<double> > _cutsDr; // TO BE DEPRECATED (HLTMATCH)
148  std::map<unsigned int, std::string> _genCut;
149  std::map<unsigned int, std::string> _recCut;
150 
153  std::map<unsigned int, StringCutObjectSelector<reco::GenParticle> *> _genSelectorMap;
163 
164  //N-1 cut values
165  std::vector<double> _NminOneCuts;
167  unsigned int NptPlots;
168 
169  // The plotters: managers of each hlt path where the plots are done
170  std::vector<HLTHiggsPlotter> _analyzers;
171 
173  std::map<std::string, MonitorElement *> _elements;
174 };
175 #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)
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)
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.
void bookobjects(const edm::ParameterSet &anpset, edm::ConsumesCollector &iC)
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
std::map< unsigned int, std::string > _recLabels
StringCutObjectSelector< reco::PFJet > * _recPFJetSelector
int col
Definition: cuy.py:1009
static std::string const source
Definition: EdmProvDump.cc:46
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
Definition: Run.h:45