本文整理汇总了C++中TLorentzVector::T方法的典型用法代码示例。如果您正苦于以下问题:C++ TLorentzVector::T方法的具体用法?C++ TLorentzVector::T怎么用?C++ TLorentzVector::T使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TLorentzVector
的用法示例。
在下文中一共展示了TLorentzVector::T方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Boost
void Boost(Double_t CM[4],Double_t Sign,Double_t ZHad[4],
Double_t XZMomentum[4],Int_t NumPart,TObjArray &InputCandList,
TObjArray &OutputCandList,Int_t Scheme)
{
// Boost method
// Corresponds to old DKTFRAM subroutine
// Rotation matrix
Double_t RMatrix[4][4],HelpMatrix[4][4];
Double_t OldVector[4], NewVector[4];
// Declare 4-vector for input and output of boost
Double_t Cand4Vec[4], FinalCand4Vec[4];
// Loop. vars
Int_t iCol, jLin, iParticle;
// Init matrix RMatrix with id.
for (iCol = 0;iCol<4;iCol++)
for (jLin = 0;jLin < 4;jLin++)
{
if (iCol != jLin)
RMatrix[iCol][jLin] = 0;
else RMatrix[iCol][jLin] = 1;
}
// Do a Lorentz boost to/from cm frame of XXXX
Dijets::LorentzBoost(RMatrix,CM,0);
//for (iCol = 0;iCol<4;iCol++)
//for (jLin = 0;jLin < 4;jLin++)
// {
//cout << "rmatrix2 = " << iCol << ' ' << jLin << ' ' << RMatrix[iCol][jLin] << endl;
// }
// Find rotation to put boosted Z on the (sign) z axis
if (Sign!=0.)
{
for (jLin = 0;jLin<4;jLin++)
{
OldVector[jLin] = 0.;
for (iCol = 0;iCol < 4;iCol++)
OldVector[jLin] += RMatrix[jLin][iCol]*ZHad[iCol];
}
//cout << "old1 = "
// << OldVector[0] << ' '
// << OldVector[1] << ' '
// << OldVector[2] << ' '
// << OldVector[3] << ' '
// << endl;
// Check if not 0 and fill in new vector
if (OldVector[0]!=0. || OldVector[1]!=0. || OldVector[2]!=0.)
{
NewVector[0] = 0.;
NewVector[1] = 0.;
NewVector[2] = Sign;
NewVector[3] = fabs(Sign);
//cout << "new1 = "
// << NewVector[0] << ' '
// << NewVector[1] << ' '
// << NewVector[2] << ' '
// << NewVector[3] << endl;
Dijets::RRot(RMatrix,OldVector,NewVector);
// Find rotation to put boosted Z and rotated XZMomentum into XZ-plane
// fix here
for (jLin = 0;jLin<4;jLin++)
{
OldVector[jLin] = 0.;
for (iCol = 0;iCol < 4;iCol++)
OldVector[jLin] += RMatrix[jLin][iCol]*XZMomentum[iCol];
}
/*
for (jLin = 0;jLin<4;jLin++)
{
cout << " rmat = "
<< RMatrix[jLin][0] << ' '
<< RMatrix[jLin][1] << ' '
<< RMatrix[jLin][2] << ' '
<< RMatrix[jLin][3] << endl;
}
cout << "xzmomentum = "
<< XZMomentum[0] << ' '
<< XZMomentum[1] << ' '
<< XZMomentum[2] << ' '
<< XZMomentum[3] << endl;
cout << "old2 = "
<< OldVector[0] << ' '
<< OldVector[1] << ' '
<< OldVector[2] << ' '
<< OldVector[3] << ' '
<< endl;
*/
// check if not negative
if (OldVector[0]!=0. || OldVector[1]!=0.)
{
//.........这里部分代码省略.........