CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/PhysicsTools/TagAndProbe/src/TPTreeFiller.cc

Go to the documentation of this file.
00001 #include "PhysicsTools/TagAndProbe/interface/TPTreeFiller.h"
00002 
00003 tnp::TPTreeFiller::TPTreeFiller(const edm::ParameterSet config) :
00004     tnp::BaseTreeFiller("fitter_tree",config) 
00005 {
00006     // Add extra branch for the mass
00007     tree_->Branch("mass",   &mass_,   "mass/F");
00008 
00009     // set up MC if needed
00010     if (config.getParameter<bool>("isMC")) {
00011         tree_->Branch("mcTrue", &mcTrue_, "mcTrue/I");
00012     }
00013 }
00014 
00015 tnp::TPTreeFiller::~TPTreeFiller() {}
00016 
00017 void tnp::TPTreeFiller::init(const edm::Event &iEvent) const {
00018     tnp::BaseTreeFiller::init(iEvent);
00019 }
00020 
00021 void tnp::TPTreeFiller::fill(const reco::CandidateBaseRef &probe, double mass, bool mcTrue) const {
00022     mass_ = mass;
00023     mcTrue_ = mcTrue;
00024     tnp::BaseTreeFiller::fill(probe);
00025 }