update of Jenn and Marco
[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$ */
7
8//_________________________________________________________________________
9// Base Class for EMCAL
10//
11//*-- Author: Yves Schutz (SUBATECH)
12
2012850d 13// --- ROOT system ---
05a92d59 14
2012850d 15class TString ;
05a92d59 16class TTask ;
17class TFolder ;
f51151a0 18class TRandom ;
2012850d 19
20// --- AliRoot header files ---
05a92d59 21
2012850d 22#include "AliDetector.h"
8367ce9a 23#include "AliEMCALGeometry.h"
2012850d 24class AliEMCAL : public AliDetector {
25
26 public:
27
b13bbe81 28 AliEMCAL();
2012850d 29 AliEMCAL(const char* name, const char* title="");
39200c71 30 AliEMCAL(const AliEMCAL& emcal) : AliDetector(emcal) {
2012850d 31 // cpy ctor: no implementation yet
32 // requested by the Coding Convention
9859bfc0 33 Fatal("cpy ctor", "not implemented") ;
2012850d 34 }
35 virtual ~AliEMCAL() ;
5dee926e 36 virtual void AddHit(Int_t, Int_t*, Float_t *) {
d64c959b 37 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 38 }
5dee926e 39 virtual void Copy(TObject & emcal) const
40 { Copy(dynamic_cast<AliEMCAL&>(emcal)); }
41 virtual void Copy(AliEMCAL & emcal) const;
8367ce9a 42 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
f51151a0 43 virtual void CreateMaterials() ;
905263da 44 // virtual void
f51151a0 45 virtual void Digits2Raw();
fdebddeb 46 virtual void FinishRun() {}
8367ce9a 47 virtual AliEMCALGeometry * GetGeometry() const
48 {return AliEMCALGeometry::GetInstance(GetTitle(),"") ; }
49 virtual void Hits2SDigits();
fdebddeb 50 virtual Int_t IsVersion(void) const = 0 ;
56088960 51 // Raw Read Out
52 Double_t GetRawFormatCapa() const { return fgCapa ; }
53 Double_t GetRawFormatHighCharge() const { return fHighCharge ; }
54 Double_t GetRawFormatHighGain() const { return fHighGain ; }
55 Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }
56 Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; }
57 Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }
58 Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }
59 Int_t GetRawFormatOrder() const { return fgOrder ; }
046ae904 60 Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }
56088960 61 Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }
62 Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }
63 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
56088960 64 static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
65 //
8367ce9a 66 virtual AliLoader* MakeLoader(const char* topfoldername);
fdebddeb 67 virtual const TString Version() const {return TString(" ") ; }
9c0a4862 68 AliEMCAL & operator = (const AliEMCAL & /*rvalue*/) {
d64c959b 69 Fatal("operator =", "not implemented") ; return *this ; }
1963b290 70
2012850d 71protected:
56088960 72
fac5662b 73 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
56088960 74 Bool_t RawSampledResponse(const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const ;
f51151a0 75
f51151a0 76 Int_t fBirkC0; // constants for Birk's Law implementation
77 Double_t fBirkC1; // constants for Birk's Law implementation
78 Double_t fBirkC2; // constants for Birk's Law implementation
1963b290 79
56088960 80 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
81 Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
82 Double_t fHighGain ; // high gain for the raw RO signal
83 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
84 Int_t fLowGainOffset ; // to separate high from low gain in the DDL
85 static Int_t fgOrder ; // order of the gamma function for the RO signal
86 static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
87 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
88 static Double_t fgTimePeak ; // peaking time of the raw RO signal
89 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
2012850d 90
56088960 91 ClassDef(AliEMCAL,9) // Electromagnetic calorimeter (base class)
92
93 } ;
2012850d 94
95#endif // ALIEMCAL_H