CMS 3D CMS Logo

TPTreeFiller.cc
Go to the documentation of this file.
2 
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 }
14 
16 
18 
19 void tnp::TPTreeFiller::fill(const reco::CandidateBaseRef &probe, double mass, bool mcTrue, float mcMass) const {
20  mass_ = mass;
21  mcTrue_ = mcTrue;
22  mcMass_ = mcMass;
24 }
TPTreeFiller.h
tnp::BaseTreeFiller::init
void init(const edm::Event &iEvent) const
To be called once per event, to load possible external variables.
Definition: BaseTreeFiller.cc:180
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
tnp::TPTreeFiller::init
void init(const edm::Event &iEvent) const
Definition: TPTreeFiller.cc:17
config
Definition: config.py:1
tnp::TPTreeFiller::fill
void fill(const reco::CandidateBaseRef &probe, double mass, bool mcTrue=false, float mcMass=0.0) const
Definition: TPTreeFiller.cc:19
tnp
Definition: BaseTreeFiller.h:41
edm::ParameterSet
Definition: ParameterSet.h:36
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:308
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:204
tnp::BaseTreeFiller
Definition: BaseTreeFiller.h:137
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
tnp::TPTreeFiller::~TPTreeFiller
~TPTreeFiller()
Definition: TPTreeFiller.cc:15
tnp::TPTreeFiller::TPTreeFiller
TPTreeFiller(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
Definition: TPTreeFiller.h:9
edm::RefToBase< Candidate >
TagProbeFitTreeAnalyzer_cfi.mcTrue
mcTrue
Definition: TagProbeFitTreeAnalyzer_cfi.py:24
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:39