1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
4 /** @file AliHLTPHOSClusterizer.h
5 @author Ã
\98ystein Djuvsland
7 @brief A temporary clusterizer for PHOS
10 #ifndef ALIHLTPHOSCLUSTERIZER_H
11 #define ALIHLTPHOSCLUSTERIZER_H
13 //#include "AliHLTPHOSCommonDefs.h"
14 #include "AliHLTPHOSConstants.h"
15 using namespace PhosHLTConst;
17 struct AliHLTPHOSClusterDataStruct;
18 struct AliHLTPHOSRecPointDataStruct;
19 struct AliHLTPHOSValidCellDataStruct;
20 struct AliHLTPHOSRecPointListDataStruct;
21 struct AliHLTPHOSRcuCellEnergyDataStruct;
23 class AliHLTPHOSClusterizer
28 AliHLTPHOSClusterizer();
29 virtual ~AliHLTPHOSClusterizer();
30 AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &);
31 AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;}
33 void SetThreshold(Float_t threshold) {fThreshold = threshold;}
34 void SetClusterThreshold(Float_t clusterThreshold) {fClusterThreshold = clusterThreshold;}
36 void SetHighGainFactor(Float_t highGain) {fHighGainFactor = highGain;}
37 void SetLowGainFactor(Float_t lowGain) {fLowGainFactor = lowGain;}
38 void SetArraySize(Int_t size)
41 fMultiplicity = fArraySize * fArraySize;
44 Float_t GetHighGainFactor() {return fHighGainFactor;}
45 Float_t GetLowGainFactor() {return fLowGainFactor;}
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();
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*/
65 ClassDef(AliHLTPHOSClusterizer, 1);