Fixing memory leak (L.Gaudichet)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRecPoint.h
CommitLineData
ab48128d 1#ifndef ALIEMCALRECPOINT_H
2#define ALIEMCALRECPOINT_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5//_________________________________________________________________________
6// Base Class for EMCAL Reconstructed Points
7// A recpoint being equivalent to a cluster in encal terminology
d64c959b 8//*-- Author: Yves Schutz (SUBATECH)
70a93198 9//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
10//*-- Author: Heather Gray (LBL): merged AliEMCALRecPoint and AliEMCALTowerRecPoint 02/04
ab48128d 11
12// --- ROOT system ---
70a93198 13class TVector3 ;
ab48128d 14
ab48128d 15// --- Standard library ---
16
17// --- AliRoot header files ---
18
19#include "AliRecPoint.h"
20#include "AliEMCALDigit.h"
21
a5c60732 22class AliEMCALGeometry;
23
ab48128d 24class AliEMCALRecPoint : public AliRecPoint {
25
26 public:
27
28 typedef TObjArray RecPointsList ;
29
30 AliEMCALRecPoint() ; // ctor
31 AliEMCALRecPoint(const char * opt) ; // ctor
d64c959b 32 AliEMCALRecPoint(const AliEMCALRecPoint & rp):AliRecPoint(rp) { Fatal("cpy ctor", "not implemented") ; }
ab48128d 33
70a93198 34 virtual ~AliEMCALRecPoint();
35 virtual void AddDigit(AliDigitNew &){ Fatal("AddDigit", "use AddDigit(AliEMCALDigit & digit, Float_t Energy )") ; }
36 virtual void AddDigit(AliEMCALDigit & digit, Float_t Energy);
37 virtual Int_t Compare(const TObject * obj) const;
ab48128d 38 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
39 virtual void Draw(Option_t * option="") ;
9e5d2067 40 virtual void ExecuteEvent(Int_t event, Int_t, Int_t) ;
70a93198 41
85c60a8e 42 virtual void SetClusterType(Int_t ver) { fClusterType = ver; }
43 virtual Int_t GetClusterType() const { return fClusterType; }
44
70a93198 45 virtual void EvalAll(Float_t logWeight, TClonesArray * digits);
46 virtual void EvalLocalPosition(Float_t logWeight, TClonesArray * digits) ;
e52475ed 47 // void EvalLocalPositionSimple(TClonesArray *digits); // ??
70a93198 48 virtual void EvalPrimaries(TClonesArray * digits) ;
87cdc3be 49 virtual void EvalParents(TClonesArray * digits) ;
70a93198 50
4800667c 51 using AliRecPoint::GetGlobalPosition;
70a93198 52 virtual void GetGlobalPosition(TVector3 & gpos) const; // return global position (x, y, z) in ALICE
e52475ed 53 virtual void GetLocalPosition(TVector3 & lpos) const; // return local position (x, y, z) in EMCAL SM
ab48128d 54 virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ;
55 return fTracksList ; }
e52475ed 56 virtual Int_t * GetParents(Int_t & number) const {number = fMulParent ;
87cdc3be 57 return fParentsList ; }
70a93198 58 Float_t GetCoreEnergy()const {return fCoreEnergy ;}
59 virtual Float_t GetDispersion()const {return fDispersion ;}
60 virtual void GetElipsAxis(Float_t * lambda)const {lambda[0] = fLambda[0]; lambda[1] = fLambda[1];};
61
62 Float_t * GetEnergiesList() const {return fEnergyList ;} // gets the list of energies making this recpoint
85c60a8e 63 Float_t * GetTimeList() const {return fTimeList ;} // gets the list of digit times in this recpoint
70a93198 64 Float_t GetMaximalEnergy(void) const ; // get the highest energy in the cluster
65 Int_t GetMaximumMultiplicity() const {return fMaxDigit ;} // gets the maximum number of digits allowed
66 Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
67 Int_t GetMultiplicityAtLevel(Float_t level) const ; // computes multiplicity of digits with
e52475ed 68 Int_t * GetAbsId() const {return fAbsIdList;}
69 Int_t GetAbsId(int i) const {if(i>=0 && i<fMulDigit)return fAbsIdList[i]; else return -1;}
70 // energy above relative level
70a93198 71 virtual Int_t GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
72 Float_t locMaxCut,TClonesArray * digits ) const ;
73 // searches for the local maxima
4635df1f 74
75 Int_t GetPrimaryIndex() const ;
70a93198 76 Float_t GetTime(void) const{return fTime ; }
77
7ee5c5be 78 virtual Bool_t IsEmc(void)const { return kTRUE ; }
ab48128d 79 virtual Bool_t IsSortable() const {
80 // tells that this is a sortable object
81 return kTRUE ;
82 }
83 virtual void Paint(Option_t * option="");
5dee926e 84 virtual void Print(Option_t * option="") const ;
7ee5c5be 85
ab48128d 86 AliEMCALRecPoint & operator = (const AliEMCALRecPoint & ) {
d64c959b 87 Fatal("operator =", "not implemented") ;
ab48128d 88 return *this ;
89 }
90
85c60a8e 91 enum RecPointType {kPseudoCluster, kClusterv1};
92
ab48128d 93protected:
70a93198 94 void EvalCoreEnergy(Float_t logWeight,TClonesArray * digits) ;
95 virtual void EvalDispersion(Float_t logWeight,TClonesArray * digits) ; // computes the dispersion of the shower
96 virtual void EvalElipsAxis(Float_t logWeight, TClonesArray * digits ); // computes the axis of shower ellipsoide
97 void EvalTime( TClonesArray * digits );
98 virtual Bool_t AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const;
99 Float_t ThetaToEta(Float_t arg) const; //Converts Theta (Radians) to Eta(Radians)
100 Float_t EtaToTheta(Float_t arg) const; //Converts Eta (Radians) to Theta(Radians)
101
85c60a8e 102private:
a5c60732 103 AliEMCALGeometry* fGeom; //! Pointer to geometry for utilities
104
85c60a8e 105 Int_t fClusterType; // type of cluster stored:
106 // pseudocluster or v1
70a93198 107 Float_t fCoreEnergy ; // energy in a shower core
108 Float_t fLambda[2] ; // shower ellipse axes
85c60a8e 109 Float_t fDispersion ; // shower dispersio
70a93198 110 Float_t *fEnergyList ; //[fMulDigit] energy of digits
85c60a8e 111 Float_t *fTimeList ; //[fMulDigit] time of digits
e52475ed 112 Int_t *fAbsIdList; //[fMulDigit] absId of digits
70a93198 113 Float_t fTime ; // Time of the digit with maximal energy deposition
114 Float_t fCoreRadius; // The radius in which the core energy is evaluated
87cdc3be 115 Int_t fMulParent; // Multiplicity of the parents
116 Int_t fMaxParent; // Maximum number of parents allowed
73f2fed2 117 Int_t * fParentsList; // [fMulParent] list of the parents of the digits
e52475ed 118 Int_t fSuperModuleNumber; //
a5c60732 119
e52475ed 120 ClassDef(AliEMCALRecPoint,7) // RecPoint for EMCAL (Base Class)
ab48128d 121
122};
123
124#endif // AliEMCALRECPOINT_H