- Timestamp:
- 10/12/04 14:43:18 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/StarResponse/MStarLight.hxx
r5099 r5248 1 #include "MFadcDefine.h" 2 #include "MTriggerDefine.h" 3 1 4 #ifndef __MStarLight__ 2 5 #define __MStarLight__ … … 13 16 #include "TRandom2.h" 14 17 15 #define VERSIONSR 1002.0 16 #define TIMERANGE 10000. 17 #define TRIGBINS 40000 18 #define FADCBINS 3000 18 #define VERSIONSR 1003.0 19 #define TIMERANGE 10000 // ns 19 20 20 21 class MStarLight { … … 22 23 private: 23 24 24 Float_t fBrightness ;// the brightness of the star in phe/nsec25 Float_t fBrightness; // the brightness of the star in phe/nsec 25 26 26 Float_t fTimeRange 27 Float_t fTimeRange; // the time range of the trigger response 27 28 28 Float_t fBinsTrig ; // Number of Bins in the trigger29 Float_t fTrigShape; // a number that indicate the shape type of30 31 32 Float_t fAmplTrig ;// the amplitude of the trigger in mV33 Float_t fFwhmTrig ;// the width of the signal in nsec29 Int_t fBinsTrig; // Number of Bins in the trigger database 30 Int_t fTrigShape; // a number that indicate the shape type of 31 // the signal 32 // = 0 --> a gaussian 33 Float_t fAmplTrig; // the amplitude of the trigger in mV 34 Float_t fFwhmTrig; // the width of the signal in nsec 34 35 35 Float_t fBinsFadc ; // Number of Bins in the trigger36 Float_t fFadcShape; // a number that indicate the shape type of37 38 39 Float_t fIntegFadc ;// the integral of the single phe response40 41 Float_t fFwhmFadc ;// the width of the signal in nsec36 Int_t fBinsFadc; // Number of Bins in the FADC database 37 Int_t fFadcShape; // a number that indicate the shape type of 38 // the signal 39 // = 0 --> a gaussian 40 Float_t fIntegFadc; // the integral of the single phe response 41 // in the FADC (in FADC counts) 42 Float_t fFwhmFadc; // the width of the signal in nsec 42 43 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 44 Float_t *fTrig; // Trigger branch "history" for 10000 nanoseconds 45 Float_t *fTrigResp; // the shape of the response for trigger 46 Float_t *fFadc; // FADC "history" for 10000 nanoseconds 47 Float_t *fFadcResp; // the shape of the response for FADC 48 49 Float_t fFadcSlicesPerNanosec; // Number of FADC slices per ns 50 // (may be < 1 if FADC is faster than 1 GHz) 51 52 Int_t fResponseSlicesFadc; 48 53 49 54 public: 50 51 MStarLight() ;52 55 53 void Reset() ; 56 MStarLight(Float_t fadc_slices_per_ns = 0., 57 Int_t response_slices_fadc = 0); 54 58 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 ) ; 59 void Reset(); 61 60 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() ; 61 void SetBrightness(Float_t in); 62 void SetAmplTrig(Float_t in); 63 void SetFwhmTrig(Float_t in); 64 void SetShapeFadc(Int_t in) {fFadcShape=in;} 65 void SetIntegFadc(Float_t in); 66 void SetFwhmFadc(Float_t in); 67 void SetFadcSlicesPerNanosec(Float_t in); 68 68 69 void SetTrigResponse(Float_t *in) ;70 69 71 void SetFadcResponse(Float_t *in) ; 70 Float_t GetBrightness(); 71 Float_t GetAmplTrig(); 72 Float_t GetFwhmTrig(); 73 Int_t GetShapeFadc() {return fFadcShape;} 74 Float_t GetIntegFadc(); 75 Float_t GetFwhmFadc(); 76 Int_t GetBinsTrig() {return fBinsTrig;} 77 Int_t GetBinsFadc() {return fBinsFadc;} 78 Float_t GetTimeRange() {return fTimeRange;} 79 Float_t GetFadcSlicesPerNanosec() {return fFadcSlicesPerNanosec;} 72 80 73 void FillResponse(Float_t ampl, Float_t time) ; 81 void SetTrigResponse(Float_t *in); 82 void SetFadcResponse(Float_t *in); 74 83 75 void ElecNoise ( Float_t noiseTrig = 0.3 , Float_t noiseFadc = .5 ) ; 84 void FillResponse(Float_t ampl, Float_t time); 85 86 void ElecNoise ( Float_t noiseTrig = 0.3 , Float_t noiseFadc = .5 ); 76 87 77 88 Float_t GetTrig (Int_t i); 78 79 89 Float_t GetFadc (Int_t i); 80 90 81 void StoreHisto (char *filename ) ; 91 Float_t* GetTrigPointer (Int_t i) { return &(fTrig[i]); } 92 Float_t* GetFadcPointer (Int_t i) { return &(fFadc[i]); } 82 93 83 void WriteBinary (char *filename );94 void StoreHisto (char *filename ); 84 95 85 void ReadBinary (char *filename );96 void WriteBinary (char *filename ); 86 97 87 } ; 98 void ReadBinary (char *filename ); 99 100 }; 88 101 89 102 #endif
Note:
See TracChangeset
for help on using the changeset viewer.