CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
bool hasTrackRef() const
Definition: HSCParticle.h:50
reco::MuonRef muonRef() const
Definition: HSCParticle.h:66
int type() const
Definition: HSCParticle.cc:5
reco::TrackRef trackRef() const
Definition: HSCParticle.h:64
float p() const
Definition: HSCParticle.cc:20
bool hasMuonRef() const
Definition: HSCParticle.h:48
float pt() const
Definition: HSCParticle.cc:33