Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:13

0001 #include "PhysicsTools/TagAndProbe/interface/TPTreeFiller.h"
0002 
0003 tnp::TPTreeFiller::TPTreeFiller(const edm::ParameterSet &config, edm::ConsumesCollector &iC)
0004     : tnp::BaseTreeFiller("fitter_tree", config, iC) {
0005   // Add extra branch for the mass
0006   tree_->Branch("mass", &mass_, "mass/F");
0007 
0008   // set up MC if needed
0009   if (config.getParameter<bool>("isMC")) {
0010     tree_->Branch("mcTrue", &mcTrue_, "mcTrue/I");
0011     tree_->Branch("mcMass", &mcMass_, "mcMass/F");
0012   }
0013 }
0014 
0015 tnp::TPTreeFiller::~TPTreeFiller() {}
0016 
0017 void tnp::TPTreeFiller::init(const edm::Event &iEvent) const { tnp::BaseTreeFiller::init(iEvent); }
0018 
0019 void tnp::TPTreeFiller::fill(const reco::CandidateBaseRef &probe, double mass, bool mcTrue, float mcMass) const {
0020   mass_ = mass;
0021   mcTrue_ = mcTrue;
0022   mcMass_ = mcMass;
0023   tnp::BaseTreeFiller::fill(probe);
0024 }