本文整理汇总了C++中TH2D::GetFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ TH2D::GetFunction方法的具体用法?C++ TH2D::GetFunction怎么用?C++ TH2D::GetFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TH2D
的用法示例。
在下文中一共展示了TH2D::GetFunction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetStartPosition
//.........这里部分代码省略.........
countu++;
}
}
if( (*itClus)->view()== Minerva::IDCluster::V ){
debug() << " StartPoint V view, pe " << (*itClus)->pe() << "; z = " << (*itClus)->z()
<< "; coord " << (*itClus)->position() << endmsg;
Dx = (*itClus)->position() - m_mathTool->calcVfromXY(vert.x(),vert.y());
distance = sqrt( pow(Dx,2) + pow(Dz,2) );
if ( is_vertex ){
hV->Fill( (*itClus)->z()-12,(*itClus)->tpos1(), (*itClus)->pe()/distance );
hV->Fill( (*itClus)->z()+12,(*itClus)->tpos2(), (*itClus)->pe()/distance );
}
hV->Fill( (*itClus)->z(),(*itClus)->position(), (*itClus)->pe()/distance );
if ( countv < 2 ){
zv[countu] = (*itClus)->z();
xv[countu] = (*itClus)->position();
countv++;
}
}
}
TF1 *fU, *fV;
double slopeu = -9999;
double slopev = -9999;
double bu = -9999;
double bv = -9999;
bool goodFit_U = false;
bool goodFit_V = false;
if ( hU->GetEntries() > 3 ){
hU->Fit("pol1","Q0");
fU = hU->GetFunction("pol1");
bu = fU->GetParameter(0);
slopeu = fU->GetParameter(1);
goodFit_U = true;
delete fU;
}
else if ( hU->GetEntries() == 2 ){ // to deal with 2 clusters on NCPi0
if ( zu[0] > zu[1] ){
slopeu = (xu[0] - xu[1]) / (zu[0] - zu[1]);
bu = xu[1] - zu[1]*slopeu;
goodFit_U = true;
}
else if (zu[0] < zu[1] ) {
slopeu = (xu[1] - xu[0]) / (zu[1] - zu[0]);
bu = xu[0] - zu[0]*slopeu;
goodFit_U = true;
}
}
if ( hV->GetEntries() > 3 ){
hV->Fit("pol1","Q0");
fV = hV->GetFunction("pol1");
bv = fV->GetParameter(0);
slopev = fV->GetParameter(1);
goodFit_V = true;
delete fV;
}
else if ( hV->GetEntries() == 2 ){ // to deal with 2 clusters on NCPi0
if ( zv[0] > zv[1] ){
slopev = (xv[0] - xv[1]) / (zv[0] - zv[1]);
bv = xv[1] - zv[1]*slopeu;