]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSClusterizer.h
Fixing comments
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterizer.h
CommitLineData
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
ab38011b 39
1804b020 40#include "AliHLTPHOSRecPointContainerStruct.h"
41#include "AliHLTPHOSRecPointDataStruct.h"
42#include "AliHLTPHOSDigitContainerDataStruct.h"
43#include "AliHLTPHOSDigitDataStruct.h"
f2e865b1 44#include "AliHLTLogging.h"
ab38011b 45
1804b020 46#include "AliPHOSGeometry.h"
ab38011b 47
933eb3ed 48class AliHLTPHOSDigitReader;
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
8b035d03 54 * TClonesArray of AliPHOSDigit through an instance of a AliPHOSLoader
2374af72 55 *
56 * @ingroup alihlt_phos
57 */
9f050726 58//class AliHLTPHOSClusterizer : public AliHLTPHOSBase
f2e865b1 59class AliHLTPHOSClusterizer : public AliHLTLogging
aac22523 60{
61
9cc0deb1 62public:
63
2374af72 64 /** Constructor */
9cc0deb1 65 AliHLTPHOSClusterizer();
aac22523 66
2374af72 67 /** Destructor */
aac22523 68 virtual ~AliHLTPHOSClusterizer();
9cc0deb1 69
25b7f84c 70 /** Copy constructor */
e304ea31 71 AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &) :
f2e865b1 72 AliHLTLogging(),
e304ea31 73 fRecPointDataPtr(0),
74 fDigitDataPtr(0),
f1bfc65f 75 fCurrentDigit(0),
76 fStartDigit(0),
77 fPreviousDigit(0),
25b7f84c 78 fEmcClusteringThreshold(0),
79 fEmcMinEnergyThreshold(0),
80 fEmcTimeGate(0),
25b7f84c 81 fDigitsInCluster(0),
25b7f84c 82 fDigitContainerPtr(0),
f1bfc65f 83 fMaxDigitIndexDiff(2*NZROWSMOD),
84 fAvailableSize(0),
85 fDigitReader(0)
25b7f84c 86 {
87 //Copy constructor not implemented
88 }
89
90 /** Assignment */
91 AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer)
92 {
93 //Assignment
94 return *this;
95 }
96
14ff16ed 97 /** Set digit container */
98 void SetDigitContainer(AliHLTPHOSDigitContainerDataStruct* digitContainerPtr)
99 { fDigitContainerPtr = digitContainerPtr; }
100
e304ea31 101 /** Set rec point data buffer */
102 void SetRecPointDataPtr(AliHLTPHOSRecPointDataStruct* recPointDataPtr);
9cc0deb1 103
2374af72 104 /** Set emc clustering threshold */
9cc0deb1 105 void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; }
2374af72 106
107 /** Set emc min energy threshold */
9cc0deb1 108 void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; }
2374af72 109
110 /** Set emc time gate */
9cc0deb1 111 void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; }
9cc0deb1 112
2374af72 113 /** Starts clusterization of the event */
933eb3ed 114 virtual Int_t ClusterizeEvent(AliHLTPHOSDigitHeaderStruct *digitHeader, UInt_t availableSize, UInt_t& totSize);
115
2374af72 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
2374af72 120 * @param recPoint pointer to the current rec point
121 */
341aab10 122 virtual Int_t ScanForNeighbourDigits(AliHLTPHOSRecPointDataStruct* recPoint, AliHLTPHOSDigitDataStruct *digit);
2374af72 123
124 /**
125 * Checks if two digits are neighbours
126 * @param d1 first digit
127 * @param d2 second digit
128 */
ab38011b 129 virtual Int_t AreNeighbours(AliHLTPHOSDigitDataStruct* d1, AliHLTPHOSDigitDataStruct* d2);
2374af72 130
9cc0deb1 131
94594220 132protected:
e304ea31 133
134 /** Pointer to the rec point output */
135 AliHLTPHOSRecPointDataStruct* fRecPointDataPtr; //! transient
136
137 /** Pointer to the digit output */
138 AliHLTPHOSDigitDataStruct* fDigitDataPtr; //! transient
139
933eb3ed 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
2374af72 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
2374af72 157 /** Counts the digits in a rec point */
158 Int_t fDigitsInCluster; //COMMENT
aac22523 159
2374af72 160 /** Contains the digits from one event */
161 AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //! transient
162
94594220 163 /** Maximum difference in index to be a neighbour */
e304ea31 164 Int_t fMaxDigitIndexDiff; //COMMENT
94594220 165
f2e865b1 166 /** Current available buffer size */
167 UInt_t fAvailableSize; //COMMENT
168
0dc57e1b 169 /** object reading the digit */
170 AliHLTPHOSDigitReader *fDigitReader; //COMMENT
171
87434909 172 ClassDef(AliHLTPHOSClusterizer, 0);
aac22523 173};
174
175#endif