Changeset 13003
- Timestamp:
- 03/07/12 16:28:14 (13 years ago)
- Location:
- trunk/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mextralgo/MExtralgoSpline.cc
r9226 r13003 289 289 return 0; 290 290 291 if ( fExtractionType == kAmplitude)291 if (!(fExtractionType&kIntegral)) 292 292 { 293 293 const Int_t pos = gRandom->Integer(fNum-1); … … 320 320 // --- End NEW --- 321 321 322 if (fExtractionType == kAmplitude) 323 { 324 fTime = maxpos; 325 fTimeDev = 0; 322 if (fExtractionType&kIntegral) 323 { 324 fSignal = CalcIntegral(maxpos); 325 fSignalDev = 0; // means: is valid 326 } 327 else 328 { 326 329 fSignal = fHeight; 327 330 fSignalDev = 0; // means: is valid 328 return; 329 } 330 331 fSignal = CalcIntegral(maxpos); 332 fSignalDev = 0; // means: is valid 333 334 if (fExtractionType==kIntegralRel && fHeightTm<0) 335 { 336 fTime = maxpos; 331 } 332 333 // Position of maximum 334 if (((fExtractionType&kTimeRel) && fHeightTm<0) || (fExtractionType&kMaximum)) 335 { 336 fTime = maxpos; 337 337 fTimeDev = 0; 338 338 return; 339 339 } 340 340 341 const Float_t h = fExtractionType==kIntegralAbs ? fHeightTm : fHeight*fHeightTm; 341 // Position of fraction height or absolute height 342 const Float_t h = (fExtractionType&kTimeRel) ? fHeight*fHeightTm : fHeightTm; 342 343 343 344 // Search downwards for fHeight/2 -
trunk/Mars/mextralgo/MExtralgoSpline.h
r9229 r13003 12 12 { 13 13 public: 14 enum ExtractionType_t { kAmplitude, kIntegralRel, kIntegralAbs }; //! Possible time and charge extraction types 14 enum ExtractionType_t 15 { 16 kIntegral = BIT(0), 17 kTimeRel = BIT(1), 18 kMaximum = BIT(2), 19 20 // For backward compatibility 21 kAmplitudeAbs = 0, // Height of maximum, absolute height leading edge 22 kAmplitudeRel = kTimeRel, // Height of maximum, relative height leading edge 23 kAmplitude = kMaximum, // Position and height of maximum 24 kIntegralAbs = kIntegral, // Integral, absolute height leading edge 25 kIntegralRel = kIntegral|kTimeRel, // Integral, relative height leading edge 26 }; 15 27 16 28 private: -
trunk/Mars/msignal/MExtractTimeAndChargeSpline.cc
r12629 r13003 225 225 { 226 226 case MExtralgoSpline::kAmplitude: 227 case MExtralgoSpline::kAmplitudeRel: 228 case MExtralgoSpline::kAmplitudeAbs: 227 229 SetResolutionPerPheHiGain(0.053); 228 230 SetResolutionPerPheLoGain(0.016); … … 303 305 { 304 306 case MExtralgoSpline::kAmplitude: 307 case MExtralgoSpline::kAmplitudeRel: 308 case MExtralgoSpline::kAmplitudeAbs: 305 309 fNumHiGainSamples = 1.; 306 310 fNumLoGainSamples = fLoGainLast ? 1. : 0.; -
trunk/Mars/msignal/MExtractTimeAndChargeSpline.h
r11568 r13003 82 82 } 83 83 84 void SetHeightTm(const Double_t h) { fHeightTm = h; } 85 84 86 void SetLoGainStretch(const Float_t f=fgLoGainStretch) { fLoGainStretch = f; } 85 87
Note:
See TracChangeset
for help on using the changeset viewer.