]>
Commit | Line | Data |
---|---|---|
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 | |
42 | class AliHLTPHOSPhysicsAnalyzer; | |
e304ea31 | 43 | class AliHLTPHOSRecPointHeaderStruct; |
fa0a9bec | 44 | class AliHLTPHOSRecPointDataStruct; |
7fc04b67 | 45 | class AliHLTCaloClusterHeaderStruct; |
46 | class AliHLTCaloClusterDataStruct; | |
87434909 | 47 | class AliPHOSGeoUtils; |
fa0a9bec | 48 | |
49 | /** | |
50 | * @class AliHLTPHOSClusterAnalyser | |
51 | * ClusterAnalyser for PHOS HLT. Algorithms for center of gravity | |
52 | * and moment calculations are based on classes from the PHOS | |
53 | * offline analysis directory | |
54 | * | |
55 | * @ingroup alihlt_phos | |
56 | */ | |
9f050726 | 57 | //class AliHLTPHOSClusterAnalyser : public AliHLTPHOSBase |
58 | class AliHLTPHOSClusterAnalyser | |
fa0a9bec | 59 | { |
60 | public: | |
61 | ||
62 | /** Constructor */ | |
63 | AliHLTPHOSClusterAnalyser(); | |
64 | ||
65 | /** Destructor */ | |
66 | virtual ~AliHLTPHOSClusterAnalyser(); | |
67 | ||
25b7f84c | 68 | /** Copy constructor */ |
69 | AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) : | |
9f050726 | 70 | // AliHLTPHOSBase(), |
25b7f84c | 71 | fLogWeight(0), |
e304ea31 | 72 | fRecPointDataPtr(0), |
73 | fNRecPoints(0), | |
74 | fCaloClusterDataPtr(0), | |
75 | fCaloClusterHeaderPtr(0), | |
25b7f84c | 76 | fPHOSGeometry(0), |
77 | fAnalyzerPtr(0), | |
78 | fDoClusterFit(false), | |
79 | fHaveCPVInfo(false), | |
80 | fDoPID(false), | |
81 | fHaveDistanceToBadChannel(false) | |
82 | ||
83 | { | |
84 | //Copy constructor not implemented | |
85 | } | |
86 | ||
87 | /** Assignment */ | |
88 | AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser) | |
89 | { | |
90 | //Assignment | |
91 | return *this; | |
92 | } | |
93 | ||
fa0a9bec | 94 | /** |
e304ea31 | 95 | * Set the rec point data buffer |
96 | * @param recPointDataPtr is a pointer to the rec points | |
fa0a9bec | 97 | */ |
e304ea31 | 98 | void SetRecPointDataPtr(AliHLTPHOSRecPointHeaderStruct *recPointDataPtr); |
99 | ||
fa0a9bec | 100 | |
101 | /** | |
e304ea31 | 102 | * Set the calo cluster output buffer |
103 | * @param caloClusterDataPtr is a pointer to the calo cluster buffer | |
fa0a9bec | 104 | */ |
7fc04b67 | 105 | void SetCaloClusterDataPtr(AliHLTCaloClusterDataStruct *caloClusterDataPtr); |
fa0a9bec | 106 | |
107 | /** | |
108 | * Calculates the center of gravity for the reconstruction points in the container | |
109 | * @return | |
110 | */ | |
111 | Int_t CalculateCenterOfGravity(); | |
112 | ||
113 | /** | |
114 | * Calculates the moments for the reconstruction points in the container | |
115 | * @return | |
116 | */ | |
117 | Int_t CalculateRecPointMoments(); | |
118 | ||
119 | /** | |
120 | * Calculates the moments for a certain cluster | |
121 | * @return | |
122 | */ | |
7fc04b67 | 123 | Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr); |
fa0a9bec | 124 | |
125 | /** | |
126 | * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct | |
127 | * @return | |
128 | */ | |
129 | Int_t DeconvoluteClusters(); | |
130 | ||
131 | /** | |
132 | * Convert the rec points into calo clusters | |
133 | * @return | |
134 | */ | |
e304ea31 | 135 | Int_t CreateClusters(UInt_t availableSize, UInt_t& totSize); |
fa0a9bec | 136 | |
137 | /** | |
138 | * Fit a cluster | |
18af2efc | 139 | * param recPointPtr is a pointer to the rec point to fit |
fa0a9bec | 140 | * @return |
141 | */ | |
142 | Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; } | |
143 | ||
144 | /** | |
145 | * Get the distance to the nearest CPV rec point | |
18af2efc | 146 | * param recPointPtr is the pointer to the emc rec point |
fa0a9bec | 147 | * @return the distance |
148 | */ | |
149 | Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }; | |
150 | ||
151 | /** | |
152 | * Do partice identification | |
18af2efc | 153 | * param clusterPtr is the pointer to the emc cluster |
fa0a9bec | 154 | * @return |
155 | */ | |
7fc04b67 | 156 | Int_t DoParticleIdentification(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; } |
fa0a9bec | 157 | |
158 | /** | |
159 | * Get the distance to the neares bad channel | |
18af2efc | 160 | * param clusterPtr is a pointer to the calo cluster |
fa0a9bec | 161 | * @return the distance |
162 | */ | |
7fc04b67 | 163 | Float_t GetDistanceToBadChannel(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; } |
fa0a9bec | 164 | |
165 | /** | |
166 | * Set do cluster fit | |
167 | */ | |
168 | void SetDoClusterFit() { fDoClusterFit = true; } | |
169 | ||
170 | /** | |
171 | * Set have cpv info | |
172 | */ | |
173 | void SetHaveCPVInfo() { fHaveCPVInfo = true; } | |
174 | ||
175 | /** | |
176 | * Set do PID | |
177 | */ | |
178 | void SetDoPID() { fDoPID = true; } | |
179 | ||
180 | /** | |
181 | * Set have distance to bad channel | |
182 | */ | |
183 | void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; } | |
184 | ||
185 | private: | |
186 | ||
187 | /** Used for calculation of center of gravity */ | |
188 | Float_t fLogWeight; //COMMENT | |
189 | ||
e304ea31 | 190 | /** Pointer to the rec points */ |
191 | AliHLTPHOSRecPointDataStruct *fRecPointDataPtr; //! transient | |
192 | ||
193 | /** Number of rec points */ | |
194 | Int_t fNRecPoints; //COMMENT | |
195 | ||
196 | /** Pointer to the cluster buffer */ | |
7fc04b67 | 197 | AliHLTCaloClusterDataStruct *fCaloClusterDataPtr; //! transient |
fa0a9bec | 198 | |
e304ea31 | 199 | /** Pointer to the cluster header */ |
7fc04b67 | 200 | AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient |
fa0a9bec | 201 | |
202 | /** Instance of the PHOS geometry */ | |
87434909 | 203 | AliPHOSGeoUtils *fPHOSGeometry; //! transient |
fa0a9bec | 204 | |
205 | //TODO: should not use PhysicsAnalyzer for global coord! | |
206 | /** */ | |
207 | AliHLTPHOSPhysicsAnalyzer *fAnalyzerPtr; //! transient | |
208 | ||
209 | /** Should we do cluster fitting? */ | |
210 | Bool_t fDoClusterFit; //COMMENT | |
211 | ||
212 | /** Do we have CPV info? */ | |
213 | Bool_t fHaveCPVInfo; //COMMENT | |
214 | ||
215 | /** Should we do PID? */ | |
216 | Bool_t fDoPID; //COMMENT | |
217 | ||
218 | /** Do we have distance to bad channel? */ | |
219 | Bool_t fHaveDistanceToBadChannel; //COMMENT | |
220 | ||
221 | ||
222 | }; | |
223 | ||
224 | #endif |