]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOS.h
Remove macro as obsolete
[u/mrichter/AliRoot.git] / PHOS / AliPHOS.h
1 #ifndef ALIPHOS_H
2 #define ALIPHOS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id$ */
6
7 /* History of cvs commits:
8  *
9  * $Log$
10  * Revision 1.64  2005/11/03 13:09:19  hristov
11  * Removing meaningless const declarations (linuxicc)
12  *
13  * Revision 1.63  2005/07/26 13:32:39  kharlov
14  * Restoring raw data fit from version of 29-Aug-2004
15  *
16  * Revision 1.62  2005/07/06 10:10:32  hristov
17  * Moving the functions used to initialize TF1 and TF2 to the pivate part of the class
18  *
19  * Revision 1.61  2005/05/28 12:10:07  schutz
20  * Copy constructor is corrected (by T.P.)
21  *
22  */
23
24
25 //_________________________________________________________________________
26 //  Base Class for PHOS     
27 //                  
28 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
29
30
31 // --- ROOT system ---
32 class TString ; 
33 class TTask ;
34 class TFolder ;
35 class TTree ; 
36 class TRandom ; 
37
38 // --- AliRoot header files ---
39 #include "AliDetector.h" 
40 #include "AliLog.h"
41 #include "AliPHOSGeometry.h" 
42 class AliPHOSAlignData;
43
44 class AliPHOS : public AliDetector {
45
46 public:
47
48   AliPHOS() ;
49   AliPHOS(const char* name, const char* title="") ;  
50   AliPHOS(AliPHOS & phos) : AliDetector(phos) {
51     //Copy(*this) ; 
52     phos.Copy(*this);
53   }
54   virtual ~AliPHOS() ; 
55   virtual void   AddHit(Int_t, Int_t*, Float_t *) {
56     // do not use this definition but the one below
57     AliFatal(Form("do not use")) ;
58     
59   }
60   virtual void   AddHit( Int_t shunt, Int_t primary, Int_t track, 
61                          Int_t id, Float_t *hits ) = 0 ;   
62   virtual void Copy(TObject &phos)const; 
63   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
64   virtual void  CreateMaterials() ;            
65   virtual void  Digits2Raw();
66   virtual void  FinishRun() {;}
67   virtual AliPHOSGeometry * GetGeometry() const 
68   {return AliPHOSGeometry::GetInstance(GetTitle(),"") ;  }
69   virtual AliPHOSGeometry * GetGeometry(AliPHOSAlignData *alignda) const 
70   {return AliPHOSGeometry::GetInstance(GetTitle(),"",alignda) ;  }
71   virtual void    Hits2SDigits();
72   virtual Int_t   IsVersion(void) const = 0 ;  
73   // Raw Read Out
74   Double_t GetRawFormatCapa() const { return fgCapa ; }   
75   Double_t GetRawFormatHighCharge() const { return fHighCharge ; }  
76   Double_t GetRawFormatHighGain() const { return fHighGain ; }  
77   Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }  
78   Double_t GetRawFormatLowCharge() const { return ( fHighCharge *  fHighLowGainFactor ) ; }  
79   Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }  
80   Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }  
81   Int_t GetRawFormatOrder() const { return fgOrder ; }   
82   Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }    
83   Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }   
84   Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }    
85   Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }   
86   static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
87   static Double_t RawResponseFunction(Double_t *x, Double_t *par) ; 
88   Bool_t   RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const ; 
89   //
90   virtual AliLoader* MakeLoader(const char* topfoldername);
91   virtual void    SetTreeAddress();   
92   virtual const TString Version() const {return TString(" ") ; } 
93   AliPHOS & operator = (const AliPHOS & /*rvalue*/)  {
94     Fatal("operator =", "not implemented") ; return *this ; }
95
96
97 protected:
98
99   
100   
101   static Double_t fgCapa ;              // capacitor of the preamplifier for the raw RO signal
102   Double_t fHighCharge ;                // high charge (to convert energy to charge) for the raw RO signal
103   Double_t fHighGain ;                  // high gain for the raw RO signal
104   Double_t fHighLowGainFactor ;         // high to low gain factor for the raw RO signal
105   Int_t    fLowGainOffset ;             // to separate high from low gain in the DDL
106   static Int_t fgOrder ;                // order of the gamma function for the RO signal
107   static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal  
108   static Double_t fgTimeMax ;           // maximum sampled time of the raw RO signal                             
109   static Double_t fgTimePeak ;          // peaking time of the raw RO signal                                    
110   static Double_t fgTimeTrigger ;       // time of the trigger for the RO signal 
111                                         
112   ClassDef(AliPHOS,5) // Photon Spectrometer Detector (base class)
113 } ;
114
115 #endif // ALIPHOS_H