ea367f6a |
1 | //-*- Mode: C++ -*- |
2 | // $Id: AliHLTCaloClusterAnalyser.h 35107 2009-09-30 01:45:06Z phille $ |
3 | |
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 ALIHLTCALOCLUSTERANALYSER_H |
20 | #define ALIHLTCALOCLUSTERANALYSER_H |
21 | |
7c80a370 |
22 | #include "AliHLTLogging.h" |
ea367f6a |
23 | |
24 | /** |
25 | * Class calculates properties of rec points |
26 | * |
27 | * @file AliHLTCaloClusterAnalyser.h |
28 | * @author Oystein Djuvsland |
29 | * @date |
30 | * @brief Cluster analyser for CALO HLT |
31 | */ |
32 | |
33 | // see header file for class documentation |
34 | // or |
35 | // refer to README to build package |
36 | // or |
37 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt |
38 | |
39 | //#include "AliHLTCaloBase.h" |
40 | |
41 | //class AliHLTCaloPhysicsAnalyzer; |
42 | class AliHLTCaloRecPointHeaderStruct; |
43 | class AliHLTCaloRecPointDataStruct; |
7c80a370 |
44 | class AliHLTCaloDigitDataStruct; |
ea367f6a |
45 | class AliHLTCaloClusterHeaderStruct; |
46 | class AliHLTCaloClusterDataStruct; |
7c80a370 |
47 | class AliHLTCaloGeometry; |
ea367f6a |
48 | |
49 | /** |
50 | * @class AliHLTCaloClusterAnalyser |
51 | * ClusterAnalyser for CALO HLT. Algorithms for center of gravity |
52 | * and moment calculations are based on classes from the CALO |
53 | * offline analysis directory |
54 | * |
55 | * @ingroup alihlt_calo |
56 | */ |
57 | //class AliHLTCaloClusterAnalyser : public AliHLTCaloBase |
7c80a370 |
58 | class AliHLTCaloClusterAnalyser : public AliHLTLogging |
ea367f6a |
59 | { |
60 | public: |
61 | |
62 | /** Constructor */ |
63 | AliHLTCaloClusterAnalyser(); |
64 | |
65 | /** Destructor */ |
66 | virtual ~AliHLTCaloClusterAnalyser(); |
67 | |
ea367f6a |
68 | /** |
69 | * Set the rec point data buffer |
70 | * @param recPointDataPtr is a pointer to the rec points |
71 | */ |
7c80a370 |
72 | void SetRecPointArray(AliHLTCaloRecPointDataStruct **recPointDataPtr, Int_t nRecPoints); |
ea367f6a |
73 | |
74 | /** |
75 | * Set the calo cluster output buffer |
76 | * @param caloClusterDataPtr is a pointer to the calo cluster buffer |
77 | */ |
7c80a370 |
78 | void SetCaloClusterData(AliHLTCaloClusterDataStruct *caloClusterDataPtr); |
ea367f6a |
79 | |
80 | /** |
81 | * Calculates the center of gravity for the reconstruction points in the container |
82 | * @return |
83 | */ |
84 | Int_t CalculateCenterOfGravity(); |
85 | |
86 | /** |
87 | * Calculates the moments for the reconstruction points in the container |
88 | * @return |
89 | */ |
90 | Int_t CalculateRecPointMoments(); |
91 | |
92 | /** |
93 | * Calculates the moments for a certain cluster |
94 | * @return |
95 | */ |
96 | Int_t CalculateClusterMoments(AliHLTCaloRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr); |
97 | |
98 | /** |
99 | * Deconvolute the clusters in an AliHLTCaloRecPointContainerStruct |
100 | * @return |
101 | */ |
102 | Int_t DeconvoluteClusters(); |
103 | |
104 | /** |
105 | * Convert the rec points into calo clusters |
106 | * @return |
107 | */ |
7c80a370 |
108 | Int_t CreateClusters(Int_t nRecPoints, UInt_t availableSize, UInt_t& totSize); |
ea367f6a |
109 | |
110 | /** |
111 | * Fit a cluster |
112 | * param recPointPtr is a pointer to the rec point to fit |
113 | * @return |
114 | */ |
115 | Int_t FitCluster(AliHLTCaloRecPointDataStruct* /*recPointPtr*/) { return 0; } |
116 | |
117 | /** |
118 | * Get the distance to the nearest CPV rec point |
119 | * param recPointPtr is the pointer to the emc rec point |
120 | * @return the distance |
121 | */ |
122 | Float_t GetCPVDistance(AliHLTCaloRecPointDataStruct* /*recPointPtr*/) { return 0; }; |
123 | |
124 | /** |
125 | * Do partice identification |
126 | * param clusterPtr is the pointer to the emc cluster |
127 | * @return |
128 | */ |
129 | Int_t DoParticleIdentification(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; } |
130 | |
131 | /** |
132 | * Get the distance to the neares bad channel |
133 | * param clusterPtr is a pointer to the calo cluster |
134 | * @return the distance |
135 | */ |
136 | Float_t GetDistanceToBadChannel(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; } |
137 | |
138 | /** |
139 | * Set do cluster fit |
140 | */ |
141 | void SetDoClusterFit() { fDoClusterFit = true; } |
142 | |
143 | /** |
144 | * Set have cpv info |
145 | */ |
146 | void SetHaveCPVInfo() { fHaveCPVInfo = true; } |
147 | |
148 | /** |
149 | * Set do PID |
150 | */ |
151 | void SetDoPID() { fDoPID = true; } |
152 | |
153 | /** |
154 | * Set have distance to bad channel |
155 | */ |
156 | void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; } |
157 | |
7c80a370 |
158 | /** |
159 | * Set the geometry object (different for EMCAL and PHOS) |
160 | */ |
161 | void SetGeometry(AliHLTCaloGeometry *geometry) { fGeometry = geometry; } |
162 | |
163 | /** |
164 | * Set pointer to the digits |
165 | */ |
166 | void SetDigitDataArray(AliHLTCaloDigitDataStruct *digits); |
167 | |
168 | |
169 | void DoNothing() { printf("Do nothing\n");} |
ea367f6a |
170 | private: |
171 | |
172 | /** Used for calculation of center of gravity */ |
173 | Float_t fLogWeight; //COMMENT |
174 | |
175 | /** Pointer to the rec points */ |
7c80a370 |
176 | AliHLTCaloRecPointDataStruct **fRecPointArray; //! transient |
177 | |
178 | /** Pointer to the digits */ |
179 | AliHLTCaloDigitDataStruct *fDigitDataArray; //! transient |
ea367f6a |
180 | |
181 | /** Number of rec points */ |
182 | Int_t fNRecPoints; //COMMENT |
183 | |
184 | /** Pointer to the cluster buffer */ |
185 | AliHLTCaloClusterDataStruct *fCaloClusterDataPtr; //! transient |
186 | |
187 | /** Pointer to the cluster header */ |
188 | AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient |
189 | |
ea367f6a |
190 | /** Should we do cluster fitting? */ |
191 | Bool_t fDoClusterFit; //COMMENT |
192 | |
193 | /** Do we have CPV info? */ |
194 | Bool_t fHaveCPVInfo; //COMMENT |
195 | |
196 | /** Should we do PID? */ |
197 | Bool_t fDoPID; //COMMENT |
198 | |
199 | /** Do we have distance to bad channel? */ |
200 | Bool_t fHaveDistanceToBadChannel; //COMMENT |
201 | |
7c80a370 |
202 | /** The geometry object */ |
203 | AliHLTCaloGeometry* fGeometry; //COMMENT |
ea367f6a |
204 | |
205 | }; |
206 | |
207 | #endif |