src
DataFormats
L1TParticleFlow
src
PFCandidate.cc
Go to the documentation of this file.
1
#include "
DataFormats/L1TParticleFlow/interface/PFCandidate.h
"
2
3
l1t::PFCandidate::PFCandidate
(
4
ParticleType
kind
,
int
charge
,
const
PolarLorentzVector
&
p
,
float
puppiWeight,
int
hwpt,
int
hweta,
int
hwphi)
5
:
L1Candidate
(
p
, hwpt, hweta, hwphi,
/*hwQuality=*/
int
(
kind
)),
6
dxy_(0),
7
puppiWeight_(puppiWeight),
8
caloEta_(0),
9
caloPhi_(0),
10
hwZ0_(0),
11
hwDxy_(0),
12
hwTkQuality_(0),
13
hwPuppiWeight_(0),
14
hwEmID_(0),
15
encodedPuppi64_(0) {
16
setCharge
(
charge
);
17
setPdgIdFromParticleType
(
charge
,
kind
);
18
}
19
20
void
l1t::PFCandidate::setPdgIdFromParticleType
(
int
charge
,
ParticleType
kind
) {
21
switch
(
kind
) {
22
case
ChargedHadron:
23
setPdgId(
charge
> 0 ? 211 : -211);
24
break
;
25
case
Electron
:
26
setPdgId(
charge
> 0 ? -11 : +11);
27
break
;
28
case
NeutralHadron:
29
setPdgId(130);
30
break
;
31
case
Photon
:
32
setPdgId(22);
33
break
;
34
case
Muon
:
35
setPdgId(
charge
> 0 ? -13 : +13);
36
break
;
37
};
38
}
reco::LeafCandidate::setCharge
void setCharge(Charge q) final
set electric charge
Definition:
LeafCandidate.h:108
createfilelist.int
int
Definition:
createfilelist.py:10
Muon
Definition:
Muon.py:1
CalibrationSummaryClient_cfi.kind
kind
Definition:
CalibrationSummaryClient_cfi.py:37
l1t::L1Candidate
Definition:
L1Candidate.h:15
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition:
ALCARECOTkAlJpsiMuMu_cff.py:47
l1t::PFCandidate::PFCandidate
PFCandidate()
Definition:
PFCandidate.h:18
Electron
Definition:
Electron.py:1
l1t::PFCandidate::setPdgIdFromParticleType
void setPdgIdFromParticleType(int charge, ParticleType kind)
Definition:
PFCandidate.cc:20
PFCandidate.h
l1t::PFCandidate::ParticleType
ParticleType
Definition:
PFCandidate.h:16
AlCaHLTBitMon_ParallelJobs.p
def p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
reco::LeafCandidate::charge
int charge() const final
electric charge
Definition:
LeafCandidate.h:106
nanoDQM_cfi.Photon
Photon
Definition:
nanoDQM_cfi.py:605
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition:
Candidate.h:38
Generated for CMSSW Reference Manual by
1.8.14