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 #include "AliEMCALTrigger.h"
28 class AliEMCAL : public AliDetector {
33 AliEMCAL(const char* name, const char* title="");
34 AliEMCAL(const AliEMCAL& emcal) : AliDetector(emcal) {
35 // cpy ctor: no implementation yet
36 // requested by the Coding Convention
37 Fatal("cpy ctor", "not implemented") ;
40 virtual void AddHit(Int_t, Int_t*, Float_t *) {
41 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 )") ;
43 virtual void Copy(TObject & emcal) const
44 { Copy(dynamic_cast<AliEMCAL&>(emcal)); }
45 virtual void Copy(AliEMCAL & emcal) const;
46 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
47 virtual void CreateMaterials() ;
49 virtual void Digits2Raw();
51 using AliDetector::Raw2Digits;
52 virtual void Raw2Digits(AliRawReader *reader);
54 virtual void FinishRun() {}
55 virtual AliEMCALGeometry * GetGeometry() const
56 {return AliEMCALGeometry::GetInstance(GetTitle(),"") ; }
57 virtual void Hits2SDigits();
58 virtual Int_t IsVersion(void) const = 0 ;
60 virtual AliTriggerDetector* CreateTriggerDetector() const
61 { return new AliEMCALTrigger(); }
64 Double_t GetRawFormatCapa() const { return fgCapa ; }
65 Double_t GetRawFormatHighCharge() const { return fHighCharge ; }
66 Double_t GetRawFormatHighGain() const { return fHighGain ; }
67 Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }
68 Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; }
69 Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }
70 Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }
71 Int_t GetRawFormatOrder() const { return fgOrder ; }
72 Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }
73 Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }
74 Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }
75 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
76 Int_t GetRawFormatDDLOffset() const { return fgDDLOffset ; }
77 Int_t GetRawFormatThreshold() const { return fgThreshold ; }
78 Int_t GetRawFormatChannelsPerDDL() const { return fgChannelsPerDDL ; }
79 static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
81 virtual AliLoader* MakeLoader(const char* topfoldername);
82 virtual const TString Version() const {return TString(" ") ; }
83 AliEMCAL & operator = (const AliEMCAL & /*rvalue*/) {
84 Fatal("operator =", "not implemented") ; return *this ; }
88 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
89 Bool_t RawSampledResponse(const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const ;
90 void FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) ;
92 Int_t fBirkC0; // constants for Birk's Law implementation
93 Double_t fBirkC1; // constants for Birk's Law implementation
94 Double_t fBirkC2; // constants for Birk's Law implementation
96 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
97 Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
98 Double_t fHighGain ; // high gain for the raw RO signal
99 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
100 Int_t fLowGainOffset ; // to separate high from low gain in the DDL
101 static Int_t fgOrder ; // order of the gamma function for the RO signal
102 static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
103 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
104 static Double_t fgTimePeak ; // peaking time of the raw RO signal
105 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
106 static Int_t fgDDLOffset;
107 static Int_t fgThreshold;
108 static Int_t fgChannelsPerDDL;
110 ClassDef(AliEMCAL,9) // Electromagnetic calorimeter (base class)