本文整理汇总了C++中TVector3::Print方法的典型用法代码示例。如果您正苦于以下问题:C++ TVector3::Print方法的具体用法?C++ TVector3::Print怎么用?C++ TVector3::Print使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TVector3
的用法示例。
在下文中一共展示了TVector3::Print方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findEangHang
void findEangHang(const TVector3& antnorm,
const TVector3& sourcedir,
Float_t& eang,
Float_t& hang) {
// both should already be unit vectors
// E angle projects onto the plane
const TVector3 w = (antnorm.Dot(sourcedir)) * antnorm;
const TVector3 v = sourcedir - w;
eang = TMath::Abs( TMath::Pi() - v.Theta() );
// H angle projects out of the plane
hang = TMath::Abs( TMath::Pi() - w.Theta() );
#ifdef DEBUG
Printf("w:");
w.Print();
Printf("v:");
v.Print();
#endif
}
示例2: CorrectionPixel
double CorrectionPixel(const TVector3 &v0,int iface,int idetector,int ipixel,const TDetector *m_detector){
double ret=0;
double n1=1.58;
double n2=1;
TVector3 vp,vn,vrel;
double theta1,theta2;
double stheta1,stheta2;
double ctheta1,ctheta2;
double tpara,tperp;
vn=m_detector->getFaceNormal(iface);
vn=-vn; //entering normal
vp=m_detector->getPosPixel(iface,idetector,ipixel);
vrel=vp-v0;
cout<<iface<<" "<<idetector<<" "<<ipixel<<endl;
v0.Print();
vp.Print();
theta1=vrel.Angle(vn);
stheta1=sin(theta1);
ctheta1=cos(theta2);
stheta2=n1*stheta1/n2;
cout<<theta1<<" "<<stheta1<<" "<<stheta2<<endl;
if (stheta2>1) ret=0;
else{
ctheta2=sqrt(1-stheta2*stheta2);
theta2=asin(stheta2); //for print
tpara=((n2*ctheta2)/(n1*ctheta1))*((2*n1*ctheta1)/(n2*ctheta1+n1*ctheta2))*((2*n1*ctheta1)/(n2*ctheta1+n1*ctheta2));
tperp=((n2*ctheta2)/(n1*ctheta1))*((2*n1*ctheta1)/(n1*ctheta1+n2*ctheta2))*((2*n1*ctheta1)/(n1*ctheta1+n2*ctheta2));
ret=0.5*(tpara+tperp);
}
return ret;
}