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

Last change on this file since 738 was 625, checked in by magicsol, 24 years ago
Format of the database for the NSB.
File size: 2.2 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 TIMERANGE 10000.
16#define TRIGBINS 40000
17#define FADCBINS 3000
18
19class MStarLight {
20
21 private:
22
23 Float_t fBrightness ; // the brightness of the star in phe/nsec
24
25 Float_t fTimeRange ; // the time range of the
26
27 Float_t fBinsTrig ; // Number of Bins in the trigger
28 Float_t fTrigShape ; // a number that indicate the shape type of
29 // the signal
30 // = 0 --> a gaussian
31 Float_t fAmplTrig ; // the amplitude of the trigger in mV
32 Float_t fFwhmTrig ; // the width of the signal in nsec
33
34 Float_t fBinsFadc ; // Number of Bins in the trigger
35 Float_t fFadcShape ; // a number that indicate the shape type of
36 // the signal
37 // = 0 --> a gaussian
38 Float_t fAmplFadc ; // the amplitude of the trigger in mV
39 Float_t fFwhmFadc ; // the width of the signal in nsec
40
41 Float_t fTrig[TRIGBINS] ; // 4.0 bins per nsec for 10000 seconds
42 Float_t fFadc[FADCBINS] ; // 0.3 bins per nsec for 10000 seconds
43
44 Float_t fTrigResp [ 40 ] ; // the shape of the response for trigger
45 Float_t fFadcResp [ 45 ] ; // the shape of the response for trigger
46
47 public:
48
49 MStarLight() ;
50
51 void Reset() ;
52
53 void SetBrightness( Float_t in ) ;
54 void SetAmplTrig( Float_t in ) ;
55 void SetFwhmTrig( Float_t in ) ;
56 void SetAmplFadc( Float_t in ) ;
57 void SetFwhmFadc( Float_t in ) ;
58
59 Float_t GetBrightness() ;
60 Float_t GetAmplTrig() ;
61 Float_t GetFwhmTrig() ;
62 Float_t GetAmplFadc() ;
63 Float_t GetFwhmFadc() ;
64
65 void SetTrigResponse(Float_t *in) ;
66
67 void SetFadcResponse(Float_t *in) ;
68
69 void FillResponse(Float_t ampl, Float_t time) ;
70
71 void ElecNoise ( Float_t noiseTrig = 0.3 , Float_t noiseFadc = .5 ) ;
72
73 Float_t GetTrig (Int_t i);
74
75 Float_t GetFadc (Int_t i);
76
77 void StoreHisto (char *filename ) ;
78
79 void WriteBinary (char *filename ) ;
80
81 void ReadBinary (char *filename ) ;
82
83} ;
84
85#endif
Note: See TracBrowser for help on using the repository browser.