- Timestamp:
- 06/13/12 14:33:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/marsmacros/singlepe.C
r14167 r14170 351 351 continue; 352 352 353 //search for maximum after threshold crossing 354 UInt_t k_max = 0; 355 for (UInt_t k=i; k<i+15 && k < roi-navg-end_skip-10; k++) 356 { 357 if (val[k+1] > val[k]) 358 k_max = k; 359 } 360 361 //search for half maximum before maximum 362 UInt_t k_half_max = 0; 363 for (UInt_t k=k_max; k>k_max-20; k--) 364 { 365 if (val[k-1] < val[k_max]/2 && 366 val[k] >= val[k_max]/2 ) 367 { 368 k_half_max = k; 369 } 370 } 371 372 353 373 // Evaluate arrival time more precisely!!! 354 374 // Get a better integration window … … 356 376 Single single; 357 377 single.fSignal = 0; 358 single.fTime = i;378 single.fTime = k_half_max; 359 379 360 380 // Crossing of the threshold is at 5 361 for (UInt_t j= i+5; j<i+5+integration_size; j++)381 for (UInt_t j=k_half_max; j<k_half_max+integration_size; j++) 362 382 single.fSignal += ptr[j]; 363 383 … … 543 563 100, 0, 10); 544 564 TH1F hGain ("Gain", "Gain distribution", 545 50, 100, 250);565 50, 200, 350); 546 566 TH1F hGainRMS ("RelSigma", "Distribution of rel. Sigma", 547 567 100, 0, 30);
Note:
See TracChangeset
for help on using the changeset viewer.