CMS 3D CMS Logo

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 }
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const HepPDT::ParticleData & data() const
particle data
Definition: PdtEntry.cc:19
void setup(const HepPDT::ParticleDataTable &)
fill data from Event Setup
Definition: PdtEntry.cc:26
Transition
Definition: Transition.h:12
bool getData(T &iHolder) const
Definition: EventSetup.h:122
HLT enums.
void beginFirstRun(const edm::EventSetup &)
const edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > tableToken_