CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TPTreeFiller.cc
Go to the documentation of this file.
2 
4  tnp::BaseTreeFiller("fitter_tree",config)
5 {
6  // Add extra branch for the mass
7  tree_->Branch("mass", &mass_, "mass/F");
8 
9  // set up MC if needed
10  if (config.getParameter<bool>("isMC")) {
11  tree_->Branch("mcTrue", &mcTrue_, "mcTrue/I");
12  }
13 }
14 
16 
19 }
20 
21 void tnp::TPTreeFiller::fill(const reco::CandidateBaseRef &probe, double mass, bool mcTrue) const {
22  mass_ = mass;
23  mcTrue_ = mcTrue;
25 }
T getParameter(std::string const &) const
void init(const edm::Event &iEvent) const
Definition: TPTreeFiller.cc:17
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:243
void init(const edm::Event &iEvent) const
To be called once per event, to load possible external variables.
void fill(const reco::CandidateBaseRef &probe, double mass, bool mcTrue=false) const
Definition: TPTreeFiller.cc:21
float mass_
extra branch for the mass
Definition: TPTreeFiller.h:18
int32_t mcTrue_
extra branch for the mc truth
Definition: TPTreeFiller.h:20
tuple mass
Definition: scaleCards.py:27
TPTreeFiller(const edm::ParameterSet config)
Definition: TPTreeFiller.cc:3