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