1 #ifndef ALIFMDDIGITIZER_H
2 #define ALIFMDDIGITIZER_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
9 # include <AliDigitizer.h>
11 #ifndef ALIRUNDIGITIZER_H
12 # include <AliRunDigitizer.h>
14 #ifndef ALIFMDEdepMAP_H
15 # include <AliFMDEdepMap.h>
20 // #ifndef ROOT_TArrayF
21 // # include <TArrayF.h>
24 //====================================================================
31 //====================================================================
32 class AliFMDBaseDigitizer : public AliDigitizer
35 AliFMDBaseDigitizer();
36 AliFMDBaseDigitizer(AliRunDigitizer * manager);
37 AliFMDBaseDigitizer(const Char_t* name, const Char_t* title);
38 virtual ~AliFMDBaseDigitizer();
41 virtual Bool_t Init();
43 // Extra member functions
44 void SetVA1MipRange(UShort_t r=20) { fVA1MipRange = r; }
45 void SetAltroChannelSize(UShort_t s=1024) { fAltroChannelSize = s;}
46 void SetSampleRate(UShort_t r=1) { fSampleRate = (r>2 ? 2 : r); }
47 void SetShapingTime(Float_t t=10) { fShapingTime = t; }
49 UShort_t GetVA1MipRange() const { return fVA1MipRange; }
50 UShort_t GetAltroChannelSize() const { return fAltroChannelSize; }
51 UShort_t GetSampleRate() const { return fSampleRate; }
52 Float_t GetShapingTime() const { return fShapingTime; }
54 virtual void SumContributions(AliFMD* fmd);
55 virtual void DigitizeHits(AliFMD* fmd) const;
56 virtual void ConvertToCount(Float_t edep,
60 TArrayI& counts) const;
61 virtual UShort_t MakePedestal() const { return 0; }
62 virtual void AddNoise(TArrayI&) const {}
63 virtual void AddDigit(AliFMD* /* fmd */,
64 UShort_t /* detector */,
66 UShort_t /* sector */,
69 UShort_t /* count1 */,
71 Short_t /* count3 */) const {}
73 AliRunLoader* fRunLoader;
74 AliFMDEdepMap fEdep; // Cache of Energy from hits
75 UShort_t fVA1MipRange; // How many MIPs the pre-amp can do
76 UShort_t fAltroChannelSize; // Largest # to store in 1 ADC chan.
77 UShort_t fSampleRate; // Times the ALTRO samples pre-amp.
78 Float_t fShapingTime; // Shaping profile parameter
80 ClassDef(AliFMDBaseDigitizer,0) // Base class for FMD digitizers
83 //====================================================================
84 class AliFMDDigitizer : public AliFMDBaseDigitizer
88 AliFMDDigitizer(AliRunDigitizer * manager);
89 virtual ~AliFMDDigitizer() {}
90 virtual void Exec(Option_t* option=0);
93 // Extra member functions
94 void SetPedestal(Float_t mean=10, Float_t width=.5);
95 void GetPedestal(Float_t& mean, Float_t& width) const;
97 virtual void AddDigit(AliFMD* fmd,
105 Short_t count3) const;
106 virtual UShort_t MakePedestal() const;
107 virtual void CheckDigit(Float_t edep,
109 const TArrayI& counts);
110 Float_t fPedestal; // Mean of pedestal
111 Float_t fPedestalWidth; // Width of pedestal
112 ClassDef(AliFMDDigitizer,0) // Make Digits from Hits
114 //____________________________________________________________________
116 AliFMDDigitizer::SetPedestal(Float_t mean, Float_t width)
119 fPedestalWidth = width;
122 //____________________________________________________________________
124 AliFMDDigitizer::GetPedestal(Float_t& mean, Float_t& width) const
127 width = fPedestalWidth;
131 //====================================================================
132 class AliFMDSDigitizer : public AliFMDBaseDigitizer
136 AliFMDSDigitizer(const Char_t* headerFile, const Char_t* sdigFile="");
137 virtual ~AliFMDSDigitizer();
138 virtual void Exec(Option_t* option=0);
140 virtual void AddDigit(AliFMD* fmd,
148 Short_t count3) const;
149 ClassDef(AliFMDSDigitizer,0) // Make Summable Digits from Hits
155 //____________________________________________________________________