CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
tnp::TPTreeFiller Class Reference

#include <TPTreeFiller.h>

Inheritance diagram for tnp::TPTreeFiller:
tnp::BaseTreeFiller

Public Member Functions

void fill (const reco::CandidateBaseRef &probe, double mass, bool mcTrue=false, float mcMass=0.0) const
 
void init (const edm::Event &iEvent) const
 
 TPTreeFiller (const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
 
 TPTreeFiller (const edm::ParameterSet &config, edm::ConsumesCollector &iC)
 
 ~TPTreeFiller ()
 
- Public Member Functions inherited from 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. More...
 
 BaseTreeFiller (const BaseTreeFiller &)=delete
 
 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)
 
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...
 
BaseTreeFilleroperator= (const BaseTreeFiller &)=delete
 
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 Attributes

float mass_
 extra branch for the mass More...
 
float mcMass_
 extra branch for the mc-truth mass More...
 
int32_t mcTrue_
 extra branch for the mc truth More...
 
- Protected Attributes inherited from tnp::BaseTreeFiller
edm::EDGetTokenT< GenLumiInfoHeader_genLumiInfoToken
 
edm::EDGetTokenT< LHEEventProduct_LHECollection
 
edm::EDGetTokenT< LHERunInfoProduct_lheRunInfoToken
 
bool addCaloMet_
 
bool addEventVariablesInfo_
 Add branches with event variables: met, sum ET, .. etc. More...
 
bool addRho_
 
bool addRunLumiInfo_
 Add branches with run and lumisection number. More...
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
uint64_t event_
 
std::vector< ProbeFlagflags_
 
edm::EDGetTokenT< reco::GenParticleCollectiongenParticlesToken_
 
float lhe_ht_
 
bool LHEinfo_
 
float lheWeight_ [9]
 
uint32_t lumi_
 
float mBSx_
 
float mBSy_
 
float mBSz_
 
edm::EDGetTokenT< reco::CaloMETCollectionmetToken_
 
float mMET_
 
float mMETSign_
 
uint32_t mNPV_
 
float mpfMET_
 
float mpfMETSign_
 
float mpfPhi_
 
float mpfSumET_
 
float mPVx_
 
float mPVy_
 
float mPVz_
 
float mSumET_
 
float mtcMET_
 
float mtcMETSign_
 
float mtcSumET_
 
edm::EDGetTokenT< reco::PFMETCollectionpfmetToken_
 
edm::EDGetTokenT< pat::METCollectionpfmetTokenMiniAOD_
 
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
 
float psWeight_ [5]
 
float PUweight_
 
edm::EDGetTokenT< double > PUweightSrcToken_
 
edm::EDGetTokenT< reco::VertexCollectionrecVtxsToken_
 
float rho_
 
edm::EDGetTokenT< double > rhoToken_
 
uint32_t run_
 
bool storePUweight_
 Store Pileup weight when running over Monte Carlo. More...
 
edm::EDGetTokenT< reco::METCollectiontcmetToken_
 
float totWeight_
 
TTree * tree_
 
int truePU_
 
std::vector< ProbeVariablevars_
 
float weight_
 
WeightMode weightMode_
 
edm::EDGetTokenT< GenEventInfoProductweightSrcToken_
 

Additional Inherited Members

- Protected Types inherited from tnp::BaseTreeFiller
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 inherited from tnp::BaseTreeFiller
void addBranches_ (TTree *tree, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC, const std::string &branchNamePrefix="")
 

Detailed Description

Definition at line 7 of file TPTreeFiller.h.

Constructor & Destructor Documentation

◆ TPTreeFiller() [1/2]

tnp::TPTreeFiller::TPTreeFiller ( const edm::ParameterSet config,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 9 of file TPTreeFiller.h.

9 : TPTreeFiller(config, iC){};

◆ TPTreeFiller() [2/2]

tnp::TPTreeFiller::TPTreeFiller ( const edm::ParameterSet config,
edm::ConsumesCollector iC 
)

Definition at line 3 of file TPTreeFiller.cc.

4  : tnp::BaseTreeFiller("fitter_tree", config, iC) {
5  // Add extra branch for the mass
6  tree_->Branch("mass", &mass_, "mass/F");
7 
8  // set up MC if needed
9  if (config.getParameter<bool>("isMC")) {
10  tree_->Branch("mcTrue", &mcTrue_, "mcTrue/I");
11  tree_->Branch("mcMass", &mcMass_, "mcMass/F");
12  }
13 }

References mass_, mcMass_, mcTrue_, and tnp::BaseTreeFiller::tree_.

◆ ~TPTreeFiller()

tnp::TPTreeFiller::~TPTreeFiller ( )

Definition at line 15 of file TPTreeFiller.cc.

15 {}

Member Function Documentation

◆ fill()

void tnp::TPTreeFiller::fill ( const reco::CandidateBaseRef probe,
double  mass,
bool  mcTrue = false,
float  mcMass = 0.0 
) const

Definition at line 19 of file TPTreeFiller.cc.

19  {
20  mass_ = mass;
21  mcTrue_ = mcTrue;
22  mcMass_ = mcMass;
24 }

References tnp::BaseTreeFiller::fill(), EgHLTOffHistBins_cfi::mass, and TagProbeFitTreeAnalyzer_cfi::mcTrue.

◆ init()

void tnp::TPTreeFiller::init ( const edm::Event iEvent) const

Definition at line 17 of file TPTreeFiller.cc.

References iEvent, and tnp::BaseTreeFiller::init().

Member Data Documentation

◆ mass_

float tnp::TPTreeFiller::mass_
mutableprotected

extra branch for the mass

Definition at line 19 of file TPTreeFiller.h.

Referenced by TPTreeFiller().

◆ mcMass_

float tnp::TPTreeFiller::mcMass_
mutableprotected

extra branch for the mc-truth mass

Definition at line 23 of file TPTreeFiller.h.

Referenced by TPTreeFiller().

◆ mcTrue_

int32_t tnp::TPTreeFiller::mcTrue_
mutableprotected

extra branch for the mc truth

Definition at line 21 of file TPTreeFiller.h.

Referenced by TPTreeFiller().

tnp::BaseTreeFiller::init
void init(const edm::Event &iEvent) const
To be called once per event, to load possible external variables.
Definition: BaseTreeFiller.cc:186
tnp::TPTreeFiller::mass_
float mass_
extra branch for the mass
Definition: TPTreeFiller.h:19
tnp::TPTreeFiller::mcMass_
float mcMass_
extra branch for the mc-truth mass
Definition: TPTreeFiller.h:23
config
Definition: config.py:1
tnp::BaseTreeFiller::fill
void fill(const reco::CandidateBaseRef &probe) const
To be called once per probe, to fill the values for this probe.
Definition: BaseTreeFiller.cc:346
iEvent
int iEvent
Definition: GenABIO.cc:224
tnp::TPTreeFiller::mcTrue_
int32_t mcTrue_
extra branch for the mc truth
Definition: TPTreeFiller.h:21
tnp::BaseTreeFiller::tree_
TTree * tree_
Definition: BaseTreeFiller.h:213
tnp::BaseTreeFiller
Definition: BaseTreeFiller.h:139
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
tnp::TPTreeFiller::TPTreeFiller
TPTreeFiller(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
Definition: TPTreeFiller.h:9
TagProbeFitTreeAnalyzer_cfi.mcTrue
mcTrue
Definition: TagProbeFitTreeAnalyzer_cfi.py:24