Ignore:
Timestamp:
09/09/04 17:19:26 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msignal/MArrivalTimePix.h

    r4274 r4899  
    3838    Byte_t GetNumLoGainSaturated()      const { return fNumLoGainSaturated; }
    3939
    40     Bool_t IsLoGainUsed() const { return fNumHiGainSaturated > 0; }
    41     Bool_t IsValid() const;   
     40    Bool_t IsLoGainUsed()               const { return fNumHiGainSaturated > 0; }
     41    Bool_t IsValid()                    const;   
    4242
    4343    ClassDef(MArrivalTimePix, 1)        // Storage Container for ArrivalTime information of one pixel
  • trunk/MagicSoft/Mars/msignal/MExtractAmplitudeSpline.cc

    r4378 r4899  
    121121
    122122  fNumHiGainSamples = 2.;
    123   fNumLoGainSamples = 2.;
     123  fNumLoGainSamples = lolast == 0 ? 0. : 2.;
    124124
    125125  fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples);
     
    166166  Int_t range = fHiGainLast - fHiGainFirst + 1 + fHiLoLast;
    167167
    168   fHiGainSignal = new Float_t[range];
     168  fHiGainSignal      = new Float_t[range];
    169169  memset(fHiGainSignal,0,range*sizeof(Float_t));
    170170  fHiGainFirstDeriv  = new Float_t[range];
     
    181181        << endl;
    182182
    183   range = fLoGainLast - fLoGainFirst + 1;
     183  range = fLoGainLast ? fLoGainLast - fLoGainFirst + 1 : 0;
    184184
    185185  fLoGainSignal = new Float_t[range];
     
    189189  fLoGainSecondDeriv = new Float_t[range];
    190190  memset(fLoGainSecondDeriv,0,range*sizeof(Float_t));
    191 
     191 
    192192  *fLog << endl;
    193193  *fLog << inf << GetDescriptor() << ": Using for Low-Gain Extraction " << range
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc

    r4896 r4899  
    181181
    182182  fNumHiGainSamples = (Float_t)(fHiGainLast-fHiGainFirst+1);
    183   fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst+1); 
     183  if (lolast)
     184    fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst+1);
     185  else
     186    fNumLoGainSamples = 0.;
    184187
    185188  fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples);
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindowSpline.cc

    r4449 r4899  
    111111
    112112  const Byte_t windowhi = hilast-hifirst+1;
    113   const Byte_t windowlo = lolast-lofirst+1;
    114  
    115113  const Byte_t whieven = windowhi & ~1;
    116   const Byte_t wloeven = windowlo & ~1;
    117114
    118115  if (whieven != windowhi)
     
    124121    }
    125122 
    126   if (wloeven != windowlo)
    127     {
    128       *fLog << warn << GetDescriptor()
    129             << Form("%s%2i%s%2i",": Lo Gain window size has to be even, set last slice from "
    130                     ,(int)lolast," to ",(int)(lolast-1)) << endl;
    131       lolast -= 1;
    132     }
    133  
    134123  if (whieven<2)
    135124    {
     
    139128      hilast = hifirst+1;
    140129    }
    141  
    142   if (wloeven<2)
    143     {
    144       *fLog << warn << GetDescriptor()
    145             << Form("%s%2i%s%2i",": Lo Gain window is smaller than 2 FADC sampes, set last slice from"
    146                     ,(int)lolast," to ",(int)(lofirst+1)) << endl;
    147       lolast = lofirst+1;       
    148     }
    149 
     130
     131  const Byte_t windowlo = lolast-lofirst+1;
     132  const Byte_t wloeven = windowlo & ~1;
     133
     134  if (lolast != 0)
     135    {
     136      if (wloeven != windowlo)
     137        {
     138          *fLog << warn << GetDescriptor()
     139                << Form("%s%2i%s%2i",": Lo Gain window size has to be even, set last slice from "
     140                        ,(int)lolast," to ",(int)(lolast-1)) << endl;
     141          lolast -= 1;
     142        }
     143     
     144     
     145      if (wloeven<2)
     146        {
     147          *fLog << warn << GetDescriptor()
     148                << Form("%s%2i%s%2i",": Lo Gain window is smaller than 2 FADC sampes, set last slice from"
     149                        ,(int)lolast," to ",(int)(lofirst+1)) << endl;
     150          lolast = lofirst+1;       
     151        }
     152    }
     153 
    150154
    151155  MExtractor::SetRange(hifirst,hilast,lofirst,lolast);
     
    157161  //
    158162  fNumHiGainSamples = (Float_t)(fHiGainLast-fHiGainFirst);
    159   fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst); 
     163  if (fLoGainLast != 0)
     164    fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst); 
     165  else
     166    fNumLoGainSamples = 0.;
    160167
    161168  fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples);
  • trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.cc

    r4340 r4899  
    129129                              fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    130130
     131
     132  *fLog << endl;
     133  *fLog << inf << GetDescriptor() << ": Taking " << fNumHiGainSamples
     134        << " HiGain samples from a window starting with slice " << (Int_t)fHiGainFirst
     135        << " to " << (Int_t)(fHiGainLast+fHiLoLast) << " incl" << endl;
     136  *fLog << inf << GetDescriptor() << ": Taking " << fNumLoGainSamples
     137        << " LoGain samples from a window starting with slice " << (Int_t)fLoGainFirst
     138        << " to " << (Int_t)fLoGainLast << " incl" << endl;
     139
    131140  return kTRUE;
    132141 
     
    161170   
    162171  const Byte_t availhirange = (fHiGainLast-fHiGainFirst+1) & ~1;
    163   const Byte_t availlorange = (fLoGainLast-fLoGainFirst+1) & ~1;
    164172
    165173  if (fWindowSizeHiGain > availhirange)
     
    173181    }
    174182 
    175   if (fWindowSizeLoGain > availlorange)
    176     {
    177       *fLog << warn << GetDescriptor()
    178             << Form("%s%2i%s%2i%s%2i%s",": Lo Gain window size: ",(int)fWindowSizeLoGain,
    179                     " is bigger than available range: [",(int)fLoGainFirst,",",(int)fLoGainLast,"]") << endl;
    180       *fLog << warn << GetDescriptor()
    181             << ": Will set window size to: " << (int)availlorange << endl;
    182       fWindowSizeLoGain = availlorange;
    183     }
    184  
    185183  if (fWindowSizeHiGain<2)
    186184    {
     
    189187    }
    190188 
    191   if (fWindowSizeLoGain<2)
    192     {
    193       fWindowSizeLoGain = 2;
    194       *fLog << warn << GetDescriptor() << ": Lo Gain window size set to two samples" << endl;
    195     }
    196    
     189  if (fLoGainLast != 0 && fWindowSizeLoGain != 0)
     190    {
     191      const Byte_t availlorange = (fLoGainLast-fLoGainFirst+1) & ~1;
     192     
     193      if (fWindowSizeLoGain > availlorange)
     194        {
     195          *fLog << warn << GetDescriptor()
     196                << Form("%s%2i%s%2i%s%2i%s",": Lo Gain window size: ",(int)fWindowSizeLoGain,
     197                        " is bigger than available range: [",(int)fLoGainFirst,",",(int)fLoGainLast,"]") << endl;
     198          *fLog << warn << GetDescriptor()
     199                << ": Will set window size to: " << (int)availlorange << endl;
     200          fWindowSizeLoGain = availlorange;
     201        }
     202     
     203      if (fWindowSizeLoGain<2)
     204        {
     205          fWindowSizeLoGain = 2;
     206          *fLog << warn << GetDescriptor() << ": Lo Gain window size set to two samples" << endl;
     207        }
     208    }
     209 
    197210  fNumHiGainSamples = (Float_t)fWindowSizeHiGain;
    198211  fNumLoGainSamples = (Float_t)fWindowSizeLoGain;
Note: See TracChangeset for help on using the changeset viewer.