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

Last change on this file since 2521 was 2431, checked in by blanch, 21 years ago
A define VERSIONSR has been introduced, now it is 1000.0
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 VERSIONSR 1000.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
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 fAmplFadc ; // the amplitude of the trigger in mV
40 Float_t fFwhmFadc ; // the width of the signal in nsec
41
42 Float_t fTrig[TRIGBINS] ; // 4.0 bins per nsec for 10000 seconds
43 Float_t fFadc[FADCBINS] ; // 0.3 bins per nsec for 10000 seconds
44
45 Float_t fTrigResp [ 40 ] ; // the shape of the response for trigger
46 Float_t fFadcResp [ 45 ] ; // the shape of the response for trigger
47
48 public:
49
50 MStarLight() ;
51
52 void Reset() ;
53
54 void SetBrightness( Float_t in ) ;
55 void SetAmplTrig( Float_t in ) ;
56 void SetFwhmTrig( Float_t in ) ;
57 void SetAmplFadc( Float_t in ) ;
58 void SetFwhmFadc( Float_t in ) ;
59
60 Float_t GetBrightness() ;
61 Float_t GetAmplTrig() ;
62 Float_t GetFwhmTrig() ;
63 Float_t GetAmplFadc() ;
64 Float_t GetFwhmFadc() ;
65
66 void SetTrigResponse(Float_t *in) ;
67
68 void SetFadcResponse(Float_t *in) ;
69
70 void FillResponse(Float_t ampl, Float_t time) ;
71
72 void ElecNoise ( Float_t noiseTrig = 0.3 , Float_t noiseFadc = .5 ) ;
73
74 Float_t GetTrig (Int_t i);
75
76 Float_t GetFadc (Int_t i);
77
78 void StoreHisto (char *filename ) ;
79
80 void WriteBinary (char *filename ) ;
81
82 void ReadBinary (char *filename ) ;
83
84} ;
85
86#endif
Note: See TracBrowser for help on using the repository browser.