]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIAOD_H | |
2 | #define ALIAOD_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | ///////////////////////////////////////////////////////////// | |
9 | // | |
10 | // base class for AOD containers | |
11 | // | |
12 | ///////////////////////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
15 | #include <TClonesArray.h> | |
16 | #include "AliVAODParticle.h" | |
17 | ||
18 | class TParticle; | |
19 | ||
20 | class AliAOD: public TObject { | |
21 | public: | |
22 | AliAOD(); | |
23 | virtual ~AliAOD(); | |
24 | ||
25 | AliAOD(const AliAOD& in); | |
26 | virtual AliAOD& operator=(const AliAOD& in); | |
27 | virtual void CopyData(AliAOD* aod);//Copys all data from aod, but leaves local type of particles | |
28 | ||
29 | virtual TClonesArray* GetParticles() const {return fParticles;} | |
30 | virtual void SetParticleClassName(const char* classname); | |
31 | virtual void SetParticleClass(TClass* pclass); | |
32 | ||
33 | virtual Int_t GetNumberOfParticles() const {return (fParticles)?fParticles->GetEntriesFast():0;} | |
34 | virtual AliVAODParticle* GetParticle(Int_t index) const {return (fParticles)?(AliVAODParticle*)fParticles->At(index):0x0;} | |
35 | virtual void AddParticle(AliVAODParticle* particle); | |
36 | virtual void AddParticle(TParticle* part, Int_t idx); //adds particle to the event | |
37 | virtual void AddParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot, | |
38 | Double_t vx, Double_t vy, Double_t vz, Double_t time); | |
39 | ||
40 | virtual void Reset(); | |
41 | ||
42 | void SwapParticles(Int_t i, Int_t j);//swaps particles positions; used by AliReader::Blend | |
43 | Bool_t IsRandomized() const {return fIsRandomized;} | |
44 | void SetRandomized(Bool_t flag = kTRUE){fIsRandomized = flag;} | |
45 | ||
46 | void GetPrimaryVertex(Double_t&x, Double_t&y, Double_t&z); | |
47 | void SetPrimaryVertex(Double_t x, Double_t y, Double_t z); | |
48 | ||
49 | Int_t GetNumberOfCharged(Double_t etamin = -10.0, Double_t etamax = 10.0) const; | |
50 | void Move(Double_t x, Double_t y, Double_t z);//moves all spacial coordinates about this vector | |
51 | virtual void SetOwner(Bool_t owner); | |
52 | virtual void Print(const Option_t* /*option*/ = "") const; | |
53 | TClass* GetParticleClass(); | |
54 | private: | |
55 | TClonesArray *fParticles; // array of AOD particles, AliAOD is owner of particles | |
56 | Bool_t fIsRandomized;//flag indicating if positions of particles were randomized - used by HBTAN | |
57 | Double_t fPrimaryVertexX;//X position of the primary vertex | |
58 | Double_t fPrimaryVertexY;//Y position of the primary vertex | |
59 | Double_t fPrimaryVertexZ;//Z position of the primary vertex | |
60 | TClass* fParticleClass;//!object that defines type of the particle | |
61 | ||
62 | ClassDef(AliAOD,1) // base class for AOD containers | |
63 | }; | |
64 | ||
65 | #endif |