StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StUeOffAxisConesEvent.h
1 #ifndef ST_UE_OFFAXISCONES_EVENT_H
2 #define ST_UE_OFFAXISCONES_EVENT_H
3 
4 #include "TObject.h"
5 #include "TClonesArray.h"
6 
7 #include "StUeVertex.h"
8 //#include "StUeJet.h"
9 #include "StUeOffAxisConesJet.h"
10 #include "StUeOffAxisCones.h"
11 
12 #include "StSpinPool/StJetEvent/StJetTrack.h"
13 #include "StSpinPool/StJetEvent/StJetTower.h"
14 #include "StSpinPool/StJetEvent/StJetParticle.h"
15 
16 class StUeOffAxisConesEvent : public TObject{
17 
18  public:
20  mEventId = -1;
21  mVertices = new TClonesArray("StUeVertex",20);
22  mUeOffAxisConesJets = new TClonesArray("StUeOffAxisConesJet",50);
23  mUeOffAxisCones = new TClonesArray("StUeOffAxisCones",2);
24  mTracks = new TClonesArray("StJetTrack",100);
25  mTowers = new TClonesArray("StJetTower",100);
26  mParticles = new TClonesArray("StJetParticle",100);
27  }
29 
30  void Clear(Option_t* option)
31  {
32  mVertices->Clear(option);
33  mUeOffAxisConesJets->Clear(option);
34  mUeOffAxisCones->Clear(option);
35  mTracks->Clear(option);
36  mTowers->Clear(option);
37  mParticles->Clear(option);
38  }
39 
40  void setEventId(int eventId){ mEventId = eventId;}
41  int eventId() const{ return mEventId;}
42 
43  int numberOfVertices () const { return mVertices->GetEntriesFast(); }
44  TClonesArray* vertices () const { return mVertices; }
45  StUeVertex* vertex(int i = 0) const{return (StUeVertex*)mVertices->At(i);}
46  StUeVertex* lastVertex() const{ return (StUeVertex*)mVertices->Last(); }
47  StUeVertex* newVertex(){return new ((*mVertices)[mVertices->GetEntriesFast()]) StUeVertex; }
48  StUeOffAxisConesJet* newUeOffAxisConesJet(){return new ((*mUeOffAxisConesJets)[mUeOffAxisConesJets->GetEntriesFast()]) StUeOffAxisConesJet; }
49  StUeOffAxisCones* newUeOffAxisCones(){return new ((*mUeOffAxisCones)[mUeOffAxisCones->GetEntriesFast()]) StUeOffAxisCones; }
50  StJetTrack* newTrack(){return new ((*mTracks)[mTracks->GetEntriesFast()]) StJetTrack; }
51  StJetTower* newTower(){return new ((*mTowers)[mTowers->GetEntriesFast()]) StJetTower; }
52  StJetParticle* newParticle(){return new ((*mParticles)[mParticles->GetEntriesFast()]) StJetParticle; }
53  private:
54  int mEventId;
55  TClonesArray *mVertices;
56  TClonesArray *mUeOffAxisConesJets;
57  TClonesArray *mUeOffAxisCones;
58  TClonesArray *mTracks;
59  TClonesArray *mTowers;
60  TClonesArray *mParticles;
61  ClassDef(StUeOffAxisConesEvent, 1);
62 };
63 #endif