Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
}
looper.cfg
tuple cfg
Definition:
looper.py:296
PdtEntry::setup
void setup(const HepPDT::ParticleDataTable &)
fill data from Event Setup
Definition:
PdtEntry.cc:26
EventSetup.h
converter::MassiveCandidateConverter::massSqr_
double massSqr_
Definition:
MassiveCandidateConverter.h:20
ParameterSet.h
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition:
EventSetup.h:128
PdtEntry
Definition:
PdtEntry.h:20
ESHandle.h
edm::Transition
Transition
Definition:
Transition.h:12
edm::EventSetup
Definition:
EventSetup.h:59
MassiveCandidateConverter.h
edm::Transition::BeginRun
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
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition:
DeDxTools.cc:283
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
PdtEntry::data
const HepPDT::ParticleData & data() const
particle data
Definition:
PdtEntry.cc:19
Generated for CMSSW Reference Manual by
1.8.5