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