本文整理汇总了C++中TLorentzVector::Beta方法的典型用法代码示例。如果您正苦于以下问题:C++ TLorentzVector::Beta方法的具体用法?C++ TLorentzVector::Beta怎么用?C++ TLorentzVector::Beta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TLorentzVector
的用法示例。
在下文中一共展示了TLorentzVector::Beta方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Path::Path(const TLorentzVector& p4, const TVector3& origin, double field)
: m_unitDirection(p4.Vect().Unit()),
m_speed(p4.Beta() * gconstc),
m_origin(origin.X(), origin.Y(), origin.Z()),
m_field(field) {
m_points[papas::Position::kVertex] = m_origin;
}
示例2: fill
void fill(int const kf, TLorentzVector* b, double weight, TLorentzVector const& p1Mom, TLorentzVector const& p2Mom, TVector3 v00)
{
int const centrality = floor(nCent * gRandom->Rndm());
TVector3 const vertex = getVertex(centrality);
// smear primary vertex
// float const sigmaVertex = sigmaVertexCent[cent];
// TVector3 const vertex(gRandom->Gaus(0, sigmaVertex), gRandom->Gaus(0, sigmaVertex), gRandom->Gaus(0, sigmaVertex));
v00 += vertex;
// smear momentum
TLorentzVector const p1RMom = smearMom(0, p1Mom);
TLorentzVector const p2RMom = smearMom(0, p2Mom);
// smear position
TVector3 const p1RPos = smearPosData(0, vertex.z(), centrality, p1RMom, v00);
TVector3 const p2RPos = smearPosData(0, vertex.z(), centrality, p2RMom, v00);
// TVector3 const kRPos = smearPos(kMom, kRMom, v00);
// TVector3 const pRPos = smearPos(pMom, pRMom, v00);
// reconstruct
TLorentzVector const rMom = p1RMom + p2RMom;
float const p1Dca = dca(p1Mom.Vect(), v00, vertex);
float const p2Dca = dca(p2Mom.Vect(), v00, vertex);
float const p1RDca = dca(p1RMom.Vect(), p1RPos, vertex);
float const p2RDca = dca(p2RMom.Vect(), p2RPos, vertex);
TVector3 v0;
float const dca12 = dca1To2(p1RMom.Vect(), p1RPos, p2RMom.Vect(), p2RPos, v0);
float const decayLength = (v0 - vertex).Mag();
float const dcaD0ToPv = dca(rMom.Vect(), v0, vertex);
float const cosTheta = (v0 - vertex).Unit().Dot(rMom.Vect().Unit());
float const angle12 = p1RMom.Vect().Angle(p2RMom.Vect());
TLorentzVector p1RMomRest = p1RMom;
TVector3 beta;
beta.SetMagThetaPhi(rMom.Beta(), rMom.Theta(), rMom.Phi());
p1RMomRest.Boost(-beta);
float const cosThetaStar = rMom.Vect().Unit().Dot(p1RMomRest.Vect().Unit());
// save
float arr[100];
int iArr = 0;
arr[iArr++] = centrality;
arr[iArr++] = vertex.X();
arr[iArr++] = vertex.Y();
arr[iArr++] = vertex.Z();
arr[iArr++] = kf;
arr[iArr++] = b->M();
arr[iArr++] = b->Perp();
arr[iArr++] = b->PseudoRapidity();
arr[iArr++] = b->Rapidity();
arr[iArr++] = b->Phi();
arr[iArr++] = v00.X();
arr[iArr++] = v00.Y();
arr[iArr++] = v00.Z();
arr[iArr++] = rMom.M();
arr[iArr++] = rMom.Perp();
arr[iArr++] = rMom.PseudoRapidity();
arr[iArr++] = rMom.Rapidity();
arr[iArr++] = rMom.Phi();
arr[iArr++] = v0.X();
arr[iArr++] = v0.Y();
arr[iArr++] = v0.Z();
arr[iArr++] = dca12;
arr[iArr++] = decayLength;
arr[iArr++] = dcaD0ToPv;
arr[iArr++] = cosTheta;
arr[iArr++] = angle12;
arr[iArr++] = cosThetaStar;
arr[iArr++] = p1Mom.M();
arr[iArr++] = p1Mom.Perp();
arr[iArr++] = p1Mom.PseudoRapidity();
arr[iArr++] = p1Mom.Rapidity();
arr[iArr++] = p1Mom.Phi();
arr[iArr++] = p1Dca;
arr[iArr++] = p1RMom.M();
arr[iArr++] = p1RMom.Perp();
arr[iArr++] = p1RMom.PseudoRapidity();
arr[iArr++] = p1RMom.Rapidity();
arr[iArr++] = p1RMom.Phi();
arr[iArr++] = p1RPos.X();
arr[iArr++] = p1RPos.Y();
arr[iArr++] = p1RPos.Z();
arr[iArr++] = p1RDca;
arr[iArr++] = tpcReconstructed(0,1,centrality,p1RMom);
arr[iArr++] = p2Mom.M();
arr[iArr++] = p2Mom.Perp();
arr[iArr++] = p2Mom.PseudoRapidity();
arr[iArr++] = p2Mom.Rapidity();
arr[iArr++] = p2Mom.Phi();
arr[iArr++] = p2Dca;
//.........这里部分代码省略.........
示例3: magBetaSystem
inline float kinematics::magBetaSystem( TLorentzVector* pa, TLorentzVector* pb )
{
TLorentzVector pTmp = (*pa)+(*pb);
return pTmp.Beta();
}