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 }
T getParameter(std::string const &) const
TPTreeFiller(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
Definition: TPTreeFiller.h:9
void init(const edm::Event &iEvent) const
Definition: TPTreeFiller.cc:17
Definition: config.py:1
void fill(const reco::CandidateBaseRef &probe) const
To be called once per probe, to fill the values for this probe.
int iEvent
Definition: GenABIO.cc:224
void init(const edm::Event &iEvent) const
To be called once per event, to load possible external variables.
float mass_
extra branch for the mass
Definition: TPTreeFiller.h:19
int32_t mcTrue_
extra branch for the mc truth
Definition: TPTreeFiller.h:21
void fill(const reco::CandidateBaseRef &probe, double mass, bool mcTrue=false, float mcMass=0.0) const
Definition: TPTreeFiller.cc:19
float mcMass_
extra branch for the mc-truth mass
Definition: TPTreeFiller.h:23