2 /**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * All rights reserved. *
6 * Primary Authors: Oystein Djuvsland *
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 **************************************************************************/
16 #ifndef ALIHLTPHOSDIGITMAKER_H
17 #define ALIHLTPHOSDIGITMAKER_H
20 * Class makes digits from information from raw data
22 * @file AliHLTPHOSDigitMaker.h
23 * @author Oystein Djuvsland
25 * @brief Digit maker for PHOS HLT
28 // see below for class documentation
30 // refer to README to build package
32 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
34 #include "AliHLTPHOSBase.h"
35 #include "AliHLTPHOSConstants.h"
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
47 class AliHLTPHOSValidCellDataStruct;
48 class AliHLTPHOSRcuCellEnergyDataStruct;
49 class AliHLTPHOSDigitContainerDataStruct;
50 class AliHLTPHOSDigitDataStruct;
51 class AliHLTPHOSSharedMemoryInterface; // added by PTH
53 using namespace PhosHLTConst;
55 class AliHLTPHOSDigitMaker : public AliHLTPHOSBase
60 AliHLTPHOSDigitMaker();
63 virtual ~AliHLTPHOSDigitMaker();
65 /** Copy constructor */
66 AliHLTPHOSDigitMaker(const AliHLTPHOSDigitMaker &) :
69 fDigitContainerStructPtr(0),
74 //Copy constructor not implemented
78 AliHLTPHOSDigitMaker & operator = (const AliHLTPHOSDigitMaker)
85 // void SetValidCellData(AliHLTPHOSValidCellDataStruct *data) { fCellDataPtr = data; }
86 // void SetDigitContainerStruct(AliHLTPHOSDigitContainerStruct *container)
87 //{ fDigitContainerStructPtr = container; }
90 * Sets the AliHLTPHOSDigitDataStruct container
91 * @param container the digit container
93 void SetDigitContainerStruct(AliHLTPHOSDigitContainerDataStruct *container)
94 { fDigitContainerStructPtr = container; }
97 * Sets the TClonesArray of AliHLTPHOSDigit
98 * @param array the array
100 void SetDigitArray(TClonesArray *array) { fDigitArrayPtr = array; }
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
108 void SetDigitThresholds(const char* filepath, Int_t nSigmas);
112 * Sets the number of pre samples
113 * @param n the number of pre samples
115 //void SetNrPresamples(Int_t n) { fNrPresamples = n; }
118 * Set the global high gain conversion factory
119 * @param factor is the conversion factor
121 void SetGlobalHighGainFactor(Float_t factor);
124 * Set the global low gain conversion factory
125 * @param factor is the conversion factor
127 void SetGlobalLowGainFactor(Float_t factor);
130 * Make the digits for one event.
131 * @param rcuCellEnergies is the data from the AliHLTPHOSRawAnalyzer
132 * @return the number of digits found
134 Int_t MakeDigits(AliHLTPHOSRcuCellEnergyDataStruct* rcuCellEnergies);
136 /** Reset the digit maker */
141 /** Pointer to valid cell list */
142 AliHLTPHOSValidCellDataStruct *fCellDataPtr; //! transient
144 /** Pointer to the digit container */
145 AliHLTPHOSDigitContainerDataStruct *fDigitContainerStructPtr; //! transient
147 /** Pointer to the digit TClonesArray */
148 TClonesArray *fDigitArrayPtr; //! transient
150 /** Pointer to a AliHLTPHOSDigitDataStruct */
151 AliHLTPHOSDigitDataStruct *fDigitStructPtr; //! transient
154 Int_t fDigitCount; //COMMENT
156 /** High gain energy conversion factors */
157 Float_t fHighGainFactors[N_XCOLUMNS_MOD][N_ZROWS_MOD]; //COMMENT
159 /** Low gain energy conversion factors */
160 Float_t fLowGainFactors[N_XCOLUMNS_MOD][N_ZROWS_MOD]; //COMMENT
162 /** Threshold for making digit ( zero suppression threshold) */
163 Float_t fDigitThresholds[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]; //COMMENT
165 ClassDef(AliHLTPHOSDigitMaker, 1);