Go to the documentation of this file. 1 #ifndef PhysicsTools_TagAndProbe_BaseTreeFiller_h
2 #define PhysicsTools_TagAndProbe_BaseTreeFiller_h
33 #include <boost/utility.hpp>
170 std::vector<ProbeVariable>
vars_;
ProbeFlag(const std::string &name, const edm::EDGetTokenT< edm::View< reco::Candidate > > &srcToken)
Create a ProbeFlag to be read from a ValueMap.
int32_t value_
the place where we store the value, and that ROOT uses to fill the tree
edm::EDGetTokenT< edm::ValueMap< float > > srcToken_
the external valuemap
edm::EDGetTokenT< double > rhoToken_
const std::string & name() const
name
void init(const edm::Event &iEvent) const
To be called once per event, to load possible external variables.
~BaseTreeFiller()
Destructor, does nothing but it's out-of-line as we have complex data members.
StringObjectFunction< reco::Candidate, true > function_
a lazy-parsed StringObjectFunction<reco::Candidate> that gets all the methods of daughter classes too
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
bool storePUweight_
Store Pileup weight when running over Monte Carlo.
bool external_
true if it's an external Candidate View, false if it's a StringParser cut
float value_
the place where we store the value, and that ROOT uses to fill the tree
bool addRunLumiInfo_
Add branches with run and lumisection number.
void writeProvenance(const edm::ParameterSet &pset) const
ProbeVariable(const std::string &name, const edm::EDGetTokenT< edm::ValueMap< float > > &srcToken)
Create a ProbeVariable to be read from a ValueMap.
const std::string & name() const
name
bool storePUweight() const
edm::EDGetTokenT< edm::View< reco::Candidate > > srcToken_
the external collection
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
ProbeVariable(const std::string &name, const std::string &expression)
Create a ProbeVariable to be evaluated on the fly from a string expression.
void init(const edm::Event &iEvent) const
To be called at the beginning of the event (will fetch ValueMap if needed)
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
ProbeFlag(const std::string &name, const std::string &cut)
Create a ProbeFlag to be evaluated on the fly from a string cut.
void fill(const reco::CandidateBaseRef &probe) const
To be called once per probe, to fill the values for this probe.
edm::EDGetTokenT< GenEventInfoProduct > weightSrcToken_
std::vector< reco::CandidateBaseRef > passingProbes_
the handle to keep the refs to the passing probes
void fill(const reco::CandidateBaseRef &probe) const
To be called for each item.
BaseTreeFiller(const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
specify the name of the TTree, and the configuration for it
edm::EDGetTokenT< reco::VertexCollection > recVtxsToken_
~ProbeFlag()
Destructor (does nothing)
StringCutObjectSelector< reco::Candidate, true > cut_
implementation of the cut using a string selector
std::vector< ProbeFlag > flags_
bool addEventVariablesInfo_
Add branches with event variables: met, sum ET, .. etc.
std::string name_
the name of the variable, which becomes the ROOT branch name
std::vector< ProbeVariable > vars_
bool external_
true if it's an external ValueMap, false if it's a StringParser function
edm::EDGetTokenT< reco::PFMETCollection > pfmetToken_
edm::Handle< edm::ValueMap< float > > handle_
the handle to keep the ValueMap
std::string name_
the name of the variable, which becomes the ROOT branch name
int32_t * address() const
Addess for ROOT Branch.
~ProbeVariable()
Destructor (does nothing)
edm::EDGetTokenT< reco::METCollection > tcmetToken_
WeightMode
How event weights are defined: 'None' = no weights, 'Fixed' = one value specified in cfg file,...
unsigned long long uint64_t
A variable for the probe: can be a string expression or an external ValueMap<float>
void addBranches_(TTree *tree, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC, const std::string &branchNamePrefix="")
void fill(const reco::CandidateBaseRef &probe) const
To be called for each item.
edm::EDGetTokenT< double > PUweightSrcToken_
float * address() const
Addess for ROOT Branch.
edm::EDGetTokenT< pat::METCollection > pfmetTokenMiniAOD_
void init(const edm::Event &iEvent) const
To be called at the beginning of the event (will fetch Candidate View if needed)