CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTExoticaSubAnalysis.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Exotica_HLTExoticaSubAnalysis_H
2 #define HLTriggerOffline_Exotica_HLTExoticaSubAnalysis_H
3 
23 
39 
42 
44 
46 #include<vector>
47 #include<set>
48 #include<map>
49 #include<cstring>
50 
52 class EVTColContainer;
53 
58 public:
59  enum class Level{
60  GEN = 98,
61  RECO = 99
62  };
63 
65  const std::string & analysisname,
66  edm::ConsumesCollector && consCollector);
68  void beginJob();
69  void beginRun(const edm::Run & iRun, const edm::EventSetup & iEventSetup);
70 
74  void subAnalysisBookHistos(DQMStore::IBooker &iBooker, const edm::Run & iRun, const edm::EventSetup & iSetup);
75 
78  void analyze(const edm::Event & iEvent, const edm::EventSetup & iEventSetup, EVTColContainer * cols);
79 
80 private:
86  const std::vector<unsigned int> getObjectsType(const std::string & hltpath) const;
87 
89  void getNamesOfObjects(const edm::ParameterSet & anpset);
91  void registerConsumes(edm::ConsumesCollector & consCollector);
95  void initSelector(const unsigned int & objtype);
98  void insertCandidates(const unsigned int & objtype, const EVTColContainer * col,
99  std::vector<reco::LeafCandidate> * matches);
100 
102  void bookHist(DQMStore::IBooker &iBooker, const std::string & source, const std::string & objType,
103  const std::string & variable);
104  void fillHist(const std::string & source, const std::string & objType,
105  const std::string & variable, const float & value);
106 
109 
112 
114  unsigned int _minCandidates;
115 
117  std::vector<std::string> _hltPathsToCheck;
119  std::set<std::string> _hltPaths;
121  std::map<std::string, std::string> _shortpath2long;
122 
127  std::map<unsigned int, edm::InputTag> _recLabels;
131  std::map<unsigned int, edm::EDGetToken> _tokens;
132 
134  std::vector<double> _parametersEta;
135  std::vector<double> _parametersPhi;
136  std::vector<double> _parametersTurnOn;
137 
139  std::map<unsigned int, std::string> _genCut;
140  std::map<unsigned int, std::string> _recCut;
141 
144  std::map<unsigned int, StringCutObjectSelector<reco::GenParticle> *> _genSelectorMap;
151 
153  std::vector<HLTExoticaPlotter> _plotters;
154 
157 
159  std::map<std::string, MonitorElement *> _elements;
160 };
161 
162 
163 #endif
unsigned int _minCandidates
The minimum number of reco/gen candidates needed by the analysis.
void getNamesOfObjects(const edm::ParameterSet &anpset)
Creates the maps that map which collection should come from which label.
std::map< unsigned int, std::string > _genCut
gen/rec objects cuts
std::vector< HLTExoticaPlotter > _plotters
The plotters: managers of each hlt path where the plots are done.
std::vector< double > _parametersPhi
void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value)
container with all the objects needed
void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols)
edm::EDGetTokenT< edm::TriggerResults > _trigResultsToken
std::map< unsigned int, edm::InputTag > _recLabels
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
int iEvent
Definition: GenABIO.cc:230
StringCutObjectSelector< reco::Muon > * _recMuonSelector
edm::ParameterSet _pset
Internal, working copy of the PSet passed from above.
void subAnalysisBookHistos(DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup)
std::vector< double > _parametersEta
Some kinematical parameters.
std::map< unsigned int, std::string > _recCut
const std::vector< unsigned int > getObjectsType(const std::string &hltpath) const
closes analyze method
HLTConfigProvider _hltConfig
Interface to the HLT information.
~HLTExoticaSubAnalysis()
End Constructor.
std::vector< std::string > _hltPathsToCheck
The hlt paths to check for.
std::string _hltProcessName
The labels of the object collections to be used in this analysis.
void registerConsumes(edm::ConsumesCollector &consCollector)
Registers consumption of objects.
void getHandlesToObjects(const edm::Event &iEvent, EVTColContainer *col)
Gets the collections themselves.
StringCutObjectSelector< reco::PFMET > * _recPFMETSelector
std::string _analysisname
The name of this sub-analysis.
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
std::map< unsigned int, StringCutObjectSelector< reco::GenParticle > * > _genSelectorMap
void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup)
std::vector< double > _parametersTurnOn
std::map< unsigned int, edm::EDGetToken > _tokens
std::map< std::string, MonitorElement * > _elements
Structure of the MonitorElements.
HLTExoticaSubAnalysis(const edm::ParameterSet &pset, const std::string &analysisname, edm::ConsumesCollector &&consCollector)
Constructor.
StringCutObjectSelector< reco::PFJet > * _recJetSelector
edm::EDGetTokenT< reco::GenParticleCollection > _genParticleToken
And also the tokens to get the object collections.
void initSelector(const unsigned int &objtype)
Initializes the selectors of the objects based on which object it is.
int col
Definition: cuy.py:1008
std::set< std::string > _hltPaths
The hlt paths found in the hltConfig.
void insertCandidates(const unsigned int &objtype, const EVTColContainer *col, std::vector< reco::LeafCandidate > *matches)
static std::string const source
Definition: EdmProvDump.cc:43
StringCutObjectSelector< reco::PFTau > * _recPFTauSelector
void bookHist(DQMStore::IBooker &iBooker, const std::string &source, const std::string &objType, const std::string &variable)
The internal functions to book and fill histograms.
Definition: Run.h:41
std::map< std::string, std::string > _shortpath2long
Relation between the short and long versions of the path.