]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSClusterAnalyser.h
Updated DA for mapping - MON
[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   /** Copy constructor */
62   AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) : 
63     AliHLTPHOSBase(),
64     fLogWeight(0),
65     fRecPointsPtr(0),
66     fCaloClustersPtr(0),
67     fPHOSGeometry(0),
68     fAnalyzerPtr(0),
69     fDoClusterFit(false),
70     fHaveCPVInfo(false),
71     fDoPID(false),
72     fHaveDistanceToBadChannel(false)
73     
74   {
75     //Copy constructor not implemented
76   }
77   
78   /** Assignment */
79   AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
80     {
81       //Assignment
82       return *this; 
83     }
84   
85   /**
86    * Set the rec point container
87    * @param recPointContainerPtr is a pointer to the rec points
88    */
89   void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *recPointContainerPtr) { fRecPointsPtr = recPointContainerPtr; }
90
91   /** 
92    * Set the calo cluster container
93    * @param caloClusterContainerPtr is a pointer to the calo clusters
94    */
95   void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr);
96
97   /** 
98    * Calculates the center of gravity for the reconstruction points in the container
99    * @return
100    */
101   Int_t CalculateCenterOfGravity();
102
103   /** 
104    * Calculates the moments for the reconstruction points in the container
105    * @return 
106    */
107   Int_t CalculateRecPointMoments();
108
109   /** 
110    * Calculates the moments for a certain cluster
111    * @return 
112    */
113   Int_t CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTPHOSCaloClusterDataStruct* clusterPtr);
114
115   /** 
116    * Deconvolute the clusters in an AliHLTPHOSRecPointContainerStruct
117    * @return
118    */
119   Int_t DeconvoluteClusters();
120
121   /**
122    * Convert the rec points into calo clusters
123    * @return
124    */
125   Int_t CreateClusters();
126
127   /**
128    * Fit a cluster
129    * @param recPointPtr is a pointer to the rec point to fit
130    * @return 
131    */
132   Int_t FitCluster(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; }
133
134   /**
135    * Get the distance to the nearest CPV rec point
136    * @param recPointPtr is the pointer to the emc rec point
137    * @return the distance
138    */
139   Float_t GetCPVDistance(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/) { return 0; };
140
141   /**
142    * Do partice identification
143    * @param clusterPtr is the pointer to the emc cluster
144    * @return 
145    */
146   Int_t DoParticleIdentification(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
147   
148   /**
149    * Get the distance to the neares bad channel
150    * @param clusterPtr is a pointer to the calo cluster
151    * @return the distance
152    */
153   Float_t GetDistanceToBadChannel(AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/) { return 0; }
154
155   /**
156    * Set do cluster fit
157    */
158   void SetDoClusterFit() { fDoClusterFit = true; }
159   
160   /**
161    * Set have cpv info
162    */
163   void SetHaveCPVInfo() { fHaveCPVInfo = true; }
164
165   /** 
166    * Set do PID
167    */
168   void SetDoPID() { fDoPID = true; }
169
170   /**
171    * Set have distance to bad channel
172    */
173   void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; }
174
175 private:
176   
177   /** Used for calculation of center of gravity */
178   Float_t fLogWeight;                                       //COMMENT
179   
180   /** Pointer to the rec point container */
181   AliHLTPHOSRecPointContainerStruct *fRecPointsPtr;         //! transient
182
183   /** Pointer to the cluster container */
184   AliHLTPHOSCaloClusterContainerStruct *fCaloClustersPtr;   //! transient
185
186   /** Instance of the PHOS geometry */
187   AliPHOSGeometry *fPHOSGeometry;                           //! transient
188
189   //TODO: should not use PhysicsAnalyzer for global coord!
190   /** */
191   AliHLTPHOSPhysicsAnalyzer *fAnalyzerPtr;                  //! transient
192
193   /** Should we do cluster fitting? */
194   Bool_t fDoClusterFit;                                     //COMMENT
195   
196   /** Do we have CPV info? */
197   Bool_t fHaveCPVInfo;                                      //COMMENT
198
199   /** Should we do PID? */ 
200   Bool_t fDoPID;                                            //COMMENT
201
202   /** Do we have distance to bad channel? */
203   Bool_t fHaveDistanceToBadChannel;                         //COMMENT
204   
205   
206 };
207
208 #endif