]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSDigitMaker.h
Selectiv readout and writing to FXS (oystein)
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSDigitMaker.h
CommitLineData
209a4703 1
ab38011b 2/**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * All rights reserved. *
5 * *
6 * Primary Authors: Oystein Djuvsland *
7 * *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
209a4703 16#ifndef ALIHLTPHOSDIGITMAKER_H
17#define ALIHLTPHOSDIGITMAKER_H
18
2374af72 19/**
20 * Class makes digits from information from raw data
21 *
22 * @file AliHLTPHOSDigitMaker.h
23 * @author Oystein Djuvsland
24 * @date
25 * @brief Digit maker for PHOS HLT
26 */
27
28// see below for class documentation
29// or
30// refer to README to build package
31// or
32// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
33
209a4703 34#include "AliHLTPHOSBase.h"
35#include "AliHLTPHOSConstants.h"
36
2374af72 37/**
38 * @class AliHLTPHOSDigitMaker
39 * Digit maker for PHOS HLT. Takes input from AliHLTPHOSRawAnalyzer, and
40 * outputs an AliHLTPHOSDigitDataStruct container, or a TClonesArray of
41 * AliHLTPHOSDigit. Can do software zero suppression
42 * @ingroup alihlt_phos
43 */
209a4703 44
209a4703 45class TClonesArray;
46class TTree;
47class AliHLTPHOSValidCellDataStruct;
48class AliHLTPHOSRcuCellEnergyDataStruct;
49class AliHLTPHOSDigitContainerDataStruct;
50class AliHLTPHOSDigitDataStruct;
14ff16ed 51class AliHLTPHOSSharedMemoryInterface; // added by PTH
209a4703 52
53using namespace PhosHLTConst;
54
55class AliHLTPHOSDigitMaker : public AliHLTPHOSBase
56{
57public:
2374af72 58
59 /** Constructor */
209a4703 60 AliHLTPHOSDigitMaker();
2374af72 61
62 /** Destructor */
ab38011b 63 virtual ~AliHLTPHOSDigitMaker();
25b7f84c 64
65 /** Copy constructor */
66 AliHLTPHOSDigitMaker(const AliHLTPHOSDigitMaker &) :
67 AliHLTPHOSBase(),
68 fCellDataPtr(0),
69 fDigitContainerStructPtr(0),
70 fDigitArrayPtr(0),
71 fDigitStructPtr(0),
72 fDigitCount(0)
73 {
74 //Copy constructor not implemented
75 }
76
77 /** Assignment */
78 AliHLTPHOSDigitMaker & operator = (const AliHLTPHOSDigitMaker)
79 {
80 //Assignment
81 return *this;
82 }
83
209a4703 84
85 // void SetValidCellData(AliHLTPHOSValidCellDataStruct *data) { fCellDataPtr = data; }
86 // void SetDigitContainerStruct(AliHLTPHOSDigitContainerStruct *container)
87 //{ fDigitContainerStructPtr = container; }
2374af72 88
89 /**
90 * Sets the AliHLTPHOSDigitDataStruct container
91 * @param container the digit container
92 */
209a4703 93 void SetDigitContainerStruct(AliHLTPHOSDigitContainerDataStruct *container)
94 { fDigitContainerStructPtr = container; }
2374af72 95
96 /**
97 * Sets the TClonesArray of AliHLTPHOSDigit
98 * @param array the array
99 */
209a4703 100 void SetDigitArray(TClonesArray *array) { fDigitArrayPtr = array; }
2374af72 101
102 /**
d949e02e 103 * Sets the digit thresholds
104 * @param filepath is the path to a file containing RMS
105 * histograms for both gains
106 * @param nSigmas is the number of sigmas to put the threshold
2374af72 107 */
d949e02e 108 void SetDigitThresholds(const char* filepath, Int_t nSigmas);
109
2374af72 110
111 /**
112 * Sets the number of pre samples
113 * @param n the number of pre samples
114 */
d949e02e 115 //void SetNrPresamples(Int_t n) { fNrPresamples = n; }
116
117 /**
118 * Set the global high gain conversion factory
119 * @param factor is the conversion factor
120 */
121 void SetGlobalHighGainFactor(Float_t factor);
122
123 /**
124 * Set the global low gain conversion factory
125 * @param factor is the conversion factor
126 */
127 void SetGlobalLowGainFactor(Float_t factor);
2374af72 128
129 /**
130 * Make the digits for one event.
131 * @param rcuCellEnergies is the data from the AliHLTPHOSRawAnalyzer
132 * @return the number of digits found
133 */
134 Int_t MakeDigits(AliHLTPHOSRcuCellEnergyDataStruct* rcuCellEnergies);
135
136 /** Reset the digit maker */
209a4703 137 void Reset();
138
139private:
140
2374af72 141 /** Pointer to valid cell list */
142 AliHLTPHOSValidCellDataStruct *fCellDataPtr; //! transient
143
144 /** Pointer to the digit container */
145 AliHLTPHOSDigitContainerDataStruct *fDigitContainerStructPtr; //! transient
146
147 /** Pointer to the digit TClonesArray */
148 TClonesArray *fDigitArrayPtr; //! transient
149
2374af72 150 /** Pointer to a AliHLTPHOSDigitDataStruct */
151 AliHLTPHOSDigitDataStruct *fDigitStructPtr; //! transient
152
153 /** Digit count */
d949e02e 154 Int_t fDigitCount; //COMMENT
155
156 /** High gain energy conversion factors */
157 Float_t fHighGainFactors[N_XCOLUMNS_MOD][N_ZROWS_MOD]; //COMMENT
158
159 /** Low gain energy conversion factors */
160 Float_t fLowGainFactors[N_XCOLUMNS_MOD][N_ZROWS_MOD]; //COMMENT
2374af72 161
d949e02e 162 /** Threshold for making digit ( zero suppression threshold) */
163 Float_t fDigitThresholds[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]; //COMMENT
209a4703 164
2374af72 165 ClassDef(AliHLTPHOSDigitMaker, 1);
209a4703 166};
167
168
169#endif
170