Ignore:
Timestamp:
02/18/05 12:19:32 (20 years ago)
Author:
moralejo
Message:
 Changes in MFadc. Added possibility to set a shift (for the moment an
 integer number of FADC slices) between the signal peak in the high gain
 and in the low gain.
Location:
trunk/MagicSoft/Simulation/Detector/include-MFadc
Files:
2 edited

Legend:

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

    r6584 r6588  
    2424             Float_t trigger_delay, Float_t fadc_slices_per_ns,
    2525             Int_t fadc_slices_written, Int_t gainswitchamp,
    26              Int_t shiftfromswitch2lowgain) {
     26             Int_t shiftfromswitch2lowgain, Int_t hi2logainpeak) {
    2727  //
    2828  //  Constructor overloaded II
     
    5555  fGainSwitchAmp = gainswitchamp;
    5656  fShiftFromSwitch2LowGain = shiftfromswitch2lowgain;
     57  fHi2LoGainPeak = hi2logainpeak;
    5758
    5859  fSlices_mFadc = (Int_t)(TOTAL_TRIGGER_TIME*fFadcSlicesPerNanosec);
     
    988989
    989990      // Now put the low gain:
     991      // FIXME: for now, the shift between the high and low gain peaks has to be an integer number
     992      // of FADC slices. But in the data the shift is ~16.5 slices. This has to be implemented.
    990993      i=0;
    991994      for ( Int_t is = iFirstSlice; is < (iFirstSlice+fFadcSlices); is++ )
     
    995998              if (switch_i > 0 && (i+fFadcSlices) >= switch_i)
    996999                output_lowgain[ip][i] = pedestal[ip] +
    997                   (sig[ip][is]-pedestal[ip])/high2low_gain;
     1000                  (sig[ip][is-(fHi2LoGainPeak-fFadcSlices)]-pedestal[ip])/high2low_gain;
    9981001              // Once the shift occurs, low gain is filled with the high
    9991002              // gain signal scaled down by the factor high2low_gain
  • trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx

    r6584 r6588  
    110110                        // to fill the low gain with a scaled down version of the pulse in the
    111111                        // high gain. Else we put in the continuation of the high gain.
     112                        // By default it is now 120 ADC counts (see constructor).
    112113
    113114  Int_t fShiftFromSwitch2LowGain;
    114115  // Distance in FADC slices from the slice in which the amplitude
    115116  // fGainSwitchAmp is reached to were the switch to low gain will happen.
     117  // By default it is now 13 slices (see constructor)
     118
     119  Int_t fHi2LoGainPeak;
     120  // Distance in FADC slices from the signal peak in the high gain to the signal peak in
     121  // the low gain. By default we set now 16 slices (see constructor).
    116122
    117123  //
     
    138144        Int_t   fadc_slices_written = FADC_SLICES,
    139145        Int_t   gainswitchamp = 120,
    140         Int_t   shiftfromswitch2lowgain = 13);
     146        Int_t   shiftfromswitch2lowgain = 13,
     147        Int_t   hi2logainpeak = 16);
    141148
    142149  void SetSeed(UInt_t seed)  {GenElec->SetSeed(seed);}
Note: See TracChangeset for help on using the changeset viewer.