3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
9 // Base Class for EMCAL
11 //*-- Author: Yves Schutz (SUBATECH)
13 // --- ROOT system ---
22 // --- AliRoot header files ---
24 #include "AliDetector.h"
25 #include "AliEMCALGeometry.h"
26 class AliEMCAL : public AliDetector {
31 AliEMCAL(const char* name, const char* title="");
32 AliEMCAL(const AliEMCAL& emcal) : AliDetector(emcal) {
33 // cpy ctor: no implementation yet
34 // requested by the Coding Convention
35 Fatal("cpy ctor", "not implemented") ;
38 virtual void AddHit(Int_t, Int_t*, Float_t *) {
39 Fatal("AddHit(Int_t, Int_t*, Float_t *", "not to be used: use AddHit( Int_t shunt, Int_t primary, Int_t track,Int_t id, Float_t *hits )") ;
41 virtual void Copy(TObject & emcal) const
42 { Copy(dynamic_cast<AliEMCAL&>(emcal)); }
43 virtual void Copy(AliEMCAL & emcal) const;
44 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
45 virtual void CreateMaterials() ;
47 virtual void Digits2Raw();
48 virtual void Raw2Digits(AliRawReader *reader);
49 virtual void FinishRun() {}
50 virtual AliEMCALGeometry * GetGeometry() const
51 {return AliEMCALGeometry::GetInstance(GetTitle(),"") ; }
52 virtual void Hits2SDigits();
53 virtual Int_t IsVersion(void) const = 0 ;
55 Double_t GetRawFormatCapa() const { return fgCapa ; }
56 Double_t GetRawFormatHighCharge() const { return fHighCharge ; }
57 Double_t GetRawFormatHighGain() const { return fHighGain ; }
58 Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }
59 Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; }
60 Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }
61 Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }
62 Int_t GetRawFormatOrder() const { return fgOrder ; }
63 Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }
64 Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }
65 Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }
66 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
67 Int_t GetRawFormatDDLOffset() const { return fgDDLOffset ; }
68 Int_t GetRawFormatThreshold() const { return fgThreshold ; }
69 Int_t GetRawFormatChannelsPerDDL() const { return fgChannelsPerDDL ; }
70 static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
72 virtual AliLoader* MakeLoader(const char* topfoldername);
73 virtual const TString Version() const {return TString(" ") ; }
74 AliEMCAL & operator = (const AliEMCAL & /*rvalue*/) {
75 Fatal("operator =", "not implemented") ; return *this ; }
79 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
80 Bool_t RawSampledResponse(const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const ;
81 void FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) ;
83 Int_t fBirkC0; // constants for Birk's Law implementation
84 Double_t fBirkC1; // constants for Birk's Law implementation
85 Double_t fBirkC2; // constants for Birk's Law implementation
87 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
88 Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
89 Double_t fHighGain ; // high gain for the raw RO signal
90 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
91 Int_t fLowGainOffset ; // to separate high from low gain in the DDL
92 static Int_t fgOrder ; // order of the gamma function for the RO signal
93 static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
94 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
95 static Double_t fgTimePeak ; // peaking time of the raw RO signal
96 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
97 static Int_t fgDDLOffset;
98 static Int_t fgThreshold;
99 static Int_t fgChannelsPerDDL;
101 ClassDef(AliEMCAL,9) // Electromagnetic calorimeter (base class)