]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOS.h
cosmetics
[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
b2a60966 7//_________________________________________________________________________
8// Base Class for PHOS
9//
10//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
fe4da5cc 11
fdeead01 12
d15a28e7 13// --- ROOT system ---
0e4b7936 14class TString ;
7b326aac 15class TTask ;
fa7cce36 16class TFolder ;
e957fea8 17class TTree ;
e9a5efdf 18class TRandom ;
fe4da5cc 19
d15a28e7 20// --- AliRoot header files ---
0e4b7936 21#include "AliDetector.h"
8367ce9a 22#include "AliPHOSGeometry.h"
7b326aac 23class AliPHOSQAChecker ;
fe4da5cc 24
25class AliPHOS : public AliDetector {
26
e9a5efdf 27public:
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
f1611b7c 37 Fatal("AddHit(Int_t, Int_t*, Float_t *)", "do not use") ;
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();
a532e9d8 46 virtual void FinishRun() {WriteQA();}
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 ;
046ae904 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 ; }
8367ce9a 57 virtual AliLoader* MakeLoader(const char* topfoldername);
7b326aac 58 AliPHOSQAChecker * QAChecker() {return fQATask;}
046ae904 59 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
7b7c1533 60 virtual void SetTreeAddress();
61 virtual TTree * TreeQA() const {return fTreeQA; }
a532e9d8 62 virtual const TString Version() const {return TString(" ") ; }
4410223b 63 virtual void WriteQA() ;
8c140292 64 AliPHOS & operator = (const AliPHOS & /*rvalue*/) {
e957fea8 65 Fatal("operator =", "not implemented") ; return *this ; }
88cb7938 66
046ae904 67
b73f246d 68protected:
046ae904 69
70 Bool_t RawSampledResponse(const Float_t dtime, const Int_t damp, Int_t * adcH, Int_t * adcL) const ;
71
72
fa7cce36 73 AliPHOSQAChecker * fQATask ; //! PHOS checkers container
7b7c1533 74 TTree * fTreeQA ; // the QA tree that contains the alarms
046ae904 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
e9a5efdf 81
046ae904 82 ClassDef(AliPHOS,3) // Photon Spectrometer Detector (base class)
fe4da5cc 83
d15a28e7 84} ;
fe4da5cc 85
d15a28e7 86#endif // ALIPHOS_H