src
AnalysisDataFormats
SUSYBSMObjects
src
HSCParticle.cc
Go to the documentation of this file.
1
#include "
AnalysisDataFormats/SUSYBSMObjects/interface/HSCParticle.h
"
2
3
namespace
susybsm
{
4
5
int
HSCParticle::type
()
const
{
6
if
(
hasTrackRef
() && !
hasMuonRef
()) {
7
return
HSCParticleType::innerTrack
;
8
}
else
if
(!
hasTrackRef
() &&
hasMuonRef
()) {
9
return
HSCParticleType::standAloneMuon
;
10
}
else
if
(
hasTrackRef
() &&
hasMuonRef
() &&
muonRef
()->isGlobalMuon()) {
11
return
HSCParticleType::globalMuon
;
12
}
else
if
(
hasTrackRef
() &&
hasMuonRef
() &&
muonRef
()->isStandAloneMuon()) {
13
return
HSCParticleType::matchedStandAloneMuon
;
14
}
else
if
(
hasTrackRef
() &&
hasMuonRef
() &&
muonRef
()->isTrackerMuon()) {
15
return
HSCParticleType::trackerMuon
;
16
}
else
17
return
HSCParticleType::unknown
;
18
}
19
20
float
HSCParticle::p
()
const
{
21
if
(
hasMuonRef
() &&
muonRef
()->combinedMuon().isNonnull()) {
22
return
muonRef
()->combinedMuon()->p();
23
}
else
if
(
hasMuonRef
() &&
muonRef
()->
innerTrack
().isNonnull()) {
24
return
muonRef
()->innerTrack()->p();
25
}
else
if
(
hasMuonRef
() &&
muonRef
()->
standAloneMuon
().isNonnull()) {
26
return
muonRef
()->standAloneMuon()->p();
27
}
else
if
(
hasTrackRef
() &&
trackRef
().isNonnull()) {
28
return
trackRef
()->p();
29
}
else
30
return
0.0f;
31
}
32
33
float
HSCParticle::pt
()
const
{
34
if
(
hasMuonRef
() &&
muonRef
()->combinedMuon().isNonnull()) {
35
return
muonRef
()->combinedMuon()->pt();
36
}
else
if
(
hasMuonRef
() &&
muonRef
()->
innerTrack
().isNonnull()) {
37
return
muonRef
()->innerTrack()->pt();
38
}
else
if
(
hasMuonRef
() &&
muonRef
()->
standAloneMuon
().isNonnull()) {
39
return
muonRef
()->standAloneMuon()->pt();
40
}
else
if
(
hasTrackRef
() &&
trackRef
().isNonnull()) {
41
return
trackRef
()->pt();
42
}
else
43
return
0.0f;
44
}
45
46
}
// namespace susybsm
susybsm::HSCParticleType::innerTrack
Definition:
HSCParticle.h:20
susybsm::HSCParticleType::unknown
Definition:
HSCParticle.h:20
susybsm::HSCParticleType::standAloneMuon
Definition:
HSCParticle.h:20
susybsm::HSCParticle::trackRef
reco::TrackRef trackRef() const
Definition:
HSCParticle.h:64
susybsm::HSCParticle::type
int type() const
Definition:
HSCParticle.cc:5
susybsm
Definition:
HSCParticle.h:16
susybsm::HSCParticleType::matchedStandAloneMuon
Definition:
HSCParticle.h:20
HSCParticle.h
susybsm::HSCParticle::hasTrackRef
bool hasTrackRef() const
Definition:
HSCParticle.h:50
susybsm::HSCParticle::p
float p() const
Definition:
HSCParticle.cc:20
susybsm::HSCParticleType::trackerMuon
Definition:
HSCParticle.h:20
susybsm::HSCParticleType::globalMuon
Definition:
HSCParticle.h:20
susybsm::HSCParticle::hasMuonRef
bool hasMuonRef() const
Definition:
HSCParticle.h:48
susybsm::HSCParticle::muonRef
reco::MuonRef muonRef() const
Definition:
HSCParticle.h:66
susybsm::HSCParticle::pt
float pt() const
Definition:
HSCParticle.cc:33
Generated for CMSSW Reference Manual by
1.8.14