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