Line data Source code
1 : // -*- mode: c++ -*-
2 : #ifndef ALIEMCALRAWUTILS_H
3 : #define ALIEMCALRAWUTILS_H
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : //_________________________________________________________________________
8 : /// \class AliEMCALRawUtils
9 : /// \brief Handling of raw data.
10 : ///
11 : /// Utility Class for handling Raw data
12 : /// Does all transitions from Digits to Raw and vice versa,
13 : /// for simu and reconstruction
14 : ///
15 : /// Only one raw signal per digit is generated;
16 : /// either high-gain or low-gain
17 : /// No pedestal is added to the raw signal.
18 : ///
19 : /// \author Marco van Leeuwen <Marco.Van.Leeuwen@cern.ch>, LBL. First implementation.
20 : /// \author Per Thomas Hille <p.t.hille@fys.uio.no>, Yale. Major refactoring.
21 : /// \author David Silvermyr <David.Silvermyr@cern.ch>, Oak Ridge. Trimming and real data adjustments.
22 : //_________________________________________________________________________
23 :
24 : #include "TObject.h" // for ROOT types
25 : #include <TString.h>
26 :
27 : class AliAnalysisManager;
28 : class AliCaloRawStreamV3;
29 : class AliAltroMapping;
30 : class TGraph;
31 : class AliRawReader;
32 : class AliEMCALGeometry;
33 : class AliCaloCalibPedestal;
34 : class AliCaloRawAnalyzer;
35 : class AliEMCALTriggerRawDigitMaker;
36 : class AliEMCALTriggerData;
37 : class TClonesArray;
38 :
39 : #include "AliCaloConstants.h"
40 :
41 : class AliEMCALRawUtils : public TObject {
42 :
43 : public:
44 :
45 : AliEMCALRawUtils(Algo::fitAlgorithm fitAlgo = Algo::kStandard);
46 :
47 : virtual ~AliEMCALRawUtils();
48 :
49 : void Digits2Raw();
50 :
51 : void Raw2Digits(AliRawReader *reader, TClonesArray *digitsArr, const AliCaloCalibPedestal* pedbadmap,
52 : TClonesArray *digitsTRG=0x0, TClonesArray *trgData=0x0);
53 :
54 : void AddDigit(TClonesArray *digitsArr, Int_t id, Int_t lowGain, Float_t amp, Float_t time, Float_t chi2, Int_t ndf);
55 :
56 : void TrimDigits(TClonesArray *digitsArr);
57 :
58 0 : Int_t GetNoiseThreshold() const { return fNoiseThreshold ; }
59 :
60 0 : Int_t GetNPedSamples() const { return fNPedSamples ; }
61 :
62 0 : Bool_t GetRemoveBadChannels() const { return fRemoveBadChannels ; }
63 :
64 8 : Int_t GetFittingAlgorithm() const { return fFittingAlgorithm ; }
65 :
66 0 : Float_t GetTimeMax() const { return fTimeMax ; }
67 :
68 0 : Float_t GetTimeMin() const { return fTimeMin ; }
69 :
70 0 : Bool_t UseFALTRO() const { return fUseFALTRO ; }
71 :
72 8 : void SetNoiseThreshold(Int_t val) { fNoiseThreshold=val ; }
73 :
74 8 : void SetNPedSamples(Int_t val) { fNPedSamples=val ; }
75 :
76 4 : void SetRemoveBadChannels(Bool_t val) { fRemoveBadChannels=val ; }
77 :
78 : void SetFittingAlgorithm(Int_t val) ;
79 :
80 0 : void SetTimeMin(Float_t t) { fTimeMin = t ; }
81 :
82 0 : void SetTimeMax(Float_t t) { fTimeMax = t ; }
83 :
84 4 : void SetFALTROUsage(Bool_t val) { fUseFALTRO = val ; }
85 :
86 4 : void SetL1PhaseUsage(Bool_t val) { fUseL1Phase = val ; }
87 :
88 0 : AliCaloRawAnalyzer *GetRawAnalyzer() const { return fRawAnalyzer ; }
89 :
90 0 : virtual Option_t* GetOption() const { return fOption.Data() ; }
91 :
92 8 : void SetOption(const Option_t* opt) { fOption = opt ; }
93 :
94 : private:
95 :
96 : AliEMCALRawUtils (const AliEMCALRawUtils& rawUtils);
97 :
98 : AliEMCALRawUtils& operator =(const AliEMCALRawUtils& rawUtils);
99 :
100 : Int_t fNoiseThreshold; ///< Threshold to consider signal or noise.
101 :
102 : Int_t fNPedSamples; ///< Number of samples to use in pedestal calculation.
103 :
104 : AliEMCALGeometry* fGeom; ///< Geometry.
105 :
106 : AliAltroMapping* fMapping[4]; ///< What is the array size?
107 :
108 : TString fOption; ///< Option passed from Reconstructor.
109 :
110 : Bool_t fRemoveBadChannels; ///< Select if bad channels are removed before fitting.
111 :
112 : Int_t fFittingAlgorithm; ///< Select the fitting algorithm.
113 :
114 : Float_t fTimeMin; ///< Minimum threshold for the time of the signal.
115 :
116 : Float_t fTimeMax; ///< Maximum threshold for the time of the signal.
117 :
118 : Bool_t fUseFALTRO; ///< Use FALTRO and pass it to the digits.
119 :
120 : Bool_t fUseL1Phase; ///< Use L1Phase time shift.
121 :
122 : AliCaloRawAnalyzer *fRawAnalyzer; ///< e.g. for sample selection for fits.
123 :
124 : AliEMCALTriggerRawDigitMaker* fTriggerRawDigitMaker; ///< Trigger raw digit info.
125 :
126 : /// \cond CLASSIMP
127 168 : ClassDef(AliEMCALRawUtils,8) ;
128 : /// \endcond
129 :
130 : };
131 :
132 : #endif
|