]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDCaloCluster.h
New version of CDB framework. Proper initialization of CDB inside AliSimulation and...
[u/mrichter/AliRoot.git] / STEER / AliESDCaloCluster.h
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                               */
5
6 /* $Id$ */
7 /* $Log $ */
8
9 //-------------------------------------------------------------------------
10 //                          Class AliESDCaloCluster
11 //   This is the class to deal with during the physics analysis of data
12 //
13 //   New container for calorimeter clusters, which are the effective 
14 //   "tracks" for calorimeter detectors.  Can be used by PHOS and EMCAL
15 //
16 //     J.L. Klay (LLNL)
17 //-------------------------------------------------------------------------
18
19 #include <TObject.h>
20 #include "AliPID.h"
21
22
23 class AliESDCaloCluster : public TObject {
24
25 public:
26
27   AliESDCaloCluster();
28   AliESDCaloCluster(const AliESDCaloCluster& clus);
29   virtual ~AliESDCaloCluster();
30
31   void SetID(Int_t id) {fID = id;}
32   Int_t GetID() const {return fID;}
33
34   void SetClusterType(Int_t type) { fClusterType = type; }
35   Int_t GetClusterType() const {return fClusterType; }
36
37   void SetEMCAL(Bool_t emc) { fEMCALCluster = emc;}
38   Bool_t IsEMCAL() const {return fEMCALCluster;}
39
40   void SetPHOS(Bool_t phos) { fPHOSCluster = phos;}
41   Bool_t IsPHOS() const {return fPHOSCluster;}
42
43   void SetGlobalPosition(const Float_t *pos) {
44     fGlobalPos[0] = pos[0]; fGlobalPos[1] = pos[1]; fGlobalPos[2] = pos[2];
45   }
46   void GetGlobalPosition(Float_t *pos) const {
47     pos[0] = fGlobalPos[0]; pos[1] = fGlobalPos[1]; pos[2] = fGlobalPos[2];
48   }
49
50   void SetClusterEnergy(Float_t ene) { fEnergy = ene;}
51   Float_t GetClusterEnergy() const   { return fEnergy;}
52
53   void SetClusterDisp(Float_t disp)  { fDispersion = disp; }
54   Float_t GetClusterDisp() const     { return fDispersion; }
55
56   void SetClusterChi2(Float_t chi2)  { fChi2 = chi2; }
57   Float_t GetClusterChi2() const     { return fChi2; }
58
59   void SetPid(const Float_t *p);
60   Float_t *GetPid() {return fPID;}
61
62   void SetPrimaryIndex(Int_t primary)     { fPrimaryIndex = primary; }
63   Int_t GetPrimaryIndex() const           { return fPrimaryIndex; }
64
65   void SetM20(Float_t m20)                { fM20 = m20; }
66   Float_t GetM20() const                  { return fM20; }
67
68   void SetM02(Float_t m02)                { fM02 = m02; }
69   Float_t GetM02() const                  { return fM02; }
70
71   void SetM11(Float_t m11)                { fM11 = m11; }
72   Float_t GetM11() const                  { return fM11; }
73
74   void SetNExMax(UShort_t nExMax)         { fNExMax = nExMax; }
75   UShort_t GetNExMax() const              { return fNExMax; }
76
77   void SetEmcCpvDistance(Float_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; }
78   Float_t GetEmcCpvDistance() const       { return fEmcCpvDistance; }
79
80   void SetNumberOfDigits(Int_t ndig)      { fNumberOfDigits = ndig; }
81   Int_t GetNumberOfDigits() const         { return fNumberOfDigits; }
82   
83   void SetDigitAmplitude(UShort_t *adc)   { fDigitAmplitude = adc;}
84   UShort_t *GetDigitAmplitude() const     { return fDigitAmplitude;}
85
86   void SetDigitTime(UShort_t *time)       { fDigitTime = time;}
87   UShort_t *GetDigitTime() const          { return fDigitTime;}
88
89   void SetDigitIndex(UShort_t *digit)     { fDigitIndex = digit;}
90   UShort_t *GetDigitIndex() const         { return fDigitIndex; }
91
92 protected:
93
94   Int_t     fID;               // Unique Id of the cluster
95   Int_t     fClusterType;      // Flag for different clustering versions
96   Bool_t    fEMCALCluster;     // Is this is an EMCAL cluster?
97   Bool_t    fPHOSCluster;      // Is this is a PHOS cluster?
98   Float_t   fGlobalPos[3];     // position in global coordinate system
99   Float_t   fEnergy;           // energy measured by calorimeter
100   Float_t   fDispersion;       // cluster dispersion, for shape analysis
101   Float_t   fChi2;             // chi2 of cluster fit
102   Float_t   fPID[AliPID::kSPECIESN]; //"detector response probabilities" (for the PID)
103   Int_t     fPrimaryIndex;     // primary track number associated with this cluster
104   Float_t   fM20;              // 2-nd moment along the main eigen axis
105   Float_t   fM02;              // 2-nd moment along the second eigen axis
106   Float_t   fM11;              // 2-nd mixed moment Mxy
107   UShort_t  fNExMax ;          // number of (Ex-)maxima before unfolding
108   Float_t   fEmcCpvDistance;   // the distance from PHOS EMC rec.point to the closest CPV rec.point
109
110
111
112   Int_t     fNumberOfDigits;   // number of calorimeter digits in cluster
113                                // Very important! The streamer needs to
114                                // know how big these arrays are for
115                                // each event that is written out: 
116   UShort_t* fDigitAmplitude;   //[fNumberOfDigits] digit energy (integer units)
117   UShort_t* fDigitTime;        //[fNumberOfDigits] time of this digit (integer units)
118   UShort_t* fDigitIndex;       //[fNumberOfDigits] calorimeter digit index
119
120   ClassDef(AliESDCaloCluster,1)  //ESDCaloCluster 
121 };
122
123 #endif 
124