]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSClusterizer.h
- data member was shadowed (fTree)
[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),
25b7f84c 75 fEmcClusteringThreshold(0),
76 fEmcMinEnergyThreshold(0),
77 fEmcTimeGate(0),
25b7f84c 78 fDigitsInCluster(0),
25b7f84c 79 fDigitContainerPtr(0),
27029341 80 fMaxDigitIndexDiff(2*NZROWSMOD)
25b7f84c 81 {
82 //Copy constructor not implemented
83 }
84
85 /** Assignment */
86 AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer)
87 {
88 //Assignment
89 return *this;
90 }
91
14ff16ed 92 /** Set digit container */
93 void SetDigitContainer(AliHLTPHOSDigitContainerDataStruct* digitContainerPtr)
94 { fDigitContainerPtr = digitContainerPtr; }
95
e304ea31 96 /** Set rec point data buffer */
97 void SetRecPointDataPtr(AliHLTPHOSRecPointDataStruct* recPointDataPtr);
9cc0deb1 98
2374af72 99 /** Set emc clustering threshold */
9cc0deb1 100 void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; }
2374af72 101
102 /** Set emc min energy threshold */
9cc0deb1 103 void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; }
2374af72 104
105 /** Set emc time gate */
9cc0deb1 106 void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; }
9cc0deb1 107
2374af72 108 /** Starts clusterization of the event */
933eb3ed 109 virtual Int_t ClusterizeEvent(AliHLTPHOSDigitHeaderStruct *digitHeader, UInt_t availableSize, UInt_t& totSize);
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
2374af72 115 * @param recPoint pointer to the current rec point
116 */
933eb3ed 117 virtual Int_t ScanForNeighbourDigits(AliHLTPHOSRecPointDataStruct* recPoint);
2374af72 118
119 /**
120 * Checks if two digits are neighbours
121 * @param d1 first digit
122 * @param d2 second digit
123 */
ab38011b 124 virtual Int_t AreNeighbours(AliHLTPHOSDigitDataStruct* d1, AliHLTPHOSDigitDataStruct* d2);
2374af72 125
9cc0deb1 126
94594220 127protected:
e304ea31 128
129 /** Pointer to the rec point output */
130 AliHLTPHOSRecPointDataStruct* fRecPointDataPtr; //! transient
131
132 /** Pointer to the digit output */
133 AliHLTPHOSDigitDataStruct* fDigitDataPtr; //! transient
134
933eb3ed 135 /** Pointer to the digit output */
136 AliHLTPHOSDigitDataStruct* fCurrentDigit; //! transient
137
138 /** Pointer to the digit output */
139 AliHLTPHOSDigitDataStruct* fStartDigit; //! transient
140
141 /** Pointer to the digit output */
142 AliHLTPHOSDigitDataStruct* fPreviousDigit; //! transient
2374af72 143 /** Energy threshold for starting a cluster for the calorimeter */
144 Float_t fEmcClusteringThreshold; //COMMENT
145
146 /** Energy threshold for including a crystal in a cluster */
147 Float_t fEmcMinEnergyThreshold; //COMMENT
148
149 /** Maximum time difference for inclusion in a rec point */
150 Float_t fEmcTimeGate; //COMMENT
151
2374af72 152 /** Counts the digits in a rec point */
153 Int_t fDigitsInCluster; //COMMENT
aac22523 154
2374af72 155 /** Contains the digits from one event */
156 AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //! transient
157
94594220 158 /** Maximum difference in index to be a neighbour */
e304ea31 159 Int_t fMaxDigitIndexDiff; //COMMENT
94594220 160
f2e865b1 161 /** Current available buffer size */
162 UInt_t fAvailableSize; //COMMENT
163
0dc57e1b 164 /** object reading the digit */
165 AliHLTPHOSDigitReader *fDigitReader; //COMMENT
166
87434909 167 ClassDef(AliHLTPHOSClusterizer, 0);
aac22523 168};
169
170#endif