]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCAL.h
Made the raw data format conversion from digits more modular (+2 more methods) to...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCAL.h
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
13 // --- ROOT system ---
14
15 class TString ;
16 class TTask ;
17 class TFolder ;
18 class TRandom ; 
19
20 // --- AliRoot header files ---
21
22 #include "AliDetector.h"
23 #include "AliEMCALGeometry.h" 
24 class AliEMCAL : public AliDetector {
25
26  public:
27
28   AliEMCAL(); 
29   AliEMCAL(const char* name, const char* title="");
30   AliEMCAL(const AliEMCAL& emcal) : AliDetector(emcal) {
31     // cpy ctor: no implementation yet
32     // requested by the Coding Convention
33     Fatal("cpy ctor", "not implemented") ;  
34   }
35   virtual ~AliEMCAL() ; 
36   virtual void   AddHit(Int_t, Int_t*, Float_t *) const{
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 )") ;  
38   }
39   virtual void  Copy(AliEMCAL & emcal) ; 
40   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
41   virtual void  CreateMaterials() ;   
42   virtual void  Digits2Raw();
43   virtual void  FinishRun() {}                  
44   virtual AliEMCALGeometry * GetGeometry() const 
45   {return AliEMCALGeometry::GetInstance(GetTitle(),"") ;  }   
46   virtual void    Hits2SDigits();
47   virtual Int_t   IsVersion(void) const = 0 ;   
48   Int_t GetRawFormatHighGainFactor() const { return fHighGainFactor ; }  
49   Int_t GetRawFormatHighGainOffset() const { return fHighGainOffset ; }  
50   Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }    
51   Double_t GetRawFormatTimeMax() const { return fTimeMax ; }   
52   Double_t GetRawFormatTimePeak() const { return fTimePeak ; }    
53   Double_t GetRawFormatTimeRes() const { return fTimeRes ; }   
54   virtual AliLoader* MakeLoader(const char* topfoldername);
55   static Double_t  RawResponseFunction(Double_t *x, Double_t *par) ; 
56   virtual void SetTreeAddress() ;              
57   virtual const TString Version() const {return TString(" ") ; }   
58   AliEMCAL & operator = (const AliEMCAL & /*rvalue*/)  {
59     Fatal("operator =", "not implemented") ;  return *this ; }
60  
61 protected:
62
63  Bool_t  RawSampledResponse(const Float_t dtime, const Int_t damp, Int_t * adcH, Int_t * adcL) const ; 
64
65   Int_t fBirkC0;    // constants for Birk's Law implementation
66   Double_t fBirkC1; // constants for Birk's Law implementation
67   Double_t fBirkC2; // constants for Birk's Law implementation
68   Int_t    fHighGainFactor ;   // High gain attenuation factor of the raw RO signal
69   Int_t    fHighGainOffset ;   // offset added to the module id to distinguish high and low gain data
70   static const Int_t fkTimeBins = 256 ;     // number of sampling bins of the raw RO signal  
71   Double_t fTimeMax ;          // maximum sampled time of the raw RO signal
72   Double_t fTimePeak ;         // peaking time of the raw RO signal
73   Double_t fTimeRes ;          // decay rime width of the raw RO signal 
74
75   ClassDef(AliEMCAL,7) // Electromagnetic calorimeter (base class)
76
77 } ;
78
79 #endif // ALIEMCAL_H