1 #ifndef ALIEMCALRAWUTILS_H
2 #define ALIEMCALRAWUTILS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 /* History of cvs commits:
10 * Revision 1.1 2007/03/17 19:56:38 mvl
11 * Moved signal shape routines from AliEMCAL to separate class AliEMCALRawUtils to streamline raw data reconstruction code.
15 //_________________________________________________________________________
16 // Utility Class for handling Raw data
17 // Does all transitions from Digits to Raw and vice versa,
18 // for simu and reconstruction
20 // Note: the current version is still simplified. Only
21 // one raw signal per digit is generated; either high-gain or low-gain
22 // Need to add concurrent high and low-gain info in the future
23 // No pedestal is added to the raw signal.
25 //*-- Author: Marco van Leeuwen (LBL)
27 #include "TObject.h" // for ROOT types
33 class AliEMCALRawUtils : public TObject {
36 virtual ~AliEMCALRawUtils();
39 void Raw2Digits(AliRawReader *reader,TClonesArray *digitsArr);
41 // Signal shape parameters
42 Double_t GetRawFormatHighLowGainFactor() const {return fHighLowGainFactor ;}
43 static Int_t GetRawFormatOrder() { return fgOrder ; }
44 static Int_t GetRawFormatTimeBins() { return fgkTimeBins ; }
45 static Double_t GetRawFormatTimeMax() { return fgTimeMax ; }
46 Double_t GetRawFormatTau() const { return fgTau ; }
47 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
48 Int_t GetRawFormatThreshold() const { return fgThreshold ; }
49 Int_t GetRawFormatDDLPerSuperModule() const { return fgDDLPerSuperModule ; }
51 // Signal shape functions
52 void FitRaw(TGraph * gSig, TF1* signalF, Double_t & amp, Double_t & time);
53 static Double_t RawResponseFunction(Double_t *x, Double_t *par);
54 Bool_t RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const;
56 ClassDef(AliEMCALRawUtils,0)
59 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
60 static Int_t fgOrder ; // order of the gamma function for the RO signal
61 static Double_t fgTau ; // tau parameter of gamma function for the RO signal
62 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
64 static const Int_t fgkTimeBins = 256 ; // number of sampling bins of the raw RO signal
65 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
66 static Int_t fgThreshold; // threshold
67 static Int_t fgDDLPerSuperModule; // number of DDL per SuperModule