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

Last change on this file since 5165 was 5099, checked in by moralejo, 20 years ago
Adapted headers to current c++ style, removed -Wno-deprecated from compilation options.
File size: 2.4 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>
11#include <fstream>
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 nanoseconds
44 Float_t fFadc[FADCBINS] ; // 0.3 bins per nsec for 10000 nanoseconds
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 SetShapeFadc( Float_t in ) { fFadcShape=in;}
59 void SetIntegFadc( Float_t in ) ;
60 void SetFwhmFadc( Float_t in ) ;
61
62 Float_t GetBrightness() ;
63 Float_t GetAmplTrig() ;
64 Float_t GetFwhmTrig() ;
65 Float_t GetShapeFadc() {return fFadcShape;}
66 Float_t GetIntegFadc() ;
67 Float_t GetFwhmFadc() ;
68
69 void SetTrigResponse(Float_t *in) ;
70
71 void SetFadcResponse(Float_t *in) ;
72
73 void FillResponse(Float_t ampl, Float_t time) ;
74
75 void ElecNoise ( Float_t noiseTrig = 0.3 , Float_t noiseFadc = .5 ) ;
76
77 Float_t GetTrig (Int_t i);
78
79 Float_t GetFadc (Int_t i);
80
81 void StoreHisto (char *filename ) ;
82
83 void WriteBinary (char *filename ) ;
84
85 void ReadBinary (char *filename ) ;
86
87} ;
88
89#endif
Note: See TracBrowser for help on using the repository browser.