#include "/home/kpiasecki/soft/therminator2/build/include/ParticleCoor.h" int partLoop () { ParticleCoor P; Float_t Pt, Y; TFile* fin = new TFile ("events/blastwave/event000.root"); TTree* tin = (TTree*) fin->Get ("particles"); tin->SetBranchAddress ("particle", &P ); TH2F* hpty = new TH2F ("hpty", "", 20, -4., 4., 20, 0., 2.); for (int iev = 0; iev < tin->GetEntries() ; iev++) { tin->GetEvent (iev); if (! (P.pid == 321 && P.decayed == false) ) continue; Pt = sqrt (P.px*P.px + P.py*P.py); Y = 0.5 * log((P.e + P.pz) / (P.e - P.pz)); hpty->Fill ( Y, Pt ); } hpty->Draw ("colz"); return 0; }