]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PHOS/AliPHOS.h
Corrected recess for chambers 1 and 2.
[u/mrichter/AliRoot.git] / PHOS / AliPHOS.h
... / ...
CommitLineData
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.61 2005/05/28 12:10:07 schutz
11 * Copy constructor is corrected (by T.P.)
12 *
13 */
14
15
16//_________________________________________________________________________
17// Base Class for PHOS
18//
19//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
20
21
22// --- ROOT system ---
23class TString ;
24class TTask ;
25class TFolder ;
26class TTree ;
27class TRandom ;
28
29// --- AliRoot header files ---
30#include "AliDetector.h"
31#include "AliLog.h"
32#include "AliPHOSGeometry.h"
33
34class AliPHOS : public AliDetector {
35
36public:
37
38 AliPHOS() ;
39 AliPHOS(const char* name, const char* title="") ;
40 AliPHOS(AliPHOS & phos) : AliDetector(phos) {
41 //Copy(*this) ;
42 phos.Copy(*this);
43 }
44 virtual ~AliPHOS() ;
45 virtual void AddHit(Int_t, Int_t*, Float_t *) {
46 // do not use this definition but the one below
47 AliFatal(Form("do not use")) ;
48
49 }
50 virtual void AddHit( Int_t shunt, Int_t primary, Int_t track,
51 Int_t id, Float_t *hits ) = 0 ;
52 virtual void Copy(TObject &phos)const;
53 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
54 virtual void CreateMaterials() ;
55 virtual void Digits2Raw();
56 virtual void FinishRun() {;}
57 virtual AliPHOSGeometry * GetGeometry() const
58 {return AliPHOSGeometry::GetInstance(GetTitle(),"") ; }
59 virtual void Hits2SDigits();
60 virtual Int_t IsVersion(void) const = 0 ;
61 // Raw Read Out
62 Double_t GetRawFormatCapa() const { return fgCapa ; }
63 Double_t GetRawFormatHighCharge() const { return fHighCharge ; }
64 Double_t GetRawFormatHighGain() const { return fHighGain ; }
65 Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }
66 Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; }
67 Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }
68 Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }
69 Int_t GetRawFormatOrder() const { return fgOrder ; }
70 Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }
71 Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }
72 Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }
73 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
74 static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
75 //
76 virtual AliLoader* MakeLoader(const char* topfoldername);
77 virtual void SetTreeAddress();
78 virtual const TString Version() const {return TString(" ") ; }
79 AliPHOS & operator = (const AliPHOS & /*rvalue*/) {
80 Fatal("operator =", "not implemented") ; return *this ; }
81
82
83protected:
84
85 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
86 Bool_t RawSampledResponse(const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const ;
87
88
89 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
90 Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
91 Double_t fHighGain ; // high gain for the raw RO signal
92 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
93 Int_t fLowGainOffset ; // to separate high from low gain in the DDL
94 static Int_t fgOrder ; // order of the gamma function for the RO signal
95 static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
96 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
97 static Double_t fgTimePeak ; // peaking time of the raw RO signal
98 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
99
100 ClassDef(AliPHOS,5) // Photon Spectrometer Detector (base class)
101} ;
102
103#endif // ALIPHOS_H