source: trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.hxx@ 18341

Last change on this file since 18341 was 5418, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1//
2// class MLons
3//
4// implemented by Oscar Blanch
5//
6// This is a class to read the right trigger and FADC response as a
7// function of the aount of phe per nsec in one pixel.
8//
9//
10//
11#include <iostream>
12#include <math.h>
13
14#include "TROOT.h"
15#include "TObject.h"
16#include "TRandom.h"
17#include "TH1.h"
18
19#include "Mdefine.h"
20#include "MMcEvt.hxx"
21
22#include "MTriggerDefine.h"
23#include "MFadc.hxx"
24
25#include "MStarLight.hxx"
26
27//=================================================
28// MLons
29//
30// The simulation of the LONS is going to be done using a database to
31// speed up the camera simulation. This class has all needed methods
32// to read the data base and get the data that we need.
33//
34
35class MLons
36{
37
38private:
39
40 Char_t path[256]; // Location of StarLight files
41
42 MStarLight *MSLStored; // MStarLight in memory
43
44 Int_t fTrigShape; // a number that indicate the shape type of
45 // the signal
46 // = 0 --> a gaussian
47 Float_t fAmplTrig; // the amplitude of the trigger in mV
48 Float_t fFwhmTrig; // the width of the signal in nsec
49
50 Int_t fFadcShape; // a number that indicate the shape type of
51 // the signal
52 // = 0 --> a gaussian
53 Float_t fIntegFadc; // the integral of the single phe response
54 // in the FADC (in FADC counts)
55 Float_t fFwhmFadc; // the width of the signal in nsec
56
57 Float_t fFadcSlicesPerNanosec; // The sampling frequency (GHz) of the FADC
58
59 Int_t fGainFluctuations; // Indicates whether or not gain fluctuations have
60 // been simulated for producing the NSB database
61
62
63 TRandom *RandomNumber; // RandomGenerator
64
65public:
66
67 MLons() ;
68
69 MLons(Int_t in_shapeT, Float_t in_amplT, Float_t in_FwhmT,
70 Int_t in_shapeF, Float_t in_integF, Float_t in_FwhmF,
71 Float_t in_Fadc_Slices_per_ns, Int_t in_Gain_Fluctuations);
72
73 void Reset() ;
74
75 void SetSeed( UInt_t in);
76 void SetAmplTrig( Float_t in ) ;
77 void SetFwhmTrig( Float_t in ) ;
78 void SetIntegFadc( Float_t in ) ;
79 void SetFwhmFadc( Float_t in ) ;
80
81 void SetPath (Char_t in[]);
82
83 Float_t GetBrightness() ;
84 Float_t GetAmplTrig() ;
85 Float_t GetFwhmTrig() ;
86 Float_t GetIntegFadc() ;
87 Float_t GetFwhmFadc() ;
88 Float_t GetFadcSlicesPerNanosec() {return fFadcSlicesPerNanosec;}
89 Int_t GetGainFluctuations() const { return fGainFluctuations; }
90
91
92 void GetPath(Char_t *out);
93
94 void ReadBinaryMStarLight(char *filename) ;
95 void SetMStarLight() ;
96
97 Int_t GetResponse(Float_t in_br, Float_t in_pre,
98 Float_t *out_tr, Float_t *out_Fr);
99
100 Int_t CheckTrig();
101 Int_t CheckFADC();
102
103};
Note: See TracBrowser for help on using the repository browser.