Changeset 13003 for trunk/Mars/mextralgo
- Timestamp:
- 03/07/12 16:28:14 (13 years ago)
- Location:
- trunk/Mars/mextralgo
- Files:
-
- 2 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:
Note:
See TracChangeset
for help on using the changeset viewer.