#include <BaseTreeFiller.h>
Public Member Functions | |
BaseTreeFiller (const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &&iC) | |
specify the name of the TTree, and the configuration for it More... | |
BaseTreeFiller (const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &iC) | |
BaseTreeFiller (BaseTreeFiller &main, const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC, const std::string &branchNamePrefix) | |
Add branches to an existing TTree managed by another BaseTreeFiller. More... | |
void | fill (const reco::CandidateBaseRef &probe) const |
To be called once per probe, to fill the values for this probe. More... | |
void | init (const edm::Event &iEvent) const |
To be called once per event, to load possible external variables. More... | |
bool | storePUweight () const |
void | writeProvenance (const edm::ParameterSet &pset) const |
~BaseTreeFiller () | |
Destructor, does nothing but it's out-of-line as we have complex data members. More... | |
Protected Types | |
enum | WeightMode { None, Fixed, External } |
How event weights are defined: 'None' = no weights, 'Fixed' = one value specified in cfg file, 'External' = read weight from the event (as double) More... | |
Protected Member Functions | |
void | addBranches_ (TTree *tree, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC, const std::string &branchNamePrefix="") |
Definition at line 141 of file BaseTreeFiller.h.
|
protected |
How event weights are defined: 'None' = no weights, 'Fixed' = one value specified in cfg file, 'External' = read weight from the event (as double)
Enumerator | |
---|---|
None | |
Fixed | |
External |
Definition at line 175 of file BaseTreeFiller.h.
|
inline |
specify the name of the TTree, and the configuration for it
Definition at line 144 of file BaseTreeFiller.h.
References tnp::ProbeVariable::fill(), iEvent, tnp::ProbeVariable::init(), tnp::ProbeVariable::name(), muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.
tnp::BaseTreeFiller::BaseTreeFiller | ( | const char * | name, |
const edm::ParameterSet & | config, | ||
edm::ConsumesCollector & | iC | ||
) |
FC (EGM) - add possibility to customize collections (can run other miniAOD)
Definition at line 36 of file BaseTreeFiller.cc.
References edm::ConsumesCollector::consumes(), event_(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), TFileService::make(), edm::ConsumesCollector::mayConsume(), dataset::name, and None.
tnp::BaseTreeFiller::BaseTreeFiller | ( | BaseTreeFiller & | main, |
const edm::ParameterSet & | iConfig, | ||
edm::ConsumesCollector && | iC, | ||
const std::string & | branchNamePrefix | ||
) |
Add branches to an existing TTree managed by another BaseTreeFiller.
Definition at line 123 of file BaseTreeFiller.cc.
References addBranches_(), addRunLumiInfo_, storePUweight_, and tree_.
tnp::BaseTreeFiller::~BaseTreeFiller | ( | ) |
Destructor, does nothing but it's out-of-line as we have complex data members.
Definition at line 171 of file BaseTreeFiller.cc.
|
protected |
Definition at line 134 of file BaseTreeFiller.cc.
References edm::ConsumesCollector::consumes(), flags, flags_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), AlCaHLTBitMon_QueryRunRegistry::string, objects.autophobj::variables, and vars_.
Referenced by BaseTreeFiller().
void tnp::BaseTreeFiller::fill | ( | const reco::CandidateBaseRef & | probe | ) | const |
To be called once per probe, to fill the values for this probe.
Definition at line 306 of file BaseTreeFiller.cc.
References flags_, ignoreExceptions_, tree_, and vars_.
Referenced by tnp::TPTreeFiller::fill().
void tnp::BaseTreeFiller::init | ( | const edm::Event & | iEvent | ) | const |
To be called once per event, to load possible external variables.
*********** store some event variables: MET, SumET ****** ///////// Primary vertex //////////////
Definition at line 173 of file BaseTreeFiller.cc.
References addCaloMet_, addEventVariablesInfo_, addRho_, ecalDrivenElectronSeedsParameters_cff::beamSpot, beamSpotToken_, edm::EventID::event(), event_, External, flags_, objects.autophobj::float, edm::Event::getByToken(), edm::EventBase::id(), edm::EventBase::isRealData(), edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), lumi_, edm::EventID::luminosityBlock(), mBSx_, mBSy_, mBSz_, RazorAnalyzer::met, metToken_, mMET_, mMETSign_, mNPV_, mpfMET_, mpfMETSign_, mpfPhi_, mpfSumET_, mPVx_, mPVy_, mPVz_, mSumET_, mtcMET_, mtcMETSign_, mtcSumET_, pfmetToken_, pfmetTokenMiniAOD_, reco::LeafCandidate::phi(), pileupInfoToken_, reco::BeamSpot::position(), reco::LeafCandidate::pt(), PUweight_, PUweightSrcToken_, recVtxsToken_, rho_, rhoToken_, edm::EventID::run(), run_, reco::MET::significance(), storePUweight_, reco::MET::sumEt(), tcmetToken_, totWeight_, truePU_, vars_, GenEventInfoProduct::weight(), mps_merge::weight, weight_, weightMode_, and weightSrcToken_.
Referenced by tnp::TPTreeFiller::init().
|
inline |
Definition at line 167 of file BaseTreeFiller.h.
void tnp::BaseTreeFiller::writeProvenance | ( | const edm::ParameterSet & | pset | ) | const |
Write a string dump of this PSet into the TTree header. see macro in test directory for how to retrieve it from the output root file
Definition at line 325 of file BaseTreeFiller.cc.
References edm::ParameterSet::dump(), list(), and tree_.
|
protected |
Definition at line 200 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Add branches with event variables: met, sum ET, .. etc.
Definition at line 198 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 199 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Add branches with run and lumisection number.
Definition at line 192 of file BaseTreeFiller.h.
Referenced by BaseTreeFiller().
|
protected |
Definition at line 181 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 208 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 172 of file BaseTreeFiller.h.
Referenced by addBranches_(), fill(), and init().
|
protected |
Ignore exceptions when evaluating variables.
Definition at line 189 of file BaseTreeFiller.h.
Referenced by fill().
|
mutableprotected |
Definition at line 207 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 211 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 211 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 211 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 182 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 207 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 211 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 211 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 211 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 213 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 184 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 185 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 186 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 206 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 178 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 180 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 212 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 179 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 207 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Store Pileup weight when running over Monte Carlo.
Definition at line 195 of file BaseTreeFiller.h.
Referenced by BaseTreeFiller(), and init().
|
protected |
Definition at line 183 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 206 of file BaseTreeFiller.h.
Referenced by init().
|
mutableprotected |
Definition at line 205 of file BaseTreeFiller.h.
Referenced by BaseTreeFiller(), fill(), tnp::TPTreeFiller::TPTreeFiller(), and writeProvenance().
|
mutableprotected |
Definition at line 209 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 167 of file BaseTreeFiller.h.
Referenced by addBranches_(), fill(), and init().
|
mutableprotected |
Definition at line 206 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 176 of file BaseTreeFiller.h.
Referenced by init().
|
protected |
Definition at line 177 of file BaseTreeFiller.h.
Referenced by init().