#include <HLTExoticaSubAnalysis.h>
Public Types | |
typedef dqm::legacy::DQMStore | DQMStore |
enum | Level { Level::GEN = 98, Level::RECO = 99 } |
typedef dqm::legacy::MonitorElement | MonitorElement |
Public Member Functions | |
void | analyze (const edm::Event &iEvent, const edm::EventSetup &iEventSetup, EVTColContainer *cols) |
void | beginJob () |
void | beginRun (const edm::Run &iRun, const edm::EventSetup &iEventSetup) |
void | endRun () |
HLTExoticaSubAnalysis (const edm::ParameterSet &pset, const std::string &analysisname, edm::ConsumesCollector &&consCollector) | |
Constructor. More... | |
void | subAnalysisBookHistos (DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup) |
~HLTExoticaSubAnalysis () | |
End Constructor. More... | |
Private Member Functions | |
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. More... | |
void | fillHist (const std::string &source, const std::string &objType, const std::string &variable, const float &value) |
void | getHandlesToObjects (const edm::Event &iEvent, EVTColContainer *col) |
Gets the collections themselves. More... | |
void | getNamesOfObjects (const edm::ParameterSet &anpset) |
Creates the maps that map which collection should come from which label. More... | |
const std::vector< unsigned int > | getObjectsType (const std::string &hltpath) const |
closes analyze method More... | |
void | initSelector (const unsigned int &objtype) |
Initializes the selectors of the objects based on which object it is. More... | |
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) |
void | registerConsumes (edm::ConsumesCollector &consCollector) |
Registers consumption of objects. More... | |
This class is the main workhorse of the package. It makes the histograms for one given analysis, taking care of all HLT paths related to that analysis.
Generate histograms for trigger efficiencies Exotica related Documentation available on the CMS TWiki: https://twiki.cern.ch/twiki/bin/view/CMS/EXOTICATriggerValidation
Definition at line 65 of file HLTExoticaSubAnalysis.h.
Definition at line 67 of file HLTExoticaSubAnalysis.h.
Definition at line 68 of file HLTExoticaSubAnalysis.h.
|
strong |
Enumerator | |
---|---|
GEN | |
RECO |
Definition at line 70 of file HLTExoticaSubAnalysis.h.
HLTExoticaSubAnalysis::HLTExoticaSubAnalysis | ( | const edm::ParameterSet & | pset, |
const std::string & | analysisname, | ||
edm::ConsumesCollector && | consCollector | ||
) |
Constructor.
Get the vector of paths to check, for this particular analysis.
Get the minimum candidates, for this particular analysis.
Definition at line 28 of file HLTExoticaSubAnalysis.cc.
References _drop_pt2, _drop_pt3, _genCut, _genCut_leading, _hltPathsToCheck, _minCandidates, _parametersDxy, _parametersEta, _parametersPhi, _parametersTurnOn, _parametersTurnOnSumEt, _pset, _recCut, _recCut_leading, _recLabels, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), getNamesOfObjects(), edm::ParameterSet::getParameter(), EVTColContainer::getTypeString(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::insert(), LogDebug, registerConsumes(), edm::ParameterSet::retrieve(), and AlCaHLTBitMon_QueryRunRegistry::string.
HLTExoticaSubAnalysis::~HLTExoticaSubAnalysis | ( | ) |
End Constructor.
Definition at line 148 of file HLTExoticaSubAnalysis.cc.
References _genMETSelector, _genSelectorMap, _l1METSelector, _recCaloJetSelector, _recCaloMETSelector, _recCaloMHTSelector, _recElecSelector, _recMETSelector, _recMuonSelector, _recMuonTrkSelector, _recPFJetSelector, _recPFMETSelector, _recPFMHTSelector, _recPFTauSelector, _recPhotonSelector, and _recTrackSelector.
void HLTExoticaSubAnalysis::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iEventSetup, | ||
EVTColContainer * | cols | ||
) |
Method to fill all relevant histograms. Notice that we update the EVTColContaner to point to the collections we want.
We are going to make a fake reco::LeafCandidate, with our particleType as the pdgId. This is an alternative to the older implementation with MatchStruct.
Filling the histograms if pass the minimum amount of candidates needed by the analysis:
GEN CASE ///
Close GEN case
RECO CASE ///
Debugging.
Close RECO case
Definition at line 370 of file HLTExoticaSubAnalysis.cc.
References _drop_pt2, _drop_pt3, _genCut, _genCut_leading, _genSelectorMap, _minCandidates, _plotters, _recCut_leading, _recLabels, _shortpath2long, _triggerCounter, edm::HLTGlobalStatus::accept(), EVTColContainer::bs, cms::cuda::co, funct::cos(), EVTColContainer::ELEC, PVValHelper::eta, fillHist(), EVTColContainer::genParticles, getHandlesToObjects(), EVTColContainer::getTypeString(), mps_fire::i, initSelector(), insertCandidates(), dqmiolumiharvest::j, findQualityFiles::jj, LogDebug, EVTColContainer::MUON, EVTColContainer::MUTRK, reco::Candidate::p4(), phi, reco::BeamSpot::position(), DiDispStaMuonMonitor_cfi::pt, edm::second(), PixelPluginsPhase0_cfi::select, funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), EVTColContainer::triggerResults, trigNames, findQualityFiles::v, verbose, reco::Candidate::vertex(), reco::BeamSpot::x0(), and reco::BeamSpot::y0().
void HLTExoticaSubAnalysis::beginJob | ( | void | ) |
Definition at line 187 of file HLTExoticaSubAnalysis.cc.
void HLTExoticaSubAnalysis::beginRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iEventSetup | ||
) |
Construct the plotters right here. For that we need to create the _hltPaths vector.
Definition at line 265 of file HLTExoticaSubAnalysis.cc.
References _analysisname, _hltConfig, _hltPaths, _hltPathsToCheck, _hltProcessName, _plotters, _pset, _recLabels, _shortpath2long, _triggerCounter, newFWLiteAna::found, mps_fire::i, HLTConfigProvider::init(), dqmiolumiharvest::j, LogDebug, LogTrace, fed_dqm_sourceclient-live_cfg::path, AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerNames(), and verbose.
|
private |
The internal functions to book and fill histograms.
Definition at line 1071 of file HLTExoticaSubAnalysis.cc.
References _elements, _parametersDxy, _parametersEta, _parametersPhi, _parametersTurnOn, _parametersTurnOnSumEt, dqm::implementation::IBooker::book1D(), submitPVResolutionJobs::desc, h, mps_fire::i, LogDebug, SiStripPI::max, SiStripPI::min, mergeVDriftHistosByStation::name, submitPVValidationJobs::params, source, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.
Referenced by subAnalysisBookHistos().
void HLTExoticaSubAnalysis::endRun | ( | ) |
Definition at line 1345 of file HLTExoticaSubAnalysis.cc.
References _analysisname, _triggerCounter, log, and LogDebug.
|
private |
Definition at line 1131 of file HLTExoticaSubAnalysis.cc.
References _elements, LogDebug, mergeVDriftHistosByStation::name, source, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
Referenced by analyze().
|
private |
Gets the collections themselves.
Definition at line 957 of file HLTExoticaSubAnalysis.cc.
References _bsToken, _genParticleToken, _tokens, _trigResultsToken, EVTColContainer::bs, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, EVTColContainer::ELEC, EVTColContainer::GENMET, EVTColContainer::genParticles, edm::Event::getByToken(), EVTColContainer::isCommonInit(), edm::HandleBase::isValid(), EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, edm::Handle< T >::product(), EVTColContainer::set(), EVTColContainer::setCaloMHT(), EVTColContainer::setPFMHT(), EVTColContainer::TRACK, and EVTColContainer::triggerResults.
Referenced by analyze().
|
private |
Creates the maps that map which collection should come from which label.
Definition at line 793 of file HLTExoticaSubAnalysis.cc.
References _analysisname, _genSelectorMap, _recLabels, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, EVTColContainer::ELEC, edm::ParameterSet::exists(), EVTColContainer::GENMET, edm::ParameterSet::getParameter(), EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, and EVTColContainer::TRACK.
Referenced by HLTExoticaSubAnalysis().
|
private |
closes analyze method
Return the objects (muons,electrons,photons,...) needed by a HLT path. Will in general return: 0 for muon, 1 for electron, 2 for photon, 3 for PFMET, 4 for PFTau, 5 for Jet. Notice that this function is really based on a parsing of the name of the path; any incongruences there may lead to problems.
Definition at line 756 of file HLTExoticaSubAnalysis.cc.
References EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, EVTColContainer::ELEC, EVTColContainer::GENMET, EVTColContainer::getTypeString(), mps_fire::i, EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, AlCaHLTBitMon_QueryRunRegistry::string, and EVTColContainer::TRACK.
|
private |
Initializes the selectors of the objects based on which object it is.
Definition at line 1145 of file HLTExoticaSubAnalysis.cc.
References _genMETSelector, _l1METSelector, _recCaloJetSelector, _recCaloMETSelector, _recCaloMHTSelector, _recCut, _recElecSelector, _recMETSelector, _recMuonSelector, _recMuonTrkSelector, _recPFJetSelector, _recPFMETSelector, _recPFMHTSelector, _recPFTauSelector, _recPhotonSelector, _recTrackSelector, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, EVTColContainer::ELEC, EVTColContainer::GENMET, EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, and EVTColContainer::TRACK.
Referenced by analyze().
|
private |
This function applies the selectors initialized previously to the objects, and matches the passing objects to HLT objects.
This is a special case. Passing a PFMET* to the constructor of MatchStruct will trigger the usage of the special constructor which also sets the sumEt member.
Definition at line 1186 of file HLTExoticaSubAnalysis.cc.
References _genMETSelector, _l1METSelector, _recCaloJetSelector, _recCaloMETSelector, _recCaloMHTSelector, _recElecSelector, _recMuonSelector, _recMuonTrkSelector, _recPFJetSelector, _recPFMETSelector, _recPFMHTSelector, _recPFTauSelector, _recPhotonSelector, _recTrackSelector, EVTColContainer::CALOJET, EVTColContainer::caloJets, EVTColContainer::CALOMET, EVTColContainer::caloMETs, EVTColContainer::CALOMHT, EVTColContainer::caloMHTs, EVTColContainer::ELEC, EVTColContainer::electrons, EVTColContainer::GENMET, EVTColContainer::genMETs, mps_fire::i, EVTColContainer::L1MET, EVTColContainer::l1METs, LogDebug, visualization-live-secondInstance_cfg::m, EVTColContainer::MUON, EVTColContainer::muons, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::pfJets, EVTColContainer::PFMET, EVTColContainer::pfMETs, EVTColContainer::PFMHT, EVTColContainer::pfMHTs, EVTColContainer::PFTAU, EVTColContainer::pfTaus, EVTColContainer::PHOTON, EVTColContainer::photons, EVTColContainer::TRACK, and EVTColContainer::tracks.
Referenced by analyze().
|
private |
Registers consumption of objects.
Definition at line 871 of file HLTExoticaSubAnalysis.cc.
References _beamSpotLabel, _bsToken, _genParticleLabel, _genParticleToken, _recLabels, _tokens, _trigResultsLabel, _trigResultsToken, EVTColContainer::CALOJET, EVTColContainer::CALOMET, EVTColContainer::CALOMHT, edm::ConsumesCollector::consumes(), EVTColContainer::ELEC, EVTColContainer::GENMET, EVTColContainer::L1MET, LogDebug, EVTColContainer::MET, EVTColContainer::MUON, EVTColContainer::MUTRK, EVTColContainer::PFJET, EVTColContainer::PFMET, EVTColContainer::PFMHT, EVTColContainer::PFTAU, EVTColContainer::PHOTON, unpackBuffers-CaloStage2::token, and EVTColContainer::TRACK.
Referenced by HLTExoticaSubAnalysis().
void HLTExoticaSubAnalysis::subAnalysisBookHistos | ( | DQMStore::IBooker & | iBooker, |
const edm::Run & | iRun, | ||
const edm::EventSetup & | iSetup | ||
) |
Method to book all relevant histograms in the DQMStore. Uses the IBooker interface for thread safety. Intended to be called from master object.
Definition at line 195 of file HLTExoticaSubAnalysis.cc.
References _analysisname, _drop_pt2, _drop_pt3, _plotters, _recLabels, bookHist(), EVTColContainer::ELEC, EVTColContainer::getTypeString(), mps_fire::i, LogDebug, EVTColContainer::MUON, EVTColContainer::MUTRK, dqm::implementation::NavigatorBase::setCurrentFolder(), source, and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
The name of this sub-analysis.
Definition at line 125 of file HLTExoticaSubAnalysis.h.
Referenced by beginRun(), endRun(), getNamesOfObjects(), and subAnalysisBookHistos().
|
private |
Definition at line 141 of file HLTExoticaSubAnalysis.h.
Referenced by registerConsumes().
|
private |
Definition at line 146 of file HLTExoticaSubAnalysis.h.
Referenced by getHandlesToObjects(), and registerConsumes().
|
private |
Definition at line 157 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), HLTExoticaSubAnalysis(), and subAnalysisBookHistos().
|
private |
Definition at line 158 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), HLTExoticaSubAnalysis(), and subAnalysisBookHistos().
|
private |
Structure of the MonitorElements.
Definition at line 196 of file HLTExoticaSubAnalysis.h.
Referenced by bookHist(), and fillHist().
|
private |
gen/rec objects cuts
Definition at line 161 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), and HLTExoticaSubAnalysis().
|
private |
gen/rec pt-leading objects cuts
Definition at line 164 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), and HLTExoticaSubAnalysis().
|
private |
Definition at line 177 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 139 of file HLTExoticaSubAnalysis.h.
Referenced by registerConsumes().
|
private |
And also the tokens to get the object collections.
Definition at line 144 of file HLTExoticaSubAnalysis.h.
Referenced by getHandlesToObjects(), and registerConsumes().
|
private |
The concrete String selectors (use the string cuts introduced via the config python)
Definition at line 169 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), getNamesOfObjects(), and ~HLTExoticaSubAnalysis().
|
private |
Interface to the HLT information.
Definition at line 193 of file HLTExoticaSubAnalysis.h.
Referenced by beginRun().
|
private |
The hlt paths found in the hltConfig.
Definition at line 133 of file HLTExoticaSubAnalysis.h.
Referenced by beginRun().
|
private |
The hlt paths to check for.
Definition at line 131 of file HLTExoticaSubAnalysis.h.
Referenced by beginRun(), and HLTExoticaSubAnalysis().
|
private |
The labels of the object collections to be used in this analysis.
Definition at line 138 of file HLTExoticaSubAnalysis.h.
Referenced by beginRun().
|
private |
Definition at line 180 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
The minimum number of reco/gen candidates needed by the analysis.
Definition at line 128 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), and HLTExoticaSubAnalysis().
|
private |
Definition at line 154 of file HLTExoticaSubAnalysis.h.
Referenced by bookHist(), and HLTExoticaSubAnalysis().
|
private |
Some kinematical parameters.
Definition at line 150 of file HLTExoticaSubAnalysis.h.
Referenced by bookHist(), and HLTExoticaSubAnalysis().
|
private |
Definition at line 151 of file HLTExoticaSubAnalysis.h.
Referenced by bookHist(), and HLTExoticaSubAnalysis().
|
private |
Definition at line 152 of file HLTExoticaSubAnalysis.h.
Referenced by bookHist(), and HLTExoticaSubAnalysis().
|
private |
Definition at line 153 of file HLTExoticaSubAnalysis.h.
Referenced by bookHist(), and HLTExoticaSubAnalysis().
|
private |
The plotters: managers of each hlt path where the plots are done.
Definition at line 187 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), beginRun(), and subAnalysisBookHistos().
|
private |
Internal, working copy of the PSet passed from above.
Definition at line 122 of file HLTExoticaSubAnalysis.h.
Referenced by beginRun(), and HLTExoticaSubAnalysis().
|
private |
Definition at line 184 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 178 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 179 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 162 of file HLTExoticaSubAnalysis.h.
Referenced by HLTExoticaSubAnalysis(), and initSelector().
|
private |
Definition at line 165 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), and HLTExoticaSubAnalysis().
|
private |
Definition at line 173 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 142 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), beginRun(), getNamesOfObjects(), HLTExoticaSubAnalysis(), registerConsumes(), and subAnalysisBookHistos().
|
private |
Definition at line 174 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 170 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 171 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 183 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 175 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 176 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 181 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 182 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Definition at line 172 of file HLTExoticaSubAnalysis.h.
Referenced by initSelector(), insertCandidates(), and ~HLTExoticaSubAnalysis().
|
private |
Relation between the short and long versions of the path.
Definition at line 135 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), and beginRun().
|
private |
Definition at line 147 of file HLTExoticaSubAnalysis.h.
Referenced by getHandlesToObjects(), and registerConsumes().
|
private |
counting HLT passed events
Definition at line 190 of file HLTExoticaSubAnalysis.h.
Referenced by analyze(), beginRun(), and endRun().
|
private |
Definition at line 140 of file HLTExoticaSubAnalysis.h.
Referenced by registerConsumes().
|
private |
Definition at line 145 of file HLTExoticaSubAnalysis.h.
Referenced by getHandlesToObjects(), and registerConsumes().