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 hasMTMuonRef() const { return MTMuonRef_.isNonnull(); }
57  bool hasTrackRef() const { return trackRef_.isNonnull(); }
58  bool hasTrackIsoRef() const { return trackIsoRef_.isNonnull(); }
59  bool hasRpcInfo() const { return rpc_.beta!=-9999; }
60  bool hasCaloInfo() const { return caloInfoRef_.isNonnull(); }
61 
62  // set infos
63  void setMuon (const reco::MuonRef& data) {muonRef_ = data;}
67  void setRpc (const RPCBetaMeasurement& data) {rpc_ = data;}
69 
70 
71  // get infos
72  reco::TrackRef trackRef () const { return trackRef_; }
74  reco::MuonRef muonRef () const { return muonRef_; }
75  reco::MuonRef MTMuonRef () const { return MTMuonRef_; }
77  const RPCBetaMeasurement& rpc () const { return rpc_; }
78 
79  // shortcut of long function
80  float p () const;
81  float pt() const;
82  int type() const;
83 
84  private:
85  reco::TrackRef trackRef_; //TrackRef from refitted track collection (dE/dx purposes)
86  reco::TrackRef trackIsoRef_; //TrackRef from general track collection (isolation purposes)
88  reco::MuonRef MTMuonRef_; //Muon reconstructed from MT muon segments. SA only
90 
92  };
93 
94  typedef std::vector<HSCParticle> HSCParticleCollection;
99 }
100 #endif
void setMuon(const reco::MuonRef &data)
Definition: HSCParticle.h:63
reco::MuonRef MTMuonRef_
Definition: HSCParticle.h:88
RPCBetaMeasurement rpc_
Definition: HSCParticle.h:91
reco::TrackRef trackIsoRef() const
Definition: HSCParticle.h:73
const RPCBetaMeasurement & rpc() const
Definition: HSCParticle.h:77
void setCaloInfo(const HSCPCaloInfoRef &data)
Definition: HSCParticle.h:68
bool hasTrackIsoRef() const
Definition: HSCParticle.h:58
bool hasTrackRef() const
Definition: HSCParticle.h:57
edm::RefProd< HSCParticleCollection > HSCParticleRefProd
Definition: HSCParticle.h:96
edm::Ref< HSCParticleCollection > HSCParticleRef
Definition: HSCParticle.h:95
GlobalPoint gp
Definition: HSCParticle.h:28
HSCPCaloInfoRef caloInfoRef_
Definition: HSCParticle.h:89
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
reco::MuonRef MTMuonRef() const
Definition: HSCParticle.h:75
void setMTMuon(const reco::MuonRef &data)
Definition: HSCParticle.h:64
std::vector< HSCParticle > HSCParticleCollection
Definition: HSCParticle.h:94
bool hasMTMuonRef() const
Definition: HSCParticle.h:56
T mag() const
Definition: PV3DBase.h:67
reco::TrackRef trackIsoRef_
Definition: HSCParticle.h:86
reco::MuonRef muonRef() const
Definition: HSCParticle.h:74
HSCPCaloInfoRef caloInfoRef() const
Definition: HSCParticle.h:76
void setTrackIso(const reco::TrackRef &data)
Definition: HSCParticle.h:66
reco::MuonRef muonRef_
Definition: HSCParticle.h:87
bool operator<(const RPCHit4D &other) const
Definition: HSCParticle.h:29
int type() const
Definition: HSCParticle.cc:5
reco::TrackRef trackRef() const
Definition: HSCParticle.h:72
bool hasRpcInfo() const
Definition: HSCParticle.h:59
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
edm::RefVector< HSCParticleCollection > HSCParticleRefVector
Definition: HSCParticle.h:97
reco::TrackRef trackRef_
Definition: HSCParticle.h:85
float p() const
Definition: HSCParticle.cc:14
void setRpc(const RPCBetaMeasurement &data)
Definition: HSCParticle.h:67
bool hasMuonRef() const
Definition: HSCParticle.h:55
bool hasCaloInfo() const
Definition: HSCParticle.h:60
edm::AssociationMap< edm::OneToOne< reco::TrackCollection, EcalRecHitCollection > > TracksEcalRecHitsMap
Definition: HSCParticle.h:98
void setTrack(const reco::TrackRef &data)
Definition: HSCParticle.h:65
float pt() const
Definition: HSCParticle.cc:22