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