fTRDsignal is added to AliAODPid class (copied from AliESDtrack).
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODCaloCluster.h
CommitLineData
fa86343a 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
78902954 19class TLorentzVector;
20
fa86343a 21class AliAODCaloCluster : public AliAODCluster {
22
23 public:
24
25 AliAODCaloCluster();
26 AliAODCaloCluster(Int_t id,
27 UInt_t nLabel,
28 Int_t *label,
29 Double_t energy,
30 Double_t x[3],
83dd7da3 31 Double_t pid[13],
fa86343a 32 Char_t ttype=kUndef,
33 UInt_t selectInfo=0);
34
35 AliAODCaloCluster(Int_t id,
36 UInt_t nLabel,
37 Int_t *label,
38 Float_t energy,
39 Float_t x[3],
83dd7da3 40 Float_t pid[13],
fa86343a 41 Char_t ttype=kUndef,
42 UInt_t selectInfo=0);
43
44 virtual ~AliAODCaloCluster();
45 AliAODCaloCluster(const AliAODCaloCluster& clus);
46 AliAODCaloCluster& operator=(const AliAODCaloCluster& clus);
8dd6eba0 47 void Clear(const Option_t*);
fa86343a 48
49 // getters
c8fe2783 50 Double_t GetDistanceToBadChannel() const { return fDistToBadChannel; }
fa86343a 51 Double_t GetDispersion() const { return fDispersion; }
52 Double_t GetM20() const { return fM20; }
fa86343a 53 Double_t GetM02() const { return fM02; }
fa86343a 54 Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
d1388fe9 55 Double_t GetTrackDx(void)const {return fTrackDx;}
56 Double_t GetTrackDz(void)const {return fTrackDz;}
c8fe2783 57 UChar_t GetNExMax() const { return fNExMax; }
78902954 58 Double_t GetTOF() const { return fTOF; }
fa86343a 59
60 Int_t GetNTracksMatched() const { return fTracksMatched.GetEntriesFast(); }
61 TObject *GetTrackMatched(Int_t i) const { return fTracksMatched.At(i); }
e649177a 62
1f66a186 63 void SetNCells(Int_t n) { fNCells = n;}
64 Int_t GetNCells() const { return fNCells;}
e649177a 65
1b54b5a3 66 void SetCellsAbsId(UShort_t *array);
e649177a 67 UShort_t *GetCellsAbsId() {return fCellsAbsId;}
68
1b54b5a3 69 void SetCellsAmplitudeFraction(Double32_t *array);
e649177a 70 Double32_t *GetCellsAmplitudeFraction() {return fCellsAmpFraction;}
71
72 Int_t GetCellAbsId(Int_t i) const {
73 if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i];
74 else return -1;}
75
76 Double_t GetCellAmplitudeFraction(Int_t i) const {
77 if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];
78 else return -1;}
c8fe2783 79
d1388fe9 80
fa86343a 81 // setters
17cff35e 82 void SetDistanceToBadChannel(Double_t dist) { fDistToBadChannel = dist; }
fa86343a 83 void SetDispersion(Double_t disp) { fDispersion = disp; }
84 void SetM20(Double_t m20) { fM20 = m20; }
fa86343a 85 void SetM02(Double_t m02) { fM02 = m02; }
fa86343a 86 void SetEmcCpvDistance(Double_t emcCpvDist) { fEmcCpvDistance = emcCpvDist; }
c8fe2783 87 void SetNExMax(UChar_t nExMax) { fNExMax = nExMax; }
78902954 88 void SetTOF(Double_t tof) { fTOF = tof; }
d1388fe9 89 void SetTrackDistance(Double_t dx, Double_t dz){fTrackDx=dx; fTrackDz=dz;}
fa86343a 90
91 void SetCaloCluster(Double_t dist = -999.,
92 Double_t disp = -1.,
93 Double_t m20 = 0.,
fa86343a 94 Double_t m02 = 0.,
fa86343a 95 Double_t emcCpvDist = -999.,
78902954 96 UShort_t nExMax = 0,
97 Double_t tof = 0.)
fa86343a 98 {
99 fDistToBadChannel = dist;
100 fDispersion = disp;
101 fM20 = m20;
fa86343a 102 fM02 = m02;
fa86343a 103 fEmcCpvDistance = emcCpvDist;
104 fNExMax = nExMax;
78902954 105 fTOF = tof ;
fa86343a 106 }
78902954 107
108 void GetMomentum(TLorentzVector& p, Double_t * vertexPosition );
fa86343a 109
7fc4b963 110 void AddTrackMatched(TObject *trk) {
111 //Make sure we attach the object to correct process number
112 if(fTracksMatched.GetEntries()==0) { TRefArray ref(TProcessID::GetProcessWithUID(trk)) ; fTracksMatched = ref ; }
113 fTracksMatched.Add(trk) ; }
114
fa86343a 115 void RemoveTrackMatched(TObject *trk) { fTracksMatched.Remove(trk); }
116 Bool_t HasTrackMatched(TObject *trk) const;
117
118 private :
119
120 Double32_t fDistToBadChannel; // Distance to nearest bad channel
121 Double32_t fDispersion; // cluster dispersion, for shape analysis
122 Double32_t fM20; // 2-nd moment along the main eigen axis
fa86343a 123 Double32_t fM02; // 2-nd moment along the second eigen axis
fa86343a 124 Double32_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point
d1388fe9 125 Double32_t fTrackDx ; // Distance to closest track in phi
126 Double32_t fTrackDz ; // Distance to closest track in z (eta)
fa86343a 127 UShort_t fNExMax; // number of (Ex-)maxima before unfolding
c8fe2783 128 Double32_t fTOF; ////[0,0,12] time-of-flight
fa86343a 129
130 TRefArray fTracksMatched; // references to tracks close to cluster. First entry is the most likely match.
e649177a 131
a89e9566 132 Int_t fNCells ;
133 UShort_t *fCellsAbsId; //[fNCells] array of cell absId numbers
134 Double32_t *fCellsAmpFraction; //[fNCells][0.,1.,16] array with cell amplitudes fraction.
fa86343a 135
d1388fe9 136 ClassDef(AliAODCaloCluster,7);
fa86343a 137};
138
139#endif