]>
Commit | Line | Data |
---|---|---|
d15a28e7 | 1 | #ifndef ALIPHOS_H |
2 | #define ALIPHOS_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
6ad0bfa0 | 4 | * See cxx source for full Copyright notice */ |
6ad0bfa0 | 5 | /* $Id$ */ |
3da30618 | 6 | |
b2a60966 | 7 | //_________________________________________________________________________ |
8 | // Base Class for PHOS | |
9 | // | |
10 | //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH) | |
fe4da5cc | 11 | |
fdeead01 | 12 | |
d15a28e7 | 13 | // --- ROOT system --- |
0e4b7936 | 14 | class TString ; |
7b326aac | 15 | class TTask ; |
fa7cce36 | 16 | class TFolder ; |
e957fea8 | 17 | class TTree ; |
e9a5efdf | 18 | class TRandom ; |
fe4da5cc | 19 | |
d15a28e7 | 20 | // --- AliRoot header files --- |
0e4b7936 | 21 | #include "AliDetector.h" |
351dd634 | 22 | #include "AliLog.h" |
8367ce9a | 23 | #include "AliPHOSGeometry.h" |
fe4da5cc | 24 | |
25 | class AliPHOS : public AliDetector { | |
26 | ||
e9a5efdf | 27 | public: |
fe4da5cc | 28 | |
6b87d0dd | 29 | AliPHOS() ; |
7b326aac | 30 | AliPHOS(const char* name, const char* title="") ; |
780fda6d | 31 | AliPHOS(AliPHOS & phos) : AliDetector(phos) { |
32 | Copy(*this) ; | |
839ffcb3 | 33 | } |
7b326aac | 34 | virtual ~AliPHOS() ; |
0a6d52e3 | 35 | virtual void AddHit(Int_t, Int_t*, Float_t *) { |
0e4b7936 | 36 | // do not use this definition but the one below |
351dd634 | 37 | AliFatal(Form("do not use")) ; |
f1611b7c | 38 | |
0a6d52e3 | 39 | } |
a532e9d8 | 40 | virtual void AddHit( Int_t shunt, Int_t primary, Int_t track, |
41 | Int_t id, Float_t *hits ) = 0 ; | |
e9a5efdf | 42 | virtual void Copy(AliPHOS & phos) ; |
487d23e3 | 43 | virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; |
8367ce9a | 44 | virtual void CreateMaterials() ; |
e9a5efdf | 45 | virtual void Digits2Raw(); |
184569b0 | 46 | virtual void FinishRun() {;} |
8367ce9a | 47 | virtual AliPHOSGeometry * GetGeometry() const |
48 | {return AliPHOSGeometry::GetInstance(GetTitle(),"") ; } | |
487d23e3 | 49 | virtual void Hits2SDigits(); |
fa7cce36 | 50 | virtual Int_t IsVersion(void) const = 0 ; |
e4d04cf1 | 51 | // Raw Read Out |
52 | Double_t GetRawFormatCapa() const { return fgCapa ; } | |
53 | Double_t GetRawFormatHighCharge() const { return fHighCharge ; } | |
54 | Double_t GetRawFormatHighGain() const { return fHighGain ; } | |
55 | Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; } | |
56 | Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; } | |
57 | Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; } | |
58 | Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; } | |
59 | Int_t GetRawFormatOrder() const { return fgOrder ; } | |
046ae904 | 60 | Int_t GetRawFormatTimeBins() const { return fkTimeBins ; } |
e4d04cf1 | 61 | Double_t GetRawFormatTimeMax() const { return fgTimeMax ; } |
62 | Double_t GetRawFormatTimePeak() const { return fgTimePeak ; } | |
63 | Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; } | |
64 | static Double_t RawResponseFunction(Double_t *x, Double_t *par) ; | |
65 | static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ; | |
66 | // | |
8367ce9a | 67 | virtual AliLoader* MakeLoader(const char* topfoldername); |
7b7c1533 | 68 | virtual void SetTreeAddress(); |
a532e9d8 | 69 | virtual const TString Version() const {return TString(" ") ; } |
8c140292 | 70 | AliPHOS & operator = (const AliPHOS & /*rvalue*/) { |
e957fea8 | 71 | Fatal("operator =", "not implemented") ; return *this ; } |
88cb7938 | 72 | |
046ae904 | 73 | |
b73f246d | 74 | protected: |
046ae904 | 75 | |
184569b0 | 76 | Bool_t RawSampledResponse(const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const ; |
77 | ||
78 | ||
e4d04cf1 | 79 | static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal |
80 | Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal | |
81 | Double_t fHighGain ; // high gain for the raw RO signal | |
82 | Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal | |
83 | Int_t fLowGainOffset ; // to separate high from low gain in the DDL | |
84 | static Int_t fgOrder ; // order of the gamma function for the RO signal | |
85 | static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal | |
86 | static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal | |
87 | static Double_t fgTimePeak ; // peaking time of the raw RO signal | |
88 | static Double_t fgTimeTrigger ; // time of the trigger for the RO signal | |
89 | ||
184569b0 | 90 | ClassDef(AliPHOS,5) // Photon Spectrometer Detector (base class) |
d15a28e7 | 91 | } ; |
fe4da5cc | 92 | |
d15a28e7 | 93 | #endif // ALIPHOS_H |