Ignore:
Timestamp:
03/02/05 21:47:58 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Simulation/Detector/include-MFadc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx

    r6710 r6714  
    2424             Float_t trigger_delay, Float_t fadc_slices_per_ns,
    2525             Int_t fadc_slices_written, Int_t gainswitchamp,
    26              Int_t shiftfromswitch2lowgain, Int_t hi2logainpeak) {
     26             Int_t shiftfromswitch2lowgain, Float_t hi2logainpeak) {
    2727  //
    2828  //  Constructor overloaded II
     
    213213    p5_LG = fPulseParametersLG[5];
    214214    p6_LG = fPulseParametersLG[6];
     215
     216    p2_LG += (fHi2LoGainPeak - fFadcSlices); // Adjust distance between high and low gain peaks
    215217
    216218
     
    313315    p6_LG = fPulseParametersLG[6];
    314316
     317    p2_LG += (fHi2LoGainPeak - fFadcSlices); // Adjust distance between high and low gain peaks
     318
    315319    for (i=0; i< fResponseSlicesFadc ; i++ )
    316320      {
     
    988992
    989993      // Now put the low gain:
    990       // FIXME: for now, the shift between the high and low gain peaks has to be an integer number
    991       // of FADC slices. But in the data the shift is ~16.5 slices. This has to be implemented.
    992994      i=0;
    993995      for ( Int_t is = iFirstSlice; is < (iFirstSlice+fFadcSlices); is++ )
     
    997999              if (switch_i > 0 && (i+fFadcSlices) >= switch_i)
    9981000                output_lowgain[ip][i] = pedestal[ip] +
    999                   (sig_LG[ip][is-(fHi2LoGainPeak-fFadcSlices)]-pedestal[ip])/high2low_gain;
     1001                  (sig_LG[ip][is]-pedestal[ip])/high2low_gain;
    10001002              // Once the shift occurs, low gain is filled with the high
    10011003              // gain signal scaled down by the factor high2low_gain
  • trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx

    r6692 r6714  
    120120  // By default it is now 13 slices (see constructor)
    121121
    122   Int_t fHi2LoGainPeak;
     122  Float_t fHi2LoGainPeak;
    123123  // Distance in FADC slices from the signal peak in the high gain to the signal peak in
    124124  // the low gain. By default we set now 16 slices (see constructor).
     
    151151        Int_t   gainswitchamp = 120,
    152152        Int_t   shiftfromswitch2lowgain = 13,
    153         Int_t   hi2logainpeak = 16);
     153        Float_t hi2logainpeak = 16.5);
    154154
    155155  void SetSeed(UInt_t seed)  {GenElec->SetSeed(seed);}
Note: See TracChangeset for help on using the changeset viewer.