source: branches/start/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx@ 13449

Last change on this file since 13449 was 378, checked in by harald, 25 years ago
This is the startpoint for the further development of the FADC system. This implementation of the class MFadc is based on the implementation of the class MTRigger (see ../include-MTrigger ).
File size: 2.9 KB
Line 
1#ifndef __MFadc__
2#define __MFadc__
3//
4// class MFadc
5//
6// implemented by Harald Kornmayer
7//
8// This is a class to simulate the FADC.
9// It assumes a special response of the PMT for one single Photo-electron.
10//
11//
12//
13#include <stream.h>
14#include <math.h>
15
16#include "TObject.h"
17#include "TRandom.h"
18
19#include "Mdefine.h"
20
21#include "MTriggerDefine.h"
22
23class MMcEvt ;
24
25//==========
26// MFadc
27//
28// The simulation of the Flash ADC system for the MAGIC teleskop is done with
29// this class.
30// So all methods concerning the FADC System should be done inside this
31// class.
32//
33// The Idea is to (in)put the data of the photo electrons into the class and
34// generate the response (output) of the FADC to that input. Response means
35// in this sense the ADC values of the different time slices for all pixels
36//
37// The pixelisation is done by the camera program of Jose Carlos.
38//
39// This class is closly connected to the MTrigger classs. So some of the
40// values defined in MTriggerDefine.h are also used by this class.
41//
42// But a lot of other stuff is defined here.
43//
44// --> Frist of all the WIDTH of the time slice of one FADC slice
45// this is 3.33333 nsec.
46//
47#define WIDTH_FADC_TIMESLICE (50./15.) // this means 3.33 nsec
48//
49// --> Second the number of slices to fill in MFADC. This must by
50// connected to the MTrigger class. The time of interest must be
51// equal in both classes.
52//
53#define SLICES_MFADC (TOTAL_TRIGGER_TIME / WIDTH_FADC_TIMESLICE)
54//
55// --> like the trigger the FADC value will also have a standard response
56// to one single Photo electron. This response is binned with smaller
57// bins. The WIDTH of that response function is done here.
58//
59#define SUBBINS 5.
60#define WIDTH_RESPONSE_MFADC (WIDTH_FADC_TIMESLICE / SUBBINS ) // 5 sub-bin in one FADC slice
61//
62// --> the number of Response slices
63//
64#define RESPONSE_SLICES_MFADC 45
65//
66//
67#define MFADC_RESPONSE_FWHM 5.0
68
69//
70//
71#define MFADC_RESPONSE_AMPLITUDE 4.0
72//
73//
74//
75//
76class MFadc {
77 private:
78 //
79 // then for all pixels the shape of all the analog signals
80 //
81 Bool_t used[CAMERA_PIXELS] ; // a boolean to indicated if the pixels is used in this event
82
83 Float_t sig[CAMERA_PIXELS][(Int_t) SLICES_MFADC] ; // the analog signal for pixels
84
85 //
86 // first the data for the response function
87 //
88 Float_t fwhm_resp ; // fwhm of the phe_response function
89 Float_t ampl_resp ; // amplitude of the phe_response function (in mV)
90 Float_t sing_resp[ RESPONSE_SLICES_MFADC ] ; // the shape of the phe_response function
91
92 //
93 // RandomGenerator for the Electonic Noise
94 //
95
96 TRandom *GenElec ;
97
98
99public:
100
101 MFadc() ;
102
103 void Reset() ;
104
105 void Fill( Int_t, Float_t, Float_t ) ;
106
107 void ElecNoise() ;
108
109 void Scan() ;
110
111 void Scan(Float_t time) ;
112
113 void ShowSignal ( MMcEvt *McEvt , Float_t ) ;
114} ;
115
116
117#endif
118
119
120
Note: See TracBrowser for help on using the repository browser.