StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StUeOffAxisCones.h
1 #ifndef STUEOFFAXISCONES
2 #define STUEOFFAXISCONES
3 
4 #include "TObject.h"
5 #include "TRefArray.h"
6 
7 #include "StSpinPool/StJetEvent/StJetTrack.h"
8 #include "StSpinPool/StJetEvent/StJetTower.h"
9 #include "StSpinPool/StJetEvent/StJetParticle.h"
10 
11 class StUeOffAxisCones : public TObject{
12  public:
13  StUeOffAxisCones() : mPt(0.), mEta(999), mPhi(3.15), mRadius(99.), mMult(0)
14  {
15  }
17  }
18 
19  float pt() const{ return mPt;}
20  float eta() const{ return mEta;}
21  float phi() const{ return mPhi;}
22  float radius() const{ return mRadius;}
23  float rpho() const {
24  if(mRadius > 0.) return mPt/(3.14159*mRadius*mRadius);
25  else return 0.;
26  }
27  float mult() const { return mMult;}
28 
29  StJetTrack* track(int i) const { return (StJetTrack*)mTracks.At(i); }
30  StJetTower* tower(int i) const { return (StJetTower*)mTowers.At(i); }
31  StJetParticle* particle(int i) const { return (StJetParticle*)mParticles.At(i); }
32 
33  int numberOfTracks() const { return mTracks.GetEntriesFast(); }
34  int numberOfTowers() const { return mTowers.GetEntriesFast(); }
35  int numberOfParticles() const { return mParticles.GetEntriesFast(); }
36 
37  const TRefArray& tracks() const { return mTracks; }
38  const TRefArray& towers() const { return mTowers; }
39  const TRefArray& particles() const { return mParticles; }
40 
41  void setPt(float pt) { mPt = pt; }
42  void setEtaPhi(float eta, float phi) { mEta = eta; mPhi = phi;}
43  void setRadius(float radius) { mRadius = radius; }
44  void setMult(int mult) { mMult = mult; }
45  StJetTrack* addTrack(StJetTrack* track) { mTracks.Add((TObject*)track); return (StJetTrack*)mTracks.Last(); }
46  StJetTower* addTower(StJetTower* tower) { mTowers.Add((TObject*)tower); return (StJetTower*)mTowers.Last(); }
47  StJetParticle* addParticle(StJetParticle* particle) { mParticles.Add((TObject*)particle); return (StJetParticle*)mParticles.Last(); }
48  private:
49  float mPt;
50  float mEta;
51  float mPhi;
52 
53  float mRadius;
54  int mMult;
55 
56  TRefArray mTracks;
57  TRefArray mTowers;
58  TRefArray mParticles;
59 
60  ClassDef(StUeOffAxisCones, 1);
61 };
62 #endif