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
void setMuon(const reco::MuonRef &data)
Definition: HSCParticle.h:56
reco::MuonRef MTMuonRef_
Definition: HSCParticle.h:80
bool hasMTMuonRef() const
Definition: HSCParticle.h:49
RPCBetaMeasurement rpc_
Definition: HSCParticle.h:83
bool hasCaloInfo() const
Definition: HSCParticle.h:53
reco::TrackRef trackRef() const
Definition: HSCParticle.h:64
int type() const
Definition: HSCParticle.cc:5
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
void setCaloInfo(const HSCPCaloInfoRef &data)
Definition: HSCParticle.h:61
bool hasTrackRef() const
Definition: HSCParticle.h:50
edm::RefProd< HSCParticleCollection > HSCParticleRefProd
Definition: HSCParticle.h:88
edm::Ref< HSCParticleCollection > HSCParticleRef
Definition: HSCParticle.h:87
bool operator<(const RPCHit4D &other) const
Definition: HSCParticle.h:28
GlobalPoint gp
Definition: HSCParticle.h:27
HSCPCaloInfoRef caloInfoRef_
Definition: HSCParticle.h:81
void setMTMuon(const reco::MuonRef &data)
Definition: HSCParticle.h:57
std::vector< HSCParticle > HSCParticleCollection
Definition: HSCParticle.h:86
const RPCBetaMeasurement & rpc() const
Definition: HSCParticle.h:69
float p() const
Definition: HSCParticle.cc:20
T mag() const
Definition: PV3DBase.h:64
reco::TrackRef trackIsoRef_
Definition: HSCParticle.h:78
HSCPCaloInfoRef caloInfoRef() const
Definition: HSCParticle.h:68
reco::MuonRef MTMuonRef() const
Definition: HSCParticle.h:67
void setTrackIso(const reco::TrackRef &data)
Definition: HSCParticle.h:59
reco::MuonRef muonRef_
Definition: HSCParticle.h:79
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
edm::RefVector< HSCParticleCollection > HSCParticleRefVector
Definition: HSCParticle.h:89
reco::TrackRef trackRef_
Definition: HSCParticle.h:77
void setRpc(const RPCBetaMeasurement &data)
Definition: HSCParticle.h:60
bool hasTrackIsoRef() const
Definition: HSCParticle.h:51
reco::TrackRef trackIsoRef() const
Definition: HSCParticle.h:65
bool hasMuonRef() const
Definition: HSCParticle.h:48
reco::MuonRef muonRef() const
Definition: HSCParticle.h:66
edm::AssociationMap< edm::OneToOne< reco::TrackCollection, EcalRecHitCollection > > TracksEcalRecHitsMap
Definition: HSCParticle.h:90
bool hasRpcInfo() const
Definition: HSCParticle.h:52
float pt() const
Definition: HSCParticle.cc:33
void setTrack(const reco::TrackRef &data)
Definition: HSCParticle.h:58