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;
53 * @class AliHLTCaloClusterAnalyser
54 * ClusterAnalyser for CALO HLT. Algorithms for center of gravity
55 * and moment calculations are based on classes from the CALO
56 * offline analysis directory
58 * @ingroup alihlt_calo
60 //class AliHLTCaloClusterAnalyser : public AliHLTCaloBase
61 class AliHLTCaloClusterAnalyser : public AliHLTLogging
66 AliHLTCaloClusterAnalyser();
69 virtual ~AliHLTCaloClusterAnalyser();
72 * Set the rec point data buffer
73 * @param recPointDataPtr is a pointer to the rec points
75 void SetRecPointArray(AliHLTCaloRecPointDataStruct **recPointDataPtr, Int_t nRecPoints);
78 * Set the calo cluster output buffer
79 * @param caloClusterDataPtr is a pointer to the calo cluster buffer
81 void SetCaloClusterData(AliHLTCaloClusterDataStruct *caloClusterDataPtr);
84 * Calculates the center of gravity for the reconstruction points in the container
87 Int_t CalculateCenterOfGravity();
90 * Calculates the moments for the reconstruction points in the container
93 Int_t CalculateRecPointMoments();
96 * Calculates the moments for a certain cluster
99 Int_t CalculateClusterMoments(AliHLTCaloRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr);
102 * Deconvolute the clusters in an AliHLTCaloRecPointContainerStruct
105 Int_t DeconvoluteClusters();
108 * Convert the rec points into calo clusters
111 Int_t CreateClusters(Int_t nRecPoints, UInt_t availableSize, UInt_t& totSize);
115 * param recPointPtr is a pointer to the rec point to fit
118 Int_t FitCluster(AliHLTCaloRecPointDataStruct* /*recPointPtr*/) { return 0; }
121 * Get the distance to the nearest CPV rec point
122 * param recPointPtr is the pointer to the emc rec point
123 * @return the distance
125 Float_t GetCPVDistance(AliHLTCaloRecPointDataStruct* /*recPointPtr*/) { return 0; };
128 * Do partice identification
129 * param clusterPtr is the pointer to the emc cluster
132 Int_t DoParticleIdentification(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
135 * Get the distance to the neares bad channel
136 * param clusterPtr is a pointer to the calo cluster
137 * @return the distance
139 Float_t GetDistanceToBadChannel(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
144 void SetDoClusterFit() { fDoClusterFit = true; }
149 void SetHaveCPVInfo() { fHaveCPVInfo = true; }
154 void SetDoPID() { fDoPID = true; }
157 * Set have distance to bad channel
159 void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
162 * Set the geometry object (different for EMCAL and PHOS)
164 void SetGeometry(AliHLTCaloGeometry *geometry) { fGeometry = geometry; }
167 * Set pointer to the digits
169 void SetDigitDataArray(AliHLTCaloDigitDataStruct *digits);
172 * Set the cluster type
174 void SetClusterType(Char_t clusterType) { fClusterType = clusterType; }
178 /** Used for calculation of center of gravity */
179 Float_t fLogWeight; //COMMENT
181 /** Pointer to the rec points */
182 AliHLTCaloRecPointDataStruct **fRecPointArray; //! transient
184 /** Pointer to the digits */
185 AliHLTCaloDigitDataStruct *fDigitDataArray; //! transient
187 /** Number of rec points */
188 Int_t fNRecPoints; //COMMENT
190 /** Pointer to the cluster buffer */
191 AliHLTCaloClusterDataStruct *fCaloClusterDataPtr; //! transient
193 /** Pointer to the cluster header */
194 AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient
196 /** Should we do cluster fitting? */
197 Bool_t fDoClusterFit; //COMMENT
199 /** Do we have CPV info? */
200 Bool_t fHaveCPVInfo; //COMMENT
202 /** Should we do PID? */
203 Bool_t fDoPID; //COMMENT
205 /** Do we have distance to bad channel? */
206 Bool_t fHaveDistanceToBadChannel; //COMMENT
208 /** The geometry object */
209 AliHLTCaloGeometry* fGeometry; //! transient
211 /** The cluster type */
212 Char_t fClusterType; //COMMENT
214 /** Copy constructor not implemented */
215 AliHLTCaloClusterAnalyser ( const AliHLTCaloClusterAnalyser &); // not implemented
218 AliHLTCaloClusterAnalyser & operator = ( const AliHLTCaloClusterAnalyser &); // not implemented