1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
5 * Primary Authors: Oystein Djuvsland *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 #ifndef ALIHLTPHOSCLUSTERANALYSER_H
17 #define ALIHLTPHOSCLUSTERANALYSER_H
20 * Class calculates properties of rec points
22 * @file AliHLTPHOSClusterAnalyser.h
23 * @author Oystein Djuvsland
25 * @brief Cluster analyser for PHOS HLT
28 // see header file for class documentation
30 // refer to README to build package
32 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
34 #include "AliHLTPHOSBase.h"
36 class AliHLTPHOSPhysicsAnalyzer;
37 class AliHLTPHOSRecPointContainerStruct;
38 class AliHLTPHOSRecPointDataStruct;
39 class AliHLTPHOSCaloClusterContainerStruct;
40 class AliHLTPHOSCaloClusterDataStruct;
41 class AliPHOSGeometry;
44 * @class AliHLTPHOSClusterAnalyser
45 * ClusterAnalyser for PHOS HLT. Algorithms for center of gravity
46 * and moment calculations are based on classes from the PHOS
47 * offline analysis directory
49 * @ingroup alihlt_phos
51 class AliHLTPHOSClusterAnalyser : public AliHLTPHOSBase
56 AliHLTPHOSClusterAnalyser();
59 virtual ~AliHLTPHOSClusterAnalyser();
61 /** Copy constructor */
62 AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) :
72 fHaveDistanceToBadChannel(false)
75 //Copy constructor not implemented
79 AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
86 * Set the rec point container
87 * @param recPointContainerPtr is a pointer to the rec points
89 void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *recPointContainerPtr) { fRecPointsPtr = recPointContainerPtr; }
92 * Set the calo cluster container
93 * @param caloClusterContainerPtr is a pointer to the calo clusters
95 void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr);
98 * Calculates the center of gravity for the reconstruction points in the container
101 Int_t CalculateCenterOfGravity();
104 * Calculates the moments for the reconstruction points in the container
107 Int_t CalculateRecPointMoments();
110 * Calculates the moments for a certain cluster
113 Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTPHOSCaloClusterDataStruct* clusterPtr);
116 * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct
119 Int_t DeconvoluteClusters();
122 * Convert the rec points into calo clusters
125 Int_t CreateClusters();
129 * @param recPointPtr is a pointer to the rec point to fit
132 Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
135 * Get the distance to the nearest CPV rec point
136 * @param recPointPtr is the pointer to the emc rec point
137 * @return the distance
139 Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
142 * Do partice identification
143 * @param clusterPtr is the pointer to the emc cluster
146 Int_t DoParticleIdentification(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
149 * Get the distance to the neares bad channel
150 * @param clusterPtr is a pointer to the calo cluster
151 * @return the distance
153 Float_t GetDistanceToBadChannel(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
158 void SetDoClusterFit() { fDoClusterFit = true; }
163 void SetHaveCPVInfo() { fHaveCPVInfo = true; }
168 void SetDoPID() { fDoPID = true; }
171 * Set have distance to bad channel
173 void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
177 /** Used for calculation of center of gravity */
178 Float_t fLogWeight; //COMMENT
180 /** Pointer to the rec point container */
181 AliHLTPHOSRecPointContainerStruct *fRecPointsPtr; //! transient
183 /** Pointer to the cluster container */
184 AliHLTPHOSCaloClusterContainerStruct *fCaloClustersPtr; //! transient
186 /** Instance of the PHOS geometry */
187 AliPHOSGeometry *fPHOSGeometry; //! transient
189 //TODO: should not use PhysicsAnalyzer for global coord!
191 AliHLTPHOSPhysicsAnalyzer *fAnalyzerPtr; //! transient
193 /** Should we do cluster fitting? */
194 Bool_t fDoClusterFit; //COMMENT
196 /** Do we have CPV info? */
197 Bool_t fHaveCPVInfo; //COMMENT
199 /** Should we do PID? */
200 Bool_t fDoPID; //COMMENT
202 /** Do we have distance to bad channel? */
203 Bool_t fHaveDistanceToBadChannel; //COMMENT