]>
Commit | Line | Data |
---|---|---|
1b41ab20 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | ||
ab38011b | 4 | /************************************************************************** |
5 | * This file is property of and copyright by the ALICE HLT Project * | |
6 | * All rights reserved. * | |
7 | * * | |
1804b020 | 8 | * Primary Authors: Oystein Djuvsland * |
ab38011b | 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 | **************************************************************************/ | |
2ef3c547 | 18 | |
91b95d47 | 19 | #ifndef ALIHLTPHOSCLUSTERIZER_H |
20 | #define ALIHLTPHOSCLUSTERIZER_H | |
aac22523 | 21 | |
2374af72 | 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 | ||
9cc0deb1 | 39 | #include "AliHLTPHOSBase.h" |
8b035d03 | 40 | #include "AliPHOSLoader.h" |
ab38011b | 41 | |
1804b020 | 42 | #include "AliHLTPHOSRecPointContainerStruct.h" |
43 | #include "AliHLTPHOSRecPointDataStruct.h" | |
44 | #include "AliHLTPHOSDigitContainerDataStruct.h" | |
45 | #include "AliHLTPHOSDigitDataStruct.h" | |
ab38011b | 46 | |
1804b020 | 47 | #include "AliPHOSGeometry.h" |
ab38011b | 48 | |
49 | class TClonesArray; | |
50 | class AliPHOSDigit; | |
94594220 | 51 | class AliPHOSRecoParamEmc; |
7e88424f | 52 | class AliPHOSRecoParam; |
2ef3c547 | 53 | |
2374af72 | 54 | /** |
55 | * @class AliHLTPHOSClusterizer | |
56 | * Clusterizer for PHOS HLT. The clusterizer takes digits as input, either | |
57 | * in the form of a container of AliHLTPHOSDigitDataStruct or a | |
8b035d03 | 58 | * TClonesArray of AliPHOSDigit through an instance of a AliPHOSLoader |
2374af72 | 59 | * |
60 | * @ingroup alihlt_phos | |
61 | */ | |
9cc0deb1 | 62 | class AliHLTPHOSClusterizer : public AliHLTPHOSBase |
aac22523 | 63 | { |
64 | ||
9cc0deb1 | 65 | public: |
66 | ||
2374af72 | 67 | /** Constructor */ |
9cc0deb1 | 68 | AliHLTPHOSClusterizer(); |
aac22523 | 69 | |
2374af72 | 70 | /** Destructor */ |
aac22523 | 71 | virtual ~AliHLTPHOSClusterizer(); |
9cc0deb1 | 72 | |
25b7f84c | 73 | /** Copy constructor */ |
e304ea31 | 74 | AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &) : |
75 | AliHLTPHOSBase(), | |
76 | fRecPointDataPtr(0), | |
77 | fDigitDataPtr(0), | |
25b7f84c | 78 | fEmcClusteringThreshold(0), |
79 | fEmcMinEnergyThreshold(0), | |
80 | fEmcTimeGate(0), | |
25b7f84c | 81 | fDigitsInCluster(0), |
25b7f84c | 82 | fDigitContainerPtr(0), |
27029341 | 83 | fMaxDigitIndexDiff(2*NZROWSMOD) |
25b7f84c | 84 | { |
85 | //Copy constructor not implemented | |
86 | } | |
87 | ||
88 | /** Assignment */ | |
89 | AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer) | |
90 | { | |
91 | //Assignment | |
92 | return *this; | |
93 | } | |
94 | ||
14ff16ed | 95 | /** Set digit container */ |
96 | void SetDigitContainer(AliHLTPHOSDigitContainerDataStruct* digitContainerPtr) | |
97 | { fDigitContainerPtr = digitContainerPtr; } | |
98 | ||
e304ea31 | 99 | /** Set rec point data buffer */ |
100 | void SetRecPointDataPtr(AliHLTPHOSRecPointDataStruct* recPointDataPtr); | |
9cc0deb1 | 101 | |
2374af72 | 102 | /** Set reco parameters */ |
7e88424f | 103 | void SetRecoParameters(AliPHOSRecoParam* recoPars); |
9cc0deb1 | 104 | |
2374af72 | 105 | /** Set emc clustering threshold */ |
9cc0deb1 | 106 | void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; } |
2374af72 | 107 | |
108 | /** Set emc min energy threshold */ | |
9cc0deb1 | 109 | void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; } |
2374af72 | 110 | |
111 | /** Set emc time gate */ | |
9cc0deb1 | 112 | void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; } |
9cc0deb1 | 113 | |
2374af72 | 114 | /** Starts clusterization of the event */ |
e304ea31 | 115 | virtual Int_t ClusterizeEvent(UInt_t availableSize, UInt_t& totSize); |
aac22523 | 116 | |
2374af72 | 117 | /** |
118 | * For a given digit this digit scans for neighbouring digits which | |
119 | * passes the threshold for inclusion in a rec point. If one is found | |
120 | * it is added to the current rec point | |
121 | * @param digIndex index of the digit in the digit container | |
122 | * @param recPoint pointer to the current rec point | |
123 | */ | |
ab38011b | 124 | virtual void ScanForNeighbourDigits(Int_t digIndex, AliHLTPHOSRecPointDataStruct* recPoint); |
2374af72 | 125 | |
126 | /** | |
127 | * Checks if two digits are neighbours | |
128 | * @param d1 first digit | |
129 | * @param d2 second digit | |
130 | */ | |
ab38011b | 131 | virtual Int_t AreNeighbours(AliHLTPHOSDigitDataStruct* d1, AliHLTPHOSDigitDataStruct* d2); |
2374af72 | 132 | |
9cc0deb1 | 133 | |
94594220 | 134 | protected: |
e304ea31 | 135 | |
136 | /** Pointer to the rec point output */ | |
137 | AliHLTPHOSRecPointDataStruct* fRecPointDataPtr; //! transient | |
138 | ||
139 | /** Pointer to the digit output */ | |
140 | AliHLTPHOSDigitDataStruct* fDigitDataPtr; //! transient | |
141 | ||
2374af72 | 142 | /** Energy threshold for starting a cluster for the calorimeter */ |
143 | Float_t fEmcClusteringThreshold; //COMMENT | |
144 | ||
145 | /** Energy threshold for including a crystal in a cluster */ | |
146 | Float_t fEmcMinEnergyThreshold; //COMMENT | |
147 | ||
148 | /** Maximum time difference for inclusion in a rec point */ | |
149 | Float_t fEmcTimeGate; //COMMENT | |
150 | ||
2374af72 | 151 | /** Counts the digits in a rec point */ |
152 | Int_t fDigitsInCluster; //COMMENT | |
aac22523 | 153 | |
2374af72 | 154 | /** Contains the digits from one event */ |
155 | AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //! transient | |
156 | ||
94594220 | 157 | /** Maximum difference in index to be a neighbour */ |
e304ea31 | 158 | Int_t fMaxDigitIndexDiff; //COMMENT |
94594220 | 159 | |
87434909 | 160 | ClassDef(AliHLTPHOSClusterizer, 0); |
aac22523 | 161 | }; |
162 | ||
163 | #endif |