Changeset 3180 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/16/04 10:58:17 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3178 r3180  
    1515     - filled from MArrivalTime
    1616     - need: MFillH("MHCalibrationRelTimeCam","MArrivalTime")
     17
     18   * manalysis/MCalibrationCalc.cc
     19     - take out all uncommented code referring to the relative arrival time
    1720
    1821   * manalysis/MArrivalTime.h
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc

    r3174 r3180  
    408408
    409409      Float_t abstime = 0.;
    410 #if 0
    411       Float_t reltime = 0.;
    412 
    413       if (TESTBIT(fFlags,kUseTimes))
    414         {
    415 
    416           //
    417           // Have a look in MArrivalTime,
    418           // otherwise search the position of maximum bin
    419           // in MRawEvtData
    420           //
    421           if (fArrivalTime)
    422             {
    423               abstime = (*fArrivalTime)[pixid];
    424               reltime = abstime - (*fArrivalTime)[1];
    425             }
    426          
    427           else
    428             {
    429               if (pixid == 1)
    430                 referencetime = (Float_t)pixel.GetIdxMaxHiGainSample();
    431               if (sig.IsLoGainUsed())
    432                 {
    433                   abstime = (Float_t)pixel.GetIdxMaxLoGainSample();
    434                   //            reltime = abstime - referencetime;
    435                 }
    436               else
    437                 {
    438                   abstime = (Float_t)pixel.GetIdxMaxHiGainSample();
    439                   //                  reltime = abstime - referencetime;
    440                 }
    441               //            }
    442               //        }  /* if Use Times */
    443 
    444 #endif
     410      if (sig.IsLoGainUsed())
     411        abstime = (Float_t)pixel.GetIdxMaxLoGainSample();
     412      else
     413        abstime = (Float_t)pixel.GetIdxMaxHiGainSample();
     414
    445415      switch(pixid)
    446416        {
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc

    r3177 r3180  
    187187Bool_t MHCalibrationRelTimeCam::Finalize()
    188188{
    189     for (Int_t i=0; i<fArray->GetSize(); i++)
    190     {
    191 
    192         MHCalibrationRelTimePix &hist = (*this)[i];
    193 
    194         //
    195         // 1) Return if the charge distribution is already succesfully fitted
    196         //    or if the histogram is empty
    197         //
    198         if (hist.IsGausFitOK() || hist.IsEmpty())
    199           continue;
    200 
    201         //
    202         // 2) Fit the Hi Gain histograms with a Gaussian
    203         //
    204         hist.FitGaus();
    205        
    206         //
    207         // 3) If fit does not succeed , bypass the fit and take the histogram means and sigmas
    208         //
    209         if (!hist.IsGausFitOK())
    210           hist.BypassFit();
    211 
    212         //
    213         // 4) Create the fourier transform of the arrays
    214         //
    215         hist.CreateFourierSpectrum();
    216 
    217         //
    218         // 5) Renormalize to the real time in ns.
    219         //
    220         hist.Renorm(fTimeSliceWidth);
    221 
    222     }
    223     return kTRUE;
     189
     190  for (Int_t i=0; i<fArray->GetSize(); i++)
     191    {
     192     
     193      MHCalibrationRelTimePix &hist = (*this)[i];
     194     
     195      //
     196      // 1) Return if the charge distribution is already succesfully fitted
     197      //    or if the histogram is empty
     198      //
     199      if (hist.IsGausFitOK() || hist.IsEmpty())
     200        continue;
     201     
     202      //
     203      // 2) Fit the Hi Gain histograms with a Gaussian
     204      //
     205      hist.FitGaus();
     206     
     207      //
     208      // 3) If fit does not succeed , bypass the fit and take the histogram means and sigmas
     209      //
     210      if (!hist.IsGausFitOK())
     211        hist.BypassFit();
     212     
     213      //
     214      // 4) Create the fourier transform of the arrays
     215      //
     216      hist.CreateFourierSpectrum();
     217     
     218      //
     219      // 5) Renormalize to the real time in ns.
     220      //
     221      hist.Renorm(fTimeSliceWidth);
     222     
     223    }
     224  return kTRUE;
    224225}
    225226
Note: See TracChangeset for help on using the changeset viewer.