Initial import.
[u/mrichter/AliRoot.git] / JETAN / AliJetEventParticles.h
CommitLineData
d7c6ab14 1#ifndef ALIJETEVENTPARTICLES_H
2#define ALIJETEVENTPARTICLES_H
3
4/* $Id$ */
5
6///////////////////////////////////////////////////////////////////
7//
8// class AliJetEventParticles
9//
10// loizides@ikf.uni-frankfurt.de
11//
12///////////////////////////////////////////////////////////////////
13
14#include <TObject.h>
15#include <TClonesArray.h>
16#include <TObjString.h>
17#include <TString.h>
18class TParticle;
19class AliJetParticle;
20
21class AliJetEventParticles: public TObject
22{
23 public:
24 AliJetEventParticles(Int_t size=1000);
25 AliJetEventParticles(const AliJetEventParticles& source);
26 virtual ~AliJetEventParticles();
27
28 void SetVertex(Float_t v[3]){fVertexX=v[0];fVertexY=v[1];fVertexZ=v[2];}
29 void SetVertex(Float_t v1,Float_t v2, Float_t v3){fVertexX=v1;fVertexY=v2;fVertexZ=v3;}
30 void SetHeader(TString& s){fHeader=s;}
31 void Reset(Int_t size=-1); //deletes all entries
32
33 //adds particle to the event
34 void AddParticle(AliJetParticle* p);
35 void AddParticle(const AliJetParticle* p);
36 void AddParticle(const TParticle* part,Int_t idx=-1, Int_t l=0);
37 void AddParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx=-1, Int_t l=0);
38 void AddParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l,
39 Float_t pt, Float_t phi, Float_t eta);
40
41 const AliJetParticle* GetParticle(Int_t n) //gets particle without boundary check
42 {return (const AliJetParticle*)fParticles->At(n);}
43 const AliJetParticle* GetParticleSafely(Int_t n);
44 Int_t GetNParticles() const {return fNParticles;}
45 const TClonesArray* GetParticles() const {return fParticles;}
46 Float_t GetVertexX() const {return fVertexX;}
47 Float_t GetVertexY() const {return fVertexY;}
48 Float_t GetVertexZ() const {return fVertexZ;}
49
50 void Print(Option_t *t="") const;
51
52 protected:
53 TString fHeader; // event description
54 Int_t fNParticles; // number of particles read
55 TClonesArray *fParticles; //-> particles in event
56
57 Float_t fVertexX; //vertex x
58 Float_t fVertexY; //vertex y
59 Float_t fVertexZ; //vertex z
60
61 ClassDef(AliJetEventParticles,1) //class AliJetEventParticles
62};
63#endif