- Timestamp:
- 11/28/04 19:19:06 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
r5489 r5496 274 274 " raising from " << windows << " to " << flush; 275 275 windows += 1; 276 *fLog << windows +1<< "!" << endl;276 *fLog << windows << "!" << endl; 277 277 rc = kFALSE; 278 278 } -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r5374 r5496 160 160 const Byte_t MExtractTimeAndChargeSpline::fgLoGainLast = 14; 161 161 const Float_t MExtractTimeAndChargeSpline::fgResolution = 0.01; 162 const Float_t MExtractTimeAndChargeSpline::fgRiseTime = 2.0;163 const Float_t MExtractTimeAndChargeSpline::fgFallTime = 4. 0;162 const Float_t MExtractTimeAndChargeSpline::fgRiseTime = 1.5; 163 const Float_t MExtractTimeAndChargeSpline::fgFallTime = 4.5; 164 164 // -------------------------------------------------------------------------- 165 165 // … … 412 412 } 413 413 414 Float_t pp; 415 416 fHiGainSecondDeriv[0] = 0.; 417 fHiGainFirstDeriv[0] = 0.; 418 419 for (Int_t i=1;i<range-1;i++) 420 { 421 pp = fHiGainSecondDeriv[i-1] + 4.; 422 fHiGainSecondDeriv[i] = -1.0/pp; 423 fHiGainFirstDeriv [i] = fHiGainSignal[i+1] - fHiGainSignal[i] - fHiGainSignal[i] + fHiGainSignal[i-1]; 424 fHiGainFirstDeriv [i] = (6.0*fHiGainFirstDeriv[i]-fHiGainFirstDeriv[i-1])/pp; 425 } 426 427 fHiGainSecondDeriv[range-1] = 0.; 428 429 for (Int_t k=range-2;k>=0;k--) 430 fHiGainSecondDeriv[k] = fHiGainSecondDeriv[k]*fHiGainSecondDeriv[k+1] + fHiGainFirstDeriv[k]; 431 for (Int_t k=range-2;k>=0;k--) 432 fHiGainSecondDeriv[k] /= 6.; 433 434 if (IsNoiseCalculation() && IsExtractionType(kAmplitude)) 435 { 436 // 437 // Take the spline value at the middle of the third slice (to avoid egde effects) 438 // 439 sum = 0.5*fHiGainSignal[2] 440 + 0.5*fHiGainSignal[3] 441 + (-0.375)*fHiGainSecondDeriv[2] 442 + (-0.375)*fHiGainSecondDeriv[3]; 443 return; 444 } 445 414 446 // 415 447 // Allow no saturated slice … … 417 449 // Don't start if the maxpos is too close to the left limit. 418 450 // 419 if ( sat || maxpos < 2)451 if ((sat || maxpos < 2)) 420 452 { 421 453 time = IsExtractionType(kMaximum) … … 427 459 } 428 460 429 Float_t pp;430 431 fHiGainSecondDeriv[0] = 0.;432 fHiGainFirstDeriv[0] = 0.;433 434 for (Int_t i=1;i<range-1;i++)435 {436 pp = fHiGainSecondDeriv[i-1] + 4.;437 fHiGainSecondDeriv[i] = -1.0/pp;438 fHiGainFirstDeriv [i] = fHiGainSignal[i+1] - fHiGainSignal[i] - fHiGainSignal[i] + fHiGainSignal[i-1];439 fHiGainFirstDeriv [i] = (6.0*fHiGainFirstDeriv[i]-fHiGainFirstDeriv[i-1])/pp;440 }441 442 fHiGainSecondDeriv[range-1] = 0.;443 444 for (Int_t k=range-2;k>=0;k--)445 fHiGainSecondDeriv[k] = fHiGainSecondDeriv[k]*fHiGainSecondDeriv[k+1] + fHiGainFirstDeriv[k];446 for (Int_t k=range-2;k>=0;k--)447 fHiGainSecondDeriv[k] /= 6.;448 449 461 // 450 462 // Now find the maximum
Note:
See TracChangeset
for help on using the changeset viewer.