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
11 #ifndef ALIHLTPHOSCLUSTERIZER_H
12 #define ALIHLTPHOSCLUSTERIZER_H
14 #include "AliHLTPHOSCommonDefs.h"
15 #include "AliHLTPHOSConstants.h"
17 using namespace PhosHLTConst;
19 struct AliHLTPHOSClusterDataStruct;
20 struct AliHLTPHOSRecPointDataStruct;
21 struct AliHLTPHOSValidCellDataStruct;
22 struct AliHLTPHOSRecPointListDataStruct;
23 struct AliHLTPHOSRcuCellEnergyDataStruct;
25 class AliHLTPHOSClusterizer
30 AliHLTPHOSClusterizer();
31 virtual ~AliHLTPHOSClusterizer();
32 AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &);
33 AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;}
35 void SetThreshold(float threshold) {fThreshold = threshold;}
36 void SetClusterThreshold(float clusterThreshold) {fClusterThreshold = clusterThreshold;}
38 void SetHighGainFactor(float highGain) {fHighGainFactor = highGain;}
39 void SetLowGainFactor(float lowGain) {fLowGainFactor = lowGain;}
40 void SetArraySize(int size)
43 fMultiplicity = fArraySize * fArraySize;
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;}
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();
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*/
71 ClassDef(AliHLTPHOSClusterizer, 1);