]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliAODCaloCluster.h
Obsolete data member removed.
[u/mrichter/AliRoot.git] / STEER / AliAODCaloCluster.h
1 #ifndef AliAODCaloCluster_H
2 #define AliAODCaloCluster_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //-------------------------------------------------------------------------
9 //     AOD calorimeter cluster class (for PHOS and EMCAL)
10 //     Author: Markus Oldenburg, CERN, 
11 //             Gustavo Conesa, INFN
12 //-------------------------------------------------------------------------
13
14 #include "AliAODCluster.h"
15
16 #include <TRefArray.h>
17 #include <TArrayS.h>
18
19 class AliAODCaloCluster : public AliAODCluster {
20
21  public:
22   
23   AliAODCaloCluster();
24   AliAODCaloCluster(Int_t id,
25                     UInt_t nLabel,
26                     Int_t *label,
27                     Double_t energy,
28                     Double_t x[3],
29                     Double_t pid[9],
30                     Char_t ttype=kUndef,
31                     UInt_t selectInfo=0);
32   
33   AliAODCaloCluster(Int_t id,
34                     UInt_t nLabel,
35                     Int_t *label,
36                     Float_t energy,
37                     Float_t x[3],
38                     Float_t pid[9],
39                     Char_t ttype=kUndef,
40                     UInt_t selectInfo=0);
41   
42   virtual ~AliAODCaloCluster();
43   AliAODCaloCluster(const AliAODCaloCluster& clus); 
44   AliAODCaloCluster& operator=(const AliAODCaloCluster& clus);
45
46   
47   // getters
48   Double_t GetDistToBadChannel() const { return fDistToBadChannel; }
49   Double_t GetDispersion() const { return fDispersion; }
50   Double_t GetM20() const { return fM20; }
51   Double_t GetM02() const { return fM02; }
52   Double_t GetM11() const { return fM11; }
53   Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
54   UShort_t GetNExMax() const { return fNExMax; }
55
56   Int_t    GetNTracksMatched() const { return fTracksMatched.GetEntriesFast(); }
57   TObject *GetTrackMatched(Int_t i) const { return fTracksMatched.At(i); }
58  
59   void SetNCells(Int_t n) { fNCells = n;}
60   Double_t GetNCells() const   { return fNCells;}
61   
62   void SetCellsAbsId(UShort_t *array) { fCellsAbsId = array; }
63   UShort_t *GetCellsAbsId() {return  fCellsAbsId;}
64   
65   void SetCellsAmplitudeFraction(Double32_t *array) { fCellsAmpFraction = array; }
66   Double32_t *GetCellsAmplitudeFraction() {return  fCellsAmpFraction;}
67   
68   Int_t GetCellAbsId(Int_t i) const {  
69     if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i];    
70     else return -1;}
71   
72   Double_t GetCellAmplitudeFraction(Int_t i) const {  
73     if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];    
74     else return -1;}
75
76   // setters
77   void SetDistToBadChannel(Double_t dist) { fDistToBadChannel = dist; }
78   void SetDispersion(Double_t disp) { fDispersion = disp; }
79   void SetM20(Double_t m20) { fM20 = m20; }
80   void SetM02(Double_t m02) { fM02 = m02; }
81   void SetM11(Double_t m11) { fM11 = m11; }
82   void SetEmcCpvDistance(Double_t emcCpvDist) { fEmcCpvDistance = emcCpvDist; }
83   void SetNExMax(UShort_t nExMax) { fNExMax = nExMax; }
84
85   void SetCaloCluster(Double_t dist = -999., 
86                       Double_t disp = -1., 
87                       Double_t m20 = 0., 
88                       Double_t m02 = 0., 
89                       Double_t m11 = 0., 
90                       Double_t emcCpvDist = -999., 
91                       UShort_t nExMax = 0) 
92   {
93     fDistToBadChannel = dist;
94     fDispersion = disp;
95     fM20 = m20;
96     fM02 = m02;
97     fM11 = m11;
98     fEmcCpvDistance = emcCpvDist;
99     fNExMax = nExMax;
100   }
101
102   void AddTrackMatched(TObject *trk) { fTracksMatched.Add(trk); }
103   void RemoveTrackMatched(TObject *trk) { fTracksMatched.Remove(trk); }
104   Bool_t HasTrackMatched(TObject *trk) const;
105
106  private :
107
108   Double32_t   fDistToBadChannel; // Distance to nearest bad channel
109   Double32_t   fDispersion;       // cluster dispersion, for shape analysis
110   Double32_t   fM20;              // 2-nd moment along the main eigen axis
111   Double32_t   fM02;              // 2-nd moment along the second eigen axis
112   Double32_t   fM11;              // 2-nd mixed moment Mxy
113   Double32_t   fEmcCpvDistance;   // the distance from PHOS EMC rec.point to the closest CPV rec.point
114   UShort_t     fNExMax;           // number of (Ex-)maxima before unfolding
115
116   TRefArray    fTracksMatched;    // references to tracks close to cluster. First entry is the most likely match.
117
118   Int_t       fNCells ;
119   UShort_t   *fCellsAbsId;        //[fNCells] array of cell absId numbers
120   Double32_t *fCellsAmpFraction;  //[fNCells][0.,1.,16] array with cell amplitudes fraction.
121
122   ClassDef(AliAODCaloCluster,3);
123 };
124
125 #endif