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