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 "AliHLTPHOSProcessor.h"
16 #include "AliHLTPHOSBase.h"
19 //#include "AliHLTPHOSCommonDefs.h"
20 //#include "AliHLTPHOSConstants.h"
22 //using namespace PhosHLTConst;
24 struct AliHLTPHOSClusterDataStruct;
25 struct AliHLTPHOSRecPointDataStruct;
26 struct AliHLTPHOSValidCellDataStruct;
27 struct AliHLTPHOSRecPointListDataStruct;
28 struct AliHLTPHOSRcuCellEnergyDataStruct;
30 //class AliHLTPHOSClusterizer: public AliHLTPHOSProcessor
31 class AliHLTPHOSClusterizer: public AliHLTPHOSBase
36 AliHLTPHOSClusterizer();
37 virtual ~AliHLTPHOSClusterizer();
38 AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &);
39 AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;}
41 void SetThreshold(float threshold) {fThreshold = threshold;}
42 void SetClusterThreshold(float clusterThreshold) {fClusterThreshold = clusterThreshold;}
44 void SetHighGainFactor(float highGain) {fHighGainFactor = highGain;}
45 void SetLowGainFactor(float lowGain) {fLowGainFactor = lowGain;}
46 void SetArraySize(int size)
49 fMultiplicity = fArraySize * fArraySize;
51 float GetThreshold() {return fThreshold;}
52 float GetClusterThreshold() {return fClusterThreshold;}
53 float GetHighGainFactor() {return fHighGainFactor;}
54 float GetLowGainFactor() {return fLowGainFactor;}
55 float GetArraySize() {return fArraySize;}
56 float GetMultiplicity() {return fMultiplicity;}
58 int BuildCellEnergyArray(AliHLTPHOSRcuCellEnergyDataStruct *structPtr, AliHLTPHOSRecPointListDataStruct* recPointList);
59 int CreateRecPointStructArray(AliHLTPHOSRecPointDataStruct* rectStructsPtr, AliHLTPHOSRecPointListDataStruct* list, int nPoints);
60 int CalculateCenterOfGravity(AliHLTPHOSRecPointDataStruct* recPointPtr);
61 int CalculateMoments(AliHLTPHOSRecPointDataStruct* recPointPtr, Bool_t axisOnly);
62 int ClusterizeStruct(AliHLTPHOSRecPointDataStruct* recArrayPtr, AliHLTPHOSClusterDataStruct* clusterArrayPtr);
63 int ResetCellEnergyArray();
68 AliHLTUInt8_t fPHOSModule; /**<Number of the PHOSModule*/
69 Float_t fEnergyArray[N_XCOLUMNS_MOD][N_ZROWS_MOD]; /**<2D array of cell energies*/
70 Float_t fThreshold; /**<Energy threshold*/
71 Float_t fClusterThreshold; /**<Cluster threshold*/
72 Float_t fHighGainFactor; /**<High gain factor*/
73 Float_t fLowGainFactor; /**<Low gain factor*/
74 Int_t fArraySize; /**<Size of the array which the energies are summed*/
75 Int_t fMultiplicity; /**<Number of crystals the energies are summed for*/
77 ClassDef(AliHLTPHOSClusterizer, 1);