]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCAL.h
default geant cuts for EMCAL's material: cutele=cutgam=100KeV
[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  
43   virtual void  Digits2Raw();
44   virtual void  FinishRun() {}                  
45   virtual AliEMCALGeometry * GetGeometry() const 
46   {return AliEMCALGeometry::GetInstance(GetTitle(),"") ;  }   
47   virtual void    Hits2SDigits();
48   virtual Int_t   IsVersion(void) const = 0 ;   
49   // Raw Read Out
50   Double_t GetRawFormatCapa() const { return fgCapa ; }   
51   Double_t GetRawFormatHighCharge() const { return fHighCharge ; }  
52   Double_t GetRawFormatHighGain() const { return fHighGain ; }  
53   Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }  
54   Double_t GetRawFormatLowCharge() const { return ( fHighCharge *  fHighLowGainFactor ) ; }  
55   Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }  
56   Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }  
57   Int_t GetRawFormatOrder() const { return fgOrder ; }   
58   Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }    
59   Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }   
60   Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }    
61   Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }   
62   static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
63   //  
64   virtual AliLoader* MakeLoader(const char* topfoldername);
65   virtual void SetTreeAddress() ;              
66   virtual const TString Version() const {return TString(" ") ; }   
67   AliEMCAL & operator = (const AliEMCAL & /*rvalue*/)  {
68     Fatal("operator =", "not implemented") ;  return *this ; }
69
70 protected:
71   
72   friend class AliEMCALGetter;
73   static Double_t RawResponseFunction(Double_t *x, Double_t *par) ; 
74   Bool_t   RawSampledResponse(const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const ; 
75
76
77   Int_t fBirkC0;    // constants for Birk's Law implementation
78   Double_t fBirkC1; // constants for Birk's Law implementation
79   Double_t fBirkC2; // constants for Birk's Law implementation
80
81   static Double_t fgCapa ;              // capacitor of the preamplifier for the raw RO signal
82   Double_t fHighCharge ;                // high charge (to convert energy to charge) for the raw RO signal
83   Double_t fHighGain ;                  // high gain for the raw RO signal
84   Double_t fHighLowGainFactor ;         // high to low gain factor for the raw RO signal
85   Int_t    fLowGainOffset ;             // to separate high from low gain in the DDL
86   static Int_t fgOrder ;                // order of the gamma function for the RO signal
87   static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal  
88   static Double_t fgTimeMax ;           // maximum sampled time of the raw RO signal                             
89   static Double_t fgTimePeak ;          // peaking time of the raw RO signal                                    
90   static Double_t fgTimeTrigger ;       // time of the trigger for the RO signal 
91
92   ClassDef(AliEMCAL,9) // Electromagnetic calorimeter (base class)
93     
94     } ;
95
96 #endif // ALIEMCAL_H