| 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.h>
|
|---|
| 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 |
|
|---|
| 35 | class MLons {
|
|---|
| 36 |
|
|---|
| 37 | private:
|
|---|
| 38 |
|
|---|
| 39 | Char_t path[256] ; // Location of StarLight files
|
|---|
| 40 |
|
|---|
| 41 | MStarLight MSLStored ; // MStarLight in memmory
|
|---|
| 42 |
|
|---|
| 43 | Float_t fTrigShape ; // a number that indicate the shape type of
|
|---|
| 44 | // the signal
|
|---|
| 45 | // = 0 --> a gaussian
|
|---|
| 46 | Float_t fAmplTrig ; // the amplitude of the trigger in mV
|
|---|
| 47 | Float_t fFwhmTrig ; // the width of the signal in nsec
|
|---|
| 48 |
|
|---|
| 49 | Float_t fFadcShape ; // a number that indicate the shape type of
|
|---|
| 50 | // the signal
|
|---|
| 51 | // = 0 --> a gaussian
|
|---|
| 52 | Float_t fAmplFadc ; // the amplitude of the trigger in mV
|
|---|
| 53 | Float_t fFwhmFadc ; // the width of the signal in nsec
|
|---|
| 54 |
|
|---|
| 55 | TRandom *RandomNumber; // RandomGenerator
|
|---|
| 56 |
|
|---|
| 57 | public:
|
|---|
| 58 |
|
|---|
| 59 | MLons() ;
|
|---|
| 60 |
|
|---|
| 61 | MLons(Float_t in_amplT, Float_t in_FwhmT,
|
|---|
| 62 | Float_t in_amplF, Float_t in_FwhmF) ;
|
|---|
| 63 |
|
|---|
| 64 | void Reset() ;
|
|---|
| 65 |
|
|---|
| 66 | void SetAmplTrig( Float_t in ) ;
|
|---|
| 67 | void SetFwhmTrig( Float_t in ) ;
|
|---|
| 68 | void SetAmplFadc( Float_t in ) ;
|
|---|
| 69 | void SetFwhmFadc( Float_t in ) ;
|
|---|
| 70 |
|
|---|
| 71 | void SetPath (Char_t in[]);
|
|---|
| 72 |
|
|---|
| 73 | Float_t GetBrightness() ;
|
|---|
| 74 | Float_t GetAmplTrig() ;
|
|---|
| 75 | Float_t GetFwhmTrig() ;
|
|---|
| 76 | Float_t GetAmplFadc() ;
|
|---|
| 77 | Float_t GetFwhmFadc() ;
|
|---|
| 78 |
|
|---|
| 79 | void GetPath(Char_t *out);
|
|---|
| 80 |
|
|---|
| 81 | void ReadBinaryMStarLight(char *filename) ;
|
|---|
| 82 | void SetMStarLight() ;
|
|---|
| 83 |
|
|---|
| 84 | Int_t GetResponse(Float_t in_br, Float_t in_pre,
|
|---|
| 85 | Float_t *out_tr, Float_t *out_Fr);
|
|---|
| 86 |
|
|---|
| 87 | Int_t CheckTrig();
|
|---|
| 88 | Int_t CheckFADC();
|
|---|
| 89 |
|
|---|
| 90 | };
|
|---|