]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSClusterAnalyser.h
update of data handling classes for SSD calibration
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterAnalyser.h
1  /**************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project        * 
3  * All rights reserved.                                                   *
4  *                                                                        *
5  * Primary Authors: Oystein Djuvsland                                     *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          * 
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 #ifndef ALIHLTPHOSCLUSTERANALYSER_H
17 #define ALIHLTPHOSCLUSTERANALYSER_H
18
19 /**
20  * Class calculates properties of rec points
21  *
22  * @file   AliHLTPHOSClusterAnalyser.h
23  * @author Oystein Djuvsland
24  * @date
25  * @brief  Cluster analyser for PHOS HLT
26  */
27
28 // see header file for class documentation
29 // or
30 // refer to README to build package
31 // or
32 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
33
34 #include "AliHLTPHOSBase.h"
35
36 class AliHLTPHOSPhysicsAnalyzer;
37 class AliHLTPHOSRecPointContainerStruct;
38 class AliHLTPHOSRecPointDataStruct;
39 class AliHLTPHOSCaloClusterContainerStruct;
40 class AliHLTPHOSCaloClusterDataStruct;
41 class AliPHOSGeometry;
42
43 /** 
44  * @class AliHLTPHOSClusterAnalyser
45  * ClusterAnalyser for PHOS HLT. Algorithms for center of gravity
46  * and moment calculations are based on classes from the PHOS
47  * offline analysis directory
48  *
49  * @ingroup alihlt_phos
50  */
51 class AliHLTPHOSClusterAnalyser : public AliHLTPHOSBase
52 {
53 public:
54
55   /** Constructor */
56   AliHLTPHOSClusterAnalyser();
57
58   /** Destructor */
59   virtual ~AliHLTPHOSClusterAnalyser();
60   
61   /**
62    * Set the rec point container
63    * @param recPointContainerPtr is a pointer to the rec points
64    */
65   void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *recPointContainerPtr) { fRecPointsPtr = recPointContainerPtr; }
66
67   /** 
68    * Set the calo cluster container
69    * @param caloClusterContainerPtr is a pointer to the calo clusters
70    */
71   void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr) { fCaloClustersPtr = caloClusterContainerPtr; }
72
73   /** 
74    * Calculates the center of gravity for the reconstruction points in the container
75    * @return
76    */
77   Int_t CalculateCenterOfGravity();
78
79   /** 
80    * Calculates the moments for the reconstruction points in the container
81    * @return 
82    */
83   Int_t CalculateRecPointMoments();
84
85   /** 
86    * Calculates the moments for a certain cluster
87    * @return 
88    */
89   Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTPHOSCaloClusterDataStruct* clusterPtr);
90
91   /** 
92    * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct
93    * @return
94    */
95   Int_t DeconvoluteClusters();
96
97   /**
98    * Convert the rec points into calo clusters
99    * @return
100    */
101   Int_t CreateClusters();
102
103   /**
104    * Fit a cluster
105    * @param recPointPtr is a pointer to the rec point to fit
106    * @return 
107    */
108   Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
109
110   /**
111    * Get the distance to the nearest CPV rec point
112    * @param recPointPtr is the pointer to the emc rec point
113    * @return the distance
114    */
115   Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
116
117   /**
118    * Do partice identification
119    * @param clusterPtr is the pointer to the emc cluster
120    * @return 
121    */
122   Int_t DoParticleIdentification(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
123   
124   /**
125    * Get the distance to the neares bad channel
126    * @param clusterPtr is a pointer to the calo cluster
127    * @return the distance
128    */
129   Float_t GetDistanceToBadChannel(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
130
131   /**
132    * Set do cluster fit
133    */
134   void SetDoClusterFit() { fDoClusterFit = true; }
135   
136   /**
137    * Set have cpv info
138    */
139   void SetHaveCPVInfo() { fHaveCPVInfo = true; }
140
141   /** 
142    * Set do PID
143    */
144   void SetDoPID() { fDoPID = true; }
145
146   /**
147    * Set have distance to bad channel
148    */
149   void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
150
151 private:
152   
153   /** Used for calculation of center of gravity */
154   Float_t fLogWeight;                                       //COMMENT
155   
156   /** Pointer to the rec point container */
157   AliHLTPHOSRecPointContainerStruct *fRecPointsPtr;         //! transient
158
159   /** Pointer to the cluster container */
160   AliHLTPHOSCaloClusterContainerStruct *fCaloClustersPtr;   //! transient
161
162   /** Instance of the PHOS geometry */
163   AliPHOSGeometry *fPHOSGeometry;                           //! transient
164
165   //TODO: should not use PhysicsAnalyzer for global coord!
166   /** */
167   AliHLTPHOSPhysicsAnalyzer *fAnalyzerPtr;                  //! transient
168
169   /** Should we do cluster fitting? */
170   Bool_t fDoClusterFit;                                     //COMMENT
171   
172   /** Do we have CPV info? */
173   Bool_t fHaveCPVInfo;                                      //COMMENT
174
175   /** Should we do PID? */ 
176   Bool_t fDoPID;                                            //COMMENT
177
178   /** Do we have distance to bad channel? */
179   Bool_t fHaveDistanceToBadChannel;                         //COMMENT
180   
181   
182 };
183
184 #endif