5 /**************************************************************************
6 * This file is property of and copyright by the ALICE HLT Project *
7 * All rights reserved. *
9 * Primary Authors: Oystein Djuvsland *
11 * Permission to use, copy, modify and distribute this software and its *
12 * documentation strictly for non-commercial purposes is hereby granted *
13 * without fee, provided that the above copyright notice appears in all *
14 * copies and that both the copyright notice and this permission notice *
15 * appear in the supporting documentation. The authors make no claims *
16 * about the suitability of this software for any purpose. It is *
17 * provided "as is" without express or implied warranty. *
18 **************************************************************************/
20 #ifndef ALIHLTPHOSCLUSTERANALYSER_H
21 #define ALIHLTPHOSCLUSTERANALYSER_H
26 * Class calculates properties of rec points
28 * @file AliHLTPHOSClusterAnalyser.h
29 * @author Oystein Djuvsland
31 * @brief Cluster analyser for PHOS HLT
34 // see header file for class documentation
36 // refer to README to build package
38 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
40 //#include "AliHLTPHOSBase.h"
42 class AliHLTPHOSRecPointHeaderStruct;
43 class AliHLTPHOSRecPointDataStruct;
44 class AliHLTCaloClusterHeaderStruct;
45 class AliHLTCaloClusterDataStruct;
46 class AliPHOSGeoUtils;
47 class AliHLTPHOSDigitHeaderStruct;
49 * @class AliHLTPHOSClusterAnalyser
50 * ClusterAnalyser for PHOS HLT. Algorithms for center of gravity
51 * and moment calculations are based on classes from the PHOS
52 * offline analysis directory
54 * @ingroup alihlt_phos
56 //class AliHLTPHOSClusterAnalyser : public AliHLTPHOSBase
57 class AliHLTPHOSClusterAnalyser
62 AliHLTPHOSClusterAnalyser();
65 virtual ~AliHLTPHOSClusterAnalyser();
67 /** Copy constructor */
68 AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) :
73 fCaloClusterDataPtr(0),
74 fCaloClusterHeaderPtr(0),
79 fHaveDistanceToBadChannel(false),
82 //Copy constructor not implemented
86 AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
93 * Set the rec point data buffer
94 * @param recPointDataPtr is a pointer to the rec points
96 void SetRecPointDataPtr(AliHLTPHOSRecPointHeaderStruct *recPointDataPtr, AliHLTPHOSDigitHeaderStruct *digitHeader);
100 * Set the calo cluster output buffer
101 * @param caloClusterDataPtr is a pointer to the calo cluster buffer
103 void SetCaloClusterDataPtr(AliHLTCaloClusterDataStruct *caloClusterDataPtr);
106 * Calculates the center of gravity for the reconstruction points in the container
109 Int_t CalculateCenterOfGravity();
112 * Calculates the moments for the reconstruction points in the container
115 Int_t CalculateRecPointMoments();
118 * Calculates the moments for a certain cluster
121 Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr);
124 * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct
127 Int_t DeconvoluteClusters();
130 * Convert the rec points into calo clusters
133 Int_t CreateClusters(UInt_t availableSize, UInt_t& totSize);
137 * param recPointPtr is a pointer to the rec point to fit
140 Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
143 * Get the distance to the nearest CPV rec point
144 * param recPointPtr is the pointer to the emc rec point
145 * @return the distance
147 Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
150 * Do partice identification
151 * param clusterPtr is the pointer to the emc cluster
154 Int_t DoParticleIdentification(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
157 * Get the distance to the neares bad channel
158 * param clusterPtr is a pointer to the calo cluster
159 * @return the distance
161 Float_t GetDistanceToBadChannel(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
166 void SetDoClusterFit() { fDoClusterFit = true; }
171 void SetHaveCPVInfo() { fHaveCPVInfo = true; }
176 void SetDoPID() { fDoPID = true; }
179 * Set have distance to bad channel
181 void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
184 * Set the PHOS Geometry
186 void SetGeometry(AliPHOSGeoUtils *geom) { fPHOSGeometry = geom; }
190 /** Used for calculation of center of gravity */
191 Float_t fLogWeight; //COMMENT
193 /** Pointer to the rec points */
194 AliHLTPHOSRecPointDataStruct *fRecPointDataPtr; //! transient
196 /** Number of rec points */
197 Int_t fNRecPoints; //COMMENT
199 /** Pointer to the cluster buffer */
200 AliHLTCaloClusterDataStruct *fCaloClusterDataPtr; //! transient
202 /** Pointer to the cluster header */
203 AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient
205 /** Instance of the PHOS geometry */
206 AliPHOSGeoUtils *fPHOSGeometry; //! transient
208 /** Should we do cluster fitting? */
209 Bool_t fDoClusterFit; //COMMENT
211 /** Do we have CPV info? */
212 Bool_t fHaveCPVInfo; //COMMENT
214 /** Should we do PID? */
215 Bool_t fDoPID; //COMMENT
217 /** Do we have distance to bad channel? */
218 Bool_t fHaveDistanceToBadChannel; //COMMENT
220 /** Pointer to the digit header */
221 AliHLTPHOSDigitHeaderStruct *fDigitHeaderPtr; //COMMENT