本文整理汇总了C++中TParticle::Vz方法的典型用法代码示例。如果您正苦于以下问题:C++ TParticle::Vz方法的具体用法?C++ TParticle::Vz怎么用?C++ TParticle::Vz使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TParticle
的用法示例。
在下文中一共展示了TParticle::Vz方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckESD
//.........这里部分代码省略.........
TH1F* hMassLambda = CreateHisto("hMassLambda", "#Lambda", 100, 1.0, 1.2,
"M(p#pi^{-}) [GeV/c^{2}]", "N");
TH1F* hMassLambdaBar = CreateHisto("hMassLambdaBar", "#bar{#Lambda}",
100, 1.0, 1.2,
"M(#bar{p}#pi^{+}) [GeV/c^{2}]", "N");
Int_t nGenV0s = 0;
Int_t nRecV0s = 0;
TH1F* hMassXi = CreateHisto("hMassXi", "#Xi", 100, 1.2, 1.5,
"M(#Lambda#pi) [GeV/c^{2}]", "N");
TH1F* hMassOmega = CreateHisto("hMassOmega", "#Omega", 100, 1.5, 1.8,
"M(#LambdaK) [GeV/c^{2}]", "N");
Int_t nGenCascades = 0;
Int_t nRecCascades = 0;
// loop over events
for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
runLoader->GetEvent(iEvent);
// select simulated primary particles, V0s and cascades
AliStack* stack = runLoader->Stack();
Int_t nParticles = stack->GetNtrack();
TArrayF vertex(3);
runLoader->GetHeader()->GenEventHeader()->PrimaryVertex(vertex);
TObjArray selParticles;
TObjArray selV0s;
TObjArray selCascades;
for (Int_t iParticle = 0; iParticle < nParticles; iParticle++) {
TParticle* particle = stack->Particle(iParticle);
if (!particle) continue;
if (particle->Pt() < 0.001) continue;
if (TMath::Abs(particle->Eta()) > 0.9) continue;
TVector3 dVertex(particle->Vx() - vertex[0],
particle->Vy() - vertex[1],
particle->Vz() - vertex[2]);
if (dVertex.Mag() > 0.0001) continue;
switch (TMath::Abs(particle->GetPdgCode())) {
case kElectron:
case kMuonMinus:
case kPiPlus:
case kKPlus:
case kProton: {
if (particle->Pt() > minPt) {
selParticles.Add(particle);
nGen++;
hGen->Fill(particle->Pt());
}
break;
}
case kK0Short:
case kLambda0: {
if (particle->Pt() > cutPtV0) {
nGenV0s++;
selV0s.Add(particle);
}
break;
}
case kXiMinus:
case kOmegaMinus: {
if (particle->Pt() > cutPtCascade) {
nGenCascades++;
selCascades.Add(particle);
}
break;
}
default: break;