1 #ifndef PhysicsTools_TagAndProbe_BaseTreeFiller_h 2 #define PhysicsTools_TagAndProbe_BaseTreeFiller_h 33 #include <boost/utility.hpp> 167 bool storePUweight()
const {
return storePUweight_;};
171 std::vector<ProbeVariable>
vars_;
207 mutable uint32_t
run_, lumi_, mNPV_;
211 mutable float mPVx_,mPVy_,
mPVz_,mBSx_,mBSy_,mBSz_;
213 mutable float mMET_,mSumET_,mMETSign_,mtcMET_,
mtcSumET_,
214 mtcMETSign_,mpfMET_,mpfSumET_,mpfMETSign_, mpfPhi_;
float * address() const
Addess for ROOT Branch.
bool addEventVariablesInfo_
Add branches with event variables: met, sum ET, .. etc.
ProbeVariable(const std::string &name, const std::string &expression)
Create a ProbeVariable to be evaluated on the fly from a string expression.
edm::EDGetTokenT< reco::PFMETCollection > pfmetToken_
bool external_
true if it's an external ValueMap, false if it's a StringParser function
std::string name_
the name of the variable, which becomes the ROOT branch name
edm::EDGetTokenT< GenEventInfoProduct > weightSrcToken_
bool addRunLumiInfo_
Add branches with run and lumisection number.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< double > PUweightSrcToken_
std::vector< ProbeVariable > vars_
ProbeFlag(const std::string &name, const std::string &cut)
Create a ProbeFlag to be evaluated on the fly from a string cut.
StringCutObjectSelector< reco::Candidate, true > cut_
implementation of the cut using a string selector
std::string name_
the name of the variable, which becomes the ROOT branch name
void init(const edm::Event &iEvent) const
To be called at the beginning of the event (will fetch ValueMap if needed)
A variable for the probe: can be a string expression or an external ValueMap<float> ...
int32_t * address() const
Addess for ROOT Branch.
const std::string & name() const
name
ProbeFlag(const std::string &name, const edm::EDGetTokenT< edm::View< reco::Candidate > > &srcToken)
Create a ProbeFlag to be read from a ValueMap.
std::vector< ProbeFlag > flags_
edm::Handle< edm::ValueMap< float > > handle_
the handle to keep the ValueMap
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
edm::EDGetTokenT< pat::METCollection > pfmetTokenMiniAOD_
edm::EDGetTokenT< reco::METCollection > tcmetToken_
ProbeVariable(const std::string &name, const edm::EDGetTokenT< edm::ValueMap< float > > &srcToken)
Create a ProbeVariable to be read from a ValueMap.
edm::EDGetTokenT< double > rhoToken_
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
~ProbeVariable()
Destructor (does nothing)
unsigned long long uint64_t
WeightMode
How event weights are defined: 'None' = no weights, 'Fixed' = one value specified in cfg file...
edm::EDGetTokenT< reco::VertexCollection > recVtxsToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void fill(const reco::CandidateBaseRef &probe) const
To be called for each item.
bool ignoreExceptions_
Ignore exceptions when evaluating variables.
bool external_
true if it's an external Candidate View, false if it's a StringParser cut
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
StringObjectFunction< reco::Candidate, true > function_
a lazy-parsed StringObjectFunction<reco::Candidate> that gets all the methods of daughter classes too...
const std::string & name() const
name
bool storePUweight_
Store Pileup weight when running over Monte Carlo.
edm::EDGetTokenT< edm::View< reco::Candidate > > srcToken_
the external collection
std::vector< reco::CandidateBaseRef > passingProbes_
the handle to keep the refs to the passing probes
float value_
the place where we store the value, and that ROOT uses to fill the tree
BaseTreeFiller(const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
specify the name of the TTree, and the configuration for it