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.2 2007/09/03 20:55:35 jklay
11 * EMCAL e-by-e reconstruction methods from Cvetan
13 * Revision 1.1 2007/03/17 19:56:38 mvl
14 * Moved signal shape routines from AliEMCAL to separate class AliEMCALRawUtils to streamline raw data reconstruction code.
18 //_________________________________________________________________________
19 // Utility Class for handling Raw data
20 // Does all transitions from Digits to Raw and vice versa,
21 // for simu and reconstruction
23 // Note: the current version is still simplified. Only
24 // one raw signal per digit is generated; either high-gain or low-gain
25 // Need to add concurrent high and low-gain info in the future
26 // No pedestal is added to the raw signal.
28 //*-- Author: Marco van Leeuwen (LBL)
30 #include "TObject.h" // for ROOT types
36 class AliEMCALRawUtils : public TObject {
39 virtual ~AliEMCALRawUtils();
42 void Raw2Digits(AliRawReader *reader,TClonesArray *digitsArr);
43 void AddDigit(TClonesArray *digitsArr, Int_t id, Int_t lowGain, Int_t amp, Float_t time);
45 // Signal shape parameters
46 Double_t GetRawFormatHighLowGainFactor() const {return fHighLowGainFactor ;}
47 static Int_t GetRawFormatOrder() { return fgOrder ; }
48 static Int_t GetRawFormatTimeBins() { return fgkTimeBins ; }
49 static Double_t GetRawFormatTimeMax() { return fgkTimeBins*fgTimeBinWidth; }
50 static Double_t GetRawFormatTimeBinWidth() { return fgTimeBinWidth; }
51 Double_t GetRawFormatTau() const { return fgTau ; }
52 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
53 Int_t GetRawFormatThreshold() const { return fgThreshold ; }
54 Int_t GetRawFormatDDLPerSuperModule() const { return fgDDLPerSuperModule ; }
56 // Signal shape functions
57 void FitRaw(TGraph * gSig, TF1* signalF, Float_t & amp, Float_t & time);
58 static Double_t RawResponseFunction(Double_t *x, Double_t *par);
59 Bool_t RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const;
61 ClassDef(AliEMCALRawUtils,0)
64 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
65 static Int_t fgOrder ; // order of the gamma function for the RO signal
66 static Double_t fgTau ; // tau parameter of gamma function for the RO signal
67 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
69 static const Int_t fgkTimeBins = 256 ; // number of sampling bins of the raw RO signal
70 static Double_t fgTimeBinWidth; // maximum sampled time of the raw RO signal
71 static Int_t fgThreshold; // threshold
72 static Int_t fgDDLPerSuperModule; // number of DDL per SuperModule