]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALRecPoint.h
New PWG library
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRecPoint.h
CommitLineData
ab48128d 1#ifndef ALIEMCALRECPOINT_H
2#define ALIEMCALRECPOINT_H
801f6c04 3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
ab48128d 4 * See cxx source for full Copyright notice */
5//_________________________________________________________________________
6// Base Class for EMCAL Reconstructed Points
40164976 7// A recpoint being equivalent to a cluster in EMCAL terminology
8//
9//
d64c959b 10//*-- Author: Yves Schutz (SUBATECH)
70a93198 11//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
12//*-- Author: Heather Gray (LBL): merged AliEMCALRecPoint and AliEMCALTowerRecPoint 02/04
ab48128d 13
14// --- ROOT system ---
9aa6a5f6 15#include <TVector3.h>
37890aaf 16class TGeoManager;
17class TGeoPhysicalNode;
18class TPad;
19class TPaveText;
20class TGraph;
21class Riostream;
ab48128d 22// --- Standard library ---
23
24// --- AliRoot header files ---
25
9aa6a5f6 26#include "AliCluster.h"
1d59832c 27class AliEMCALDigit;
9aa6a5f6 28class AliDigitNew;
a5c60732 29class AliEMCALGeometry;
40164976 30class AliEMCALHit;
31class AliCaloCalibPedestal;
a5c60732 32
9aa6a5f6 33class AliEMCALRecPoint : public AliCluster {
ab48128d 34
35 public:
36
37 typedef TObjArray RecPointsList ;
38
39 AliEMCALRecPoint() ; // ctor
40 AliEMCALRecPoint(const char * opt) ; // ctor
0a4cb131 41 AliEMCALRecPoint(const AliEMCALRecPoint & rp);
9aa6a5f6 42
43 AliEMCALRecPoint& operator= (const AliEMCALRecPoint &rp);
44
70a93198 45 virtual ~AliEMCALRecPoint();
9aa6a5f6 46
37890aaf 47 virtual void AddDigit(AliDigitNew &) const {
9aa6a5f6 48 Fatal("AddDigit", "use AddDigit(AliEMCALDigit & digit, Float_t Energy )") ;
49 }
25bb3dcb 50 virtual void AddDigit(AliEMCALDigit & digit, Float_t Energy, Bool_t shared);
51 virtual Int_t Compare(const TObject * obj) const;
52 //virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);//Not used, remove?
ab48128d 53 virtual void Draw(Option_t * option="") ;
25bb3dcb 54 //virtual void ExecuteEvent(Int_t event, Int_t, Int_t) ;//Not used, remove?
70a93198 55
85c60a8e 56 virtual void SetClusterType(Int_t ver) { fClusterType = ver; }
57 virtual Int_t GetClusterType() const { return fClusterType; }
58
70a93198 59 virtual void EvalAll(Float_t logWeight, TClonesArray * digits);
25bb3dcb 60 virtual void EvalLocalPosition (Float_t logWeight, TClonesArray * digits);
61 virtual void EvalGlobalPosition(Float_t logWeight, TClonesArray * digits);
62
70a93198 63 virtual void EvalPrimaries(TClonesArray * digits) ;
87cdc3be 64 virtual void EvalParents(TClonesArray * digits) ;
70a93198 65
9aa6a5f6 66 virtual int * GetDigitsList(void) const { return fDigitsList ; }
67 virtual Float_t GetEnergy() const {return fAmp; }
68
69 void EvalLocal2TrackingCSTransform();
1ae500a2 70 void EvalLocalPositionFit(Double_t deff, Double_t w0, Double_t phiSlope,TClonesArray * digits);
71 Bool_t EvalLocalPosition2(TClonesArray *digits, TArrayD &ed);
72
25bb3dcb 73 Bool_t EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0,
1ae500a2 74 TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
25bb3dcb 75 Bool_t EvalLocalPositionFromDigits(TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
1ae500a2 76 static void GetDeffW0(const Double_t esum, Double_t &deff, Double_t &w0);
77
7cfcebd3 78 //virtual void GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const; // return global position (x, y, z) in ALICE
70a93198 79 virtual void GetGlobalPosition(TVector3 & gpos) const; // return global position (x, y, z) in ALICE
25bb3dcb 80 virtual void GetLocalPosition(TVector3 & lpos) const; // return local position (x, y, z) in EMCAL SM
ab48128d 81 virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ;
82 return fTracksList ; }
25bb3dcb 83 virtual Int_t * GetParents(Int_t & number) const {number = fMulParent ;
87cdc3be 84 return fParentsList ; }
9aa6a5f6 85
25bb3dcb 86 virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
87 Int_t GetIndexInList() const { return fIndexInList ; }
9aa6a5f6 88
70a93198 89 Float_t GetCoreEnergy()const {return fCoreEnergy ;}
90 virtual Float_t GetDispersion()const {return fDispersion ;}
91 virtual void GetElipsAxis(Float_t * lambda)const {lambda[0] = fLambda[0]; lambda[1] = fLambda[1];};
92
93 Float_t * GetEnergiesList() const {return fEnergyList ;} // gets the list of energies making this recpoint
1d46d1f6 94 Double_t GetPointEnergy() const; // gets point energy (sum of energy list)
25bb3dcb 95 Float_t * GetTimeList() const {return fTimeList ;} // gets the list of digit times in this recpoint
70a93198 96 Float_t GetMaximalEnergy(void) const ; // get the highest energy in the cluster
25bb3dcb 97 Int_t GetMaximalEnergyIndex(void) const ; // get the index of highest energy digit
70a93198 98 Int_t GetMaximumMultiplicity() const {return fMaxDigit ;} // gets the maximum number of digits allowed
99 Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
25bb3dcb 100 Int_t GetMultiplicityAtLevel(Float_t level) const ; // computes multiplicity of digits with
e52475ed 101 Int_t * GetAbsId() const {return fAbsIdList;}
25bb3dcb 102 Int_t GetAbsId(Int_t i) const {if(i>=0 && i<fMulDigit)return fAbsIdList[i]; else return -1;}
37890aaf 103 Int_t GetAbsIdMaxDigit() const {return GetAbsId(fDigitIndMax);}
104 Int_t GetIndMaxDigit() const {return fDigitIndMax;}
1ae500a2 105 void SetIndMaxDigit(const Int_t ind) {fDigitIndMax = ind;}
40164976 106 void SetIndexInList(Int_t val) { fIndexInList = val ; }
9aa6a5f6 107
108 virtual Int_t GetSuperModuleNumber(void) const { return fSuperModuleNumber;}
109
e52475ed 110 // energy above relative level
70a93198 111 virtual Int_t GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
112 Float_t locMaxCut,TClonesArray * digits ) const ;
113 // searches for the local maxima
225cd96d 114 // Number of local maxima found in cluster in unfolding:
115 // 0: no unfolding
116 //-1: unfolding failed
25bb3dcb 117 Short_t GetNExMax(void) const { return fNExMax ;} // Number of maxima found in cluster in unfolding
118 void SetNExMax(Int_t nmax=1) {fNExMax = static_cast<Short_t>(nmax) ;}
119
120 Int_t GetPrimaryIndex() const ;
121
122 Float_t GetTime(void) const { return fTime ; }
123
124 Bool_t SharedCluster(void) const { return fSharedCluster ; }
2ebdefe6 125 void SetSharedCluster(Bool_t s){ fSharedCluster = s ; }
25bb3dcb 126
127 virtual Bool_t IsEmc(void) const { return kTRUE ; }
128 virtual Bool_t IsSortable() const {
ab48128d 129 // tells that this is a sortable object
130 return kTRUE ;
131 }
132 virtual void Paint(Option_t * option="");
5dee926e 133 virtual void Print(Option_t * option="") const ;
7ee5c5be 134
1ae500a2 135 static Double_t TmaxInCm(const Double_t e=0.0, const Int_t key=0);
ab48128d 136
40164976 137 Float_t GetDistanceToBadTower() const {return fDistToBadTower;}
138 void EvalDistanceToBadChannels(AliCaloCalibPedestal* caloped);
139
ab48128d 140protected:
40164976 141 void EvalCoreEnergy(Float_t logWeight,TClonesArray * digits) ;
70a93198 142 virtual void EvalDispersion(Float_t logWeight,TClonesArray * digits) ; // computes the dispersion of the shower
143 virtual void EvalElipsAxis(Float_t logWeight, TClonesArray * digits ); // computes the axis of shower ellipsoide
40164976 144 void EvalTime( TClonesArray * digits );
70a93198 145 virtual Bool_t AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const;
146 Float_t ThetaToEta(Float_t arg) const; //Converts Theta (Radians) to Eta(Radians)
147 Float_t EtaToTheta(Float_t arg) const; //Converts Eta (Radians) to Theta(Radians)
148
85c60a8e 149private:
9aa6a5f6 150
151 //JLK do we need this?
40164976 152 AliEMCALGeometry* fGeomPtr; //! Pointer to geometry for utilities
153
154 Float_t fAmp ; // summed amplitude of digits
155 Int_t fIndexInList ; // the index of this RecPoint in the
156 // list stored in TreeR (to be set by analysis)
25bb3dcb 157 TVector3 fGlobPos ; // global position
158 TVector3 fLocPos ; // local position in the sub-detector coordinate
40164976 159 Int_t fMaxDigit ; //! max initial size of digits array (not saved)
160 Int_t fMulDigit ; // total multiplicity of digits
161 Int_t fMaxTrack ; //! max initial size of tracks array (not saved)
162 Int_t fMulTrack ; // total multiplicity of tracks
163 Int_t * fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed
164 Int_t * fTracksList ; //[fMulTrack] list of tracks to which the point was assigned
165
25bb3dcb 166 Int_t fClusterType; // type of cluster stored: v1
70a93198 167 Float_t fCoreEnergy ; // energy in a shower core
168 Float_t fLambda[2] ; // shower ellipse axes
1ae500a2 169 Float_t fDispersion ; // shower dispersion
70a93198 170 Float_t *fEnergyList ; //[fMulDigit] energy of digits
85c60a8e 171 Float_t *fTimeList ; //[fMulDigit] time of digits
40164976 172 Int_t *fAbsIdList; //[fMulDigit] absId of digits
70a93198 173 Float_t fTime ; // Time of the digit with maximal energy deposition
225cd96d 174 Short_t fNExMax ; // number of (Ex-)maxima before unfolding
70a93198 175 Float_t fCoreRadius; // The radius in which the core energy is evaluated
af5bdd85 176 Float_t *fDETracksList ; //[fMulTrack] list of tracks to which the point was assigned
177 Int_t fMulParent; // Multiplicity of the parents
40164976 178 Int_t fMaxParent; // Maximum number of parents allowed
179 Int_t * fParentsList; // [fMulParent] list of the parents of the digits
180 Float_t * fDEParentsList; // [fMulParent] list of the parents of the digits
25bb3dcb 181 Int_t fSuperModuleNumber; // number identifying supermodule containing recpoint, reference is cell with maximum energy.
40164976 182 Int_t fDigitIndMax; // Index of digit with max energy in array fAbsIdList
25bb3dcb 183 Float_t fDistToBadTower; // Distance to nearest bad tower
184 Bool_t fSharedCluster; // States if cluster is shared by 2 SuperModules in same phi rack (0,1), (2,3) ... (10,11).
185
40164976 186 ClassDef(AliEMCALRecPoint,12) // RecPoint for EMCAL (Base Class)
ab48128d 187
188};
189
190#endif // AliEMCALRECPOINT_H