test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
()){
return
HSCParticleType::innerTrack
;
7
}
else
if
(!
hasTrackRef
() &&
hasMuonRef
()){
return
HSCParticleType::standAloneMuon
;
8
}
else
if
(
hasTrackRef
() &&
hasMuonRef
() &&
muonRef
()->isGlobalMuon()){
return
HSCParticleType::globalMuon
;
9
}
else
if
(
hasTrackRef
() &&
hasMuonRef
() &&
muonRef
()->isStandAloneMuon()){
return
HSCParticleType::matchedStandAloneMuon
;
10
}
else
if
(
hasTrackRef
() &&
hasMuonRef
() &&
muonRef
()->isTrackerMuon()){
return
HSCParticleType::trackerMuon
;
11
}
else
return
HSCParticleType::unknown
;
12
}
13
14
float
HSCParticle::p
()
const
{
15
if
(
hasMuonRef
() &&
muonRef
()->combinedMuon() .isNonnull()){
return
muonRef
()->combinedMuon() ->p();
16
}
else
if
(
hasMuonRef
() &&
muonRef
()->
innerTrack
() .isNonnull()){
return
muonRef
()->innerTrack() ->p();
17
}
else
if
(
hasMuonRef
() &&
muonRef
()->
standAloneMuon
().isNonnull()){
return
muonRef
()->standAloneMuon()->p();
18
}
else
if
(
hasTrackRef
()&&
trackRef
() .isNonnull()){
return
trackRef
() ->p();
19
}
else
return
0.0f;
20
}
21
22
float
HSCParticle::pt
()
const
{
23
if
(
hasMuonRef
() &&
muonRef
()->combinedMuon() .isNonnull()){
return
muonRef
()->combinedMuon() ->pt();
24
}
else
if
(
hasMuonRef
() &&
muonRef
()->
innerTrack
() .isNonnull()){
return
muonRef
()->innerTrack() ->pt();
25
}
else
if
(
hasMuonRef
() &&
muonRef
()->
standAloneMuon
().isNonnull()){
return
muonRef
()->standAloneMuon()->pt();
26
}
else
if
(
hasTrackRef
()&&
trackRef
() .isNonnull()){
return
trackRef
() ->pt();
27
}
else
return
0.0f;
28
}
29
30
}
susybsm::HSCParticleType::innerTrack
Definition:
HSCParticle.h:20
susybsm::HSCParticleType::unknown
Definition:
HSCParticle.h:20
susybsm::HSCParticleType::standAloneMuon
Definition:
HSCParticle.h:20
susybsm::HSCParticleType::matchedStandAloneMuon
Definition:
HSCParticle.h:20
HSCParticle.h
susybsm::HSCParticle::hasTrackRef
bool hasTrackRef() const
Definition:
HSCParticle.h:57
susybsm::HSCParticleType::trackerMuon
Definition:
HSCParticle.h:20
susybsm::HSCParticle::muonRef
reco::MuonRef muonRef() const
Definition:
HSCParticle.h:74
susybsm::HSCParticleType::globalMuon
Definition:
HSCParticle.h:20
susybsm::HSCParticle::type
int type() const
Definition:
HSCParticle.cc:5
susybsm::HSCParticle::trackRef
reco::TrackRef trackRef() const
Definition:
HSCParticle.h:72
susybsm::HSCParticle::p
float p() const
Definition:
HSCParticle.cc:14
susybsm::HSCParticle::hasMuonRef
bool hasMuonRef() const
Definition:
HSCParticle.h:55
susybsm::HSCParticle::pt
float pt() const
Definition:
HSCParticle.cc:22
Generated for CMSSW Reference Manual by
1.8.5