]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSJet.h
1419fe3a805ed17484374f8478d02356e27a395e
[u/mrichter/AliRoot.git] / PHOS / AliPHOSJet.h
1 #ifndef ALIPHOSJET_H
2 #define ALIPHOSJET_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 //  Base Class for Jets in ALICE
10 //                  
11 //*-- Author: D.Peressounko
12
13
14 // --- ROOT system ---
15 #include "TObject.h"
16 class TParticle ;
17 #include "TArrayI.h"
18
19 // --- Standard library ---
20
21 // --- AliRoot header files ---
22
23 class AliPHOSJet : public TObject {
24
25 public:
26   AliPHOSJet() ;          // ctor
27   AliPHOSJet(const AliPHOSJet & jet) {
28     // copy ctor: no implementation yet
29     Fatal("cpy ctor", "not implemented") ;
30   }
31   virtual ~AliPHOSJet() ; 
32
33   void AddDigit(const Double_t e,const Double_t eta,const Double_t phi,const Int_t index) ;
34   void AddParticle(const TParticle * p,const Int_t index) ;
35   //adds particle p to jet. index: index of p in list of all particles in event
36
37   Double_t DistanceToJet(const TParticle *p)const ;
38   //calculates distance to Jet in accordance with some scheam: 
39   //geometrical, inv mass, etc
40
41   void CalculateAll(void) ;
42   //calculate final Energy, Eta & phi from intermediate ones.
43
44   const Int_t * Indexs(Int_t & nIndexs)const{nIndexs = fNpart; return fList->GetArray() ;}
45
46   Bool_t IsInCone(const TParticle * p)const ;
47   Bool_t IsInCone(const Double_t e,const Double_t eta,const Double_t phi)const ;
48   Bool_t AcceptConeDeviation(const TParticle *p)const ;
49   Bool_t AcceptConeDeviation(const Double_t e,const Double_t eta,const Double_t phi)const ;
50
51   void SetConeRadius(Double_t r){fConeRad = r ;} ;
52   void SetMaxConeMove(Double_t max = 0.15){fMaxConeMove = max ;} ;
53   void SetMinConeMove(Double_t min = 0.05){fMinConeMove = min ;} ;
54
55   Double_t Energy(void)const{if(fEnergy) return fEnergy ;
56                         else return fSumEnergy ;}
57   Double_t Eta(void)const{if(fEta) return fEta; 
58                           else return fSumEta/fSumEnergy ;}
59   Double_t Phi(void)const{if(fPhi) return fPhi; 
60                           else return fSumPhi/fSumEnergy ;}
61   Int_t GetNJetParticles(void)const{return fNpart;}
62
63   void Print(Option_t * option="") ;
64   AliPHOSJet & operator = (const AliPHOSJet & rvalue)  {
65     // assignement operator requested by coding convention but not needed
66     Fatal("operator =", "not implemented") ; return *this ; 
67   }
68
69 private:
70   Int_t      fNpart ;     //Number of particles in jet
71   TArrayI *  fList ;      //Indexes of particles in list
72
73   Double_t   fConeRad ; // Cone radius 
74   Double_t   fMaxConeMove ;// Maximum Cone movement
75   Double_t   fMinConeMove ;// Minimum Cone movement 
76   Double_t   fSumEnergy ; //! Intermediate energy
77   Double_t   fSumEta ;    //! Intermediate eta
78   Double_t   fSumPhi ;    //! Intermediate phi
79   Double_t   fEnergy ;    //Energy of the jet
80   Double_t   fEta ;       //Eta directtion of the jet
81   Double_t   fPhi ;       //Phi direction of the jet
82   Double_t   fLEnergy ;    //Energy of Leading particle of jet
83   Double_t   fLEta ;       //Eta directtion of Leading particle of the jet
84   Double_t   fLPhi ;       //Phi direction of leading particles of the jet
85
86   ClassDef(AliPHOSJet,1)  // description 
87
88 };
89
90 //////////////////////////////////////////////////////
91
92 #endif // ALIPHOSJET_H
93
94
95
96
97