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