1 #ifndef ALIEMCALRECPOINT_H
2 #define ALIEMCALRECPOINT_H
3 /* Copyright(c) 1998-2007, 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 EMCAL terminology
10 //*-- Author: Yves Schutz (SUBATECH)
11 //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
12 //*-- Author: Heather Gray (LBL): merged AliEMCALRecPoint and AliEMCALTowerRecPoint 02/04
14 // --- ROOT system ---
17 class TGeoPhysicalNode;
22 // --- Standard library ---
24 // --- AliRoot header files ---
26 #include "AliCluster.h"
29 class AliEMCALGeometry;
31 class AliCaloCalibPedestal;
33 class AliEMCALRecPoint : public AliCluster {
37 typedef TObjArray RecPointsList ;
39 AliEMCALRecPoint() ; // ctor
40 AliEMCALRecPoint(const char * opt) ; // ctor
41 AliEMCALRecPoint(const AliEMCALRecPoint & rp);
43 AliEMCALRecPoint& operator= (const AliEMCALRecPoint &rp);
45 virtual ~AliEMCALRecPoint();
47 virtual void AddDigit(AliDigitNew &) const {
48 Fatal("AddDigit", "use AddDigit(AliEMCALDigit & digit, Float_t Energy )") ;
50 virtual void AddDigit(AliEMCALDigit & digit, Float_t Energy);
51 virtual Int_t Compare(const TObject * obj) const;
52 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
53 virtual void Draw(Option_t * option="") ;
54 virtual void ExecuteEvent(Int_t event, Int_t, Int_t) ;
56 virtual void SetClusterType(Int_t ver) { fClusterType = ver; }
57 virtual Int_t GetClusterType() const { return fClusterType; }
59 virtual void EvalAll(Float_t logWeight, TClonesArray * digits);
60 virtual void EvalLocalPosition(Float_t logWeight, TClonesArray * digits);
61 virtual void EvalPrimaries(TClonesArray * digits) ;
62 virtual void EvalParents(TClonesArray * digits) ;
64 virtual int * GetDigitsList(void) const { return fDigitsList ; }
65 virtual Float_t GetEnergy() const {return fAmp; }
67 void EvalLocal2TrackingCSTransform();
68 void EvalLocalPositionFit(Double_t deff, Double_t w0, Double_t phiSlope,TClonesArray * digits);
69 Bool_t EvalLocalPosition2(TClonesArray *digits, TArrayD &ed);
71 static Bool_t EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0,
72 TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
73 static Bool_t EvalLocalPositionFromDigits(TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
74 static void GetDeffW0(const Double_t esum, Double_t &deff, Double_t &w0);
76 virtual void GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const; // return global position (x, y, z) in ALICE
77 virtual void GetGlobalPosition(TVector3 & gpos) const; // return global position (x, y, z) in ALICE
78 virtual void GetLocalPosition(TVector3 & lpos) const; // return local position (x, y, z) in EMCAL SM
79 virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ;
80 return fTracksList ; }
81 virtual Int_t * GetParents(Int_t & number) const {number = fMulParent ;
82 return fParentsList ; }
84 virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
85 Int_t GetIndexInList() const { return fIndexInList ; }
87 Float_t GetCoreEnergy()const {return fCoreEnergy ;}
88 virtual Float_t GetDispersion()const {return fDispersion ;}
89 virtual void GetElipsAxis(Float_t * lambda)const {lambda[0] = fLambda[0]; lambda[1] = fLambda[1];};
91 Float_t * GetEnergiesList() const {return fEnergyList ;} // gets the list of energies making this recpoint
92 Double_t GetPointEnergy() const; // gets point energy (sum of energy list)
93 Float_t * GetTimeList() const {return fTimeList ;} // gets the list of digit times in this recpoint
94 Float_t GetMaximalEnergy(void) const ; // get the highest energy in the cluster
95 Int_t GetMaximumMultiplicity() const {return fMaxDigit ;} // gets the maximum number of digits allowed
96 Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
97 Int_t GetMultiplicityAtLevel(Float_t level) const ; // computes multiplicity of digits with
98 Int_t * GetAbsId() const {return fAbsIdList;}
99 Int_t GetAbsId(int i) const {if(i>=0 && i<fMulDigit)return fAbsIdList[i]; else return -1;}
100 Int_t GetAbsIdMaxDigit() const {return GetAbsId(fDigitIndMax);}
101 Int_t GetIndMaxDigit() const {return fDigitIndMax;}
102 void SetIndMaxDigit(const Int_t ind) {fDigitIndMax = ind;}
103 void SetIndexInList(Int_t val) { fIndexInList = val ; }
105 virtual Int_t GetSuperModuleNumber(void) const { return fSuperModuleNumber;}
107 // energy above relative level
108 virtual Int_t GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
109 Float_t locMaxCut,TClonesArray * digits ) const ;
110 // searches for the local maxima
111 // Number of local maxima found in cluster in unfolding:
113 //-1: unfolding failed
114 Short_t GetNExMax(void) const {return fNExMax ;} // Number of maxima found in cluster in unfolding
115 void SetNExMax(Int_t nmax=1){fNExMax = static_cast<Short_t>(nmax) ;}
116 Int_t GetPrimaryIndex() const ;
117 Float_t GetTime(void) const{return fTime ; }
119 virtual Bool_t IsEmc(void)const { return kTRUE ; }
120 virtual Bool_t IsSortable() const {
121 // tells that this is a sortable object
124 virtual void Paint(Option_t * option="");
125 virtual void Print(Option_t * option="") const ;
127 static Double_t TmaxInCm(const Double_t e=0.0, const Int_t key=0);
129 Float_t GetDistanceToBadTower() const {return fDistToBadTower;}
130 void EvalDistanceToBadChannels(AliCaloCalibPedestal* caloped);
133 void EvalCoreEnergy(Float_t logWeight,TClonesArray * digits) ;
134 virtual void EvalDispersion(Float_t logWeight,TClonesArray * digits) ; // computes the dispersion of the shower
135 virtual void EvalElipsAxis(Float_t logWeight, TClonesArray * digits ); // computes the axis of shower ellipsoide
136 void EvalTime( TClonesArray * digits );
137 virtual Bool_t AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const;
138 Float_t ThetaToEta(Float_t arg) const; //Converts Theta (Radians) to Eta(Radians)
139 Float_t EtaToTheta(Float_t arg) const; //Converts Eta (Radians) to Theta(Radians)
143 //JLK do we need this?
144 AliEMCALGeometry* fGeomPtr; //! Pointer to geometry for utilities
146 Float_t fAmp ; // summed amplitude of digits
147 Int_t fIndexInList ; // the index of this RecPoint in the
148 // list stored in TreeR (to be set by analysis)
149 TVector3 fLocPos ; // local position in the sub-detector coordinate
150 TMatrixF * fLocPosM ; // covariance matrix ;
151 Int_t fMaxDigit ; //! max initial size of digits array (not saved)
152 Int_t fMulDigit ; // total multiplicity of digits
153 Int_t fMaxTrack ; //! max initial size of tracks array (not saved)
154 Int_t fMulTrack ; // total multiplicity of tracks
155 Int_t * fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed
156 Int_t * fTracksList ; //[fMulTrack] list of tracks to which the point was assigned
158 Int_t fClusterType; // type of cluster stored: pseudocluster or v1
159 Float_t fCoreEnergy ; // energy in a shower core
160 Float_t fLambda[2] ; // shower ellipse axes
161 Float_t fDispersion ; // shower dispersion
162 Float_t *fEnergyList ; //[fMulDigit] energy of digits
163 Float_t *fTimeList ; //[fMulDigit] time of digits
164 Int_t *fAbsIdList; //[fMulDigit] absId of digits
165 Float_t fTime ; // Time of the digit with maximal energy deposition
166 Short_t fNExMax ; // number of (Ex-)maxima before unfolding
167 Float_t fCoreRadius; // The radius in which the core energy is evaluated
168 Float_t *fDETracksList ; //[fMulTrack] list of tracks to which the point was assigned
169 Int_t fMulParent; // Multiplicity of the parents
170 Int_t fMaxParent; // Maximum number of parents allowed
171 Int_t * fParentsList; // [fMulParent] list of the parents of the digits
172 Float_t * fDEParentsList; // [fMulParent] list of the parents of the digits
173 Int_t fSuperModuleNumber; // number identifying supermodule containing recpoint
175 Int_t fDigitIndMax; // Index of digit with max energy in array fAbsIdList
176 Float_t fDistToBadTower; // Distance to nearest bad tower
178 ClassDef(AliEMCALRecPoint,12) // RecPoint for EMCAL (Base Class)
182 #endif // AliEMCALRECPOINT_H