3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 //_________________________________________________________________________
10 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
13 // --- ROOT system ---
20 // --- AliRoot header files ---
21 #include "AliDetector.h"
22 #include "AliPHOSGeometry.h"
23 class AliPHOSQAChecker ;
25 class AliPHOS : public AliDetector {
30 AliPHOS(const char* name, const char* title="") ;
31 AliPHOS(AliPHOS & phos) : AliDetector(phos) {
35 virtual void AddHit(Int_t, Int_t*, Float_t *) {
36 // do not use this definition but the one below
37 Fatal("AddHit(Int_t, Int_t*, Float_t *)", "do not use") ;
40 virtual void AddHit( Int_t shunt, Int_t primary, Int_t track,
41 Int_t id, Float_t *hits ) = 0 ;
42 virtual void Copy(AliPHOS & phos) ;
43 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
44 virtual void CreateMaterials() ;
45 virtual void Digits2Raw();
46 virtual void FinishRun() {WriteQA();}
47 virtual AliPHOSGeometry * GetGeometry() const
48 {return AliPHOSGeometry::GetInstance(GetTitle(),"") ; }
49 virtual void Hits2SDigits();
50 virtual Int_t IsVersion(void) const = 0 ;
51 Int_t GetRawFormatHighGainFactor() const { return fHighGainFactor ; }
52 Int_t GetRawFormatHighGainOffset() const { return fHighGainOffset ; }
53 Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }
54 Double_t GetRawFormatTimeMax() const { return fTimeMax ; }
55 Double_t GetRawFormatTimePeak() const { return fTimePeak ; }
56 Double_t GetRawFormatTimeRes() const { return fTimeRes ; }
57 virtual AliLoader* MakeLoader(const char* topfoldername);
58 AliPHOSQAChecker * QAChecker() {return fQATask;}
59 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
60 virtual void SetTreeAddress();
61 virtual TTree * TreeQA() const {return fTreeQA; }
62 virtual const TString Version() const {return TString(" ") ; }
63 virtual void WriteQA() ;
64 AliPHOS & operator = (const AliPHOS & /*rvalue*/) {
65 Fatal("operator =", "not implemented") ; return *this ; }
70 Bool_t RawSampledResponse(const Float_t dtime, const Int_t damp, Int_t * adcH, Int_t * adcL) const ;
73 AliPHOSQAChecker * fQATask ; //! PHOS checkers container
74 TTree * fTreeQA ; // the QA tree that contains the alarms
75 Int_t fHighGainFactor ; // High gain attenuation factor of the raw RO signal
76 Int_t fHighGainOffset ; // offset added to the module id to distinguish high and low gain data
77 static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
78 Double_t fTimeMax ; // maximum sampled time of the raw RO signal
79 Double_t fTimePeak ; // peaking time of the raw RO signal
80 Double_t fTimeRes ; // decay rime width of the raw RO signal
82 ClassDef(AliPHOS,3) // Photon Spectrometer Detector (base class)