]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/CALO/AliHLTCaloClusterizer.h
- fixing compilation warnings
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloClusterizer.h
1 //-*- Mode: C++ -*-\r
2 // $Id$\r
3 \r
4 /**************************************************************************\r
5  * This file is property of and copyright by the ALICE HLT Project        * \r
6  * All rights reserved.                                                   *\r
7  *                                                                        *\r
8  * Primary Authors: Oystein Djuvsland                                     *\r
9  *                                                                        *\r
10  * Permission to use, copy, modify and distribute this software and its   *\r
11  * documentation strictly for non-commercial purposes is hereby granted   *\r
12  * without fee, provided that the above copyright notice appears in all   *\r
13  * copies and that both the copyright notice and this permission notice   *\r
14  * appear in the supporting documentation. The authors make no claims     *\r
15  * about the suitability of this software for any purpose. It is          * \r
16  * provided "as is" without express or implied warranty.                  *\r
17  **************************************************************************/\r
18 \r
19 #ifndef ALIHLTCALOCLUSTERIZER_H\r
20 #define ALIHLTCALOCLUSTERIZER_H\r
21 \r
22 \r
23 /**\r
24  * Class does clusterization in for Calorimeters on an event basis. It is intended \r
25  * for use in HLT, but can also be used offline\r
26  *\r
27  * @file   AliHLTCaloClusterizer.h\r
28  * @author Oystein Djuvsland\r
29  * @date\r
30  * @brief  Clusterizer for CALO HLT\r
31  */\r
32 \r
33 // see header file for class documentation\r
34 // or\r
35 // refer to README to build package\r
36 // or\r
37 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt\r
38 \r
39 //#include "AliHLTCaloBase.h"\r
40 \r
41 #include "AliHLTCaloRecPointContainerStruct.h"\r
42 #include "AliHLTCaloRecPointDataStruct.h"\r
43 #include "AliHLTCaloDigitContainerDataStruct.h"\r
44 #include "AliHLTCaloDigitDataStruct.h"\r
45 #include "AliHLTCaloConstantsHandler.h"\r
46 #include "TString.h"\r
47 \r
48 //#include "AliPHOSGeometry.h"\r
49 \r
50 class TClonesArray;\r
51 //class AliPHOSDigit;\r
52 //class AliPHOSRecoParamEmc;\r
53 //class AliPHOSRecoParam;\r
54 \r
55 /** \r
56  * @class AliHLTCaloClusterizer\r
57  * Clusterizer for CALO HLT. The clusterizer takes digits as input, either\r
58  * in the form of a container of AliHLTCaloDigitDataStruct or a\r
59  * TClonesArray of AliPHOSDigit through an instance of a AliPHOSLoader\r
60  *\r
61  * @ingroup alihlt_calo\r
62  */\r
63 //class AliHLTCaloClusterizer : public AliHLTCaloBase\r
64 \r
65 \r
66 \r
67 class AliHLTCaloClusterizer : public AliHLTCaloConstantsHandler\r
68 {\r
69   \r
70 public:\r
71   \r
72   /** Constructor */\r
73   AliHLTCaloClusterizer(TString det);    \r
74   \r
75   /** Destructor */\r
76   virtual ~AliHLTCaloClusterizer();\r
77 \r
78 //   /** Copy constructor */  \r
79 //   AliHLTCaloClusterizer(const AliHLTCaloClusterizer &) : \r
80 //     //    AliHLTCaloBase(),\r
81 //     AliHLTCaloConstantsHandler(new TString("BALLE")),\r
82 //     fRecPointDataPtr(0),\r
83 //     fDigitDataPtr(0),\r
84 //     fEmcClusteringThreshold(0),\r
85 //     fEmcMinEnergyThreshold(0),\r
86 //     fEmcTimeGate(0),\r
87 //     fDigitsInCluster(0),\r
88 //     fDigitContainerPtr(0),\r
89 //     fMaxDigitIndexDiff(2*NZROWSMOD)\r
90 //   {\r
91 //     //Copy constructor not implemented\r
92 //   }\r
93   \r
94   /** Assignment */\r
95   AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer)\r
96   {\r
97     //Assignment\r
98     return *this; \r
99   }\r
100   \r
101   /** Set digit container */\r
102   void SetDigitContainer(AliHLTCaloDigitContainerDataStruct* digitContainerPtr)\r
103   { fDigitContainerPtr = digitContainerPtr; }\r
104 \r
105   /** Set rec point data buffer */\r
106   void SetRecPointDataPtr(AliHLTCaloRecPointDataStruct* recPointDataPtr);\r
107 \r
108   /** Set reco parameters */\r
109   //  void SetRecoParameters(AliPHOSRecoParam* recoPars);\r
110 \r
111   /** Set emc clustering threshold */\r
112   void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; }\r
113 \r
114   /** Set emc min energy threshold */\r
115   void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; }\r
116 \r
117   /** Set emc time gate */\r
118   void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; }\r
119   \r
120   /** Starts clusterization of the event */ \r
121   virtual Int_t ClusterizeEvent(UInt_t availableSize, UInt_t& totSize);\r
122   \r
123   /**\r
124    * For a given digit this digit scans for neighbouring digits which \r
125    * passes the threshold for inclusion in a rec point. If one is found \r
126    * it is added to the current rec point\r
127    * @param digIndex index of the digit in the digit container\r
128    * @param recPoint pointer to the current rec point\r
129    */\r
130   virtual void ScanForNeighbourDigits(Int_t digIndex, AliHLTCaloRecPointDataStruct* recPoint);\r
131 \r
132   /**\r
133    * Checks if two digits are neighbours\r
134    * @param d1 first digit\r
135    * @param d2 second digit\r
136    */\r
137   virtual Int_t AreNeighbours(AliHLTCaloDigitDataStruct* d1, AliHLTCaloDigitDataStruct* d2);\r
138 \r
139 \r
140 protected:\r
141 \r
142   /** Pointer to the rec point output */\r
143   AliHLTCaloRecPointDataStruct* fRecPointDataPtr;              //! transient\r
144 \r
145   /** Pointer to the digit output */\r
146   AliHLTCaloDigitDataStruct* fDigitDataPtr;                    //! transient\r
147 \r
148   /** Energy threshold for starting a cluster for the calorimeter */\r
149   Float_t fEmcClusteringThreshold;                             //COMMENT\r
150 \r
151   /** Energy threshold for including a crystal in a cluster */\r
152   Float_t fEmcMinEnergyThreshold;                              //COMMENT\r
153 \r
154   /** Maximum time difference for inclusion in a rec point */\r
155   Float_t fEmcTimeGate;                                        //COMMENT\r
156 \r
157   /** Counts the digits in a rec point */\r
158   Int_t fDigitsInCluster;                                      //COMMENT\r
159 \r
160   /** Contains the digits from one event */\r
161   AliHLTCaloDigitContainerDataStruct *fDigitContainerPtr;      //! transient\r
162 \r
163   /** Maximum difference in index to be a neighbour */\r
164   Int_t fMaxDigitIndexDiff;                                    //COMMENT\r
165 \r
166 private:\r
167   AliHLTCaloClusterizer();\r
168 \r
169   AliHLTCaloClusterizer (const AliHLTCaloClusterizer  & );\r
170   //  AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer &);\r
171 \r
172 \r
173   ClassDef(AliHLTCaloClusterizer, 0);\r
174 \r
175 \r
176 };\r
177 \r
178 #endif\r