]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSClusterizer.h
Included AliHLTPHOSConstnts.h where needed
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterizer.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3   
4 /** @file   AliHLTPHOSClusterizer.h
5     @author Ã\98ystein Djuvsland
6     @date   
7     @brief  A temporary clusterizer for PHOS
8 */
9
10
11 #ifndef ALIHLTPHOSCLUSTERIZER_H
12 #define ALIHLTPHOSCLUSTERIZER_H
13
14 #include "AliHLTPHOSCommonDefs.h"
15 #include "AliHLTPHOSConstants.h"
16
17 using namespace PhosHLTConst;
18
19 struct AliHLTPHOSClusterDataStruct;
20 struct AliHLTPHOSRecPointDataStruct;
21 struct AliHLTPHOSValidCellDataStruct;
22 struct AliHLTPHOSRecPointListDataStruct;
23 struct AliHLTPHOSRcuCellEnergyDataStruct;
24
25 class AliHLTPHOSClusterizer
26 {
27   
28  public: 
29   
30   AliHLTPHOSClusterizer();
31   virtual ~AliHLTPHOSClusterizer();
32   AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &);
33   AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;}
34    
35   void    SetThreshold(float threshold) {fThreshold = threshold;}
36   void    SetClusterThreshold(float clusterThreshold) {fClusterThreshold = clusterThreshold;}
37   
38   void    SetHighGainFactor(float highGain) {fHighGainFactor = highGain;}
39   void    SetLowGainFactor(float lowGain) {fLowGainFactor = lowGain;}
40   void    SetArraySize(int size) 
41   { 
42     fArraySize = size;
43     fMultiplicity = fArraySize * fArraySize;
44   }
45   float GetThreshold() {return fThreshold;}
46   float GetClusterThreshold() {return fClusterThreshold;}
47   float GetHighGainFactor() {return fHighGainFactor;}
48   float GetLowGainFactor() {return fLowGainFactor;}
49   float GetArraySize() {return fArraySize;}
50   float GetMultiplicity() {return fMultiplicity;}
51   
52   int   BuildCellEnergyArray(AliHLTPHOSRcuCellEnergyDataStruct *structPtr, AliHLTPHOSRecPointListDataStruct* recPointList);
53   int   CreateRecPointStructArray(AliHLTPHOSRecPointDataStruct* rectStructsPtr, AliHLTPHOSRecPointListDataStruct* list, int nPoints);
54   int   CalculateCenterOfGravity(AliHLTPHOSRecPointDataStruct* recPointPtr);
55   int   CalculateMoments(AliHLTPHOSRecPointDataStruct* recPointPtr, Bool_t axisOnly);
56   int   ClusterizeStruct(AliHLTPHOSRecPointDataStruct* recArrayPtr, AliHLTPHOSClusterDataStruct* clusterArrayPtr);
57   int   ResetCellEnergyArray();
58
59   
60  private:
61
62   AliHLTUInt8_t fPHOSModule;                                     /**<Number of the PHOSModule*/
63   Float_t fEnergyArray[N_COLUMNS_MOD][N_ROWS_MOD];               /**<2D array of cell energies*/
64   Float_t fThreshold;                                            /**<Energy threshold*/
65   Float_t fClusterThreshold;                                     /**<Cluster threshold*/
66   Float_t fHighGainFactor;                                       /**<High gain factor*/
67   Float_t fLowGainFactor;                                        /**<Low gain factor*/
68   Int_t   fArraySize;                                            /**<Size of the array which the energies are summed*/
69   Int_t   fMultiplicity;                                         /**<Number of crystals the energies are summed for*/
70
71   ClassDef(AliHLTPHOSClusterizer, 1);
72 };
73
74 #endif