Moved signal shape routines from AliEMCAL to separate class AliEMCALRawUtils to strea...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRawUtils.h
CommitLineData
ee299369 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 */
5
6/* $Id$ */
7/* History of cvs commits:
8 *
9 * $Log$
10 *
11 */
12//_________________________________________________________________________
13// Utility Class for handling Raw data
14// Does all transitions from Digits to Raw and vice versa,
15// for simu and reconstruction
16//
17// Note: the current version is still simplified. Only
18// one raw signal per digit is generated; either high-gain or low-gain
19// Need to add concurrent high and low-gain info in the future
20// No pedestal is added to the raw signal.
21//
22//*-- Author: Marco van Leeuwen (LBL)
23//
24#include "TObject.h" // for ROOT types
25
26class TGraph;
27class TF1;
28class AliRawReader;
29
30class AliEMCALRawUtils : public TObject {
31 public:
32 AliEMCALRawUtils();
33 virtual ~AliEMCALRawUtils();
34
35 void Digits2Raw();
36 void Raw2Digits(AliRawReader *reader);
37
38 // Signal shape parameters
39 Double_t GetRawFormatHighLowGainFactor() const {return fHighLowGainFactor ;}
40 static Int_t GetRawFormatOrder() { return fgOrder ; }
41 static Int_t GetRawFormatTimeBins() { return fgkTimeBins ; }
42 static Double_t GetRawFormatTimeMax() { return fgTimeMax ; }
43 Double_t GetRawFormatTau() const { return fgTau ; }
44 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
45 Int_t GetRawFormatThreshold() const { return fgThreshold ; }
46 Int_t GetRawFormatDDLPerSuperModule() const { return fgDDLPerSuperModule ; }
47
48 // Signal shape functions
49 void FitRaw(TGraph * gSig, TF1* signalF, Double_t & amp, Double_t & time);
50 static Double_t RawResponseFunction(Double_t *x, Double_t *par);
51 Bool_t RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const;
52
53 ClassDef(AliEMCALRawUtils,0)
54
55 private:
56 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
57 static Int_t fgOrder ; // order of the gamma function for the RO signal
58 static Double_t fgTau ; // tau parameter of gamma function for the RO signal
59 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
60
61 static const Int_t fgkTimeBins = 256 ; // number of sampling bins of the raw RO signal
62 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
63 static Int_t fgThreshold; // threshold
64 static Int_t fgDDLPerSuperModule; // number of DDL per SuperModule
65};
66
67#endif