CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MassiveCandidateConverter.cc
Go to the documentation of this file.
3 #include "HepPDT/ParticleData.hh"
7 #include <algorithm>
8 using namespace edm;
9 using namespace std;
10 using namespace converter;
11 
12 MassiveCandidateConverter::MassiveCandidateConverter(const edm::ParameterSet& cfg, edm::ConsumesCollector iC)
13  : massSqr_(0),
14  particle_(cfg.getParameter<PdtEntry>("particleType")),
15  tableToken_(iC.esConsumes<edm::Transition::BeginRun>()) {}
16 
18  auto const& pdt = es.getData(tableToken_);
19  particle_.setup(pdt);
20  massSqr_ = particle_.data().mass();
21  massSqr_ *= massSqr_;
22 }
tuple cfg
Definition: looper.py:296
void setup(const HepPDT::ParticleDataTable &)
fill data from Event Setup
Definition: PdtEntry.cc:26
bool getData(T &iHolder) const
Definition: EventSetup.h:128
Transition
Definition: Transition.h:12
void beginFirstRun(const edm::EventSetup &)
const edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > tableToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const HepPDT::ParticleData & data() const
particle data
Definition: PdtEntry.cc:19