]>
Commit | Line | Data |
---|---|---|
ab38011b | 1 | /************************************************************************** |
2 | * This file is property of and copyright by the ALICE HLT Project * | |
3 | * All rights reserved. * | |
4 | * * | |
1804b020 | 5 | * Primary Authors: Oystein Djuvsland * |
ab38011b | 6 | * * |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
2ef3c547 | 15 | |
91b95d47 | 16 | #ifndef ALIHLTPHOSCLUSTERIZER_H |
17 | #define ALIHLTPHOSCLUSTERIZER_H | |
aac22523 | 18 | |
2374af72 | 19 | |
20 | /** | |
21 | * Class does clusterization in for PHOS on an event basis. It is intended | |
22 | * for use in HLT, but can also be used offline | |
23 | * | |
24 | * @file AliHLTPHOSClusterizer.h | |
25 | * @author Oystein Djuvsland | |
26 | * @date | |
27 | * @brief Clusterizer for PHOS HLT | |
28 | */ | |
29 | ||
30 | // see header file for class documentation | |
31 | // or | |
32 | // refer to README to build package | |
33 | // or | |
34 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
35 | ||
9cc0deb1 | 36 | #include "AliHLTPHOSBase.h" |
9cc0deb1 | 37 | #include "AliPHOSGetter.h" |
ab38011b | 38 | |
1804b020 | 39 | #include "AliHLTPHOSRecPointContainerStruct.h" |
40 | #include "AliHLTPHOSRecPointDataStruct.h" | |
41 | #include "AliHLTPHOSDigitContainerDataStruct.h" | |
42 | #include "AliHLTPHOSDigitDataStruct.h" | |
ab38011b | 43 | |
1804b020 | 44 | #include "AliPHOSGeometry.h" |
ab38011b | 45 | |
46 | class TClonesArray; | |
47 | class AliPHOSDigit; | |
48 | class AliPHOSRecoParamEmc; | |
2ef3c547 | 49 | |
2374af72 | 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 AliPHOSGetter | |
55 | * | |
56 | * @ingroup alihlt_phos | |
57 | */ | |
9cc0deb1 | 58 | class AliHLTPHOSClusterizer : public AliHLTPHOSBase |
aac22523 | 59 | { |
60 | ||
9cc0deb1 | 61 | public: |
62 | ||
2374af72 | 63 | /** Constructor */ |
9cc0deb1 | 64 | AliHLTPHOSClusterizer(); |
aac22523 | 65 | |
2374af72 | 66 | /** Destructor */ |
aac22523 | 67 | virtual ~AliHLTPHOSClusterizer(); |
aac22523 | 68 | |
2374af72 | 69 | /* |
9cc0deb1 | 70 | AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &); |
71 | AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;} | |
2374af72 | 72 | */ |
9cc0deb1 | 73 | |
2374af72 | 74 | /** Set rec point container */ |
9cc0deb1 | 75 | void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *RecPointContainerPtr) |
76 | { fRecPointContainerPtr = RecPointContainerPtr; } | |
77 | ||
2374af72 | 78 | /** Set reco parameters */ |
ab38011b | 79 | void SetRecoParameters(AliPHOSRecoParamEmc* recoPars); |
9cc0deb1 | 80 | |
2374af72 | 81 | /** Set emc clustering threshold */ |
9cc0deb1 | 82 | void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; } |
2374af72 | 83 | |
84 | /** Set emc min energy threshold */ | |
9cc0deb1 | 85 | void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; } |
2374af72 | 86 | |
87 | /** Set emc time gate */ | |
9cc0deb1 | 88 | void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; } |
2374af72 | 89 | |
90 | /** Set log weight */ | |
9cc0deb1 | 91 | void SetLogWeight(Float_t weight) { fLogWeight = weight; } |
92 | ||
2374af72 | 93 | /** |
94 | * Set offline mode | |
95 | * @param getter pointer to an instance of AliPHOSGetter | |
96 | */ | |
ab38011b | 97 | void SetOfflineMode(AliPHOSGetter* getter); |
9cc0deb1 | 98 | |
2374af72 | 99 | /** Starts clusterization of the event */ |
9cc0deb1 | 100 | virtual Int_t ClusterizeEvent(); |
2374af72 | 101 | |
102 | /** | |
103 | * Gets an event, for offline mode | |
104 | * @param evtNr event number to get | |
105 | */ | |
ab38011b | 106 | virtual Int_t GetEvent(Int_t evtNr); |
aac22523 | 107 | |
2374af72 | 108 | /** Get number of events */ |
9cc0deb1 | 109 | Int_t GetNEvents(); |
aac22523 | 110 | |
2374af72 | 111 | /** |
112 | * For a given digit this digit scans for neighbouring digits which | |
113 | * passes the threshold for inclusion in a rec point. If one is found | |
114 | * it is added to the current rec point | |
115 | * @param digIndex index of the digit in the digit container | |
116 | * @param recPoint pointer to the current rec point | |
117 | */ | |
ab38011b | 118 | virtual void ScanForNeighbourDigits(Int_t digIndex, AliHLTPHOSRecPointDataStruct* recPoint); |
2374af72 | 119 | |
120 | /** | |
121 | * Checks if two digits are neighbours | |
122 | * @param d1 first digit | |
123 | * @param d2 second digit | |
124 | */ | |
ab38011b | 125 | virtual Int_t AreNeighbours(AliHLTPHOSDigitDataStruct* d1, AliHLTPHOSDigitDataStruct* d2); |
2374af72 | 126 | |
127 | /** Calculates the center of gravity of a rec point */ | |
9cc0deb1 | 128 | virtual void CalculateCenterOfGravity(); |
129 | ||
130 | private: | |
2374af72 | 131 | /** Energy threshold for starting a cluster for the calorimeter */ |
132 | Float_t fEmcClusteringThreshold; //COMMENT | |
133 | ||
134 | /** Energy threshold for including a crystal in a cluster */ | |
135 | Float_t fEmcMinEnergyThreshold; //COMMENT | |
136 | ||
137 | /** Maximum time difference for inclusion in a rec point */ | |
138 | Float_t fEmcTimeGate; //COMMENT | |
139 | ||
140 | /** Variable used in calculation of the center of gravity for a rec point */ | |
141 | Float_t fLogWeight; //COMMENT | |
142 | ||
143 | /** Counts the digits in a rec point */ | |
144 | Int_t fDigitsInCluster; //COMMENT | |
aac22523 | 145 | |
2374af72 | 146 | /** Online mode flag */ |
147 | Bool_t fOnlineMode; //COMMENT | |
ab38011b | 148 | |
2374af72 | 149 | /** Array of digits from one event, used in offline mode */ |
150 | TClonesArray *fDigitArrayPtr; //! transient | |
151 | ||
152 | /** Array of reconstruction points from one event, used in offline mode */ | |
153 | TObjArray *fEmcRecPointsPtr; //! transient | |
154 | ||
155 | /** Pointer to digit */ | |
156 | AliPHOSDigit *fDigitPtr; //! transient | |
157 | ||
158 | /** Contains the digits from one event */ | |
159 | AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //! transient | |
160 | ||
161 | /** Contains the reconstruction points from one event */ | |
162 | AliHLTPHOSRecPointContainerStruct *fRecPointContainerPtr; //! transient | |
aac22523 | 163 | |
2374af72 | 164 | /** Instance of the PHOS geometry class */ |
165 | AliPHOSGeometry *fPHOSGeometry; //! transient | |
9cc0deb1 | 166 | |
2374af72 | 167 | /** Instance of the PHOS getter, used in offline mode */ |
168 | AliPHOSGetter *fGetterPtr; //! transient | |
9cc0deb1 | 169 | |
aac22523 | 170 | ClassDef(AliHLTPHOSClusterizer, 1); |
171 | }; | |
172 | ||
173 | #endif |