本文整理汇总了C++中Plane::Projection方法的典型用法代码示例。如果您正苦于以下问题:C++ Plane::Projection方法的具体用法?C++ Plane::Projection怎么用?C++ Plane::Projection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plane
的用法示例。
在下文中一共展示了Plane::Projection方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: thrust_HiForest
//.........这里部分代码省略.........
// fill thrust vs Aj plot
hThrust_vs_Aj[cBin]->Fill(Aj, thrust_max);
//PART 3 ====================================================
//Begin code to select the Thrust Major and Minor axes
//define the plane perpendicular to this axis in order to calculate Tmaj and Tmin
Plane* perp = new Plane(max_thrust_axis);
//reset maximum values for new axis test
thrust_maj_max = 0; thrust_min_max = 0;
//Thrust maj axis loop
for(Long64_t naxis = 0; naxis < NJets_Sel; ++naxis){
// if((pt[naxis] < pT_cut)||(TMath::Abs(eta[naxis]) > 2)){ continue;}
if(debug) cout<< " \n --------- New Test Axis (Min/Maj)--------- " << endl;
//define the jet axis for this iteration
//calculate px, py, pz
// px[naxis] = pt[naxis]*TMath::Cos(phi[naxis]);
// py[naxis] = pt[naxis]*TMath::Sin(phi[naxis]);
// pz[naxis] = pt[naxis]*TMath::SinH(eta[naxis]);
//define momentum three vector
TVector3 p3 (px[naxis], py[naxis], pz[naxis]);
if(debug) cout<<"Jet Axis UnNormed = {" << p3(0) << ", " << p3(1) << ", " << p3(2)<< "}" << endl;
p3 = Norm(p3);
if(debug) cout<<"Jet Axis Normed = {" << p3(0) << ", " << p3(1) << ", " << p3(2)<< "}" << endl;
//define maj_axis and min_axis
TVector3 maj_axis = perp->Projection((p3));
if(debug) cout<<"Maj Axis UnNormed = {" << maj_axis(0) << ", " << maj_axis(1) << ", " << maj_axis(2)<< "}" << endl;
maj_axis = Norm(maj_axis);
TVector3 min_axis = max_thrust_axis.Cross(maj_axis);
min_axis = Norm(min_axis);
if(debug) cout<<"Jet Axis = {" << p3(0) << ", " << p3(1) << ", " << p3(2)<< "}" << endl;
if(debug) cout<<"Maj Axis = {" << maj_axis(0) << ", " << maj_axis(1) << ", " << maj_axis(2)<< "}" << endl;
if(debug) cout<<"Min Axis = {" << min_axis(0) << ", " << min_axis(1) << ", " << min_axis(2)<< "}\n" << endl;
//reset for new axis test
dot_maj = 0; dot_min = 0; mag = 0;
//PART 4 ====================================================
//Test the axis defined by the above loop to determine if this axis is the maximum
//jet loop
for(Long64_t njet = 0; njet < NJets_Sel; ++njet){
//make a ptcut
// if((pt[njet] < pT_cut)||(TMath::Abs(eta[njet]) > 2)){ continue;}
float jet_pt = pt_v[njet];
float jet_eta = eta_v[njet];
float jet_phi = phi_v[njet];
if(debug) cout<< " \n --------- New Jet (Maj/Min)--------- " << endl;
//if(debug) cout<< "Jet Variables: "<< "\n \t pT = "<<pt[njet]<<"\n \t eta = "<<eta[njet]<<"\n \t phi = "<<phi[njet]<<endl;
if(debug) cout<< "Jet Variables: "<< "\n \t pT = "<<jet_pt<<"\n \t eta = "<<jet_eta<<"\n \t phi = "<<jet_phi<<endl;
//calculate px, py, pz
// px[njet] = pt[njet]*TMath::Cos(phi[njet]);
// py[njet] = pt[njet]*TMath::Sin(phi[njet]);
// pz[njet] = pt[njet]*TMath::SinH(eta[njet]);