]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSClusterizer.h
- fixing bug in digitmaker
[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
2374af72 48/**
49 * @class AliHLTPHOSClusterizer
50 * Clusterizer for PHOS HLT. The clusterizer takes digits as input, either
51 * in the form of a container of AliHLTPHOSDigitDataStruct or a
8b035d03 52 * TClonesArray of AliPHOSDigit through an instance of a AliPHOSLoader
2374af72 53 *
54 * @ingroup alihlt_phos
55 */
9f050726 56//class AliHLTPHOSClusterizer : public AliHLTPHOSBase
f2e865b1 57class AliHLTPHOSClusterizer : public AliHLTLogging
aac22523 58{
59
9cc0deb1 60public:
61
2374af72 62 /** Constructor */
9cc0deb1 63 AliHLTPHOSClusterizer();
aac22523 64
2374af72 65 /** Destructor */
aac22523 66 virtual ~AliHLTPHOSClusterizer();
9cc0deb1 67
25b7f84c 68 /** Copy constructor */
e304ea31 69 AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &) :
f2e865b1 70 AliHLTLogging(),
e304ea31 71 fRecPointDataPtr(0),
72 fDigitDataPtr(0),
25b7f84c 73 fEmcClusteringThreshold(0),
74 fEmcMinEnergyThreshold(0),
75 fEmcTimeGate(0),
25b7f84c 76 fDigitsInCluster(0),
25b7f84c 77 fDigitContainerPtr(0),
27029341 78 fMaxDigitIndexDiff(2*NZROWSMOD)
25b7f84c 79 {
80 //Copy constructor not implemented
81 }
82
83 /** Assignment */
84 AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer)
85 {
86 //Assignment
87 return *this;
88 }
89
14ff16ed 90 /** Set digit container */
91 void SetDigitContainer(AliHLTPHOSDigitContainerDataStruct* digitContainerPtr)
92 { fDigitContainerPtr = digitContainerPtr; }
93
e304ea31 94 /** Set rec point data buffer */
95 void SetRecPointDataPtr(AliHLTPHOSRecPointDataStruct* recPointDataPtr);
9cc0deb1 96
2374af72 97 /** Set emc clustering threshold */
9cc0deb1 98 void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; }
2374af72 99
100 /** Set emc min energy threshold */
9cc0deb1 101 void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; }
2374af72 102
103 /** Set emc time gate */
9cc0deb1 104 void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; }
9cc0deb1 105
2374af72 106 /** Starts clusterization of the event */
e304ea31 107 virtual Int_t ClusterizeEvent(UInt_t availableSize, UInt_t& totSize);
aac22523 108
2374af72 109 /**
110 * For a given digit this digit scans for neighbouring digits which
111 * passes the threshold for inclusion in a rec point. If one is found
112 * it is added to the current rec point
113 * @param digIndex index of the digit in the digit container
114 * @param recPoint pointer to the current rec point
115 */
f2e865b1 116 virtual Int_t ScanForNeighbourDigits(Int_t digIndex, AliHLTPHOSRecPointDataStruct* recPoint);
2374af72 117
118 /**
119 * Checks if two digits are neighbours
120 * @param d1 first digit
121 * @param d2 second digit
122 */
ab38011b 123 virtual Int_t AreNeighbours(AliHLTPHOSDigitDataStruct* d1, AliHLTPHOSDigitDataStruct* d2);
2374af72 124
9cc0deb1 125
94594220 126protected:
e304ea31 127
128 /** Pointer to the rec point output */
129 AliHLTPHOSRecPointDataStruct* fRecPointDataPtr; //! transient
130
131 /** Pointer to the digit output */
132 AliHLTPHOSDigitDataStruct* fDigitDataPtr; //! transient
133
2374af72 134 /** Energy threshold for starting a cluster for the calorimeter */
135 Float_t fEmcClusteringThreshold; //COMMENT
136
137 /** Energy threshold for including a crystal in a cluster */
138 Float_t fEmcMinEnergyThreshold; //COMMENT
139
140 /** Maximum time difference for inclusion in a rec point */
141 Float_t fEmcTimeGate; //COMMENT
142
2374af72 143 /** Counts the digits in a rec point */
144 Int_t fDigitsInCluster; //COMMENT
aac22523 145
2374af72 146 /** Contains the digits from one event */
147 AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //! transient
148
94594220 149 /** Maximum difference in index to be a neighbour */
e304ea31 150 Int_t fMaxDigitIndexDiff; //COMMENT
94594220 151
f2e865b1 152 /** Current available buffer size */
153 UInt_t fAvailableSize; //COMMENT
154
87434909 155 ClassDef(AliHLTPHOSClusterizer, 0);
aac22523 156};
157
158#endif