#include "prttools.C" #include "save.C" void drawTest(TString infile="../build/hits.root"){ std::cout<<"new scan"<GetEntries(); ievent++){ PrtNextEvent(ievent,1000); if(ievent == 0) fPath = createDir("rdata/platePi17",fInfo, fSaveFlag); tVal = fEvent->GetTest()*1000; angle = fEvent->GetAngle() + 0.01; for(Int_t h=0; hGetHitSize(); h++){ fHit = fEvent->GetHit(h); Double_t time = fHit.GetLeadTime(0)/1000.; if(time<50){ z = fHit.GetGlobalPos().Z(); hHits->Fill(fHit.GetGlobalPos().X()/10.,fHit.GetGlobalPos().Y()/10.); hTime->Fill(time); } } } Int_t phi = tVal; TString title = Form(" a=%d^{o} d=%f",angle,(Double_t)phi/100.); TCanvas* c2 = new TCanvas(infile+"c2","c2",800,500); axisHits800x500(hHits); hHits->SetTitle(Form("%d hits",(Int_t)hHits->GetEntries())+title); hHits->Draw("colz"); save(c2,fPath,Form("d_hit_a%d_s%d",angle,phi),fInfo,fSaveFlag,1); TCanvas* c3 = new TCanvas(infile+"c3","c3",800,500); axisTime800x500(hTime); hTime->SetTitle(Form("%d hits",(Int_t)hTime->GetEntries())+title); hTime->Draw(); save(c3,fPath,Form("d_time_a%d_s%d",angle,phi),fInfo,fSaveFlag,1); }