]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSClusterAnalyser.h
Removing obsolete code + refactoring
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterAnalyser.h
CommitLineData
1b41ab20 1//-*- Mode: C++ -*-
2// $Id$
3
fa0a9bec 4 /**************************************************************************
5 * This file is property of and copyright by the ALICE HLT Project *
6 * All rights reserved. *
7 * *
8 * Primary Authors: Oystein Djuvsland *
9 * *
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 **************************************************************************/
18
19#ifndef ALIHLTPHOSCLUSTERANALYSER_H
20#define ALIHLTPHOSCLUSTERANALYSER_H
21
22/**
23 * Class calculates properties of rec points
24 *
25 * @file AliHLTPHOSClusterAnalyser.h
26 * @author Oystein Djuvsland
27 * @date
28 * @brief Cluster analyser for PHOS HLT
29 */
30
31// see header file for class documentation
32// or
33// refer to README to build package
34// or
35// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
36
37#include "AliHLTPHOSBase.h"
38
39class AliHLTPHOSPhysicsAnalyzer;
e304ea31 40class AliHLTPHOSRecPointHeaderStruct;
fa0a9bec 41class AliHLTPHOSRecPointDataStruct;
7fc04b67 42class AliHLTCaloClusterHeaderStruct;
43class AliHLTCaloClusterDataStruct;
87434909 44class AliPHOSGeoUtils;
fa0a9bec 45
46/**
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
51 *
52 * @ingroup alihlt_phos
53 */
54class AliHLTPHOSClusterAnalyser : public AliHLTPHOSBase
55{
56public:
57
58 /** Constructor */
59 AliHLTPHOSClusterAnalyser();
60
61 /** Destructor */
62 virtual ~AliHLTPHOSClusterAnalyser();
63
25b7f84c 64 /** Copy constructor */
65 AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) :
66 AliHLTPHOSBase(),
67 fLogWeight(0),
e304ea31 68 fRecPointDataPtr(0),
69 fNRecPoints(0),
70 fCaloClusterDataPtr(0),
71 fCaloClusterHeaderPtr(0),
25b7f84c 72 fPHOSGeometry(0),
73 fAnalyzerPtr(0),
74 fDoClusterFit(false),
75 fHaveCPVInfo(false),
76 fDoPID(false),
77 fHaveDistanceToBadChannel(false)
78
79 {
80 //Copy constructor not implemented
81 }
82
83 /** Assignment */
84 AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
85 {
86 //Assignment
87 return *this;
88 }
89
fa0a9bec 90 /**
e304ea31 91 * Set the rec point data buffer
92 * @param recPointDataPtr is a pointer to the rec points
fa0a9bec 93 */
e304ea31 94 void SetRecPointDataPtr(AliHLTPHOSRecPointHeaderStruct *recPointDataPtr);
95
fa0a9bec 96
97 /**
e304ea31 98 * Set the calo cluster output buffer
99 * @param caloClusterDataPtr is a pointer to the calo cluster buffer
fa0a9bec 100 */
7fc04b67 101 void SetCaloClusterDataPtr(AliHLTCaloClusterDataStruct *caloClusterDataPtr);
fa0a9bec 102
103 /**
104 * Calculates the center of gravity for the reconstruction points in the container
105 * @return
106 */
107 Int_t CalculateCenterOfGravity();
108
109 /**
110 * Calculates the moments for the reconstruction points in the container
111 * @return
112 */
113 Int_t CalculateRecPointMoments();
114
115 /**
116 * Calculates the moments for a certain cluster
117 * @return
118 */
7fc04b67 119 Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr);
fa0a9bec 120
121 /**
122 * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct
123 * @return
124 */
125 Int_t DeconvoluteClusters();
126
127 /**
128 * Convert the rec points into calo clusters
129 * @return
130 */
e304ea31 131 Int_t CreateClusters(UInt_t availableSize, UInt_t& totSize);
fa0a9bec 132
133 /**
134 * Fit a cluster
18af2efc 135 * param recPointPtr is a pointer to the rec point to fit
fa0a9bec 136 * @return
137 */
138 Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
139
140 /**
141 * Get the distance to the nearest CPV rec point
18af2efc 142 * param recPointPtr is the pointer to the emc rec point
fa0a9bec 143 * @return the distance
144 */
145 Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
146
147 /**
148 * Do partice identification
18af2efc 149 * param clusterPtr is the pointer to the emc cluster
fa0a9bec 150 * @return
151 */
7fc04b67 152 Int_t DoParticleIdentification(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
fa0a9bec 153
154 /**
155 * Get the distance to the neares bad channel
18af2efc 156 * param clusterPtr is a pointer to the calo cluster
fa0a9bec 157 * @return the distance
158 */
7fc04b67 159 Float_t GetDistanceToBadChannel(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
fa0a9bec 160
161 /**
162 * Set do cluster fit
163 */
164 void SetDoClusterFit() { fDoClusterFit = true; }
165
166 /**
167 * Set have cpv info
168 */
169 void SetHaveCPVInfo() { fHaveCPVInfo = true; }
170
171 /**
172 * Set do PID
173 */
174 void SetDoPID() { fDoPID = true; }
175
176 /**
177 * Set have distance to bad channel
178 */
179 void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
180
181private:
182
183 /** Used for calculation of center of gravity */
184 Float_t fLogWeight; //COMMENT
185
e304ea31 186 /** Pointer to the rec points */
187 AliHLTPHOSRecPointDataStruct *fRecPointDataPtr; //! transient
188
189 /** Number of rec points */
190 Int_t fNRecPoints; //COMMENT
191
192 /** Pointer to the cluster buffer */
7fc04b67 193 AliHLTCaloClusterDataStruct *fCaloClusterDataPtr; //! transient
fa0a9bec 194
e304ea31 195 /** Pointer to the cluster header */
7fc04b67 196 AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient
fa0a9bec 197
198 /** Instance of the PHOS geometry */
87434909 199 AliPHOSGeoUtils *fPHOSGeometry; //! transient
fa0a9bec 200
201 //TODO: should not use PhysicsAnalyzer for global coord!
202 /** */
203 AliHLTPHOSPhysicsAnalyzer *fAnalyzerPtr; //! transient
204
205 /** Should we do cluster fitting? */
206 Bool_t fDoClusterFit; //COMMENT
207
208 /** Do we have CPV info? */
209 Bool_t fHaveCPVInfo; //COMMENT
210
211 /** Should we do PID? */
212 Bool_t fDoPID; //COMMENT
213
214 /** Do we have distance to bad channel? */
215 Bool_t fHaveDistanceToBadChannel; //COMMENT
216
217
218};
219
220#endif