4 /**************************************************************************
\r
5 * This file is property of and copyright by the ALICE HLT Project *
\r
6 * All rights reserved. *
\r
8 * Primary Authors: Oystein Djuvsland *
\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
19 #ifndef ALIHLTCALOCLUSTERIZER_H
\r
20 #define ALIHLTCALOCLUSTERIZER_H
\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
27 * @file AliHLTCaloClusterizer.h
\r
28 * @author Oystein Djuvsland
\r
30 * @brief Clusterizer for CALO HLT
\r
33 // see header file for class documentation
\r
35 // refer to README to build package
\r
37 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
\r
39 //#include "AliHLTCaloBase.h"
\r
41 #include "AliHLTCaloRecPointContainerStruct.h"
\r
42 #include "AliHLTCaloRecPointDataStruct.h"
\r
43 #include "AliHLTCaloDigitContainerDataStruct.h"
\r
44 #include "AliHLTCaloDigitDataStruct.h"
\r
45 #include "TString.h"
\r
46 #include "AliHLTCaloConstantsHandler.h"
\r
48 //#include "AliPHOSGeometry.h"
\r
52 //class AliPHOSDigit;
\r
53 //class AliPHOSRecoParamEmc;
\r
54 //class AliPHOSRecoParam;
\r
57 * @class AliHLTCaloClusterizer
\r
58 * Clusterizer for CALO HLT. The clusterizer takes digits as input, either
\r
59 * in the form of a container of AliHLTCaloDigitDataStruct or a
\r
60 * TClonesArray of AliPHOSDigit through an instance of a AliPHOSLoader
\r
62 * @ingroup alihlt_calo
\r
66 class AliHLTCaloClusterizer : public AliHLTCaloConstantsHandler
\r
72 AliHLTCaloClusterizer(TString det);
\r
75 virtual ~AliHLTCaloClusterizer();
\r
77 // /** Copy constructor */
\r
78 // AliHLTCaloClusterizer(const AliHLTCaloClusterizer &) :
\r
79 // // AliHLTCaloBase(),
\r
80 // AliHLTCaloConstants(NULL),
\r
81 // fRecPointDataPtr(0),
\r
82 // fDigitDataPtr(0),
\r
83 // fEmcClusteringThreshold(0),
\r
84 // fEmcMinEnergyThreshold(0),
\r
86 // fDigitsInCluster(0),
\r
87 // fDigitContainerPtr(0),
\r
88 // fMaxDigitIndexDiff(2*NZROWSMOD)
\r
90 // //Copy constructor not implemented
\r
94 AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer)
\r
100 /** Set digit container */
\r
101 void SetDigitContainer(AliHLTCaloDigitContainerDataStruct* digitContainerPtr)
\r
102 { fDigitContainerPtr = digitContainerPtr; }
\r
104 /** Set array with digits */
\r
105 void SetDigitArray(AliHLTCaloDigitDataStruct **digitPointerArr)
\r
106 { fDigitsPointerArray = digitPointerArr; }
\r
108 /** Set rec point data buffer */
\r
109 void SetRecPointDataPtr(AliHLTCaloRecPointDataStruct* recPointDataPtr);
\r
111 /** Set reco parameters */
\r
112 // void SetRecoParameters(AliPHOSRecoParam* recoPars);
\r
114 /** Set emc clustering threshold */
\r
115 void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; }
\r
117 /** Set emc min energy threshold */
\r
118 void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; }
\r
120 /** Set emc time gate */
\r
121 void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; }
\r
123 /** Starts clusterization of the event */
\r
124 virtual Int_t ClusterizeEvent(Int_t nDigits, UInt_t availableSize, UInt_t& totSize);
\r
127 * For a given digit this digit scans for neighbouring digits which
\r
128 * passes the threshold for inclusion in a rec point. If one is found
\r
129 * it is added to the current rec point
\r
130 * @param digIndex index of the digit in the digit container
\r
131 * @param recPoint pointer to the current rec point
\r
133 virtual void ScanForNeighbourDigits(Int_t digIndex, AliHLTCaloRecPointDataStruct* recPoint);
\r
136 * Checks if two digits are neighbours
\r
137 * @param d1 first digit
\r
138 * @param d2 second digit
\r
140 virtual Int_t AreNeighbours(AliHLTCaloDigitDataStruct* d1, AliHLTCaloDigitDataStruct* d2);
\r
145 /** Pointer to the rec point output */
\r
146 AliHLTCaloRecPointDataStruct *fRecPointDataPtr; //! transient
\r
148 /** Pointer to the digit index array in the rec point */
\r
149 Int_t* fDigitIndexPtr; //! transient
\r
151 /** Energy threshold for starting a cluster for the calorimeter */
\r
152 Float_t fEmcClusteringThreshold; //COMMENT
\r
154 /** Energy threshold for including a crystal in a cluster */
\r
155 Float_t fEmcMinEnergyThreshold; //COMMENT
\r
157 /** Maximum time difference for inclusion in a rec point */
\r
158 Float_t fEmcTimeGate; //COMMENT
\r
160 /** Counts the digits in a rec point */
\r
161 Int_t fDigitsInCluster; //COMMENT
\r
163 /** Array of our digits */
\r
164 AliHLTCaloDigitDataStruct **fDigitsPointerArray; //! transient
\r
166 /** Contains the digits from one event */
\r
167 AliHLTCaloDigitContainerDataStruct *fDigitContainerPtr; //! transient
\r
169 /** Maximum difference in index to be a neighbour */
\r
170 Int_t fMaxDigitIndexDiff; //COMMENT
\r
172 /** Number of digits in event */
\r
173 Int_t fNDigits; //COMMENT
\r
177 AliHLTCaloClusterizer();
\r
179 AliHLTCaloClusterizer (const AliHLTCaloClusterizer &);
\r
180 // AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer &)
\r
185 ClassDef(AliHLTCaloClusterizer, 0);
\r