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