The decoder now handles correctly the case when
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterizer.h
CommitLineData
aac22523 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
91b95d47 10#ifndef ALIHLTPHOSCLUSTERIZER_H
11#define ALIHLTPHOSCLUSTERIZER_H
aac22523 12
13#include "AliHLTPHOSCommonDefs.h"
91b95d47 14
15struct AliHLTPHOSClusterDataStruct;
16struct AliHLTPHOSRecPointDataStruct;
17struct AliHLTPHOSValidCellDataStruct;
18struct AliHLTPHOSRecPointListDataStruct;
19struct AliHLTPHOSRcuCellEnergyDataStruct;
aac22523 20
21class AliHLTPHOSClusterizer
22{
23
91b95d47 24 public:
aac22523 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;}
91b95d47 44
aac22523 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
aac22523 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*/
91b95d47 58 Float_t fHighGainFactor; /**<High gain factor*/
59 Float_t fLowGainFactor; /**<Low gain factor*/
aac22523 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