CMS 3D CMS Logo

HSCParticle.h
Go to the documentation of this file.
1 #ifndef HSCParticle_H
2 #define HSCParticle_H
11 #include <vector>
12 
15 
16 namespace susybsm {
17 
19  namespace HSCParticleType {
21  }
22 
23  class RPCHit4D {
24  public:
25  int id;
26  int bx;
28  bool operator<(const RPCHit4D& other) const { return gp.mag() < other.gp.mag(); }
29  };
30 
32  public:
34  float beta;
35 
37  isCandidate = false;
38  beta = -9999;
39  }
40  };
41 
42  class HSCParticle {
43  public:
44  // constructor
46 
47  // check available infos
48  bool hasMuonRef() const { return muonRef_.isNonnull(); }
49  bool hasMTMuonRef() const { return MTMuonRef_.isNonnull(); }
50  bool hasTrackRef() const { return trackRef_.isNonnull(); }
51  bool hasTrackIsoRef() const { return trackIsoRef_.isNonnull(); }
52  bool hasRpcInfo() const { return rpc_.beta != -9999; }
53  bool hasCaloInfo() const { return caloInfoRef_.isNonnull(); }
54 
55  // set infos
56  void setMuon(const reco::MuonRef& data) { muonRef_ = data; }
60  void setRpc(const RPCBetaMeasurement& data) { rpc_ = data; }
62 
63  // get infos
64  reco::TrackRef trackRef() const { return trackRef_; }
66  reco::MuonRef muonRef() const { return muonRef_; }
67  reco::MuonRef MTMuonRef() const { return MTMuonRef_; }
69  const RPCBetaMeasurement& rpc() const { return rpc_; }
70 
71  // shortcut of long function
72  float p() const;
73  float pt() const;
74  int type() const;
75 
76  private:
77  reco::TrackRef trackRef_; //TrackRef from refitted track collection (dE/dx purposes)
78  reco::TrackRef trackIsoRef_; //TrackRef from general track collection (isolation purposes)
80  reco::MuonRef MTMuonRef_; //Muon reconstructed from MT muon segments. SA only
82 
84  };
85 
86  typedef std::vector<HSCParticle> HSCParticleCollection;
91 } // namespace susybsm
92 #endif
edm::RefProd
Definition: EDProductfwd.h:25
susybsm::HSCParticle::caloInfoRef_
HSCPCaloInfoRef caloInfoRef_
Definition: HSCParticle.h:81
susybsm::HSCParticle::setTrack
void setTrack(const reco::TrackRef &data)
Definition: HSCParticle.h:58
susybsm::HSCParticle
Definition: HSCParticle.h:42
Muon.h
susybsm::HSCParticle::trackRef_
reco::TrackRef trackRef_
Definition: HSCParticle.h:77
DeDxData.h
susybsm::HSCParticle::trackIsoRef
reco::TrackRef trackIsoRef() const
Definition: HSCParticle.h:65
susybsm::HSCParticle::setCaloInfo
void setCaloInfo(const HSCPCaloInfoRef &data)
Definition: HSCParticle.h:61
susybsm::HSCParticle::hasMuonRef
bool hasMuonRef() const
Definition: HSCParticle.h:48
susybsm::HSCParticle::setMuon
void setMuon(const reco::MuonRef &data)
Definition: HSCParticle.h:56
susybsm::HSCParticle::rpc
const RPCBetaMeasurement & rpc() const
Definition: HSCParticle.h:69
AssociationMap.h
susybsm::HSCParticleRef
edm::Ref< HSCParticleCollection > HSCParticleRef
Definition: HSCParticle.h:87
susybsm
Definition: HSCParticle.h:16
susybsm::HSCParticleCollection
std::vector< HSCParticle > HSCParticleCollection
Definition: HSCParticle.h:86
edm::RefVector
Definition: EDProductfwd.h:27
susybsm::HSCParticleRefProd
edm::RefProd< HSCParticleCollection > HSCParticleRefProd
Definition: HSCParticle.h:88
EcalRecHitCollections.h
edm::Ref< MuonCollection >
susybsm::HSCParticle::MTMuonRef
reco::MuonRef MTMuonRef() const
Definition: HSCParticle.h:67
susybsm::HSCParticle::hasRpcInfo
bool hasRpcInfo() const
Definition: HSCParticle.h:52
susybsm::RPCBetaMeasurement::beta
float beta
Definition: HSCParticle.h:34
susybsm::HSCParticle::setTrackIso
void setTrackIso(const reco::TrackRef &data)
Definition: HSCParticle.h:59
susybsm::HSCParticleType::trackerMuon
Definition: HSCParticle.h:20
Track.h
susybsm::HSCParticleType::Type
Type
Definition: HSCParticle.h:20
susybsm::HSCParticle::hasCaloInfo
bool hasCaloInfo() const
Definition: HSCParticle.h:53
susybsm::RPCHit4D
Definition: HSCParticle.h:23
susybsm::RPCHit4D::operator<
bool operator<(const RPCHit4D &other) const
Definition: HSCParticle.h:28
susybsm::HSCParticle::caloInfoRef
HSCPCaloInfoRef caloInfoRef() const
Definition: HSCParticle.h:68
MuonFwd.h
MuonTimeExtra.h
susybsm::HSCParticle::HSCParticle
HSCParticle()
Definition: HSCParticle.h:45
susybsm::RPCHit4D::id
int id
Definition: HSCParticle.h:25
trackingPlots.other
other
Definition: trackingPlots.py:1467
Point3DBase< float, GlobalTag >
susybsm::HSCParticle::trackIsoRef_
reco::TrackRef trackIsoRef_
Definition: HSCParticle.h:78
susybsm::HSCParticleType::matchedStandAloneMuon
Definition: HSCParticle.h:20
susybsm::RPCHit4D::bx
int bx
Definition: HSCParticle.h:26
susybsm::HSCParticle::hasTrackRef
bool hasTrackRef() const
Definition: HSCParticle.h:50
edm::AssociationMap
Definition: AssociationMap.h:48
susybsm::HSCParticle::p
float p() const
Definition: HSCParticle.cc:20
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
susybsm::HSCParticle::setRpc
void setRpc(const RPCBetaMeasurement &data)
Definition: HSCParticle.h:60
susybsm::HSCParticle::muonRef
reco::MuonRef muonRef() const
Definition: HSCParticle.h:66
susybsm::HSCParticleType::innerTrack
Definition: HSCParticle.h:20
susybsm::HSCParticle::MTMuonRef_
reco::MuonRef MTMuonRef_
Definition: HSCParticle.h:80
susybsm::HSCParticle::hasMTMuonRef
bool hasMTMuonRef() const
Definition: HSCParticle.h:49
susybsm::HSCParticle::pt
float pt() const
Definition: HSCParticle.cc:33
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
HSCPCaloInfo.h
susybsm::HSCParticleRefVector
edm::RefVector< HSCParticleCollection > HSCParticleRefVector
Definition: HSCParticle.h:89
susybsm::HSCParticle::setMTMuon
void setMTMuon(const reco::MuonRef &data)
Definition: HSCParticle.h:57
susybsm::HSCParticle::trackRef
reco::TrackRef trackRef() const
Definition: HSCParticle.h:64
susybsm::RPCBetaMeasurement
Definition: HSCParticle.h:31
susybsm::HSCParticle::hasTrackIsoRef
bool hasTrackIsoRef() const
Definition: HSCParticle.h:51
susybsm::HSCParticle::type
int type() const
Definition: HSCParticle.cc:5
susybsm::RPCBetaMeasurement::RPCBetaMeasurement
RPCBetaMeasurement()
Definition: HSCParticle.h:36
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
susybsm::RPCHit4D::gp
GlobalPoint gp
Definition: HSCParticle.h:27
AssociationVector.h
susybsm::TracksEcalRecHitsMap
edm::AssociationMap< edm::OneToOne< reco::TrackCollection, EcalRecHitCollection > > TracksEcalRecHitsMap
Definition: HSCParticle.h:90
susybsm::HSCParticle::rpc_
RPCBetaMeasurement rpc_
Definition: HSCParticle.h:83
susybsm::HSCParticleType::standAloneMuon
Definition: HSCParticle.h:20
GlobalPoint.h
susybsm::RPCBetaMeasurement::isCandidate
bool isCandidate
Definition: HSCParticle.h:33
susybsm::HSCParticle::muonRef_
reco::MuonRef muonRef_
Definition: HSCParticle.h:79
susybsm::HSCParticleType::globalMuon
Definition: HSCParticle.h:20
susybsm::HSCParticleType::unknown
Definition: HSCParticle.h:20