本文整理汇总了C++中Trace::GetWaveform方法的典型用法代码示例。如果您正苦于以下问题:C++ Trace::GetWaveform方法的具体用法?C++ Trace::GetWaveform怎么用?C++ Trace::GetWaveform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace::GetWaveform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Analyze
void FittingAnalyzer::Analyze(Trace &trace, const std::string &detType,
const std::string &detSubtype,
const std::map<std::string, int> & tagMap) {
TraceAnalyzer::Analyze(trace, detType, detSubtype, tagMap);
if(trace.HasValue("saturation") || trace.empty() ||
trace.GetWaveform().size() == 0) {
EndAnalyze();
return;
}
Globals *globals = Globals::get();
const double sigmaBaseline = trace.GetValue("sigmaBaseline");
const double maxVal = trace.GetValue("maxval");
const double qdc = trace.GetValue("qdc");
const double maxPos = trace.GetValue("maxpos");
const vector<double> waveform = trace.GetWaveform();
bool isDblBeta = detType == "beta" && detSubtype == "double";
bool isDblBetaT = isDblBeta && tagMap.find("timing") != tagMap.end();
trace.plot(D_SIGMA, sigmaBaseline*100);
if(!isDblBetaT) {
if(sigmaBaseline > globals->sigmaBaselineThresh()) {
EndAnalyze();
return;
}
} else {
if(sigmaBaseline > globals->siPmtSigmaBaselineThresh()) {
EndAnalyze();
return;
}
}
pair<double,double> pars = globals->fitPars(detType+":"+detSubtype);
if(isDblBetaT)
pars = globals->fitPars(detType+":"+detSubtype+":timing");
FitDriver *driver;
switch(fitterType_) {
case FitDriver::GSL:
driver = new GslFitter(isDblBetaT);
break;
case FitDriver::UNKNOWN:
default:
EndAnalyze();
return;
}
driver->PerformFit(waveform, pars, sigmaBaseline, qdc);
trace.InsertValue("phase", driver->GetPhase()+maxPos);
trace.plot(DD_AMP, driver->GetAmplitude(), maxVal);
trace.plot(D_PHASE, driver->GetPhase()*1000+100);
trace.plot(D_CHISQPERDOF, driver->GetChiSqPerDof());
delete(driver);
EndAnalyze();
}