CMS 3D CMS Logo

HSCParticle.cc
Go to the documentation of this file.
2 
3 namespace susybsm {
4 
5  int HSCParticle::type() const {
6  if (hasTrackRef() && !hasMuonRef()) {
8  } else if (!hasTrackRef() && hasMuonRef()) {
10  } else if (hasTrackRef() && hasMuonRef() && muonRef()->isGlobalMuon()) {
12  } else if (hasTrackRef() && hasMuonRef() && muonRef()->isStandAloneMuon()) {
14  } else if (hasTrackRef() && hasMuonRef() && muonRef()->isTrackerMuon()) {
16  } else
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::HSCParticle::hasMuonRef
bool hasMuonRef() const
Definition: HSCParticle.h:48
susybsm
Definition: HSCParticle.h:16
susybsm::HSCParticleType::trackerMuon
Definition: HSCParticle.h:20
HSCParticle.h
susybsm::HSCParticleType::matchedStandAloneMuon
Definition: HSCParticle.h:20
susybsm::HSCParticle::hasTrackRef
bool hasTrackRef() const
Definition: HSCParticle.h:50
susybsm::HSCParticle::p
float p() const
Definition: HSCParticle.cc:20
susybsm::HSCParticle::muonRef
reco::MuonRef muonRef() const
Definition: HSCParticle.h:66
susybsm::HSCParticleType::innerTrack
Definition: HSCParticle.h:20
susybsm::HSCParticle::pt
float pt() const
Definition: HSCParticle.cc:33
susybsm::HSCParticle::trackRef
reco::TrackRef trackRef() const
Definition: HSCParticle.h:64
susybsm::HSCParticle::type
int type() const
Definition: HSCParticle.cc:5
susybsm::HSCParticleType::standAloneMuon
Definition: HSCParticle.h:20
susybsm::HSCParticleType::globalMuon
Definition: HSCParticle.h:20
susybsm::HSCParticleType::unknown
Definition: HSCParticle.h:20