]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOS.h
- Adding handling of track info in digits.
[u/mrichter/AliRoot.git] / PHOS / AliPHOS.h
CommitLineData
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
ffcecca6 7/* History of cvs commits:
8 *
9 * $Log$
eb0b1051 10 * Revision 1.63 2005/07/26 13:32:39 kharlov
11 * Restoring raw data fit from version of 29-Aug-2004
12 *
45c1ce6f 13 * Revision 1.62 2005/07/06 10:10:32 hristov
14 * Moving the functions used to initialize TF1 and TF2 to the pivate part of the class
15 *
fac5662b 16 * Revision 1.61 2005/05/28 12:10:07 schutz
17 * Copy constructor is corrected (by T.P.)
18 *
ffcecca6 19 */
20
21
b2a60966 22//_________________________________________________________________________
23// Base Class for PHOS
24//
25//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
fe4da5cc 26
fdeead01 27
d15a28e7 28// --- ROOT system ---
0e4b7936 29class TString ;
7b326aac 30class TTask ;
fa7cce36 31class TFolder ;
e957fea8 32class TTree ;
e9a5efdf 33class TRandom ;
fe4da5cc 34
d15a28e7 35// --- AliRoot header files ---
0e4b7936 36#include "AliDetector.h"
351dd634 37#include "AliLog.h"
8367ce9a 38#include "AliPHOSGeometry.h"
fe4da5cc 39
40class AliPHOS : public AliDetector {
41
e9a5efdf 42public:
fe4da5cc 43
6b87d0dd 44 AliPHOS() ;
7b326aac 45 AliPHOS(const char* name, const char* title="") ;
780fda6d 46 AliPHOS(AliPHOS & phos) : AliDetector(phos) {
ffcecca6 47 //Copy(*this) ;
48 phos.Copy(*this);
839ffcb3 49 }
7b326aac 50 virtual ~AliPHOS() ;
0a6d52e3 51 virtual void AddHit(Int_t, Int_t*, Float_t *) {
0e4b7936 52 // do not use this definition but the one below
351dd634 53 AliFatal(Form("do not use")) ;
f1611b7c 54
0a6d52e3 55 }
a532e9d8 56 virtual void AddHit( Int_t shunt, Int_t primary, Int_t track,
57 Int_t id, Float_t *hits ) = 0 ;
ffcecca6 58 virtual void Copy(TObject &phos)const;
487d23e3 59 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
8367ce9a 60 virtual void CreateMaterials() ;
e9a5efdf 61 virtual void Digits2Raw();
184569b0 62 virtual void FinishRun() {;}
8367ce9a 63 virtual AliPHOSGeometry * GetGeometry() const
64 {return AliPHOSGeometry::GetInstance(GetTitle(),"") ; }
487d23e3 65 virtual void Hits2SDigits();
fa7cce36 66 virtual Int_t IsVersion(void) const = 0 ;
e4d04cf1 67 // Raw Read Out
68 Double_t GetRawFormatCapa() const { return fgCapa ; }
69 Double_t GetRawFormatHighCharge() const { return fHighCharge ; }
70 Double_t GetRawFormatHighGain() const { return fHighGain ; }
71 Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }
72 Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; }
73 Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }
74 Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }
75 Int_t GetRawFormatOrder() const { return fgOrder ; }
046ae904 76 Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }
e4d04cf1 77 Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }
78 Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }
79 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
e4d04cf1 80 static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
45c1ce6f 81 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
eb0b1051 82 Bool_t RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const ;
e4d04cf1 83 //
8367ce9a 84 virtual AliLoader* MakeLoader(const char* topfoldername);
7b7c1533 85 virtual void SetTreeAddress();
a532e9d8 86 virtual const TString Version() const {return TString(" ") ; }
8c140292 87 AliPHOS & operator = (const AliPHOS & /*rvalue*/) {
e957fea8 88 Fatal("operator =", "not implemented") ; return *this ; }
88cb7938 89
046ae904 90
b73f246d 91protected:
046ae904 92
184569b0 93
94
e4d04cf1 95 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
96 Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
97 Double_t fHighGain ; // high gain for the raw RO signal
98 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
99 Int_t fLowGainOffset ; // to separate high from low gain in the DDL
100 static Int_t fgOrder ; // order of the gamma function for the RO signal
101 static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
102 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
103 static Double_t fgTimePeak ; // peaking time of the raw RO signal
104 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
105
184569b0 106 ClassDef(AliPHOS,5) // Photon Spectrometer Detector (base class)
d15a28e7 107} ;
fe4da5cc 108
d15a28e7 109#endif // ALIPHOS_H