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

Last change on this file since 5304 was 5248, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 2.4 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 TRandom *RandomNumber; // RandomGenerator
60
61public:
62
63 MLons() ;
64
65 MLons(Int_t in_shapeT, Float_t in_amplT, Float_t in_FwhmT,
66 Int_t in_shapeF, Float_t in_integF, Float_t in_FwhmF,
67 Float_t in_Fadc_Slices_per_ns);
68
69 void Reset() ;
70
71 void SetSeed( Int_t in);
72 void SetAmplTrig( Float_t in ) ;
73 void SetFwhmTrig( Float_t in ) ;
74 void SetIntegFadc( Float_t in ) ;
75 void SetFwhmFadc( Float_t in ) ;
76
77 void SetPath (Char_t in[]);
78
79 Float_t GetBrightness() ;
80 Float_t GetAmplTrig() ;
81 Float_t GetFwhmTrig() ;
82 Float_t GetIntegFadc() ;
83 Float_t GetFwhmFadc() ;
84 Float_t GetFadcSlicesPerNanosec() {return fFadcSlicesPerNanosec;}
85
86 void GetPath(Char_t *out);
87
88 void ReadBinaryMStarLight(char *filename) ;
89 void SetMStarLight() ;
90
91 Int_t GetResponse(Float_t in_br, Float_t in_pre,
92 Float_t *out_tr, Float_t *out_Fr);
93
94 Int_t CheckTrig();
95 Int_t CheckFADC();
96
97};
Note: See TracBrowser for help on using the repository browser.