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