Ignore:
Timestamp:
10/12/04 14:43:18 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
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
    14#ifndef __MStarLight__
    25#define __MStarLight__
     
    1316#include "TRandom2.h"
    1417
    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
    1920
    2021class MStarLight {
     
    2223 private:
    2324 
    24   Float_t  fBrightness  ;   // the brightness of the star in phe/nsec
     25  Float_t  fBrightness;  // the brightness of the star in phe/nsec
    2526 
    26   Float_t  fTimeRange   ;   // the time range of the trigger response
     27  Float_t  fTimeRange;   // the time range of the trigger response
    2728 
    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
     29  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
    3435
    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
     36  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
    4243 
    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;
    4853
    4954 public:
    50  
    51   MStarLight() ;
    5255
    53   void Reset() ;
     56  MStarLight(Float_t fadc_slices_per_ns = 0.,
     57             Int_t response_slices_fadc = 0);
    5458
    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();
    6160
    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);
    6868
    69   void SetTrigResponse(Float_t *in) ;
    7069
    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;}
    7280
    73   void FillResponse(Float_t ampl, Float_t time) ;
     81  void SetTrigResponse(Float_t *in);
     82  void SetFadcResponse(Float_t *in);
    7483
    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 );
    7687
    7788  Float_t GetTrig (Int_t i);
    78 
    7989  Float_t GetFadc (Int_t i);
    8090
    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]); }
    8293
    83   void WriteBinary (char *filename ) ;
     94  void StoreHisto  (char *filename );
    8495
    85   void ReadBinary (char *filename ) ;
     96  void WriteBinary (char *filename );
    8697
    87 } ;
     98  void ReadBinary (char *filename );
     99
     100};
    88101
    89102#endif
Note: See TracChangeset for help on using the changeset viewer.