CommonTools
RecoAlgos
src
MassiveCandidateConverter.cc
Go to the documentation of this file.
1
#include "
CommonTools/RecoAlgos/interface/MassiveCandidateConverter.h
"
2
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
3
#include "HepPDT/ParticleData.hh"
4
#include "
FWCore/Framework/interface/ESHandle.h
"
5
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
6
#include "
FWCore/Framework/interface/EventSetup.h
"
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
17
void
MassiveCandidateConverter::beginFirstRun
(
const
EventSetup
& es) {
18
auto
const
& pdt = es.
getData
(
tableToken_
);
19
particle_
.
setup
(pdt);
20
massSqr_
=
particle_
.
data
().mass();
21
massSqr_
*=
massSqr_
;
22
}
deDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition:
DeDxTools.cc:283
PdtEntry::data
const HepPDT::ParticleData & data() const
particle data
Definition:
PdtEntry.cc:19
PdtEntry::setup
void setup(const HepPDT::ParticleDataTable &)
fill data from Event Setup
Definition:
PdtEntry.cc:26
EventSetup.h
std
Definition:
JetResolutionObject.h:76
converter::MassiveCandidateConverter::massSqr_
double massSqr_
Definition:
MassiveCandidateConverter.h:20
converter
Definition:
CandidateProducer.h:25
ParameterSet.h
PdtEntry
Definition:
PdtEntry.h:20
ESHandle.h
edm::Transition
Transition
Definition:
Transition.h:12
edm::EventSetup
Definition:
EventSetup.h:59
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition:
EventSetup.h:122
looper.cfg
cfg
Definition:
looper.py:296
MassiveCandidateConverter.h
edm::Transition::BeginRun
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ParameterSet
Definition:
ParameterSet.h:47
converter::MassiveCandidateConverter::beginFirstRun
void beginFirstRun(const edm::EventSetup &)
Definition:
MassiveCandidateConverter.cc:17
converter::MassiveCandidateConverter::particle_
PdtEntry particle_
Definition:
MassiveCandidateConverter.h:21
ConsumesCollector.h
converter::MassiveCandidateConverter::tableToken_
const edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > tableToken_
Definition:
MassiveCandidateConverter.h:24
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.14