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 }
ESHandle.h
converter
Definition: CandidateProducer.h:25
edm
HLT enums.
Definition: AlignableModifier.h:19
converter::MassiveCandidateConverter::beginFirstRun
void beginFirstRun(const edm::EventSetup &)
Definition: MassiveCandidateConverter.cc:17
MassiveCandidateConverter.h
PdtEntry::data
const HepPDT::ParticleData & data() const
particle data
Definition: PdtEntry.cc:19
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
PdtEntry::setup
void setup(const HepPDT::ParticleDataTable &)
fill data from Event Setup
Definition: PdtEntry.cc:26
edm::EventSetup
Definition: EventSetup.h:58
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
looper.cfg
cfg
Definition: looper.py:296
std
Definition: JetResolutionObject.h:76
edm::Transition::BeginRun
EventSetup.h
PdtEntry
Definition: PdtEntry.h:20
converter::MassiveCandidateConverter::massSqr_
double massSqr_
Definition: MassiveCandidateConverter.h:20
converter::MassiveCandidateConverter::tableToken_
const edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > tableToken_
Definition: MassiveCandidateConverter.h:24
ConsumesCollector.h
ParameterSet.h
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
converter::MassiveCandidateConverter::particle_
PdtEntry particle_
Definition: MassiveCandidateConverter.h:21
edm::ConsumesCollector
Definition: ConsumesCollector.h:45