2 // $Id: AliHLTCaloClusterAnalyser.h 35107 2009-09-30 01:45:06Z phille $
4 /**************************************************************************
5 * This file is property of and copyright by the ALICE HLT Project *
6 * All rights reserved. *
8 * Primary Authors: Oystein Djuvsland *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
19 #ifndef ALIHLTCALOCLUSTERANALYSER_H
20 #define ALIHLTCALOCLUSTERANALYSER_H
22 #include "AliHLTLogging.h"
25 * Class calculates properties of rec points
27 * @file AliHLTCaloClusterAnalyser.h
28 * @author Oystein Djuvsland
30 * @brief Cluster analyser for CALO HLT
33 // see header file for class documentation
35 // refer to README to build package
37 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
39 //#include "AliHLTCaloBase.h"
41 //class AliHLTCaloPhysicsAnalyzer;
42 class AliHLTCaloRecPointHeaderStruct;
43 class AliHLTCaloRecPointDataStruct;
44 class AliHLTCaloDigitDataStruct;
45 class AliHLTCaloClusterHeaderStruct;
46 class AliHLTCaloClusterDataStruct;
47 class AliHLTCaloGeometry;
48 class AliHLTCaloRecoParamHandler;
54 * @class AliHLTCaloClusterAnalyser
55 * ClusterAnalyser for CALO HLT. Algorithms for center of gravity
56 * and moment calculations are based on classes from the CALO
57 * offline analysis directory
59 * @ingroup alihlt_calo
61 //class AliHLTCaloClusterAnalyser : public AliHLTCaloBase
62 class AliHLTCaloClusterAnalyser : public AliHLTLogging
67 AliHLTCaloClusterAnalyser();
70 virtual ~AliHLTCaloClusterAnalyser();
73 * Set the rec point data buffer
74 * @param recPointDataPtr is a pointer to the rec points
76 void SetRecPointArray(AliHLTCaloRecPointDataStruct **recPointDataPtr, Int_t nRecPoints);
79 * Set the calo cluster output buffer
80 * @param caloClusterDataPtr is a pointer to the calo cluster buffer
82 void SetCaloClusterData(AliHLTCaloClusterDataStruct *caloClusterDataPtr);
85 * Calculates the center of gravity for the reconstruction points in the container
88 Int_t CalculateCenterOfGravity();
91 * Calculates the moments for the reconstruction points in the container
94 Int_t CalculateRecPointMoments();
97 * Calculates the moments for a certain cluster
100 Int_t CalculateClusterMoments(AliHLTCaloRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr);
103 * Deconvolute the clusters in an AliHLTCaloRecPointContainerStruct
106 Int_t DeconvoluteClusters();
109 * Convert the rec points into calo clusters
112 Int_t CreateClusters(Int_t nRecPoints, UInt_t availableSize, UInt_t& totSize);
116 * param recPointPtr is a pointer to the rec point to fit
119 Int_t FitCluster(AliHLTCaloRecPointDataStruct* /*recPointPtr*/) { return 0; }
122 * Get the distance to the nearest CPV rec point
123 * param recPointPtr is the pointer to the emc rec point
124 * @return the distance
126 Float_t GetCPVDistance(AliHLTCaloRecPointDataStruct* /*recPointPtr*/) { return 0; };
129 * Do partice identification
130 * param clusterPtr is the pointer to the emc cluster
133 Int_t DoParticleIdentification(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
136 * Get the distance to the neares bad channel
137 * param clusterPtr is a pointer to the calo cluster
138 * @return the distance
140 Float_t GetDistanceToBadChannel(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
145 void SetDoClusterFit() { fDoClusterFit = true; }
150 void SetHaveCPVInfo() { fHaveCPVInfo = true; }
155 void SetDoPID() { fDoPID = true; }
158 * Set have distance to bad channel
160 void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
163 * Set the geometry object (different for EMCAL and PHOS)
165 void SetGeometry(AliHLTCaloGeometry *geometry) { fGeometry = geometry; }
168 * Set pointer to the digits
170 void SetDigitDataArray(AliHLTCaloDigitDataStruct **digits);
173 * Set the cluster type
175 void SetClusterType(Char_t clusterType) { fClusterType = clusterType; }
178 * Set the reconstruction parameters handler
180 void SetRecoParamHandler(AliHLTCaloRecoParamHandler *recoParams) { fRecoParamsPtr = recoParams; }
182 /** Set cut on single cell clusters */
183 void SetCutOnSingleCellClusters(Bool_t doCut, Float_t energyCut) {fCutOnSingleCellClusters = doCut; fSingleCellEnergyCut = energyCut; }
188 /** Used for calculation of center of gravity */
189 Float_t fLogWeight; //COMMENT
191 /** Pointer to the rec points */
192 AliHLTCaloRecPointDataStruct **fRecPointArray; //! transient
194 /** Pointer to the digits */
195 AliHLTCaloDigitDataStruct **fDigitDataArray; //! transient
197 /** Number of rec points */
198 Int_t fNRecPoints; //COMMENT
200 /** Pointer to the cluster buffer */
201 AliHLTCaloClusterDataStruct *fCaloClusterDataPtr; //! transient
203 /** Pointer to the cluster header */
204 AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient
206 /** Should we do cluster fitting? */
207 Bool_t fDoClusterFit; //COMMENT
209 /** Do we have CPV info? */
210 Bool_t fHaveCPVInfo; //COMMENT
212 /** Should we do PID? */
213 Bool_t fDoPID; //COMMENT
215 /** Do we have distance to bad channel? */
216 Bool_t fHaveDistanceToBadChannel; //COMMENT
218 /** The geometry object */
219 AliHLTCaloGeometry* fGeometry; //! transient
221 /** The cluster type */
222 Char_t fClusterType; //COMMENT
224 /** Handler to get the hold of reconstruction parameters */
225 AliHLTCaloRecoParamHandler *fRecoParamsPtr; //COMMENT
227 /** Should we cut out single celled high energy clusters? */
228 Bool_t fCutOnSingleCellClusters; //COMMENT
230 /** If we cut on single celled clusters, what is our energy cut? */
231 Float_t fSingleCellEnergyCut; //COMMENT
233 /** Copy constructor not implemented */
234 AliHLTCaloClusterAnalyser ( const AliHLTCaloClusterAnalyser &); // not implemented
237 AliHLTCaloClusterAnalyser & operator = ( const AliHLTCaloClusterAnalyser &); // not implemented