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