]>
Commit | Line | Data |
---|---|---|
df9db588 | 1 | #ifndef AliAODEvent_H |
2 | #define AliAODEvent_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // AOD base class | |
10 | // Author: Markus Oldenburg, CERN | |
11 | //------------------------------------------------------------------------- | |
12 | ||
13 | #include <TBuffer.h> | |
14 | #include <TClonesArray.h> | |
15 | #include <TList.h> | |
16 | #include <TNamed.h> | |
17 | ||
18 | #include "AliAODHeader.h" | |
19 | #include "AliAODTrack.h" | |
20 | #include "AliAODVertex.h" | |
a9255000 | 21 | #include "AliAODCluster.h" |
df9db588 | 22 | #include "AliAODJet.h" |
23 | ||
24 | class AliAODEvent : public TObject { | |
25 | ||
26 | public : | |
27 | AliAODEvent(); | |
28 | virtual ~AliAODEvent(); | |
29 | ||
30 | //AliAODEvent(const AliAODEvent& aodevent); // not implemented | |
31 | //AliAODEvent& operator=(const AliAODEvent& aodevent); // not implemented | |
32 | ||
33 | void AddObject(TObject *obj); | |
34 | TObject *GetObject(const char *objName) const; | |
35 | TList *GetList() const { return fAODObjects; } | |
36 | ||
37 | // -- Header | |
38 | AliAODHeader *GetHeader() const { return (AliAODHeader*)fHeader; } | |
39 | void AddHeader(const AliAODHeader* hdx) | |
40 | {delete fHeader; fHeader=new AliAODHeader(*hdx);} | |
41 | ||
42 | // -- Tracks | |
43 | TClonesArray *GetTracks() const { return fTracks; } | |
44 | Int_t GetNTracks() const { return fTracks->GetEntriesFast(); } | |
45 | AliAODTrack *GetTrack(Int_t nTrack) const { return (AliAODTrack*)fTracks->At(nTrack); } | |
46 | void AddTrack(const AliAODTrack* trk) | |
47 | {new((*fTracks)[fTracks->GetEntries()]) AliAODTrack(*trk);} | |
fb41236c | 48 | Int_t GetMuonTracks(TRefArray *muonTracks) const; |
df9db588 | 49 | |
50 | // -- Vertex | |
51 | TClonesArray *GetVertices() const { return fVertices; } | |
52 | Int_t GetNVertices() const { return fVertices->GetEntriesFast(); } | |
53 | AliAODVertex *GetVertex(Int_t nVertex) const { return (AliAODVertex*)fVertices->At(nVertex); } | |
54 | void AddVertex(const AliAODVertex* vtx) | |
55 | {new((*fVertices)[fVertices->GetEntries()]) AliAODVertex(*vtx);} | |
5c2fdfa2 | 56 | virtual AliAODVertex *GetPrimaryVertex() const { return GetVertex(0); } |
57 | ||
df9db588 | 58 | |
a9255000 | 59 | // -- Cluster |
60 | TClonesArray *GetClusters() const { return fClusters; } | |
61 | Int_t GetNClusters() const { return fClusters->GetEntriesFast(); } | |
62 | AliAODCluster *GetCluster(Int_t nCluster) const { return (AliAODCluster*)fClusters->At(nCluster); } | |
63 | void AddCluster(const AliAODCluster* vtx) | |
64 | {new((*fClusters)[fClusters->GetEntries()]) AliAODCluster(*vtx);} | |
df9db588 | 65 | |
66 | // -- Jet | |
67 | TClonesArray *GetJets() const { return fJets; } | |
68 | Int_t GetNJets() const { return fJets->GetEntriesFast(); } | |
69 | AliAODJet *GetJet(Int_t nJet) const { return (AliAODJet*)fJets->At(nJet); } | |
70 | void AddJet(const AliAODJet* vtx) | |
71 | {new((*fJets)[fJets->GetEntries()]) AliAODJet(*vtx);} | |
72 | ||
73 | // -- Services | |
74 | void CreateStdContent(); | |
75 | void GetStdContent() const; | |
76 | void ResetStd(Int_t trkArrSize = 0, Int_t vtxArrSize = 0); | |
77 | ||
78 | private : | |
79 | ||
80 | AliAODEvent(const AliAODEvent&); // Not implemented | |
81 | AliAODEvent& operator=(const AliAODEvent&); // Not implemented | |
82 | ||
83 | TList *fAODObjects; // list of AODObjects | |
84 | ||
85 | // standard content | |
86 | mutable AliAODHeader *fHeader; //! event information | |
87 | mutable TClonesArray *fTracks; //! charged tracks | |
88 | mutable TClonesArray *fVertices; //! vertices | |
a9255000 | 89 | mutable TClonesArray *fClusters; //! neutral particles |
df9db588 | 90 | mutable TClonesArray *fJets; //! jets |
91 | ||
92 | ClassDef(AliAODEvent,1); | |
93 | }; | |
94 | ||
95 | #endif |