]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALRawUtils.h
prepare for v4-08-Release tagging
[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$
82cbdfca 10 * Revision 1.2 2007/09/03 20:55:35 jklay
11 * EMCAL e-by-e reconstruction methods from Cvetan
12 *
c47157cd 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.
15 *
ee299369 16 *
17 */
18//_________________________________________________________________________
19// Utility Class for handling Raw data
20// Does all transitions from Digits to Raw and vice versa,
21// for simu and reconstruction
22//
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.
27//
28//*-- Author: Marco van Leeuwen (LBL)
29//
30#include "TObject.h" // for ROOT types
31
32class TGraph;
33class TF1;
34class AliRawReader;
35
36class AliEMCALRawUtils : public TObject {
37 public:
38 AliEMCALRawUtils();
39 virtual ~AliEMCALRawUtils();
40
41 void Digits2Raw();
c47157cd 42 void Raw2Digits(AliRawReader *reader,TClonesArray *digitsArr);
82cbdfca 43 void AddDigit(TClonesArray *digitsArr, Int_t id, Int_t lowGain, Int_t amp, Float_t time);
ee299369 44
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 ; }
82cbdfca 49 static Double_t GetRawFormatTimeMax() { return fgkTimeBins*fgTimeBinWidth; }
50 static Double_t GetRawFormatTimeBinWidth() { return fgTimeBinWidth; }
ee299369 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 ; }
55
56 // Signal shape functions
82cbdfca 57 void FitRaw(TGraph * gSig, TF1* signalF, Float_t & amp, Float_t & time);
ee299369 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;
60
61 ClassDef(AliEMCALRawUtils,0)
62
63 private:
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
68
69 static const Int_t fgkTimeBins = 256 ; // number of sampling bins of the raw RO signal
82cbdfca 70 static Double_t fgTimeBinWidth; // maximum sampled time of the raw RO signal
ee299369 71 static Int_t fgThreshold; // threshold
72 static Int_t fgDDLPerSuperModule; // number of DDL per SuperModule
73};
74
75#endif