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();
62 * Set the rec point container
63 * @param recPointContainerPtr is a pointer to the rec points
65 void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *recPointContainerPtr) { fRecPointsPtr = recPointContainerPtr; }
68 * Set the calo cluster container
69 * @param caloClusterContainerPtr is a pointer to the calo clusters
71 void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr) { fCaloClustersPtr = caloClusterContainerPtr; }
74 * Calculates the center of gravity for the reconstruction points in the container
77 Int_t CalculateCenterOfGravity();
80 * Calculates the moments for the reconstruction points in the container
83 Int_t CalculateRecPointMoments();
86 * Calculates the moments for a certain cluster
89 Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTPHOSCaloClusterDataStruct* clusterPtr);
92 * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct
95 Int_t DeconvoluteClusters();
98 * Convert the rec points into calo clusters
101 Int_t CreateClusters();
105 * @param recPointPtr is a pointer to the rec point to fit
108 Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
111 * Get the distance to the nearest CPV rec point
112 * @param recPointPtr is the pointer to the emc rec point
113 * @return the distance
115 Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
118 * Do partice identification
119 * @param clusterPtr is the pointer to the emc cluster
122 Int_t DoParticleIdentification(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
125 * Get the distance to the neares bad channel
126 * @param clusterPtr is a pointer to the calo cluster
127 * @return the distance
129 Float_t GetDistanceToBadChannel(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
134 void SetDoClusterFit() { fDoClusterFit = true; }
139 void SetHaveCPVInfo() { fHaveCPVInfo = true; }
144 void SetDoPID() { fDoPID = true; }
147 * Set have distance to bad channel
149 void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
153 /** Used for calculation of center of gravity */
154 Float_t fLogWeight; //COMMENT
156 /** Pointer to the rec point container */
157 AliHLTPHOSRecPointContainerStruct *fRecPointsPtr; //! transient
159 /** Pointer to the cluster container */
160 AliHLTPHOSCaloClusterContainerStruct *fCaloClustersPtr; //! transient
162 /** Instance of the PHOS geometry */
163 AliPHOSGeometry *fPHOSGeometry; //! transient
165 //TODO: should not use PhysicsAnalyzer for global coord!
167 AliHLTPHOSPhysicsAnalyzer *fAnalyzerPtr; //! transient
169 /** Should we do cluster fitting? */
170 Bool_t fDoClusterFit; //COMMENT
172 /** Do we have CPV info? */
173 Bool_t fHaveCPVInfo; //COMMENT
175 /** Should we do PID? */
176 Bool_t fDoPID; //COMMENT
178 /** Do we have distance to bad channel? */
179 Bool_t fHaveDistanceToBadChannel; //COMMENT