/* * mudst.C * * Created on: 16 wrz 2020 * Author: Daniel Wielanek * E-mail: daniel.wielanek@gmail.com * Warsaw University of Technology, Faculty of Physics */ #ifndef __CLING__ #include #include #include #include #include #include #include #include "MpdMiniBTofHit.h" #include "MpdMiniDstReader.h" #include "MpdMiniEvent.h" #include "MpdMiniMcEvent.h" #include "MpdMiniMcTrack.h" #include "MpdMiniTrack.h" #include "NicaArray.h" using namespace std; #endif void ReadFile2(TString name) { MpdMiniDstReader *f = new MpdMiniDstReader(name); f->Init(); f->SetStatus("McEvent*", 1); f->readMiniEvent(0); MpdMiniDst *dst = f->miniDst(); MpdMiniMcEvent *ev = (MpdMiniMcEvent *)dst->mcEvent(); cout << name << "\n\t" << ev->primaryVertexZ() << " " << ev->b() << std::endl; f->readMiniEvent(1); dst = f->miniDst(); cout << "\t" << ev->primaryVertexZ() << " " << ev->b() << std::endl; } void ReadFile(TString name) { TFile *f = new TFile(name); TTree *t = (TTree *)f->Get("MiniDst"); TClonesArray *simEvent = nullptr; t->SetBranchAddress("McEvent", &simEvent); t->GetEntry(0); MpdMiniMcEvent *ev = (MpdMiniMcEvent *)simEvent->UncheckedAt(0); cout << name << "\n\t" << ev->primaryVertexZ() << " " << ev->b() << std::endl; t->GetEntry(1); cout << "\t" << ev->primaryVertexZ() << " " << ev->b() << std::endl; f->Close(); cout << "****" << endl; ReadFile2(name); } void mudst3() { ReadFile( "/eos/nica/mpd/sim/data/MiniDst/dst-BiBi-09GeV-mp07-20-pwg3-250ev/BiBi/" "09.0GeV-0-14fm/UrQMD/BiBi-09GeV-mp07-20-pwg3-250ev-1/" "urqmd-BiBi-09.0GeV-0-14fm-eos0-250-0-0.reco.MiniDst.root"); ReadFile( "/eos/nica/mpd/sim/data/MiniDst/dst-BiBi-09GeV-mp07-20-pwg3-250ev/BiBi/" "09.0GeV-0-14fm/UrQMD/BiBi-09GeV-mp07-20-pwg3-250ev-1/" "urqmd-BiBi-09.0GeV-0-14fm-eos0-250-0-1.reco.MiniDst.root"); ReadFile( "/eos/nica/mpd/sim/data/MiniDst/dst-BiBi-09GeV-mp07-20-pwg3-250ev/BiBi/" "09.0GeV-0-14fm/UrQMD/BiBi-09GeV-mp07-20-pwg3-250ev-1/" "urqmd-BiBi-09.0GeV-0-14fm-eos0-250-0-2.reco.MiniDst.root"); ReadFile( "/eos/nica/mpd/sim/data/MiniDst/dst-BiBi-09GeV-mp07-20-pwg3-250ev/BiBi/" "09.0GeV-0-14fm/UrQMD/BiBi-09GeV-mp07-20-pwg3-250ev-1/" "urqmd-BiBi-09.0GeV-0-14fm-eos0-250-0-3.reco.MiniDst.root"); ReadFile( "/eos/nica/mpd/sim/data/MiniDst/dst-BiBi-09GeV-mp07-20-pwg3-250ev/BiBi/" "09.0GeV-0-14fm/UrQMD/BiBi-09GeV-mp07-20-pwg3-250ev-1/" "urqmd-BiBi-09.0GeV-0-14fm-eos0-250-1-0.reco.MiniDst.root"); }