Version number ++
[u/mrichter/AliRoot.git] / ANALYSIS / AliAOD.h
CommitLineData
a5556ea5 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>
dd2b6810 15#include <TClonesArray.h>
afa8b37b 16#include "AliVAODParticle.h"
a5556ea5 17
18class TParticle;
19
20class AliAOD: public TObject {
21public:
0d8a4589 22 AliAOD();
dd2b6810 23 virtual ~AliAOD();
efdb0cc9 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;}
dd2b6810 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);
a5556ea5 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();
efdb0cc9 41
a5556ea5 42 void SwapParticles(Int_t i, Int_t j);//swaps particles positions; used by AliReader::Blend
1be739ff 43 Bool_t IsRandomized() const {return fIsRandomized;}
44 void SetRandomized(Bool_t flag = kTRUE){fIsRandomized = flag;}
0d8a4589 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
fb734f70 49 Int_t GetNumberOfCharged(Double_t etamin = -10.0, Double_t etamax = 10.0) const;
0d8a4589 50 void Move(Double_t x, Double_t y, Double_t z);//moves all spacial coordinates about this vector
dd2b6810 51 virtual void SetOwner(Bool_t owner);
201c7e13 52 virtual void Print(const Option_t* /*option*/ = "") const;
cd46844c 53 TClass* GetParticleClass();
a5556ea5 54private:
dd2b6810 55 TClonesArray *fParticles; // array of AOD particles, AliAOD is owner of particles
1be739ff 56 Bool_t fIsRandomized;//flag indicating if positions of particles were randomized - used by HBTAN
0d8a4589 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
d9122a01 60 TClass* fParticleClass;//!object that defines type of the particle
0d8a4589 61
a5556ea5 62 ClassDef(AliAOD,1) // base class for AOD containers
63};
64
65#endif