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