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 ALIHLTPHOSCLUSTERANALYSER_H
20 #define ALIHLTPHOSCLUSTERANALYSER_H
23 * Class calculates properties of rec points
25 * @file AliHLTPHOSClusterAnalyser.h
26 * @author Oystein Djuvsland
28 * @brief Cluster analyser for PHOS HLT
31 // see header file for class documentation
33 // refer to README to build package
35 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
37 #include "AliHLTPHOSBase.h"
39 class AliHLTPHOSPhysicsAnalyzer;
40 class AliHLTPHOSRecPointHeaderStruct;
41 class AliHLTPHOSRecPointDataStruct;
42 class AliHLTPHOSCaloClusterHeaderStruct;
43 class AliHLTPHOSCaloClusterDataStruct;
44 class AliPHOSGeometry;
47 * @class AliHLTPHOSClusterAnalyser
48 * ClusterAnalyser for PHOS HLT. Algorithms for center of gravity
49 * and moment calculations are based on classes from the PHOS
50 * offline analysis directory
52 * @ingroup alihlt_phos
54 class AliHLTPHOSClusterAnalyser : public AliHLTPHOSBase
59 AliHLTPHOSClusterAnalyser();
62 virtual ~AliHLTPHOSClusterAnalyser();
64 /** Copy constructor */
65 AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) :
70 fCaloClusterDataPtr(0),
71 fCaloClusterHeaderPtr(0),
77 fHaveDistanceToBadChannel(false)
80 //Copy constructor not implemented
84 AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
91 * Set the rec point data buffer
92 * @param recPointDataPtr is a pointer to the rec points
94 void SetRecPointDataPtr(AliHLTPHOSRecPointHeaderStruct *recPointDataPtr);
98 * Set the calo cluster output buffer
99 * @param caloClusterDataPtr is a pointer to the calo cluster buffer
101 void SetCaloClusterDataPtr(AliHLTPHOSCaloClusterDataStruct *caloClusterDataPtr);
104 * Calculates the center of gravity for the reconstruction points in the container
107 Int_t CalculateCenterOfGravity();
110 * Calculates the moments for the reconstruction points in the container
113 Int_t CalculateRecPointMoments();
116 * Calculates the moments for a certain cluster
119 Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTPHOSCaloClusterDataStruct* clusterPtr);
122 * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct
125 Int_t DeconvoluteClusters();
128 * Convert the rec points into calo clusters
131 Int_t CreateClusters(UInt_t availableSize, UInt_t& totSize);
135 * param recPointPtr is a pointer to the rec point to fit
138 Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
141 * Get the distance to the nearest CPV rec point
142 * param recPointPtr is the pointer to the emc rec point
143 * @return the distance
145 Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
148 * Do partice identification
149 * param clusterPtr is the pointer to the emc cluster
152 Int_t DoParticleIdentification(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
155 * Get the distance to the neares bad channel
156 * param clusterPtr is a pointer to the calo cluster
157 * @return the distance
159 Float_t GetDistanceToBadChannel(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
164 void SetDoClusterFit() { fDoClusterFit = true; }
169 void SetHaveCPVInfo() { fHaveCPVInfo = true; }
174 void SetDoPID() { fDoPID = true; }
177 * Set have distance to bad channel
179 void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
183 /** Used for calculation of center of gravity */
184 Float_t fLogWeight; //COMMENT
186 /** Pointer to the rec points */
187 AliHLTPHOSRecPointDataStruct *fRecPointDataPtr; //! transient
189 /** Number of rec points */
190 Int_t fNRecPoints; //COMMENT
192 /** Pointer to the cluster buffer */
193 AliHLTPHOSCaloClusterDataStruct *fCaloClusterDataPtr; //! transient
195 /** Pointer to the cluster header */
196 AliHLTPHOSCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient
198 /** Instance of the PHOS geometry */
199 AliPHOSGeometry *fPHOSGeometry; //! transient
201 //TODO: should not use PhysicsAnalyzer for global coord!
203 AliHLTPHOSPhysicsAnalyzer *fAnalyzerPtr; //! transient
205 /** Should we do cluster fitting? */
206 Bool_t fDoClusterFit; //COMMENT
208 /** Do we have CPV info? */
209 Bool_t fHaveCPVInfo; //COMMENT
211 /** Should we do PID? */
212 Bool_t fDoPID; //COMMENT
214 /** Do we have distance to bad channel? */
215 Bool_t fHaveDistanceToBadChannel; //COMMENT