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
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 AliHLTCaloClusterHeaderStruct;
45 class AliHLTCaloClusterDataStruct;
46 class AliPHOSGeoUtils;
49 * @class AliHLTCaloClusterAnalyser
50 * ClusterAnalyser for CALO HLT. Algorithms for center of gravity
51 * and moment calculations are based on classes from the CALO
52 * offline analysis directory
54 * @ingroup alihlt_calo
56 //class AliHLTCaloClusterAnalyser : public AliHLTCaloBase
57 class AliHLTCaloClusterAnalyser
62 AliHLTCaloClusterAnalyser();
65 virtual ~AliHLTCaloClusterAnalyser();
67 /** Copy constructor */
68 AliHLTCaloClusterAnalyser(const AliHLTCaloClusterAnalyser &) :
73 fCaloClusterDataPtr(0),
74 fCaloClusterHeaderPtr(0),
80 fHaveDistanceToBadChannel(false)
83 //Copy constructor not implemented
87 AliHLTCaloClusterAnalyser & operator = (const AliHLTCaloClusterAnalyser)
94 * Set the rec point data buffer
95 * @param recPointDataPtr is a pointer to the rec points
97 void SetRecPointDataPtr(AliHLTCaloRecPointHeaderStruct *recPointDataPtr);
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(AliHLTCaloRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr);
124 * Deconvolute the clusters in an AliHLTCaloRecPointContainerStruct
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(AliHLTCaloRecPointDataStruct* /*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(AliHLTCaloRecPointDataStruct* /*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; }
185 /** Used for calculation of center of gravity */
186 Float_t fLogWeight; //COMMENT
188 /** Pointer to the rec points */
189 AliHLTCaloRecPointDataStruct *fRecPointDataPtr; //! transient
191 /** Number of rec points */
192 Int_t fNRecPoints; //COMMENT
194 /** Pointer to the cluster buffer */
195 AliHLTCaloClusterDataStruct *fCaloClusterDataPtr; //! transient
197 /** Pointer to the cluster header */
198 AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient
200 /** Instance of the PHOS geometry */
201 AliPHOSGeoUtils *fPHOSGeometry; //! transient
203 //TODO: should not use PhysicsAnalyzer for global coord!
205 // AliHLTCaloPhysicsAnalyzer *fAnalyzerPtr; //! transient
207 /** Should we do cluster fitting? */
208 Bool_t fDoClusterFit; //COMMENT
210 /** Do we have CPV info? */
211 Bool_t fHaveCPVInfo; //COMMENT
213 /** Should we do PID? */
214 Bool_t fDoPID; //COMMENT
216 /** Do we have distance to bad channel? */
217 Bool_t fHaveDistanceToBadChannel; //COMMENT