]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/CALO/AliHLTCaloClusterizerComponent.h
af58ebd6be3f19394d89c14f8bfa3f442e40e771
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloClusterizerComponent.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTCaloClusterizerComponent.h 36636 2009-11-11 02:16:41Z odjuvsla $
3
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 ALIHLTCALOCLUSTERIZERCOMPONENT_H
21 #define ALIHLTCALOCLUSTERIZERCOMPONENT_H
22
23
24
25 /**
26  * Clusterizer component for PHOS HLT
27  *
28  * @file   AliHLTCaloClusterizerComponent.h
29  * @author Oystein Djuvsland
30  * @date
31  * @brief  A clusterizer component for PHOS HLT
32 */
33
34 // see below 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 "AliHLTCaloConstantsHandler.h"
41 #include "AliHLTCaloProcessor.h"
42
43
44 class AliHLTCaloDigitDataStruct;
45 class AliHLTCaloDigitContainerDataStruct;
46 class AliHLTCaloClusterizer;
47 class AliHLTCaloRecPointDataStruct;
48
49 /**
50  * @class AliHLTCaloClusterizerComponent
51  *
52  * Class for running clusterization for PHOS in HLT. It takes digits as input and
53  * gives reconstruction points as output.
54  *
55  * The component has the following component arguments:
56  * -clusterthreshold       The energy threshold for starting a new rec point
57  * -energythreshold        The energy threshold for including a digit in a
58  *                         rec point
59  * @ingroup alihlt_phos
60  */
61
62 /**
63  * @class AliHLTCaloClusterizerComponent
64  *
65  * Class for running clusterization for PHOS in HLT.
66  *
67  * <h2>General properties:</h2>
68  *
69  * Component ID: \b PhosClusterizer <br>
70  * Library: \b libAliHLTPHOS.so     <br>
71  * Input Data Types: @ref AliHLTPHOSDefinitions::fgkDigitDataType<br>
72  * Output Data Types: @ref AliHLTPHOSDefinitions::fgkRecPointDataType<br>
73  *
74  * <h2>Mandatory arguments:</h2>
75  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
76  * \li No mandatory arguments for component                           <br>
77  *
78  * <h2>Optional arguments:</h2>
79  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
80  * \li -digitthreshold      <i> value </i> <br>
81  *      threshold for a digit to be added to a rec point in GeV (default value: 0.03)
82  * \li -recpointthreshold <i> value </i> <br>
83  *      threshold for starting a new rec point  (default value: 0.2)
84  * \li -partitionmode
85  *      if we want to do clusterisation on the partition level (not available...) (defaul value: false)
86  *
87  * <h2>Configuration:</h2>
88  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
89  * \li No configuration arguments
90  *
91  * <h2>Default CDB entries:</h2>
92  * \li No CDB entry yet, will come.
93  *
94  * <h2>Performance:</h2>
95  * Pretty good (~ 3 kHz), depends on amount of data...
96  *
97  * <h2>Memory consumption:</h2>
98  * Depends on the amount of data, but pretty godd
99  *
100  * <h2>Output size:</h2>
101  * Depends on the amount of data...
102  *
103  * More detailed description. (At some point...)
104  *
105  * @ingroup alihlt_phos
106  */
107
108 //class AliHLTCaloClusterizerComponent : public AliHLTCaloConstantsHandler, public AliHLTCaloProcessor
109 class AliHLTCaloClusterizerComponent : public AliHLTCaloProcessor, public AliHLTCaloConstantsHandler
110   {
111   public:
112
113     /** Constructor */
114     AliHLTCaloClusterizerComponent(TString det);
115
116     /** Destructor */
117     virtual ~AliHLTCaloClusterizerComponent();
118
119 //     /** Copy constructor */
120 //     AliHLTCaloClusterizerComponent ( const AliHLTCaloClusterizerComponent & ) :
121 //         AliHLTPHOSProcessor(),
122 //         fAllDigitsPtr ( 0 ),
123 //         fClusterizerPtr ( 0 ),
124 //         //    fRecPointStructArrayPtr(0),
125 //         fDigitCount ( 0 )
126 //     {
127 //       //Copy constructor not implemented
128 //     }
129
130 //     /** Assignment */
131 //     AliHLTCaloClusterizerComponent & operator = ( const AliHLTCaloClusterizerComponent )
132 //     {
133 //       //Assignment
134 //       return *this;
135 //     }
136
137 //     /** interface function, see @ref AliHLTComponent for description */
138 //     void GetInputDataTypes ( std::vector<AliHLTComponentDataType>& list );
139
140 //     /** interface function, see @ref AliHLTComponent for description */
141 //     AliHLTComponentDataType GetOutputDataType();
142
143 //     /** interface function, see @ref AliHLTComponent for description */
144 //     void GetOutputDataSize ( unsigned long& constBase, double& inputMultiplier );
145
146     /** interface function, see @ref AliHLTComponent for description */
147
148     using  AliHLTCaloProcessor::DoEvent;
149
150     int DoEvent ( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
151                   AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
152                   std::vector<AliHLTComponentBlockData>& outputBlocks );
153
154     /** 
155      * Compare two digits, used during the sorting
156      */
157     static Int_t CompareDigits(const void *dig0, const void *dig);
158     
159   protected:
160
161     /** interface function, see @ref AliHLTComponent for
162         description */
163     int DoInit ( int argc, const char** argv );
164
165     /** interface function, see @ref AliHLTComponent for description */
166     int Deinit();
167
168     /** interface function, see @ref AliHLTComponent for description */
169     int Reconfigure ( const char* cdbEntry, const char* chainId );
170
171     /** interface function, see @ref AliHLTComponent for description */
172     int ScanConfigurationArgument ( int argc, const char** argv );
173
174   private:
175
176     /** Array of pointers to our digits */
177     AliHLTCaloDigitDataStruct **fDigitsPointerArray;              //! transient
178
179     /** Pointer to the clusterizer it self */
180     AliHLTCaloClusterizer* fClusterizerPtr;                       //! transient
181
182     /** Number of digits in event */
183     Int_t fDigitCount;                                            //COMMENT
184
185     /** Default constructor, not implemented */
186     AliHLTCaloClusterizerComponent();                             //COMMENT
187
188     /** Copy constructor  not implemented */
189     AliHLTCaloClusterizerComponent ( const AliHLTCaloClusterizerComponent &); // not implemented
190     
191     /** Assignment */
192     AliHLTCaloClusterizerComponent & operator = ( const AliHLTCaloClusterizerComponent &); // not implemented
193   };
194
195 #endif