Added set method.
[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>
d7c6ab14 15#include <TString.h>
301a24f1 16
d7c6ab14 17class TParticle;
9e431626 18class TClonesArray;
d7c6ab14 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
3bf434de 32 void Clear(Option_t *option="") {TObject::Clear(option);Reset();}
962f5fc0 33 void Set(const AliJetEventParticles& source);
d7c6ab14 34
35 //adds particle to the event
36 void AddParticle(AliJetParticle* p);
37 void AddParticle(const AliJetParticle* p);
301a24f1 38 void AddParticle(const TParticle* part,Int_t idx=-1, Int_t l=0, Int_t ncl=0);
39 void AddParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx=-1, Int_t l=0, Int_t ncl=0);
40 void AddParticle(Float_t px, Float_t py, Float_t pz, Float_t etot, Int_t idx, Int_t l, Int_t ncl,
d7c6ab14 41 Float_t pt, Float_t phi, Float_t eta);
42
301a24f1 43 void AddSignal(const AliJetEventParticles& source);
44
45 const AliJetParticle* GetParticle(Int_t n) const //gets particle without boundary check
d7c6ab14 46 {return (const AliJetParticle*)fParticles->At(n);}
47 const AliJetParticle* GetParticleSafely(Int_t n);
48 Int_t GetNParticles() const {return fNParticles;}
49 const TClonesArray* GetParticles() const {return fParticles;}
50 Float_t GetVertexX() const {return fVertexX;}
51 Float_t GetVertexY() const {return fVertexY;}
52 Float_t GetVertexZ() const {return fVertexZ;}
53
04a02430 54 Int_t Trials() const {return fTrials;}
55 Int_t NTriggerJets() const {return fNJets;}
56 Int_t NUQTriggerJets() const {return fNUQJets;}
57 void TriggerJet(Int_t i, Float_t p[4]) const;
58 void UQJet(Int_t i, Float_t p[4]) const;
9e431626 59 void TriggerJet(Int_t i, Float_t &p1, Float_t &p2, Float_t &p3, Float_t &E) const;
60 void UQJet(Int_t i, Float_t &p1, Float_t &p2, Float_t &p3, Float_t &E) const;
61 void Hard(Int_t i, Float_t &p1, Float_t &p2, Float_t &p3, Float_t &E, Float_t &type) const;
3bf434de 62 void Hard(Int_t i, Float_t p[4], Float_t &type) const;
04a02430 63 Double_t GetXJet() const {return fXJet;}
64 Double_t GetYJet() const {return fYJet;}
65 void GetZQuench(Double_t z[4]) const;
962f5fc0 66 TString GetHeader() const {return fHeader;}
04a02430 67
3bf434de 68 Float_t GetImpact() const {return fImpact;}
69 Int_t GetNhard() const {return fNHardScatters;}
70 Int_t GetNpart() const {return fNwNwColl;}
71
04a02430 72 void SetXYJet(Double_t x, Double_t y);
73 void SetZQuench(Double_t z[4]);
74 void SetTrials(Int_t trials) {fTrials = trials;}
75 void AddJet(Float_t px, Float_t py, Float_t pz, Float_t e);
76 void AddUQJet(Float_t px, Float_t py, Float_t pz, Float_t e);
77 void AddJet(Float_t p[4]);
78 void AddUQJet(Float_t p[4]);
9e431626 79 void AddHard(Int_t i,Float_t px, Float_t py, Float_t pz, Float_t e, Float_t type);
04a02430 80
3bf434de 81 void SetImpact(Float_t b){fImpact=b;}
82 void SetNhard(Int_t n){fNHardScatters=n;}
83 void SetNpart(Int_t n){fNwNwColl=n;}
84
85 void Print(Option_t *t="") const;
d7c6ab14 86
87 protected:
88 TString fHeader; // event description
89 Int_t fNParticles; // number of particles read
90 TClonesArray *fParticles; //-> particles in event
91
04a02430 92 Float_t fVertexX; // vertex x
93 Float_t fVertexY; // vertex y
94 Float_t fVertexZ; // vertex z
95
96 Int_t fTrials; // Number of trials to fulfill trigger condition
97 Int_t fNJets; // Number of triggered jets
98 Int_t fNUQJets; // Number of unquenched
99 Double_t fXJet; // Jet production point (x)
100 Double_t fYJet; // Jet production point (y)
101 Float_t fJets[4][10]; // Trigger jets
102 Float_t fUQJets[4][10]; // Unquenched trigger jets
9e431626 103 Float_t fHard[5][2]; // Hard partons
04a02430 104 Double_t fZquench[4]; // Quenching fraction
d7c6ab14 105
3bf434de 106 Float_t fImpact; // impact parameter
107 Int_t fNHardScatters; // number of hard scatterings
108 Int_t fNwNwColl; // number of Nwounded-Nwounded collisions
109
110 ClassDef(AliJetEventParticles,5) //class AliJetEventParticles
d7c6ab14 111};
112#endif