]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDCaloCluster.h
Realisation of VEventHandler for input events.
[u/mrichter/AliRoot.git] / STEER / AliESDCaloCluster.h
CommitLineData
85c60a8e 1#ifndef ALIESDCALOCLUSTER_H
2#define ALIESDCALOCLUSTER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
85c60a8e 5/* $Id$ */
6/* $Log $ */
7
8//-------------------------------------------------------------------------
9// Class AliESDCaloCluster
10// This is the class to deal with during the physics analysis of data
11//
12// New container for calorimeter clusters, which are the effective
13// "tracks" for calorimeter detectors. Can be used by PHOS and EMCAL
14//
15// J.L. Klay (LLNL)
16//-------------------------------------------------------------------------
17
18#include <TObject.h>
19#include "AliPID.h"
5efdec54 20#include "TArrayS.h"
85c60a8e 21
bab0b5f0 22class TLorentzVector;
85c60a8e 23
24class AliESDCaloCluster : public TObject {
25
26public:
27
28 AliESDCaloCluster();
29 AliESDCaloCluster(const AliESDCaloCluster& clus);
fe12e09c 30 AliESDCaloCluster & operator=(const AliESDCaloCluster& source);
85c60a8e 31 virtual ~AliESDCaloCluster();
32
33 void SetID(Int_t id) {fID = id;}
34 Int_t GetID() const {return fID;}
35
8ada0ffe 36 //similar to AliAODCluster but offset by one for
37 // backward comp. -1 was undefined, which only applied
38 // for PHOS clusters before
39 enum ESDClu_t {kUndef = -2,
40 kPHOSCluster,
41 kEMCALPseudoCluster,
42 kEMCALClusterv1};
85c60a8e 43 void SetClusterType(Int_t type) { fClusterType = type; }
8ada0ffe 44 Char_t GetClusterType() const {return fClusterType; }
85c60a8e 45
8ada0ffe 46 Bool_t IsEMCAL() const {return (fClusterType == kEMCALClusterv1||fClusterType == kEMCALPseudoCluster);}
47 Bool_t IsEMCALPseudo() {return (fClusterType == kEMCALPseudoCluster);}
48 Bool_t IsPHOS() const {return (fClusterType == kPHOSCluster);}
85c60a8e 49
5efdec54 50 void SetPosition(const Float_t *pos) {
85c60a8e 51 fGlobalPos[0] = pos[0]; fGlobalPos[1] = pos[1]; fGlobalPos[2] = pos[2];
52 }
5efdec54 53 void GetPosition(Float_t *pos) const {
85c60a8e 54 pos[0] = fGlobalPos[0]; pos[1] = fGlobalPos[1]; pos[2] = fGlobalPos[2];
55 }
56
5efdec54 57 void SetE(Float_t ene) { fEnergy = ene;}
8ada0ffe 58 Double_t E() const { return fEnergy;}
85c60a8e 59
60 void SetClusterDisp(Float_t disp) { fDispersion = disp; }
8ada0ffe 61 Double_t GetClusterDisp() const { return fDispersion; }
85c60a8e 62
63 void SetClusterChi2(Float_t chi2) { fChi2 = chi2; }
8ada0ffe 64 Double_t GetClusterChi2() const { return fChi2; }
85c60a8e 65
66 void SetPid(const Float_t *p);
8ada0ffe 67 Double_t *GetPid() {return fPID;}
85c60a8e 68
85c60a8e 69 void SetM20(Float_t m20) { fM20 = m20; }
8ada0ffe 70 Double_t GetM20() const { return fM20; }
85c60a8e 71
72 void SetM02(Float_t m02) { fM02 = m02; }
8ada0ffe 73 Double_t GetM02() const { return fM02; }
85c60a8e 74
75 void SetM11(Float_t m11) { fM11 = m11; }
8ada0ffe 76 Double_t GetM11() const { return fM11; }
85c60a8e 77
8ada0ffe 78 void SetNExMax(UChar_t nExMax) { fNExMax = nExMax; }
79 UChar_t GetNExMax() const { return fNExMax; }
85c60a8e 80
81 void SetEmcCpvDistance(Float_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; }
8ada0ffe 82 Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
85c60a8e 83
45636e1b 84 void SetDistanceToBadChannel(Float_t dist) {fDistToBadChannel=dist;}
8ada0ffe 85 Double_t GetDistanceToBadChannel() const {return fDistToBadChannel;}
45636e1b 86
5efdec54 87 void AddTracksMatched(TArrayS & array) { fTracksMatched = new TArrayS(array) ; }
88 void AddLabels(TArrayS & array) { fLabels = new TArrayS(array) ; }
89 void AddDigitAmplitude(TArrayS & array) { fDigitAmplitude = new TArrayS(array) ; }
90 void AddDigitTime(TArrayS & array) { fDigitTime = new TArrayS(array) ; }
91 void AddDigitIndex(TArrayS & array) { fDigitIndex = new TArrayS(array) ; }
92
93 TArrayS * GetTracksMatched() const {return fTracksMatched;}
94 TArrayS * GetLabels() const {return fLabels;}
95 TArrayS * GetDigitAmplitude() const {return fDigitAmplitude;}
96 TArrayS * GetDigitTime() const {return fDigitTime;}
97 TArrayS * GetDigitIndex() const {return fDigitIndex;}
98
99 Int_t GetTrackMatched() const
100 {if( fTracksMatched && fTracksMatched->GetSize() >0) return fTracksMatched->At(0);
101 else return -1;} //Most likely the track associated to the cluster
102 Int_t GetLabel() const
103 {if( fLabels && fLabels->GetSize() >0) return fLabels->At(0);
104 else return -1;} //Most likely the track associated to the cluster
105
106
107 Int_t GetNTracksMatched() const {if (fTracksMatched) return fTracksMatched->GetSize();
108 else return -1;}
109 Int_t GetNLabels() const { if (fLabels) return fLabels->GetSize();
110 else return -1;}
111 Int_t GetNumberOfDigits() const { if (fDigitAmplitude) return fDigitAmplitude->GetSize();
112 else return -1;}
113
114 void GetMomentum(TLorentzVector& p, Double_t * vertexPosition );
cb8cf003 115 // Sep 7, 2007
116 Int_t GetTrueDigitAmplitude(Int_t i, Double_t cc);
117 Double_t GetTrueDigitEnergy(Int_t i, Double_t cc);
118 Double_t GetRecalibratedDigitEnergy(Int_t i, Double_t ccOld, Double_t ccNew);
bab0b5f0 119
85c60a8e 120protected:
121
5efdec54 122 TArrayS * fTracksMatched; //Index of tracks close to cluster. First entry is the most likely match.
123 TArrayS * fLabels; //list of primaries that generated the cluster, ordered in deposited energy.
124 TArrayS * fDigitAmplitude; //digit energy (integer units)
125 TArrayS * fDigitTime; //time of this digit (integer units)
126 TArrayS * fDigitIndex; //calorimeter digit index
85c60a8e 127
8ada0ffe 128
129 Double32_t fGlobalPos[3]; // position in global coordinate systemD
130 Double32_t fEnergy; // energy measured by calorimeter
131 Double32_t fDispersion; // cluster dispersion, for shape analysis
132 Double32_t fChi2; // chi2 of cluster fi
133 Double32_t fM20; // 2-nd moment along the main eigen axis
134 Double32_t fM02; // 2-nd moment along the second eigen axis
135 Double32_t fM11; // 2-nd mixed moment Mxy
136 Double32_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point
137 Double32_t fDistToBadChannel; // Distance to nearest bad channel
138 Double32_t fPID[AliPID::kSPECIESN]; //[0,1,8]"detector response probabilities" (for the PID)
139 Int_t fID; // Unique Id of the cluster
140 UChar_t fNExMax ; // number of (Ex-)maxima before unfolding
141 Char_t fClusterType; // Flag for different cluster type/versions
142
143 ClassDef(AliESDCaloCluster,5) //ESDCaloCluster
85c60a8e 144};
145
146#endif
147