CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  {
25  public:
26  int id;
27  int bx;
29  bool operator<(const RPCHit4D& other) const {
30  return gp.mag() < other.gp.mag();
31  }
32  };
33 
34 
36  {
37  public:
39  float beta;
40 
42  isCandidate = false;
43  beta = -9999;
44  }
45  };
46 
47 
48  class HSCParticle
49  {
50  public:
51  // constructor
53 
54  // check available infos
55  bool hasMuonRef() const { return muonRef_.isNonnull(); }
56  bool hasTrackRef() const { return trackRef_.isNonnull(); }
57  bool hasTrackIsoRef() const { return trackIsoRef_.isNonnull(); }
58  bool hasRpcInfo() const { return rpc_.beta!=-9999; }
59  bool hasCaloInfo() const { return caloInfoRef_.isNonnull(); }
60 
61  // set infos
62  void setMuon (const reco::MuonRef& data) {muonRef_ = data;}
65  void setRpc (const RPCBetaMeasurement& data) {rpc_ = data;}
67 
68 
69  // get infos
70  reco::TrackRef trackRef () const { return trackRef_; }
72  reco::MuonRef muonRef () const { return muonRef_; }
74  const RPCBetaMeasurement& rpc () const { return rpc_; }
75 
76  // shortcut of long function
77  float p () const;
78  float pt() const;
79  int type() const;
80 
81  private:
82  reco::TrackRef trackRef_; //TrackRef from refitted track collection (dE/dx purposes)
83  reco::TrackRef trackIsoRef_; //TrackRef from general track collection (isolation purposes)
86 
88  };
89 
90  typedef std::vector<HSCParticle> HSCParticleCollection;
95 }
96 
97 #endif
void setMuon(const reco::MuonRef &data)
Definition: HSCParticle.h:62
RPCBetaMeasurement rpc_
Definition: HSCParticle.h:87
reco::TrackRef trackIsoRef() const
Definition: HSCParticle.h:71
const RPCBetaMeasurement & rpc() const
Definition: HSCParticle.h:74
void setCaloInfo(const HSCPCaloInfoRef &data)
Definition: HSCParticle.h:66
bool hasTrackIsoRef() const
Definition: HSCParticle.h:57
bool hasTrackRef() const
Definition: HSCParticle.h:56
edm::RefProd< HSCParticleCollection > HSCParticleRefProd
Definition: HSCParticle.h:92
edm::Ref< HSCParticleCollection > HSCParticleRef
Definition: HSCParticle.h:91
GlobalPoint gp
Definition: HSCParticle.h:28
HSCPCaloInfoRef caloInfoRef_
Definition: HSCParticle.h:85
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:249
std::vector< HSCParticle > HSCParticleCollection
Definition: HSCParticle.h:90
T mag() const
Definition: PV3DBase.h:61
reco::TrackRef trackIsoRef_
Definition: HSCParticle.h:83
reco::MuonRef muonRef() const
Definition: HSCParticle.h:72
HSCPCaloInfoRef caloInfoRef() const
Definition: HSCParticle.h:73
void setTrackIso(const reco::TrackRef &data)
Definition: HSCParticle.h:64
reco::MuonRef muonRef_
Definition: HSCParticle.h:84
bool operator<(const RPCHit4D &other) const
Definition: HSCParticle.h:29
int type() const
Definition: HSCParticle.cc:5
reco::TrackRef trackRef() const
Definition: HSCParticle.h:70
bool hasRpcInfo() const
Definition: HSCParticle.h:58
edm::RefVector< HSCParticleCollection > HSCParticleRefVector
Definition: HSCParticle.h:93
reco::TrackRef trackRef_
Definition: HSCParticle.h:82
float p() const
Definition: HSCParticle.cc:14
void setRpc(const RPCBetaMeasurement &data)
Definition: HSCParticle.h:65
bool hasMuonRef() const
Definition: HSCParticle.h:55
bool hasCaloInfo() const
Definition: HSCParticle.h:59
edm::AssociationMap< edm::OneToOne< reco::TrackCollection, EcalRecHitCollection > > TracksEcalRecHitsMap
Definition: HSCParticle.h:94
void setTrack(const reco::TrackRef &data)
Definition: HSCParticle.h:63
float pt() const
Definition: HSCParticle.cc:22