本文整理汇总了C++中TCanvas::AbsPixeltoY方法的典型用法代码示例。如果您正苦于以下问题:C++ TCanvas::AbsPixeltoY方法的具体用法?C++ TCanvas::AbsPixeltoY怎么用?C++ TCanvas::AbsPixeltoY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCanvas
的用法示例。
在下文中一共展示了TCanvas::AbsPixeltoY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run_ana_8He
//.........这里部分代码省略.........
}
}// HoughPar Loop
for (Int_t i=0; i<4; i++) {
//fQuadrant[i] = fHoughSpaceLine_buff->GetHoughQuadrant(i); //Obsolete
quadrant = &protoevent->GetQuadrantArray()->at(i);
qNumHits.push_back(quadrant->GetNumHits());
Int_t qNumHit = quadrant->GetNumHits();
Double_t *rad_graph = new Double_t[qNumHit];
Double_t *posz_graph = new Double_t[qNumHit];
Double_t rad_max=0.0;
for(Int_t j=0; j<qNumHit; j++) {
ATHit* qhit = quadrant->GetHit(j);
TVector3 position = qhit->GetPosition();
//position.SetZ( (qhit->GetTimeStamp()-390)*2.8*80/10.0 );
//position.SetZ( (390-qhit->GetTimeStamp())*2.8*80.0/100.0 );
Double_t radius = TMath::Sqrt( TMath::Power(position.X(),2) + TMath::Power(position.Y(),2) );
if(radius>rad_max) rad_max=radius;
fQuadHist[i]->Fill(radius,position.Z(),qhit->GetCharge());
rad_graph[j] = radius;
posz_graph[j] = position.Z();
Int_t pixelY = ctest->YtoAbsPixel(position.Z());
Int_t pixelX = ctest->XtoAbsPixel(radius);
Int_t pixelYback = ctest->AbsPixeltoY(pixelY);
Int_t pixelXback = ctest->AbsPixeltoX(pixelX);
Int_t mda = HoughFit[i]->DistancetoPrimitive(-pixelX,pixelY); //Minimum Distance of Approach in Pixels
DistHist[i]->Fill(mda);
Double_t geo_dist_STD = 0.0;
Double_t geo_dist = TMath::Abs (TMath::Cos(HoughPar.at(i).first)*radius + TMath::Sin(HoughPar.at(i).first)*position.Z() - HoughPar.at(i).second);
if(stdhough) geo_dist_STD = TMath::Abs (TMath::Cos(HoughParSTD.at(i).first)*radius + TMath::Sin(HoughParSTD.at(i).first)*position.Z() - HoughParSTD.at(i).second);
// An example to make annotations to each one of the TGraph points
/* TLatex *latex = new TLatex(gr->GetX()[5], gr->GetY()[5],"my annotation");
gr->GetListOfFunctions()->Add(latex);
gr->Draw("alp");
latex->SetTextSize(0.07);
latex->SetTextColor(kRed);*/
/*if(debug){
std::cout<<" ___________________________________________________________________________________________________"<<std::endl;
std::cout<<" Hit : "<<j<<" - Radius : "<<radius<<" - Z pos : "<<position.Z()<<" - Distance to Hough Space : "<<mda<<" Geomtrical Distance : "<<geo_dist<<std::endl;
//std::cout<<" Pixel X : "<<pixelX<<" Pixel Y : "<<pixelY<<std::endl;
//std::cout<<" Pixel Back X : "<<pixelXback<<" Pixel Back Y : "<<pixelYback<<std::endl;
}*/
if(geo_dist<HoughDist) HitPatternFilter[i]->SetPoint(HitPatternFilter[i]->GetN(),radius,position.Z());
if(stdhough)
if(geo_dist_STD<HoughDist) HitPatternFilterSTD[i]->SetPoint(HitPatternFilterSTD[i]->GetN(),radius,position.Z());
}//NumHit loop
Double_t par0=0.0;