]> git.uio.no Git - u/mrichter/AliRoot.git/blob - JETAN/AliJetEventParticles.h
TOF library splitting and conversion of some printout messages in AliLog schema ...
[u/mrichter/AliRoot.git] / JETAN / AliJetEventParticles.h
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 <TString.h>
16
17 class TParticle;
18 class TClonesArray;
19 class AliJetParticle;
20
21 class 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   void Clear(Option_t *option="") {TObject::Clear(option);Reset();}
33   void Set(const AliJetEventParticles& source);
34   
35   //adds particle to the event
36   void AddParticle(AliJetParticle* p);  
37   void AddParticle(const AliJetParticle* p); 
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,
41                    Float_t pt, Float_t phi, Float_t eta);
42
43   void AddSignal(const AliJetEventParticles& source);
44
45   const AliJetParticle* GetParticle(Int_t n) const //gets particle without boundary check
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
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;
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;
62   void     Hard(Int_t i, Float_t p[4], Float_t &type) const;
63
64   void     AddJet(Float_t px, Float_t py, Float_t pz, Float_t e);
65   void     AddUQJet(Float_t px, Float_t py, Float_t pz, Float_t e);
66   void     AddJet(Float_t p[4]);
67   void     AddUQJet(Float_t p[4]);
68   void     AddHard(Int_t i,Float_t px, Float_t py, Float_t pz, Float_t e, Float_t type);
69
70   Double_t GetXJet() const {return fXJet;}
71   Double_t GetYJet() const {return fYJet;}    
72   void     GetZQuench(Double_t z[4]) const;
73   TString  GetHeader() const {return fHeader;}
74   Float_t  GetImpact()  const {return fImpact;}
75   Int_t    GetNhard()   const {return fNHardScatters;}
76   Int_t    GetNpart()   const {return fNwNwColl;}
77   Int_t    GetEventNr() const {return fEventNr;}
78
79   void     SetXYJet(Double_t x, Double_t y); 
80   void     SetZQuench(Double_t z[4]);
81   void     SetTrials(Int_t trials) {fTrials = trials;}
82
83   void     SetImpact(Float_t b){fImpact=b;}
84   void     SetNhard(Int_t n){fNHardScatters=n;}
85   void     SetNpart(Int_t n){fNwNwColl=n;}
86   void SetEventNr(Int_t n){fEventNr=n;}
87   void     Print(Option_t *t="") const;
88
89   protected:
90   TString fHeader;          //   event description
91   Int_t fNParticles;        //   number of particles read
92   TClonesArray *fParticles; //-> particles in event
93
94   Float_t fVertexX;         // vertex x
95   Float_t fVertexY;         // vertex y
96   Float_t fVertexZ;         // vertex z
97
98   Int_t    fTrials;         // Number of trials to fulfill trigger condition
99   Int_t    fNJets;          // Number of triggered jets
100   Int_t    fNUQJets;        // Number of unquenched
101   Double_t fXJet;           // Jet production point (x)
102   Double_t fYJet;           // Jet production point (y)
103   Float_t  fJets[4][10];    // Trigger jets
104   Float_t  fUQJets[4][10];  // Unquenched trigger jets
105   Float_t  fHard[5][2];     // Hard partons
106   Double_t fZquench[4];     // Quenching fraction
107
108   Float_t fImpact;          // impact parameter
109   Int_t   fNHardScatters;   // number of hard scatterings
110   Int_t   fNwNwColl;        // number of Nwounded-Nwounded collisions
111
112   Int_t fEventNr;           // simple counter to check event number
113
114   ClassDef(AliJetEventParticles,6) //class AliJetEventParticles
115 };
116 #endif