Event Cut developed; Spacial event move implemented; and few others
[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>
15#include <TObjArray.h>
afa8b37b 16#include "AliVAODParticle.h"
a5556ea5 17
18class TParticle;
19
20class AliAOD: public TObject {
21public:
0d8a4589 22 AliAOD();
a5556ea5 23 virtual ~AliAOD() { Reset(); }
24
78d7c6d3 25 virtual void SetOwner(Bool_t owner){fParticles.SetOwner(owner);}
a5556ea5 26 virtual TObjArray* GetParticles() {return &fParticles;};
27 virtual Int_t GetNumberOfParticles() const {return fParticles.GetEntriesFast();}
0d8a4589 28 virtual AliVAODParticle* GetParticle(Int_t index) const {return (AliVAODParticle*) fParticles[index];}
afa8b37b 29 virtual void AddParticle(AliVAODParticle* particle) {fParticles.Add(particle);};
a5556ea5 30 virtual void AddParticle(TParticle* part, Int_t idx); //adds particle to the event
31 virtual void AddParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
32 Double_t vx, Double_t vy, Double_t vz, Double_t time);
33
34 virtual void Reset();
35 void SwapParticles(Int_t i, Int_t j);//swaps particles positions; used by AliReader::Blend
1be739ff 36 Bool_t IsRandomized() const {return fIsRandomized;}
37 void SetRandomized(Bool_t flag = kTRUE){fIsRandomized = flag;}
0d8a4589 38
39 void GetPrimaryVertex(Double_t&x, Double_t&y, Double_t&z);
40 void SetPrimaryVertex(Double_t x, Double_t y, Double_t z);
41
42 Int_t GetNumberOfCharged(Double_t etamin = -10.0, Double_t etamax = -10.0) const;
43 void Move(Double_t x, Double_t y, Double_t z);//moves all spacial coordinates about this vector
a5556ea5 44private:
45 TObjArray fParticles; // array of AOD particles, AliAOD is owner of particles
1be739ff 46 Bool_t fIsRandomized;//flag indicating if positions of particles were randomized - used by HBTAN
0d8a4589 47 Double_t fPrimaryVertexX;//X position of the primary vertex
48 Double_t fPrimaryVertexY;//Y position of the primary vertex
49 Double_t fPrimaryVertexZ;//Z position of the primary vertex
50
51
a5556ea5 52 ClassDef(AliAOD,1) // base class for AOD containers
53};
54
55#endif