本文整理汇总了C++中Track::GetPx方法的典型用法代码示例。如果您正苦于以下问题:C++ Track::GetPx方法的具体用法?C++ Track::GetPx怎么用?C++ Track::GetPx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Track
的用法示例。
在下文中一共展示了Track::GetPx方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Process
//_____________________________________________________________________________
Bool_t ProofEventProc::Process(Long64_t entry)
{
// The Process() function is called for each entry in the tree (or possibly
// keyed object in the case of PROOF) to be processed. The entry argument
// specifies which entry in the currently loaded tree is to be processed.
// It can be passed to either TTree::GetEntry() or TBranch::GetEntry()
// to read either all or the required parts of the data. When processing
// keyed objects with PROOF, the object is already loaded and is available
// via the fObject pointer.
//
// This function should contain the "body" of the analysis. It can contain
// simple or elaborate selection criteria, run algorithms on the data
// of the event and typically fill histograms.
// WARNING when a selector is used with a TChain, you must use
// the pointer to the current TTree to call GetEntry(entry).
// The entry is always the local entry number in the current tree.
// Assuming that fChain is the pointer to the TChain being processed,
// use fChain->GetTree()->GetEntry(entry).
if (fEntMin == -1 || entry < fEntMin) fEntMin = entry;
if (fEntMax == -1 || entry > fEntMax) fEntMax = entry;
if (fTestAbort == 1) {
Double_t rr = gRandom->Rndm();
if (rr > 0.999) {
Info("Process", "%lld -> %f", entry, rr);
Abort("Testing file abortion", kAbortFile);
return kTRUE;
}
}
if (fFullRead) {
fChain->GetTree()->GetEntry(entry);
} else {
b_event_fNtrack->GetEntry(entry);
}
if (fNtrack > 0) {
if (!fFullRead) b_fTracks->GetEntry(entry);
if (fTracks) {
for (Int_t j=0;j<fTracks->GetEntries();j++){
Track *curtrack = dynamic_cast<Track*>(fTracks->At(j));
if (curtrack) {
fPtHist->Fill(curtrack->GetPt(),1./curtrack->GetPt());
fPxPyHist->Fill(curtrack->GetPx(),curtrack->GetPy());
if (j == 0) fPzHist->Fill(curtrack->GetPz());
}
}
fTracks->Clear("C");
}
}
return kTRUE;
}