]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSClusterizer.h
Coding conventions
[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 Ã˜ystein Djuvsland
6     @date   
7     @brief  A temporary clusterizer for PHOS
8 */
9
10 #ifndef ALIHLTPHOSCLUSTERIZER_H
11 #define ALIHLTPHOSCLUSTERIZER_H
12
13 #include "AliHLTPHOSCommonDefs.h"
14
15 struct AliHLTPHOSClusterDataStruct;
16 struct AliHLTPHOSRecPointDataStruct;
17 struct AliHLTPHOSValidCellDataStruct;
18 struct AliHLTPHOSRecPointListDataStruct;
19 struct AliHLTPHOSRcuCellEnergyDataStruct;
20
21 class AliHLTPHOSClusterizer
22 {
23   
24  public: 
25   
26   AliHLTPHOSClusterizer();
27   virtual ~AliHLTPHOSClusterizer();
28   AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &);
29   AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;}
30    
31   void    SetThreshold(Float_t threshold) {fThreshold = threshold;}
32   void    SetClusterThreshold(Float_t clusterThreshold) {fClusterThreshold = clusterThreshold;}
33   
34   void    SetHighGainFactor(Float_t highGain) {fHighGainFactor = highGain;}
35   void    SetLowGainFactor(Float_t lowGain) {fLowGainFactor = lowGain;}
36   void    SetArraySize(Int_t size) 
37   { 
38     fArraySize = size;
39     fMultiplicity = fArraySize * fArraySize;
40   }
41   
42   Float_t GetHighGainFactor() {return fHighGainFactor;}
43   Float_t GetLowGainFactor() {return fLowGainFactor;}
44   
45   Int_t   BuildCellEnergyArray(AliHLTPHOSRcuCellEnergyDataStruct *structPtr, AliHLTPHOSRecPointListDataStruct* recPointList);
46   Int_t   CreateRecPointStructArray(AliHLTPHOSRecPointDataStruct* rectStructsPtr, AliHLTPHOSRecPointListDataStruct* list, Int_t nPoints);
47   Int_t   CalculateCenterOfGravity(AliHLTPHOSRecPointDataStruct* recPointPtr);
48   Int_t   ClusterizeStruct(AliHLTPHOSRecPointDataStruct* recArrayPtr, AliHLTPHOSClusterDataStruct* clusterArrayPtr);
49   Int_t   ResetCellEnergyArray();
50
51   
52  private:
53
54   AliHLTUInt8_t fPHOSModule;                                     /**<Number of the PHOSModule*/
55   Float_t fEnergyArray[N_COLUMNS_MOD][N_ROWS_MOD];               /**<2D array of cell energies*/
56   Float_t fThreshold;                                            /**<Energy threshold*/
57   Float_t fClusterThreshold;                                     /**<Cluster threshold*/
58   Float_t fHighGainFactor;                                       /**<High gain factor*/
59   Float_t fLowGainFactor;                                        /**<Low gain factor*/
60   Int_t   fArraySize;                                            /**<Size of the array which the energies are summed*/
61   Int_t   fMultiplicity;                                         /**<Number of crystals the energies are summed for*/
62
63   ClassDef(AliHLTPHOSClusterizer, 1);
64 };
65
66 #endif