3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 /* History of cvs commits:
10 * Revision 1.68 2006/08/11 12:36:25 cvetan
11 * Update of the PHOS code needed in order to read and reconstruct the beam test raw data (i.e. without an existing galice.root)
13 * Revision 1.67 2006/04/07 08:42:00 hristov
14 * Follow AliAlignObj framework and remove AliPHOSAlignData (Yu.Kharlov)
16 * Revision 1.66 2006/03/24 21:39:33 schutz
17 * Modification needed to include PHOS in the global trigger framework
19 * Revision 1.65 2006/03/07 18:56:25 kharlov
20 * CDB is passed via environment variable
22 * Revision 1.64 2005/11/03 13:09:19 hristov
23 * Removing meaningless const declarations (linuxicc)
25 * Revision 1.63 2005/07/26 13:32:39 kharlov
26 * Restoring raw data fit from version of 29-Aug-2004
28 * Revision 1.62 2005/07/06 10:10:32 hristov
29 * Moving the functions used to initialize TF1 and TF2 to the pivate part of the class
31 * Revision 1.61 2005/05/28 12:10:07 schutz
32 * Copy constructor is corrected (by T.P.)
37 //_________________________________________________________________________
38 // Base Class for PHOS
40 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
43 // --- ROOT system ---
50 // --- AliRoot header files ---
51 #include "AliDetector.h"
53 #include "AliPHOSGeometry.h"
54 #include "AliPHOSTrigger.h"
56 class AliPHOS : public AliDetector {
61 AliPHOS(const char* name, const char* title="") ;
63 virtual void AddHit(Int_t, Int_t*, Float_t *) {
64 // do not use this definition but the one below
65 AliFatal(Form("do not use")) ;
68 virtual void AddHit( Int_t shunt, Int_t primary, Int_t track,
69 Int_t id, Float_t *hits ) = 0 ;
70 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
71 virtual void CreateMaterials() ;
72 virtual void Digits2Raw();
73 virtual void FinishRun() {;}
74 virtual AliPHOSGeometry * GetGeometry() const
75 {return AliPHOSGeometry::GetInstance(GetTitle(),"") ; }
77 virtual void Hits2SDigits();
78 virtual Int_t IsVersion(void) const = 0 ;
80 virtual AliTriggerDetector* CreateTriggerDetector() const
81 { return new AliPHOSTrigger(); }
84 Double_t GetRawFormatCapa() const { return fgCapa ; }
85 static Double_t GetRawFormatHighCharge() { return fgHighCharge ; }
86 static Double_t GetRawFormatHighGain() { return fgHighGain ; }
87 static Double_t GetRawFormatHighLowGainFactor() { return fgHighLowGainFactor ; }
88 static Double_t GetRawFormatLowCharge() { return ( fgHighCharge * fgHighLowGainFactor ) ; }
89 static Double_t GetRawFormatLowGain() { return ( fgHighGain / fgHighLowGainFactor ) ; }
90 Int_t GetRawFormatOrder() const { return fgOrder ; }
91 static Int_t GetRawFormatTimeBins() { 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 ;
99 virtual AliLoader* MakeLoader(const char* topfoldername);
100 virtual void SetTreeAddress();
101 virtual const TString Version() const {return TString(" ") ; }
108 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
109 static Double_t fgHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
110 static Double_t fgHighGain ; // high gain for the raw RO signal
111 static Double_t fgHighLowGainFactor ; // high to low gain factor for the raw RO signal
112 static Int_t fgOrder ; // order of the gamma function for the RO signal
113 // static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
114 static const Int_t fkTimeBins = 64 ; // number of sampling bins of the raw RO signal
115 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
116 static Double_t fgTimePeak ; // peaking time of the raw RO signal
117 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
120 AliPHOS(AliPHOS & phos);
121 AliPHOS & operator = (const AliPHOS & /*rvalue*/);
123 ClassDef(AliPHOS,6) // Photon Spectrometer Detector (base class)