本文整理汇总了C++中TParticle::Phi方法的典型用法代码示例。如果您正苦于以下问题:C++ TParticle::Phi方法的具体用法?C++ TParticle::Phi怎么用?C++ TParticle::Phi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TParticle
的用法示例。
在下文中一共展示了TParticle::Phi方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckESD
Bool_t CheckESD(const char* gAliceFileName = "galice.root",
const char* esdFileName = "AliESDs.root")
{
// check the content of the ESD
// check values
Int_t checkNGenLow = 1;
Double_t checkEffLow = 0.5;
Double_t checkEffSigma = 3;
Double_t checkFakeHigh = 0.5;
Double_t checkFakeSigma = 3;
Double_t checkResPtInvHigh = 5;
Double_t checkResPtInvSigma = 3;
Double_t checkResPhiHigh = 10;
Double_t checkResPhiSigma = 3;
Double_t checkResThetaHigh = 10;
Double_t checkResThetaSigma = 3;
Double_t checkPIDEffLow = 0.5;
Double_t checkPIDEffSigma = 3;
Double_t checkResTOFHigh = 500;
Double_t checkResTOFSigma = 3;
Double_t checkPHOSNLow = 5;
Double_t checkPHOSEnergyLow = 0.3;
Double_t checkPHOSEnergyHigh = 1.0;
Double_t checkEMCALNLow = 50;
Double_t checkEMCALEnergyLow = 0.05;
Double_t checkEMCALEnergyHigh = 1.0;
Double_t checkMUONNLow = 1;
Double_t checkMUONPtLow = 0.5;
Double_t checkMUONPtHigh = 10.;
Double_t cutPtV0 = 0.3;
Double_t checkV0EffLow = 0.02;
Double_t checkV0EffSigma = 3;
Double_t cutPtCascade = 0.5;
Double_t checkCascadeEffLow = 0.01;
Double_t checkCascadeEffSigma = 3;
// open run loader and load gAlice, kinematics and header
AliRunLoader* runLoader = AliRunLoader::Open(gAliceFileName);
if (!runLoader) {
Error("CheckESD", "getting run loader from file %s failed",
gAliceFileName);
return kFALSE;
}
runLoader->LoadgAlice();
gAlice = runLoader->GetAliRun();
if (!gAlice) {
Error("CheckESD", "no galice object found");
return kFALSE;
}
runLoader->LoadKinematics();
runLoader->LoadHeader();
// open the ESD file
TFile* esdFile = TFile::Open(esdFileName);
if (!esdFile || !esdFile->IsOpen()) {
Error("CheckESD", "opening ESD file %s failed", esdFileName);
return kFALSE;
}
AliESDEvent * esd = new AliESDEvent;
TTree* tree = (TTree*) esdFile->Get("esdTree");
if (!tree) {
Error("CheckESD", "no ESD tree found");
return kFALSE;
}
esd->ReadFromTree(tree);
// efficiency and resolution histograms
Int_t nBinsPt = 15;
Float_t minPt = 0.1;
Float_t maxPt = 3.1;
TH1F* hGen = CreateHisto("hGen", "generated tracks",
nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");
TH1F* hRec = CreateHisto("hRec", "reconstructed tracks",
nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");
Int_t nGen = 0;
Int_t nRec = 0;
Int_t nFake = 0;
TH1F* hResPtInv = CreateHisto("hResPtInv", "", 100, -10, 10,
"(p_{t,rec}^{-1}-p_{t,sim}^{-1}) / p_{t,sim}^{-1} [%]", "N");
TH1F* hResPhi = CreateHisto("hResPhi", "", 100, -20, 20,
"#phi_{rec}-#phi_{sim} [mrad]", "N");
TH1F* hResTheta = CreateHisto("hResTheta", "", 100, -20, 20,
"#theta_{rec}-#theta_{sim} [mrad]", "N");
// PID
Int_t partCode[AliPID::kSPECIES] =
{kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};
const char* partName[AliPID::kSPECIES+1] =
{"electron", "muon", "pion", "kaon", "proton", "other"};
Double_t partFrac[AliPID::kSPECIES] =
{0.01, 0.01, 0.85, 0.10, 0.05};
Int_t identified[AliPID::kSPECIES+1][AliPID::kSPECIES];
//.........这里部分代码省略.........
示例2: compClusHitsMod2
//.........这里部分代码省略.........
if (cl->TestBit(kSplit)) {
if (col%2) GetHistoClSize(clsize,kDTXoddSPL,&histoArr)->Fill((txyzH[0]-xyzClTr[0])*1e4);
else GetHistoClSize(clsize,kDTXevenSPL,&histoArr)->Fill((txyzH[0]-xyzClTr[0])*1e4);
GetHistoClSize(clsize,kDTZSPL,&histoArr)->Fill((txyzH[2]-xyzClTr[2])*1e4);
GetHistoClSize(0,kNPixSPL,&histoArr)->Fill(clsize);
}
if (col%2) GetHistoClSize(clsize,kDTXodd,&histoArr)->Fill((txyzH[0]-xyzClTr[0])*1e4);
else GetHistoClSize(clsize,kDTXeven,&histoArr)->Fill((txyzH[0]-xyzClTr[0])*1e4);
GetHistoClSize(clsize,kDTZ,&histoArr)->Fill((txyzH[2]-xyzClTr[2])*1e4);
GetHistoClSize(0,kNPixAll,&histoArr)->Fill(clsize);
//
cSum.evID = iEvent;
cSum.volID = cl->GetVolumeId();
cSum.lrID = ilr;
cSum.clID = icl;
cSum.nPix = cl->GetNPix();
cSum.nX = cl->GetNx();
cSum.nZ = cl->GetNz();
cSum.q = cl->GetQ();
cSum.split = cl->TestBit(kSplit);
cSum.dX = (txyzH[0]-xyzClTr[0])*1e4;
cSum.dY = (txyzH[1]-xyzClTr[1])*1e4;
cSum.dZ = (txyzH[2]-xyzClTr[2])*1e4;
cSum.nRowPatt = cl-> GetPatternRowSpan();
cSum.nColPatt = cl-> GetPatternColSpan();
int label = cl->GetLabel(0);
TParticle* part = 0;
if (label>=0 && (part=stack->Particle(label)) ) {
cSum.pdg = part->GetPdgCode();
cSum.eta = part->Eta();
cSum.pt = part->Pt();
cSum.phi = part->Phi();
cSum.prim = stack->IsPhysicalPrimary(label);
}
cSum.ntr = 0;
for (int ilb=0;ilb<3;ilb++) if (cl->GetLabel(ilb)>=0) cSum.ntr++;
for (int i=0;i<3;i++) cSum.xyz[i] = xyzClGloF[i];
//
trOut->Fill();
/*
if (clsize==5) {
printf("\nL%d(%c) Mod%d, Cl:%d | %+5.1f %+5.1f (%d/%d)|H:%e %e %e | C:%e %e %e\n",ilr,cl->TestBit(kSplit) ? 'S':'N',
modID,icl,(txyzH[0]-xyzClTr[0])*1e4,(txyzH[2]-xyzClTr[2])*1e4, row,col,
gxyzH[0],gxyzH[1],gxyzH[2],xyzClGlo[0],xyzClGlo[1],xyzClGlo[2]);
cl->Print();
pHit->Print();
//
double a0,b0,c0,a1,b1,c1,e0;
pHit->GetPositionL0(a0,b0,c0,e0);
pHit->GetPositionL(a1,b1,c1);
float cloc[3];
cl->GetLocalXYZ(cloc);
printf("LocH: %e %e %e | %e %e %e\n",a0,b0,c0,a1,b1,c1);
printf("LocC: %e %e %e | %e %e %e\n",cloc[0],cloc[1],cloc[2],xyzClTr[0],xyzClTr[1],xyzClTr[2]);
}
*/
//
}
}
}
// layerClus.Clear();
//
arrMCTracks.Delete();