Changeset 5504 for trunk/MagicSoft/Mars/mpedestal
- Timestamp:
- 11/29/04 16:45:57 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mpedestal
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
r5496 r5504 150 150 ///////////////////////////////////////////////////////////////////////////// 151 151 #include "MExtractPedestal.h" 152 #include "MExtractTimeAndCharge.h" 152 153 153 154 #include "MParList.h" … … 355 356 356 357 *fLog << inf; 357 Print();358 358 359 359 return kTRUE; … … 419 419 } 420 420 421 421 if (fExtractor) 422 fExtractor->InitArrays(); 423 424 Print(); 425 422 426 return kTRUE; 423 427 } -
trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
r5498 r5504 100 100 // fCheckWinFirst = fgCheckWinFirst = 0 101 101 // fCheckWinLast = fgCheckWinLast = 29 102 // fExtractWinFirst = fgExtractWinFirst = 0102 // fExtractWinFirst = fgExtractWinFirst = 15 103 103 // fExtractWinSize = fgExtractWinSize = 6 104 104 // fMaxSignalVar = fgMaxSignalVar = 40; … … 108 108 // to set the Window in which a signal is searched 109 109 // 110 // SetExtractWindow(fExtractWin dFirst,fExtractWinSize);110 // SetExtractWindow(fExtractWinFirst,fExtractWinSize); 111 111 // to set the Window from which a signal is extracted 112 112 // … … 239 239 const UShort_t losamples = fRunHeader->GetNumSamplesLoGain(); 240 240 241 UShort_t lastavailable = hisamples+losamples-1; 242 241 243 if (fExtractor) 242 SetExtractWindow(hisamples+fExtractor->GetHiGainFirst(),hisamples+fExtractor->GetHiGainLast()); 243 244 { 245 SetExtractWindow(fExtractor->GetHiGainFirst(),(Int_t)fExtractor->GetNumHiGainSamples()); 246 lastavailable = losamples-1; 247 } 248 244 249 // If the size is not yet set, set the size 245 250 if (fSumx.GetSize()==0) … … 250 255 } 251 256 252 MExtractPedestal::ReInit(pList); 253 254 UShort_t lastavailable = hisamples+losamples-1; 255 256 if (fExtractWinLast > lastavailable) //changed to override check 257 if (fExtractWinLast > lastavailable) //changed to override check 257 258 { 258 259 const UShort_t diff = fExtractWinLast - lastavailable; … … 264 265 fExtractWinSize -= diff; 265 266 } 266 267 lastavailable = fRunHeader->GetNumSamplesHiGain()-1;268 267 268 lastavailable = hisamples + losamples -1; 269 269 270 if (fCheckWinLast > lastavailable) //changed to override check 270 {271 { 271 272 *fLog << warn << GetDescriptor(); 272 273 *fLog << " - WARNING: Last Check Window slice out of range...adjusting to last available slice "; 273 274 *fLog << lastavailable << endl; 274 275 275 276 fCheckWinLast = lastavailable; 276 } 277 277 } 278 279 MExtractPedestal::ReInit(pList); 280 278 281 return kTRUE; 279 282 } … … 488 491 489 492 fPedestalsOut->SetReadyToSave(); 493 490 494 return kTRUE; 491 495 } -
trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc
r5487 r5504 202 202 Bool_t MPedCalcPedRun::ReInit(MParList *pList) 203 203 { 204 205 if (fExtractor) 206 SetExtractWindow(fExtractor->GetHiGainFirst(),(Int_t)fExtractor->GetNumHiGainSamples()); 204 207 205 208 MExtractPedestal::ReInit(pList); … … 291 294 CalcSums( &pixel, sum, ab0, ab1); 292 295 293 const Float_t msum = (Float_t)sum; 294 295 fSumx[idx] += msum; 296 fAreaSumx[aidx] += msum; 297 fSectorSumx[sector] += msum; 298 299 const Float_t sqrsum = msum*msum; 296 fSumx[idx] += sum; 297 fAreaSumx[aidx] += sum; 298 fSectorSumx[sector] += sum; 299 300 const Float_t sqrsum = sum*sum; 300 301 fSumx2[idx] += sqrsum; 301 302 fAreaSumx2[aidx] += sqrsum; … … 316 317 return kTRUE; 317 318 } 318 319 320 319 321 320 void MPedCalcPedRun::CalcExtractor( MRawEvtPixelIter *pixel, Float_t &sum, MPedestalPix &ped) … … 328 327 Float_t dummy; 329 328 fExtractor->FindTimeAndChargeHiGain(first,logain,sum,dummy,dummy,dummy,sat,ped,abflag); 329 330 330 } 331 331 … … 458 458 Bool_t MPedCalcPedRun::IsPedBitSet() 459 459 { 460 460 461 if (fRunHeader->GetRunNumber() < gkFirstRunWithFinalBits) 461 462 return kFALSE;
Note:
See TracChangeset
for help on using the changeset viewer.