]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSClusterAnalyser.h
Removing unused constants
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterAnalyser.h
1
2 //-*- Mode: C++ -*-
3 // $Id$
4
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
23 #include "Rtypes.h"
24
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
40 //#include "AliHLTPHOSBase.h"
41
42 class AliHLTPHOSRecPointHeaderStruct;
43 class AliHLTPHOSRecPointDataStruct;
44 class AliHLTCaloClusterHeaderStruct;
45 class AliHLTCaloClusterDataStruct;
46 class AliPHOSGeoUtils;
47 class AliHLTPHOSDigitHeaderStruct;
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  */
56 //class AliHLTPHOSClusterAnalyser : public AliHLTPHOSBase
57 class AliHLTPHOSClusterAnalyser 
58 {
59 public:
60
61   /** Constructor */
62   AliHLTPHOSClusterAnalyser();
63
64   /** Destructor */
65   virtual ~AliHLTPHOSClusterAnalyser();
66   
67   /** Copy constructor */
68   AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) : 
69     //   AliHLTPHOSBase(),
70     fLogWeight(0),
71     fRecPointDataPtr(0),
72     fNRecPoints(0),
73     fCaloClusterDataPtr(0),
74     fCaloClusterHeaderPtr(0),
75     fPHOSGeometry(0),
76     fDoClusterFit(false),
77     fHaveCPVInfo(false),
78     fDoPID(false),
79     fHaveDistanceToBadChannel(false),
80     fDigitHeaderPtr(0)
81   {
82     //Copy constructor not implemented
83   }
84   
85   /** Assignment */
86   AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
87     {
88       //Assignment
89       return *this; 
90     }
91   
92   /**
93    * Set the rec point data buffer
94    * @param recPointDataPtr is a pointer to the rec points
95    */
96   void SetRecPointDataPtr(AliHLTPHOSRecPointHeaderStruct *recPointDataPtr, AliHLTPHOSDigitHeaderStruct *digitHeader);
97
98
99   /** 
100    * Set the calo cluster output buffer
101    * @param caloClusterDataPtr is a pointer to the calo cluster buffer
102    */
103   void SetCaloClusterDataPtr(AliHLTCaloClusterDataStruct *caloClusterDataPtr);
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    */
121   Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTCaloClusterDataStruct* clusterPtr);
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    */
133   Int_t CreateClusters(UInt_t availableSize, UInt_t& totSize);
134
135   /**
136    * Fit a cluster
137    * param recPointPtr is a pointer to the rec point to fit
138    * @return 
139    */
140   Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
141
142   /**
143    * Get the distance to the nearest CPV rec point
144    * param recPointPtr is the pointer to the emc rec point
145    * @return the distance
146    */
147   Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
148
149   /**
150    * Do partice identification
151    * param clusterPtr is the pointer to the emc cluster
152    * @return 
153    */
154   Int_t DoParticleIdentification(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
155   
156   /**
157    * Get the distance to the neares bad channel
158    * param clusterPtr is a pointer to the calo cluster
159    * @return the distance
160    */
161   Float_t GetDistanceToBadChannel(AliHLTCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
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
183   /**
184    * Set the PHOS Geometry
185    */
186   void SetGeometry(AliPHOSGeoUtils *geom) { fPHOSGeometry = geom; }
187
188 private:
189   
190   /** Used for calculation of center of gravity */
191   Float_t fLogWeight;                                       //COMMENT
192   
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 */
200   AliHLTCaloClusterDataStruct *fCaloClusterDataPtr;   //! transient
201
202   /** Pointer to the cluster header */
203   AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr;   //! transient
204
205   /** Instance of the PHOS geometry */
206   AliPHOSGeoUtils *fPHOSGeometry;                           //! transient
207
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
219
220   /** Pointer to the digit header */
221   AliHLTPHOSDigitHeaderStruct *fDigitHeaderPtr;             //COMMENT
222   
223 };
224
225 #endif