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 */
8 //-------------------------------------------------------------------------
9 // AOD calorimeter cluster class (for PHOS and EMCAL)
10 // Author: Markus Oldenburg, CERN,
11 // Gustavo Conesa, INFN
12 //-------------------------------------------------------------------------
14 #include "AliAODCluster.h"
16 #include <TRefArray.h>
21 class AliAODCaloCluster : public AliAODCluster {
26 AliAODCaloCluster(Int_t id,
35 AliAODCaloCluster(Int_t id,
44 virtual ~AliAODCaloCluster();
45 AliAODCaloCluster(const AliAODCaloCluster& clus);
46 AliAODCaloCluster& operator=(const AliAODCaloCluster& clus);
47 void Clear(const Option_t*);
50 Double_t GetDistanceToBadChannel() const { return fDistToBadChannel; }
51 Double_t GetDispersion() const { return fDispersion; }
52 Double_t GetM20() const { return fM20; }
53 Double_t GetM02() const { return fM02; }
54 Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
55 UChar_t GetNExMax() const { return fNExMax; }
56 Double_t GetTOF() const { return fTOF; }
58 Int_t GetNTracksMatched() const { return fTracksMatched.GetEntriesFast(); }
59 TObject *GetTrackMatched(Int_t i) const { return fTracksMatched.At(i); }
61 void SetNCells(Int_t n) { fNCells = n;}
62 Int_t GetNCells() const { return fNCells;}
64 void SetCellsAbsId(UShort_t *array);
65 UShort_t *GetCellsAbsId() {return fCellsAbsId;}
67 void SetCellsAmplitudeFraction(Double32_t *array);
68 Double32_t *GetCellsAmplitudeFraction() {return fCellsAmpFraction;}
70 Int_t GetCellAbsId(Int_t i) const {
71 if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i];
74 Double_t GetCellAmplitudeFraction(Int_t i) const {
75 if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];
78 //Not defined yet in AODs, put a large number the track is not matched.
79 Double_t GetTrackDx(void)const {return 10000. ;}
80 Double_t GetTrackDz(void)const {return 10000. ;}
83 void SetDistanceToBadChannel(Double_t dist) { fDistToBadChannel = dist; }
84 void SetDispersion(Double_t disp) { fDispersion = disp; }
85 void SetM20(Double_t m20) { fM20 = m20; }
86 void SetM02(Double_t m02) { fM02 = m02; }
87 void SetEmcCpvDistance(Double_t emcCpvDist) { fEmcCpvDistance = emcCpvDist; }
88 void SetNExMax(UChar_t nExMax) { fNExMax = nExMax; }
89 void SetTOF(Double_t tof) { fTOF = tof; }
90 void SetTrackDistance(Double_t, Double_t ){ ; }
92 void SetCaloCluster(Double_t dist = -999.,
96 Double_t emcCpvDist = -999.,
100 fDistToBadChannel = dist;
104 fEmcCpvDistance = emcCpvDist;
109 void GetMomentum(TLorentzVector& p, Double_t * vertexPosition );
111 void AddTrackMatched(TObject *trk) {
112 //Make sure we attach the object to correct process number
113 if(fTracksMatched.GetEntries()==0) { TRefArray ref(TProcessID::GetProcessWithUID(trk)) ; fTracksMatched = ref ; }
114 fTracksMatched.Add(trk) ; }
116 void RemoveTrackMatched(TObject *trk) { fTracksMatched.Remove(trk); }
117 Bool_t HasTrackMatched(TObject *trk) const;
121 Double32_t fDistToBadChannel; // Distance to nearest bad channel
122 Double32_t fDispersion; // cluster dispersion, for shape analysis
123 Double32_t fM20; // 2-nd moment along the main eigen axis
124 Double32_t fM02; // 2-nd moment along the second eigen axis
125 Double32_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point
126 UShort_t fNExMax; // number of (Ex-)maxima before unfolding
127 Double32_t fTOF; ////[0,0,12] time-of-flight
129 TRefArray fTracksMatched; // references to tracks close to cluster. First entry is the most likely match.
132 UShort_t *fCellsAbsId; //[fNCells] array of cell absId numbers
133 Double32_t *fCellsAmpFraction; //[fNCells][0.,1.,16] array with cell amplitudes fraction.
135 ClassDef(AliAODCaloCluster,6);