]>
Commit | Line | Data |
---|---|---|
2012850d | 1 | #ifndef ALIEMCAL_H |
2 | #define ALIEMCAL_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 | ||
8 | //_________________________________________________________________________ | |
9 | // Base Class for EMCAL | |
14ce0a6e | 10 | // holds all geant information of |
11 | // materials, etc. | |
2012850d | 12 | // |
13 | //*-- Author: Yves Schutz (SUBATECH) | |
14 | ||
2012850d | 15 | // --- ROOT system --- |
05a92d59 | 16 | |
2012850d | 17 | class TString ; |
05a92d59 | 18 | class TTask ; |
19 | class TFolder ; | |
f51151a0 | 20 | class TRandom ; |
2d5d9e60 | 21 | class TGraph; |
22 | class TF1; | |
2012850d | 23 | |
24 | // --- AliRoot header files --- | |
2d5d9e60 | 25 | class AliRawReader; |
2012850d | 26 | #include "AliDetector.h" |
8367ce9a | 27 | #include "AliEMCALGeometry.h" |
0631a867 | 28 | #include "AliEMCALTrigger.h" |
b4215a15 | 29 | |
2012850d | 30 | class AliEMCAL : public AliDetector { |
31 | ||
32 | public: | |
b4215a15 | 33 | |
b13bbe81 | 34 | AliEMCAL(); |
2012850d | 35 | AliEMCAL(const char* name, const char* title=""); |
0a4cb131 | 36 | |
2012850d | 37 | virtual ~AliEMCAL() ; |
5dee926e | 38 | virtual void AddHit(Int_t, Int_t*, Float_t *) { |
d64c959b | 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 )") ; |
b13bbe81 | 40 | } |
8367ce9a | 41 | virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; |
f51151a0 | 42 | virtual void CreateMaterials() ; |
905263da | 43 | // virtual void |
f51151a0 | 44 | virtual void Digits2Raw(); |
b4215a15 | 45 | |
4800667c | 46 | using AliDetector::Raw2Digits; |
2d5d9e60 | 47 | virtual void Raw2Digits(AliRawReader *reader); |
b4215a15 | 48 | |
fdebddeb | 49 | virtual void FinishRun() {} |
8367ce9a | 50 | virtual AliEMCALGeometry * GetGeometry() const |
b4215a15 | 51 | {return AliEMCALGeometry::GetInstance(GetTitle(),"") ; } |
8367ce9a | 52 | virtual void Hits2SDigits(); |
fdebddeb | 53 | virtual Int_t IsVersion(void) const = 0 ; |
b4215a15 | 54 | |
55 | virtual AliTriggerDetector* CreateTriggerDetector() const | |
56 | { return new AliEMCALTrigger(); } | |
0a4cb131 | 57 | |
56088960 | 58 | // Raw Read Out |
59 | Double_t GetRawFormatCapa() const { return fgCapa ; } | |
60 | Double_t GetRawFormatHighCharge() const { return fHighCharge ; } | |
61 | Double_t GetRawFormatHighGain() const { return fHighGain ; } | |
62 | Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; } | |
63 | Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; } | |
64 | Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; } | |
65 | Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; } | |
66 | Int_t GetRawFormatOrder() const { return fgOrder ; } | |
14ce0a6e | 67 | Int_t GetRawFormatTimeBins() const { return fgkTimeBins ; } |
56088960 | 68 | Double_t GetRawFormatTimeMax() const { return fgTimeMax ; } |
69 | Double_t GetRawFormatTimePeak() const { return fgTimePeak ; } | |
2d5d9e60 | 70 | Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; } |
2d5d9e60 | 71 | Int_t GetRawFormatThreshold() const { return fgThreshold ; } |
72 | Int_t GetRawFormatChannelsPerDDL() const { return fgChannelsPerDDL ; } | |
56088960 | 73 | static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ; |
03ecfe88 | 74 | Bool_t RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const ; |
56088960 | 75 | // |
8367ce9a | 76 | virtual AliLoader* MakeLoader(const char* topfoldername); |
fdebddeb | 77 | virtual const TString Version() const {return TString(" ") ; } |
1963b290 | 78 | |
2012850d | 79 | protected: |
56088960 | 80 | |
fac5662b | 81 | static Double_t RawResponseFunction(Double_t *x, Double_t *par) ; |
2d5d9e60 | 82 | void FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) ; |
f51151a0 | 83 | |
0a4cb131 | 84 | void Init(void); //initializes some params |
85 | ||
f51151a0 | 86 | Int_t fBirkC0; // constants for Birk's Law implementation |
87 | Double_t fBirkC1; // constants for Birk's Law implementation | |
88 | Double_t fBirkC2; // constants for Birk's Law implementation | |
1963b290 | 89 | |
56088960 | 90 | static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal |
91 | Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal | |
92 | Double_t fHighGain ; // high gain for the raw RO signal | |
93 | Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal | |
94 | Int_t fLowGainOffset ; // to separate high from low gain in the DDL | |
95 | static Int_t fgOrder ; // order of the gamma function for the RO signal | |
14ce0a6e | 96 | static const Int_t fgkTimeBins = 256 ; // number of sampling bins of the raw RO signal |
56088960 | 97 | static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal |
98 | static Double_t fgTimePeak ; // peaking time of the raw RO signal | |
99 | static Double_t fgTimeTrigger ; // time of the trigger for the RO signal | |
14ce0a6e | 100 | static Int_t fgThreshold; // threshold |
101 | static Int_t fgChannelsPerDDL; // number of channels per DDL | |
2012850d | 102 | |
e939a978 | 103 | private: |
104 | AliEMCAL(const AliEMCAL& emcal); | |
105 | AliEMCAL & operator = (const AliEMCAL & /*rvalue*/); | |
106 | ||
56088960 | 107 | ClassDef(AliEMCAL,9) // Electromagnetic calorimeter (base class) |
108 | ||
109 | } ; | |
2012850d | 110 | |
111 | #endif // ALIEMCAL_H |