source: trunk/MagicSoft/Simulation/Detector/StarResponse/MStarLight.hxx@ 4747

Last change on this file since 4747 was 2976, checked in by blanch, 21 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef __MStarLight__
2#define __MStarLight__
3//
4// class MStarLight
5//
6//
7#include "TROOT.h"
8#include "TH1.h"
9#include "TFile.h"
10#include "iostream.h"
11#include "fstream.h"
12#include "stdlib.h"
13#include "TRandom2.h"
14
15#define VERSIONSR 1002.0
16#define TIMERANGE 10000.
17#define TRIGBINS 40000
18#define FADCBINS 3000
19
20class MStarLight {
21
22 private:
23
24 Float_t fBrightness ; // the brightness of the star in phe/nsec
25
26 Float_t fTimeRange ; // the time range of the trigger response
27
28 Float_t fBinsTrig ; // Number of Bins in the trigger
29 Float_t fTrigShape ; // a number that indicate the shape type of
30 // the signal
31 // = 0 --> a gaussian
32 Float_t fAmplTrig ; // the amplitude of the trigger in mV
33 Float_t fFwhmTrig ; // the width of the signal in nsec
34
35 Float_t fBinsFadc ; // Number of Bins in the trigger
36 Float_t fFadcShape ; // a number that indicate the shape type of
37 // the signal
38 // = 0 --> a gaussian
39 Float_t fIntegFadc ; // the integral of the single phe response
40 // in the FADC (in FADC counts)
41 Float_t fFwhmFadc ; // the width of the signal in nsec
42
43 Float_t fTrig[TRIGBINS] ; // 4.0 bins per nsec for 10000 seconds
44 Float_t fFadc[FADCBINS] ; // 0.3 bins per nsec for 10000 seconds
45
46 Float_t fTrigResp [ 40 ] ; // the shape of the response for trigger
47 Float_t fFadcResp [ 45 ] ; // the shape of the response for FADC
48
49 public:
50
51 MStarLight() ;
52
53 void Reset() ;
54
55 void SetBrightness( Float_t in ) ;
56 void SetAmplTrig( Float_t in ) ;
57 void SetFwhmTrig( Float_t in ) ;
58 void SetIntegFadc( Float_t in ) ;
59 void SetFwhmFadc( Float_t in ) ;
60
61 Float_t GetBrightness() ;
62 Float_t GetAmplTrig() ;
63 Float_t GetFwhmTrig() ;
64 Float_t GetIntegFadc() ;
65 Float_t GetFwhmFadc() ;
66
67 void SetTrigResponse(Float_t *in) ;
68
69 void SetFadcResponse(Float_t *in) ;
70
71 void FillResponse(Float_t ampl, Float_t time) ;
72
73 void ElecNoise ( Float_t noiseTrig = 0.3 , Float_t noiseFadc = .5 ) ;
74
75 Float_t GetTrig (Int_t i);
76
77 Float_t GetFadc (Int_t i);
78
79 void StoreHisto (char *filename ) ;
80
81 void WriteBinary (char *filename ) ;
82
83 void ReadBinary (char *filename ) ;
84
85} ;
86
87#endif
Note: See TracBrowser for help on using the repository browser.