Changeset 14081
- Timestamp:
- 06/05/12 16:52:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/templateextractors.C
r14062 r14081 574 574 return returnval; 575 575 } 576 577 double 578 PulseFunction( 579 double* time, 580 double* baseline, 581 double* risingChargeVoltage, 582 double* risingImpedance, 583 double* risingCapacity, 584 double* fallingChargeVoltage, 585 double* fallingImpedance, 586 double* fallingCapacity 587 ) 588 { 589 double returnValue = 0.0; 590 returnValue += baseline; 591 returnValue += ChargeDiode( 592 time, 593 risingChargeVoltage, 594 risingImpedance, 595 risingCapacity); 596 returnValue += UnChargeDiode( 597 time, 598 fallingChargeVoltage, 599 fallingImpedance, 600 fallingCapacity); 601 return returnValue; 602 } 603 604 void 605 FitPulse( 606 TString name, 607 TH1F* histo, 608 double xMin, 609 double xMax, 610 double* parameters 611 ) 612 { 613 TF1* pulseFunction = new TF1(name, PulseFunction, xMin, xMax, 7 ); 614 pulseFunction->SetParNames( 615 "Baseline", 616 "Charge-Voltage of rising Edge", 617 "Impedance for rising Edge", 618 "Capacity for rising Edge", 619 "Charge-Voltage of falling Edge", 620 "Impedance for falling Edge", 621 "Capacity for falling Edge" 622 ); 623 pulseFunction->SetLineColor(kRed); 624 histo->Fit(pulseFunction, "RWM"); 625 pulseFunction->GetParameters(parameters); 626 return 0; 627 }
Note:
See TracChangeset
for help on using the changeset viewer.