PhysicsTools
TagAndProbe
src
TPTreeFiller.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/TagAndProbe/interface/TPTreeFiller.h
"
2
3
tnp::TPTreeFiller::TPTreeFiller
(
const
edm::ParameterSet
&
config
,
edm::ConsumesCollector
&iC)
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
15
tnp::TPTreeFiller::~TPTreeFiller
() {}
16
17
void
tnp::TPTreeFiller::init
(
const
edm::Event
&
iEvent
)
const
{
tnp::BaseTreeFiller::init
(
iEvent
); }
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;
23
tnp::BaseTreeFiller::fill
(probe);
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
Generated for CMSSW Reference Manual by
1.8.16