StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRareEvent.h
1 #ifndef STRAREEVENT_HH
2 #define STRAREEVENT_HH
3 #include "TObject.h"
4 #include "TClonesArray.h"
5 
6 class StEvent;
7 class StPrimaryTrack;
8 class StGlobalTrack;
9 class StL3Trigger;
10 
11 class StRareEvent : public TObject {
12 
13  public:
14  StRareEvent();
15  // StRareEvent(StEvent* event);
16  ~StRareEvent();
17 
18  void fillRareEvent(StEvent* event);
19  void fillL3Info(StL3Trigger *l3Event);
20  void clear(Option_t *option="");
21 
22  int eventNumber() const;
23  int runNumber() const;
24  int triggerWord() const;
25  float vertexZ() const;
26  int numberOfTracks() const;
27  int numberOfGoodPrimaryTracks() const;
28  float magneticField() const;
29  void addTrack(StPrimaryTrack* track);
30  void addL3Track(StGlobalTrack* l3track);
31  float l3vertexZ() const;
32  int numberOfL3Tracks() const;
33  short l3Unbiased() const;
34  int numberOfProccesedEvents() const;
35  int numberOfAcceptedEvents() const;
36  int numberOfBuildEvents() const;
37  float triggerData(int i) const;
38  int l3Flag() const;
39  TClonesArray* getTracks() const;
40  TClonesArray* getL3Tracks() const;
41 
42  private:
43  TClonesArray* fRareTracks;
44  static TClonesArray* fgRareTracks;
45  int fNRareTrack;
46  int fEventNumber;
47  int fRunNumber;
48  int fTriggerWord;
49  float fVertexZ;
50  int fnumberOfGoodPrimaryTracks;
51  float fmagneticField;
52 
53  // L3 stuff
54  TClonesArray* fL3RareTracks;
55  static TClonesArray* fgL3RareTracks;
56  int fNL3RareTrack;
57  float fL3VertexZ;
58  short fL3Unbiased;
59  int fNProcessed;
60  int fNAccept;
61  int fNBuild;
62  float fTriggerData[10];
63  int fL3Flag;
64 
65  ClassDef(StRareEvent,3)
66 };
67 
68 
69 inline int StRareEvent::eventNumber() const {return fEventNumber;}
70 inline int StRareEvent::runNumber() const {return fRunNumber;}
71 inline int StRareEvent::triggerWord() const {return fTriggerWord;}
72 inline int StRareEvent::numberOfGoodPrimaryTracks() const {return fnumberOfGoodPrimaryTracks;}
73 inline int StRareEvent::numberOfTracks() const {return fNRareTrack;}
74 inline float StRareEvent::vertexZ() const {return fVertexZ;}
75 inline float StRareEvent::magneticField() const {return fmagneticField;}
76 inline TClonesArray* StRareEvent::getTracks() const {return fRareTracks;}
77 
78 
79 // L3 stuff
80 inline int StRareEvent::numberOfL3Tracks() const {return fNL3RareTrack;}
81 inline short StRareEvent::l3Unbiased() const {return fL3Unbiased;}
82 inline int StRareEvent::numberOfProccesedEvents() const {return fNProcessed;}
83 inline int StRareEvent::numberOfAcceptedEvents() const {return fNAccept;}
84 inline int StRareEvent::numberOfBuildEvents() const {return fNBuild;}
85 inline float StRareEvent::l3vertexZ() const {return fL3VertexZ;}
86 inline TClonesArray* StRareEvent::getL3Tracks() const {return fL3RareTracks;}
87 inline float StRareEvent::triggerData(int i) const {
88  if (i>=0 && i<=9) return fTriggerData[i];
89  else return -9999;
90 }
91 inline int StRareEvent::l3Flag() const {return fL3Flag;}
92 
93 #endif