StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJets.h
1 // -*- mode: c++;-*-
2 // $Id: StJets.h,v 1.4 2010/06/30 17:51:58 pibero Exp $
3 #ifndef StJets_h
4 #define StJets_h
5 
6 #include <vector>
7 using std::vector;
8 
9 #include "TObject.h"
10 #include "TClonesArray.h"
11 
12 #include "TrackToJetIndex.h"
13 #include "TowerToJetIndex.h"
14 
15 class StJet;
16 
24 class StJets : public TObject
25 {
26 public:
27 
28  StJets();
29  virtual ~StJets();
30 
31  void Clear(bool clearTracks = false);
32  void Clear(Option_t* opt);
33 
35  void setBemcCorrupt(bool v) { mCorrupt = v; }
36  bool bemcCorrupt() const { return mCorrupt; }
37 
39  int nJets() const { return mJets->GetEntriesFast(); }
40 
42  TClonesArray* jets() { return mJets; }
43 
44  void addJet(StJet& jet);
45 
47  TClonesArray* tracks() { return mTrackToJetIndices; }
48  TClonesArray* towers() { return mTowerToJetIndices; }
49 
50  void addTrackToIndex(TrackToJetIndex& t2j);
51  void addTowerToIndex(TowerToJetIndex& t2j);
52 
54  TObjArray tracks(int jetIndex) const;
55  TObjArray towers(int jetIndex) const;
56  vector<TLorentzVector*> particles(int jetIndex) const; // for backward compatibility
57 
59  int eventId () const { return mEventId ; }
60  int eventNumber() const { return mEventNumber; }
61  int runId () const { return mRunId ; }
62  int runNumber () const { return mRunNumber ; }
63 
64  void seteventId (int v) { mEventId = v; }
65  void seteventNumber(int v) { mEventNumber = v; }
66  void setrunId (int v) { mRunId = v; }
67  void setrunNumber (int v) { mRunNumber = v; }
68 
70  // bool isSameEvent(const StMuDst*);
71 
73  int nDylanPoints() const { return mDylanPoints; }
74  void setDylanPoints(int v) { mDylanPoints = v; }
75 
77  double sumEmcE() const { return mSumEmcE; }
78  void setSumEmcE(double v) { mSumEmcE = v; }
79 
81  double e (int jetIndex) const;
82  double et (int jetIndex) const;
83  double p (int jetIndex) const;
84  double pt (int jetIndex) const;
85  double phi (int jetIndex) const;
86  double eta (int jetIndex) const;
87  int nCell (int jetIndex) const;
88  int charge(int jetIndex) const;
89 
90 private:
91  int mDylanPoints;
92  double mSumEmcE;
93  int mEventId;
94  int mEventNumber;
95  int mRunId;
96  int mRunNumber;
97  bool mCorrupt;
98 
99  bool inBounds(int);
100  StJet* jet(int);
101 
102  TClonesArray* mJets;
103  TClonesArray* mTrackToJetIndices;
104  TClonesArray* mTowerToJetIndices;
105 
106  ClassDef(StJets,2);
107 };
108 
109 //inlines
110 inline void StJets::Clear(Option_t* opt)
111 {
112  TObject::Clear(opt);
113  mEventId = mEventNumber = mRunId = mRunNumber = 0;
114  mCorrupt = false;
115 }
116 
117 #endif // StJets_h
double sumEmcE() const
Summed energy of towers with e&gt;0.4 (after status check)
Definition: StJets.h:77
void setBemcCorrupt(bool v)
Set the BEMC corrupt flag. true –&gt; event is corrupt, no jet finding was performed.
Definition: StJets.h:35
TClonesArray * jets()
Access to the jets in this event.
Definition: StJets.h:42
Definition: StJets.h:24
double e(int jetIndex) const
User Interface as per Thomas H&#39;s request. Access jet kinematics based on index:
Definition: StJets.cxx:102
int nJets() const
The number of jets found in this event.
Definition: StJets.h:39
int eventId() const
access to event numbers, used to synchronize with StMuDstMaker for simultaneous reading ...
Definition: StJets.h:59
TClonesArray * tracks()
The track/tower to jet indices TClonesArray: this contains all the 4momenta contained in jets for jet...
Definition: StJets.h:47
int nDylanPoints() const
A double check, used to synchronize with StMuDstMaker for simultaneous reading.
Definition: StJets.h:73
Definition: StJet.h:91