CMS 3D CMS Logo

HLTExoticaSubAnalysis.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Exotica_HLTExoticaSubAnalysis_H
2 #define HLTriggerOffline_Exotica_HLTExoticaSubAnalysis_H
3 
23 
51 
53 
54 #include <cstring>
55 #include <map>
56 #include <set>
57 #include <vector>
58 
60 struct EVTColContainer;
61 
66 public:
69 
70  enum class Level { GEN = 98, RECO = 99 };
71 
73  const std::string &analysisname,
74  edm::ConsumesCollector &&consCollector);
76  void beginJob();
77  void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup);
78  void endRun();
79 
83  void subAnalysisBookHistos(DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup);
84 
88  void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols);
89 
90 private:
96  const std::vector<unsigned int> getObjectsType(const std::string &hltpath) const;
97 
99  void getNamesOfObjects(const edm::ParameterSet &anpset);
101  void registerConsumes(edm::ConsumesCollector &consCollector);
105  void initSelector(const unsigned int &objtype);
108  void insertCandidates(const unsigned int &objtype,
109  const EVTColContainer *col,
110  std::vector<reco::LeafCandidate> *matches,
111  std::map<int, double> &theSumEt,
112  std::map<int, std::vector<const reco::Track *>> &trkObjs);
113 
115  void bookHist(DQMStore::IBooker &iBooker,
116  const std::string &source,
117  const std::string &objType,
118  const std::string &variable);
119  void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value);
120 
123 
126 
128  unsigned int _minCandidates;
129 
131  std::vector<std::string> _hltPathsToCheck;
133  std::set<std::string> _hltPaths;
135  std::map<std::string, std::string> _shortpath2long;
136 
142  std::map<unsigned int, edm::InputTag> _recLabels;
147  std::map<unsigned int, edm::EDGetToken> _tokens;
148 
150  std::vector<double> _parametersEta;
151  std::vector<double> _parametersPhi;
152  std::vector<double> _parametersTurnOn;
153  std::vector<double> _parametersTurnOnSumEt;
154  std::vector<double> _parametersDxy;
155 
156  // flag to switch off
157  bool _drop_pt2;
158  bool _drop_pt3;
159 
161  std::map<unsigned int, std::string> _genCut;
162  std::map<unsigned int, std::string> _recCut;
164  std::map<unsigned int, std::string> _genCut_leading;
165  std::map<unsigned int, std::string> _recCut_leading;
166 
169  std::map<unsigned int, StringCutObjectSelector<reco::GenParticle> *> _genSelectorMap;
185 
187  std::vector<HLTExoticaPlotter> _plotters;
188 
190  std::map<std::string, int> _triggerCounter;
191 
194 
196  std::map<std::string, MonitorElement *> _elements;
197 };
198 
199 #endif
HLTExoticaSubAnalysis::_recCut_leading
std::map< unsigned int, std::string > _recCut_leading
Definition: HLTExoticaSubAnalysis.h:165
HLTExoticaSubAnalysis::_recCut
std::map< unsigned int, std::string > _recCut
Definition: HLTExoticaSubAnalysis.h:162
CaloJetCollection.h
HLTExoticaSubAnalysis::_genParticleToken
edm::EDGetTokenT< reco::GenParticleCollection > _genParticleToken
And also the tokens to get the object collections.
Definition: HLTExoticaSubAnalysis.h:144
CaloJet.h
HLTExoticaSubAnalysis::_recCaloMETSelector
StringCutObjectSelector< reco::CaloMET > * _recCaloMETSelector
Definition: HLTExoticaSubAnalysis.h:178
HLTExoticaSubAnalysis::~HLTExoticaSubAnalysis
~HLTExoticaSubAnalysis()
End Constructor.
Definition: HLTExoticaSubAnalysis.cc:148
HLTExoticaSubAnalysis::_hltProcessName
std::string _hltProcessName
The labels of the object collections to be used in this analysis.
Definition: HLTExoticaSubAnalysis.h:138
PFTauFwd.h
Muon.h
HLTExoticaSubAnalysis::initSelector
void initSelector(const unsigned int &objtype)
Initializes the selectors of the objects based on which object it is.
Definition: HLTExoticaSubAnalysis.cc:1121
HLTExoticaSubAnalysis::_hltPathsToCheck
std::vector< std::string > _hltPathsToCheck
The hlt paths to check for.
Definition: HLTExoticaSubAnalysis.h:131
HLTExoticaSubAnalysis::_parametersTurnOnSumEt
std::vector< double > _parametersTurnOnSumEt
Definition: HLTExoticaSubAnalysis.h:153
GenMETCollection.h
HLTExoticaSubAnalysis::_trigResultsToken
edm::EDGetTokenT< edm::TriggerResults > _trigResultsToken
Definition: HLTExoticaSubAnalysis.h:145
HLTExoticaSubAnalysis::_genCut_leading
std::map< unsigned int, std::string > _genCut_leading
gen/rec pt-leading objects cuts
Definition: HLTExoticaSubAnalysis.h:164
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< reco::GenParticleCollection >
cuy.col
col
Definition: cuy.py:1010
HLTExoticaSubAnalysis::_parametersDxy
std::vector< double > _parametersDxy
Definition: HLTExoticaSubAnalysis.h:154
PFJet.h
PFJetCollection.h
HLTExoticaSubAnalysis::_recMuonTrkSelector
StringCutObjectSelector< reco::Track > * _recMuonTrkSelector
Definition: HLTExoticaSubAnalysis.h:171
DQMStore.h
PhotonFwd.h
HLTExoticaSubAnalysis::insertCandidates
void insertCandidates(const unsigned int &objtype, const EVTColContainer *col, std::vector< reco::LeafCandidate > *matches, std::map< int, double > &theSumEt, std::map< int, std::vector< const reco::Track * >> &trkObjs)
Definition: HLTExoticaSubAnalysis.cc:1162
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
HLTExoticaSubAnalysis::Level::GEN
HLTExoticaSubAnalysis::_l1METSelector
StringCutObjectSelector< l1extra::L1EtMissParticle > * _l1METSelector
Definition: HLTExoticaSubAnalysis.h:180
EDAnalyzer.h
PFMETCollection.h
HLTExoticaSubAnalysis::_genCut
std::map< unsigned int, std::string > _genCut
gen/rec objects cuts
Definition: HLTExoticaSubAnalysis.h:161
HLTExoticaSubAnalysis::_drop_pt2
bool _drop_pt2
Definition: HLTExoticaSubAnalysis.h:157
CaloMETCollection.h
GenParticle.h
HLTExoticaSubAnalysis::_recElecSelector
StringCutObjectSelector< reco::GsfElectron > * _recElecSelector
Definition: HLTExoticaSubAnalysis.h:173
HLTExoticaPlotter.h
dqm::legacy::DQMStore::IBooker
dqm::implementation::IBooker IBooker
Definition: DQMStore.h:729
MakerMacros.h
Photon.h
Track.h
TrackFwd.h
HLTExoticaSubAnalysis::_shortpath2long
std::map< std::string, std::string > _shortpath2long
Relation between the short and long versions of the path.
Definition: HLTExoticaSubAnalysis.h:135
dqm::legacy::DQMStore
Definition: DQMStore.h:727
BeamSpot.h
HLTExoticaSubAnalysis::_recPFMHTSelector
StringCutObjectSelector< reco::PFMET > * _recPFMHTSelector
Definition: HLTExoticaSubAnalysis.h:176
CaloMET.h
HLTExoticaSubAnalysis::_parametersTurnOn
std::vector< double > _parametersTurnOn
Definition: HLTExoticaSubAnalysis.h:152
HLTExoticaSubAnalysis
Definition: HLTExoticaSubAnalysis.h:65
MuonFwd.h
HLTExoticaSubAnalysis::_elements
std::map< std::string, MonitorElement * > _elements
Structure of the MonitorElements.
Definition: HLTExoticaSubAnalysis.h:196
source
static const std::string source
Definition: EdmProvDump.cc:47
HLTExoticaSubAnalysis::getHandlesToObjects
void getHandlesToObjects(const edm::Event &iEvent, EVTColContainer *col)
Gets the collections themselves.
Definition: HLTExoticaSubAnalysis.cc:933
LeafCandidate.h
HLTExoticaSubAnalysis::fillHist
void fillHist(const std::string &source, const std::string &objType, const std::string &variable, const float &value)
Definition: HLTExoticaSubAnalysis.cc:1107
GsfElectron.h
HLTExoticaSubAnalysis::HLTExoticaSubAnalysis
HLTExoticaSubAnalysis(const edm::ParameterSet &pset, const std::string &analysisname, edm::ConsumesCollector &&consCollector)
Constructor.
Definition: HLTExoticaSubAnalysis.cc:28
HLTExoticaSubAnalysis::_recPhotonSelector
StringCutObjectSelector< reco::Photon > * _recPhotonSelector
Definition: HLTExoticaSubAnalysis.h:182
HLTExoticaSubAnalysis::_bsToken
edm::EDGetTokenT< reco::BeamSpot > _bsToken
Definition: HLTExoticaSubAnalysis.h:146
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTExoticaSubAnalysis::_hltConfig
HLTConfigProvider _hltConfig
Interface to the HLT information.
Definition: HLTExoticaSubAnalysis.h:193
GenMET.h
HLTExoticaSubAnalysis::_tokens
std::map< unsigned int, edm::EDGetToken > _tokens
Definition: HLTExoticaSubAnalysis.h:147
HLTExoticaSubAnalysis::subAnalysisBookHistos
void subAnalysisBookHistos(DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup)
Definition: HLTExoticaSubAnalysis.cc:195
HLTExoticaSubAnalysis::_genParticleLabel
edm::InputTag _genParticleLabel
Definition: HLTExoticaSubAnalysis.h:139
GsfElectronFwd.h
electrons_cff.objType
objType
Definition: electrons_cff.py:491
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
HLTExoticaSubAnalysis::_recPFJetSelector
StringCutObjectSelector< reco::PFJet > * _recPFJetSelector
Definition: HLTExoticaSubAnalysis.h:183
HLTExoticaSubAnalysis::_parametersEta
std::vector< double > _parametersEta
Some kinematical parameters.
Definition: HLTExoticaSubAnalysis.h:150
HLTExoticaSubAnalysis::_triggerCounter
std::map< std::string, int > _triggerCounter
counting HLT passed events
Definition: HLTExoticaSubAnalysis.h:190
PFMET.h
iEvent
int iEvent
Definition: GenABIO.cc:224
HLTExoticaSubAnalysis::_pset
edm::ParameterSet _pset
Internal, working copy of the PSet passed from above.
Definition: HLTExoticaSubAnalysis.h:122
HLTExoticaSubAnalysis::getObjectsType
const std::vector< unsigned int > getObjectsType(const std::string &hltpath) const
closes analyze method
Definition: HLTExoticaSubAnalysis.cc:732
value
Definition: value.py:1
HLTExoticaSubAnalysis::_analysisname
std::string _analysisname
The name of this sub-analysis.
Definition: HLTExoticaSubAnalysis.h:125
HLTExoticaSubAnalysis::Level::RECO
HLTExoticaSubAnalysis::_genMETSelector
StringCutObjectSelector< reco::GenMET > * _genMETSelector
Definition: HLTExoticaSubAnalysis.h:177
HLTExoticaSubAnalysis::_recMETSelector
StringCutObjectSelector< reco::MET > * _recMETSelector
Definition: HLTExoticaSubAnalysis.h:174
edm::EventSetup
Definition: EventSetup.h:57
HLTExoticaSubAnalysis::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: HLTExoticaSubAnalysis.h:68
HLTExoticaSubAnalysis::_recCaloJetSelector
StringCutObjectSelector< reco::CaloJet > * _recCaloJetSelector
Definition: HLTExoticaSubAnalysis.h:184
HLTConfigProvider.h
InputTag.h
HLTExoticaSubAnalysis::_recCaloMHTSelector
StringCutObjectSelector< reco::CaloMET > * _recCaloMHTSelector
Definition: HLTExoticaSubAnalysis.h:179
HLTExoticaSubAnalysis::_minCandidates
unsigned int _minCandidates
The minimum number of reco/gen candidates needed by the analysis.
Definition: HLTExoticaSubAnalysis.h:128
HLTExoticaSubAnalysis::_plotters
std::vector< HLTExoticaPlotter > _plotters
The plotters: managers of each hlt path where the plots are done.
Definition: HLTExoticaSubAnalysis.h:187
taus_updatedMVAIds_cff.variable
variable
Definition: taus_updatedMVAIds_cff.py:32
HLTConfigProvider
Definition: HLTConfigProvider.h:28
HLTExoticaSubAnalysis::_beamSpotLabel
edm::InputTag _beamSpotLabel
Definition: HLTExoticaSubAnalysis.h:141
StringCutObjectSelector.h
Frameworkfwd.h
StringCutObjectSelector< reco::Muon >
HLTExoticaSubAnalysis::getNamesOfObjects
void getNamesOfObjects(const edm::ParameterSet &anpset)
Creates the maps that map which collection should come from which label.
Definition: HLTExoticaSubAnalysis.cc:769
PFTau.h
HLTExoticaSubAnalysis::_recMuonSelector
StringCutObjectSelector< reco::Muon > * _recMuonSelector
Definition: HLTExoticaSubAnalysis.h:170
HLTExoticaSubAnalysis::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: HLTExoticaSubAnalysis.h:67
HLTExoticaSubAnalysis::_parametersPhi
std::vector< double > _parametersPhi
Definition: HLTExoticaSubAnalysis.h:151
HLTExoticaSubAnalysis::_hltPaths
std::set< std::string > _hltPaths
The hlt paths found in the hltConfig.
Definition: HLTExoticaSubAnalysis.h:133
HLTExoticaSubAnalysis::endRun
void endRun()
Definition: HLTExoticaSubAnalysis.cc:1321
patCandidatesForDimuonsSequences_cff.matches
matches
Definition: patCandidatesForDimuonsSequences_cff.py:131
ConsumesCollector.h
genParticles_cff.map
map
Definition: genParticles_cff.py:11
L1EtMissParticle.h
ParameterSet.h
HLTExoticaSubAnalysis::_recLabels
std::map< unsigned int, edm::InputTag > _recLabels
Definition: HLTExoticaSubAnalysis.h:142
HLTExoticaSubAnalysis::_recPFMETSelector
StringCutObjectSelector< reco::PFMET > * _recPFMETSelector
Definition: HLTExoticaSubAnalysis.h:175
HLTExoticaSubAnalysis::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols)
Definition: HLTExoticaSubAnalysis.cc:370
HLTExoticaSubAnalysis::_trigResultsLabel
edm::InputTag _trigResultsLabel
Definition: HLTExoticaSubAnalysis.h:140
HLTExoticaSubAnalysis::_recTrackSelector
StringCutObjectSelector< reco::Track > * _recTrackSelector
Definition: HLTExoticaSubAnalysis.h:172
EVTColContainer
container with all the objects needed
Definition: EVTColContainer.cc:45
edm::Event
Definition: Event.h:73
HLTExoticaSubAnalysis::Level
Level
Definition: HLTExoticaSubAnalysis.h:70
HLTExoticaSubAnalysis::registerConsumes
void registerConsumes(edm::ConsumesCollector &consCollector)
Registers consumption of objects.
Definition: HLTExoticaSubAnalysis.cc:847
HLTExoticaSubAnalysis::bookHist
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: HLTExoticaSubAnalysis.cc:1047
HLTExoticaSubAnalysis::beginRun
void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup)
Definition: HLTExoticaSubAnalysis.cc:265
edm::InputTag
Definition: InputTag.h:15
HLTExoticaSubAnalysis::_drop_pt3
bool _drop_pt3
Definition: HLTExoticaSubAnalysis.h:158
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
HLTExoticaSubAnalysis::_recPFTauSelector
StringCutObjectSelector< reco::PFTau > * _recPFTauSelector
Definition: HLTExoticaSubAnalysis.h:181
HLTExoticaSubAnalysis::_genSelectorMap
std::map< unsigned int, StringCutObjectSelector< reco::GenParticle > * > _genSelectorMap
Definition: HLTExoticaSubAnalysis.h:169
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
HLTExoticaSubAnalysis::beginJob
void beginJob()
Definition: HLTExoticaSubAnalysis.cc:187