AliRoot Core  edcc906 (edcc906)
AliEMCALRecPoint.h
Go to the documentation of this file.
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 
21 
22 // --- ROOT system ---
23 #include <TVector3.h>
24 class TGeoManager;
25 class TGeoPhysicalNode;
26 class TPad;
27 class TPaveText;
28 class TGraph;
29 class Riostream;
30 
31 // --- AliRoot header files ---
32 #include "AliCluster.h"
33 class AliEMCALDigit;
34 class AliDigitNew;
35 class AliEMCALGeometry;
36 class AliEMCALHit;
38 
40 {
41 
42  public:
43 
45 
46  AliEMCALRecPoint() ; // ctor
47  AliEMCALRecPoint(const char * opt) ; // ctor
49 
51 
52  virtual ~AliEMCALRecPoint();
53 
54  virtual void AddDigit(AliEMCALDigit & digit, const Float_t energy, const Bool_t shared);
55  virtual Int_t Compare(const TObject * obj) const;
56  virtual void Draw(Option_t * option="") ;
57 
58  virtual void SetClusterType(Int_t ver) { fClusterType = ver ; }
59  virtual Int_t GetClusterType() const { return fClusterType; }
60 
61  virtual void EvalAll (Float_t logWeight, TClonesArray * digits, const Bool_t justClusters);
62  virtual void EvalLocalPosition (Float_t logWeight, TClonesArray * digits);
63  virtual void EvalGlobalPosition(Float_t logWeight, TClonesArray * digits);
64 
65  virtual void EvalPrimaries(TClonesArray * digits) ;
66  virtual void EvalParents (TClonesArray * digits) ;
67 
69  void EvalLocalPositionFit(Double_t deff, Double_t w0, Double_t phiSlope,TClonesArray * digits);
70  Bool_t EvalLocalPosition2(TClonesArray *digits, TArrayD &ed);
71  Bool_t EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0,
72  TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
73  Bool_t EvalLocalPositionFromDigits(TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
74  static void GetDeffW0(const Double_t esum, Double_t &deff, Double_t &w0);
75 
76  virtual void GetGlobalPosition(TVector3 & gpos) const; // return global position (x, y, z) in ALICE
77  virtual void GetLocalPosition (TVector3 & lpos) const; // return local position (x, y, z) in EMCAL SM
78 
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 ; }
83  virtual Float_t * GetParentsDE() const { return fDEParentsList ; }
84 
85  virtual void SetParents (Int_t nParents, Int_t* parents) { // Needed in particular case in tender
86  fMulParent = nParents;
87  if(fParentsList) delete [] fParentsList ;
88  fParentsList = parents ; }
89 
90  virtual void SetParentsDE (Float_t* parentsde) { // Needed in particular case in tender
91  if(fDEParentsList) delete [] fDEParentsList ;
92  fDEParentsList = parentsde ; }
93 
94  virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
95  Int_t GetIndexInList() const { return fIndexInList ; }
96  virtual int * GetDigitsList(void) const { return fDigitsList ; }
97  virtual Float_t GetEnergy() const { return fAmp ; }
98  Float_t GetCoreEnergy() const { return fCoreEnergy ; }
99  virtual Float_t GetDispersion() const { return fDispersion ; }
100  virtual void GetElipsAxis(Float_t * lambda) const {lambda[0] = fLambda[0]; lambda[1] = fLambda[1];};
101  Float_t * GetEnergiesList() const { return fEnergyList ; } // gets the list of energies making this recpoint
102  Double_t GetPointEnergy() const; // gets point energy (sum of energy list)
103  Float_t GetMaximalEnergy(void) const ; // get the highest energy in the cluster
104  Int_t GetMaximalEnergyIndex(void) const ; // get the index of highest energy digit
105  Int_t GetMaximumMultiplicity() const { return fMaxDigit ; } // gets the maximum number of digits allowed
106  Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
107  Int_t GetMultiplicityAtLevel(Float_t level) const ; // computes multiplicity of digits with
108  Int_t * GetAbsId() const { return fAbsIdList ; }
109  Int_t GetAbsId(Int_t i) const { if(i>=0 && i<fMulDigit)
110  return fAbsIdList[i];
111  else return -1 ; }
112  Int_t GetAbsIdMaxDigit() const { return GetAbsId(fDigitIndMax) ; }
113  Int_t GetIndMaxDigit() const { return fDigitIndMax ; }
114  void SetIndMaxDigit(const Int_t ind) { fDigitIndMax = ind ; }
115  void SetIndexInList(Int_t val) { fIndexInList = val ; }
116 
117  virtual Int_t GetSuperModuleNumber(void) const { return fSuperModuleNumber;}
118 
119  // searches for the local maxima
120  // energy above relative level
121  virtual Int_t GetNumberOfLocalMax(Int_t nDigitMult,
122  Float_t locMaxCut,TClonesArray * digits ) const ;
123 
124  virtual Int_t GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
125  Float_t locMaxCut,TClonesArray * digits ) const ;
126 
131  Short_t GetNExMax(void) const { return fNExMax ; }
132  void SetNExMax(Int_t nmax=1) { fNExMax = static_cast<Short_t>(nmax) ;}
133 
134  Int_t GetPrimaryIndex() const ;
135 
136  Float_t GetTime(void) const { return fTime ; }
137 
138  Bool_t SharedCluster(void) const { return fSharedCluster ; }
139  void SetSharedCluster(Bool_t s) { fSharedCluster = s ; }
140 
141  virtual Bool_t IsEmc(void) const { return kTRUE ; }
142  virtual Bool_t IsSortable() const { return kTRUE ; }
143  virtual void Paint(Option_t * option="");
144  virtual void Print(Option_t * option="") const ;
145 
146  Double_t TmaxInCm(const Double_t e=0.0, const Int_t key=0);
147 
148  Float_t GetDistanceToBadTower() const {return fDistToBadTower;}
150 
151 protected:
152  void EvalCoreEnergy(Float_t logWeight, TClonesArray * digits) ;
153  virtual void EvalDispersion(Float_t logWeight, TClonesArray * digits) ; // computes the dispersion of the shower
154  virtual void EvalElipsAxis (Float_t logWeight, TClonesArray * digits ); // computes the axis of shower ellipsoide
155  void EvalTime( TClonesArray * digits );
156  virtual Bool_t AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const;
157  Float_t ThetaToEta(Float_t arg) const; //Converts Theta (Radians) to Eta(Radians)
158  Float_t EtaToTheta(Float_t arg) const; //Converts Eta (Radians) to Theta(Radians)
159 
160 private:
161 
163 
164  Float_t fAmp ;
165  Int_t fIndexInList ;
166 
167  TVector3 fGlobPos ;
168  TVector3 fLocPos ;
169 
170  Int_t fMaxDigit ;
171  Int_t fMulDigit ;
172  Int_t fMaxTrack ;
173  Int_t fMulTrack ;
174 
176  Int_t *fDigitsList ; //[fMulDigit]
177 
179  Int_t *fTracksList ; //[fMulTrack]
180 
181  Int_t fClusterType;
182  Float_t fCoreEnergy ;
183 
184  Float_t fLambda[2] ;
185  Float_t fDispersion ;
186 
188  Float_t *fEnergyList ; //[fMulDigit]
189 
191  Int_t *fAbsIdList; //[fMulDigit]
192 
193  Float_t fTime ;
194  Short_t fNExMax ;
195  Float_t fCoreRadius;
196 
198  Float_t *fDETracksList ; //[fMulTrack]
199 
200  Int_t fMulParent;
201  Int_t fMaxParent;
202 
204  Int_t *fParentsList; //[fMulParent]
205 
207  Float_t *fDEParentsList; //[fMulParent]
208 
210  Int_t fDigitIndMax;
211  Float_t fDistToBadTower;
212  Bool_t fSharedCluster;
213 
215  ClassDef(AliEMCALRecPoint,13) ;
217 
218 };
219 
220 #endif // AliEMCALRECPOINT_H
Bool_t EvalLocalPosition2(TClonesArray *digits, TArrayD &ed)
void EvalDistanceToBadChannels(AliCaloCalibPedestal *caloped)
virtual void EvalElipsAxis(Float_t logWeight, TClonesArray *digits)
virtual Int_t GetNumberOfLocalMax(Int_t nDigitMult, Float_t locMaxCut, TClonesArray *digits) const
Int_t fMaxTrack
! Max initial size of tracks array (not saved)
Int_t GetIndexInList() const
TObjArray RecPointsList
Float_t fAmp
Summed amplitude of digits.
Float_t * fDETracksList
List of tracks to which the point was assigned.
AliEMCALRecPoint & operator=(const AliEMCALRecPoint &rp)
Assignment operator.
Int_t fMaxParent
Maximum number of parents allowed.
Short_t fNExMax
Number of (Ex-)maxima before unfolding.
Int_t * fDigitsList
List of digit&#39;s indexes from which the point was reconstructed.
#define TObjArray
virtual Int_t GetSuperModuleNumber(void) const
virtual Float_t * GetParentsDE() const
Int_t fMulTrack
Total multiplicity of tracks.
virtual Float_t GetDispersion() const
Int_t GetAbsId(Int_t i) const
virtual void EvalDispersion(Float_t logWeight, TClonesArray *digits)
Float_t GetMaximalEnergy(void) const
Finds the maximum energy in the cluster.
virtual Int_t GetDigitsMultiplicity(void) const
TVector3 fGlobPos
Global position.
virtual void Paint(Option_t *option="")
Paint this ALiRecPoint as a TMarker with its current attributes.
Float_t fDistToBadTower
Distance to nearest bad tower.
Float_t GetCoreEnergy() const
virtual Float_t GetEnergy() const
Float_t fCoreRadius
The radius in which the core energy is evaluated.
virtual int * GetDigitsList(void) const
void EvalCoreEnergy(Float_t logWeight, TClonesArray *digits)
void SetIndMaxDigit(const Int_t ind)
Double_t TmaxInCm(const Double_t e=0.0, const Int_t key=0)
void EvalLocal2TrackingCSTransform()
EMCal digits object.
Definition: AliEMCALDigit.h:30
Float_t fLambda[2]
Shower ellipse axes.
Int_t GetMaximalEnergyIndex(void) const
Finds the maximum energy in the cluster.
Int_t fSuperModuleNumber
number identifying supermodule containing recpoint, reference is cell with maximum energy...
Short_t GetNExMax(void) const
virtual Bool_t AreNeighbours(AliEMCALDigit *digit1, AliEMCALDigit *digit2) const
Int_t GetMultiplicity(void) const
virtual void GetLocalPosition(TVector3 &lpos) const
virtual void Draw(Option_t *option="")
Draw this AliEMCALRecPoint with its current attributes.
Bool_t fSharedCluster
States if cluster is shared by 2 SuperModules in same phi rack (0,1), (2,3) ... (10,11).
Float_t fTime
Time of the digit with maximal energy deposition.
Int_t GetPrimaryIndex() const
EMCal hits object.
Definition: AliEMCALHit.h:24
Float_t ThetaToEta(Float_t arg) const
Converts Eta (Radians) to Theta (Radians)
virtual void EvalPrimaries(TClonesArray *digits)
Int_t * GetAbsId() const
virtual void AddDigit(AliEMCALDigit &digit, const Float_t energy, const Bool_t shared)
AliEMCALRecPoint()
Default constructor.
EMCal rec_points object.
Int_t GetMultiplicityAtLevel(Float_t level) const
Calculates the multiplicity of digits with energy larger than H*energy.
Float_t * fDEParentsList
List of the parents energy deposit of the digits.
Int_t * fAbsIdList
List with absId of digits.
Float_t * GetEnergiesList() const
Int_t fMaxDigit
! Max initial size of digits array (not saved)
Bool_t SharedCluster(void) const
Int_t GetAbsIdMaxDigit() const
virtual void EvalParents(TClonesArray *digits)
pedestal/bad map monitoring and calibration tools
virtual void SetParentsDE(Float_t *parentsde)
Float_t EtaToTheta(Float_t arg) const
Converts Theta (Radians) to Eta (Radians)
Float_t * fEnergyList
List with energy of digits.
Int_t fClusterType
Type of cluster stored: v1.
TVector3 fLocPos
Local position in the sub-detector coordinate.
Float_t fCoreEnergy
Energy in a shower core.
virtual Int_t Compare(const TObject *obj) const
Compares two RecPoints according to their position in the EMCAL modules.
Int_t * fTracksList
List of tracks to which the point was assigned.
virtual void GetGlobalPosition(TVector3 &gpos) const
virtual void Print(Option_t *option="") const
Print the list of digits belonging to the cluster.
virtual Int_t * GetParents(Int_t &number) const
void EvalTime(TClonesArray *digits)
Time is set to the time of the digit with the maximum energy.
virtual void SetParents(Int_t nParents, Int_t *parents)
Float_t fDispersion
Shower dispersion.
AliEMCALGeometry * fGeomPtr
! Pointer to geometry for utilities
Float_t GetDistanceToBadTower() const
virtual void EvalAll(Float_t logWeight, TClonesArray *digits, const Bool_t justClusters)
Evaluates cluster parameters: position, shower shape, primaries ...
virtual Int_t GetClusterType() const
void SetSharedCluster(Bool_t s)
Int_t GetMaximumMultiplicity() const
void EvalLocalPositionFit(Double_t deff, Double_t w0, Double_t phiSlope, TClonesArray *digits)
Evaluates local position of clusters in SM.
Int_t fDigitIndMax
Index of digit with max energy in array fAbsIdList.
Float_t GetTime(void) const
Int_t fIndexInList
The index of this RecPoint in the list stored in TreeR (to be set by analysis)
virtual Bool_t IsEmc(void) const
virtual void SetClusterType(Int_t ver)
Double_t GetPointEnergy() const
void SetNExMax(Int_t nmax=1)
void SetIndexInList(Int_t val)
virtual Bool_t IsSortable() const
virtual void EvalLocalPosition(Float_t logWeight, TClonesArray *digits)
Calculates the center of gravity in the local EMCAL-module coordinates.
virtual ~AliEMCALRecPoint()
Destructor.
Int_t GetIndMaxDigit() const
Int_t fMulDigit
Total multiplicity of digits.
Bool_t EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0, TClonesArray *digits, TArrayD &ed, TVector3 &locPos)
Evaluate position of digits in supermodule.
EMCal geometry, singleton.
virtual Int_t * GetPrimaries(Int_t &number) const
virtual void EvalGlobalPosition(Float_t logWeight, TClonesArray *digits)
Calculates the center of gravity in the global ALICE coordinates.
virtual void GetElipsAxis(Float_t *lambda) const
static void GetDeffW0(const Double_t esum, Double_t &deff, Double_t &w0)
Int_t * fParentsList
List of the parents index of the digits.
Int_t fMulParent
Multiplicity of the parents.