ParfenovPeter 1 год назад
Родитель
Сommit
a314a1a0be

+ 0 - 14
format/mciEvent.cxx

@@ -1,14 +0,0 @@
-#include <mciEvent.h>
-
-ClassImp(mciEvent);
-
-mciEvent::mciEvent(/* args */) :  fB(mciUtility::GetInstance()->error_code),
-                                  fPhiRP(mciUtility::GetInstance()->error_code),
-                                  fNparticles(mciUtility::GetInstance()->error_code),
-                                  fNparticipants(mciUtility::GetInstance()->error_code)
-{
-}
-
-mciEvent::~mciEvent()
-{
-}

+ 0 - 38
format/mciEvent.h

@@ -1,38 +0,0 @@
-#ifndef MODELCONVERTER_FORMAT_EVENT_H
-#define MODELCONVERTER_FORMAT_EVENT_H
-
-#include <iostream>
-#include <vector>
-
-#include <Rtypes.h>
-
-#include <Utility.h>
-
-class mciEvent
-{
-private:
-  Float_t fB;
-  Float_t fPhiRP;
-  Int_t fNparticles;
-  Int_t fNparticipants;
-
-public:
-  mciEvent(/* args */);
-  virtual ~mciEvent();
-
-  // Setters
-  virtual void SetB(Float_t _a) { fB = _a; }
-  virtual void SetPhiRP(Float_t _a) { fPhiRP = _a; }
-  virtual void SetNparticles(Float_t _a) { fNparticles = _a; }
-  virtual void SetNparticipants(Float_t _a) { fNparticipants = _a; }
-
-  // Getters
-  virtual Float_t GetB() const { return fB; }
-  virtual Float_t GetPhiRP() const { return fPhiRP; }
-  virtual Int_t GetNparticles() const { return fNparticles; }
-  virtual Int_t GetNparticipants() const { return fNparticipants; }
-
-  ClassDef(mciEvent, 0);
-};
-
-#endif

+ 0 - 16
format/mciParticle.cxx

@@ -1,16 +0,0 @@
-#include <mciParticle.h>
-
-ClassImp(mciParticle);
-
-mciParticle::mciParticle(/* args */) :  fMom(mciUtility::GetInstance()->error_code, mciUtility::GetInstance()->error_code, mciUtility::GetInstance()->error_code),
-                                        fR(mciUtility::GetInstance()->error_code, mciUtility::GetInstance()->error_code, mciUtility::GetInstance()->error_code),
-                                        fEn(mciUtility::GetInstance()->error_code),
-                                        fT(mciUtility::GetInstance()->error_code),
-                                        fPdg(mciUtility::GetInstance()->error_code),
-                                        fCharge(mciUtility::GetInstance()->error_code)
-{
-}
-
-mciParticle::~mciParticle()
-{
-}

+ 0 - 60
format/mciParticle.h

@@ -1,60 +0,0 @@
-#ifndef MODELCONVERTER_FORMAT_PARTICLE_H
-#define MODELCONVERTER_FORMAT_PARTICLE_H
-
-#include <iostream>
-
-#include <Rtypes.h>
-#include <TVector3.h>
-
-#include <Utility.h>
-
-class mciParticle
-{
-private:
-  TVector3 fMom;
-  TVector3 fR;
-  Float_t fEn;
-  Float_t fT;
-  Int_t fPdg;
-  Int_t fCharge;
-
-public:
-  mciParticle(/* args */);
-  virtual ~mciParticle();
-
-  // Setters
-  virtual void SetPxPyPz(Float_t _px, Float_t _py, Float_t _pz) { fMom.SetXYZ(_px, _py, _pz); }
-  virtual void SetXYZ(Float_t _x, Float_t _y, Float_t _z) { fR.SetXYZ(_x, _y, _z); }
-  virtual void SetPx(Float_t _a) { fMom.SetX(_a); }
-  virtual void SetPy(Float_t _a) { fMom.SetY(_a); }
-  virtual void SetPz(Float_t _a) { fMom.SetZ(_a); }
-  virtual void SetX(Float_t _a) { fR.SetX(_a); }
-  virtual void SetY(Float_t _a) { fR.SetY(_a); }
-  virtual void SetZ(Float_t _a) { fR.SetZ(_a); }
-  virtual void SetPdg(Int_t _a) { fPdg = _a; }
-  virtual void SetEnergy(Float_t _a) { fEn = _a; }
-  virtual void SetTime(Float_t _a) { fT = _a; }
-  virtual void SetCharge(Int_t _a) { fCharge = _a; }
-
-  // Getters
-  virtual TVector3 GetMom() { return fMom; }
-  virtual TVector3 GetR() { return fR; }
-  virtual Float_t GetPx() { return fMom.X(); }
-  virtual Float_t GetPy() { return fMom.Y(); }
-  virtual Float_t GetPz() { return fMom.Z(); }
-  virtual Float_t GetPt() { return fMom.Perp(); }
-  virtual Float_t GetP() { return fMom.Mag(); }
-  virtual Float_t GetEta() { return fMom.Eta(); }
-  virtual Float_t GetPhi() { return fMom.Phi(); }
-  virtual Float_t GetT() { return fT; }
-  virtual Float_t GetX() { return fR.X(); }
-  virtual Float_t GetY() { return fR.Y(); }
-  virtual Float_t GetZ() { return fR.Z(); }
-  virtual Int_t GetPdg() const { return fPdg; }
-  virtual Float_t GetEnergy() const { return fEn; }
-  virtual Int_t GetCharge() const { return fCharge; }
-
-  ClassDef(mciParticle, 0);
-};
-
-#endif

+ 0 - 29
mConverter.LinkDef.h

@@ -1,29 +0,0 @@
-#ifdef __CINT__
-
-#pragma link off all global;
-#pragma link off all classes;
-#pragma link off all functions;
-//#pragma link off all extern;
-
-#pragma link C++ nestedclass;
-#pragma link C++ nestedtypedef;
-
-#pragma link C++ class mciParticle+;
-#pragma link C++ class mciEvent+;
-#pragma link C++ class mciReader_smash_root+;
-#pragma link C++ class mciReader_mcpico+;
-#pragma link C++ class mciWriter_mcpico+;
-#ifdef _MCINI_
-#pragma link C++ class mciReader_mcini+;
-#endif
-#ifdef _PHQMD_
-#pragma link C++ class mciReader_phqmd+;
-#endif
-#ifdef _HSD_ROOT_
-#pragma link C++ class mciReader_hsd_root+;
-#endif
-#pragma link C++ class mciReader_manager+;
-#pragma link C++ class mciWriter_manager+;
-#pragma link C++ class mciUtility+;
-
-#endif

+ 0 - 136
readers/mciReader_hsd_root.cxx

@@ -1,136 +0,0 @@
-#include <mciReader_hsd_root.h>
-
-ClassImp(mciReader_hsd_root);
-
-mciReader_hsd_root::mciReader_hsd_root(/* args */) : is_init(false), fCurrentEvent(-1), fEvent(nullptr), fParticle(nullptr)
-{
-}
-
-mciReader_hsd_root::~mciReader_hsd_root()
-{
-}
-
-Bool_t mciReader_hsd_root::ChainCheck()
-{
-  if (!is_init)
-  {
-    return false;
-  }
-
-  if (fCurrentEvent == -1)
-  {
-    return false;
-  }
-
-  if (!fChainPHSD->GetEntry(fCurrentEvent))
-  {
-    return false;
-  }
-  if (!fChainFrag->GetEntry(fCurrentEvent))
-  {
-    return false;
-  }
-
-  return true;
-}
-
-void mciReader_hsd_root::SetChain(const TString &inputFileName)
-{
-  fChainPHSD = (TChain *)mciUtility::GetInstance()->initChain(inputFileName, fChainPHSDName);
-
-  fChainPHSD->SetBranchAddress("event", &fEvent);
-
-  fChainFrag = (TChain *)mciUtility::GetInstance()->initChain(inputFileName, fChainFragName);
-
-  fChainFrag->SetBranchAddress("eventFrag", &fEventFrag);
-
-  is_init = kTRUE;
-}
-
-mciEvent *mciReader_hsd_root::ReadEvent(Long64_t iev)
-{
-  mciEvent *event = new mciEvent();
-
-  fCurrentEvent = iev;
-
-  if (!ChainCheck())
-  {
-    return event;
-  }
-
-  event->SetB(fEvent->GetB());
-  event->SetPhiRP(0.); // in PHQMD axis orientation is rotated by 180 deg. In HSD/PHSD it's ok.
-  //event->SetPhiRP(TMath::Pi()); // in PHQMD axis orientation is rotated by 180 deg. In HSD/PHSD it's ok.
-  event->SetNparticles(fEvent->GetNpart() + fEventFrag->GetNfragMST()); // number of particles from PHSD and number of MST fragments
-
-  return event;
-}
-
-mciParticle *mciReader_hsd_root::ReadParticle(Int_t ipart)
-{
-  mciParticle *particle = new mciParticle();
-
-  if (!ChainCheck())
-  {
-    return particle;
-  }
-
-  if (ipart >= fEvent->GetNpart() + fEventFrag->GetNfragMST())
-  {
-    return particle;
-  }
-
-  if (ipart < 0)
-  {
-    return particle;
-  }
-
-  bool is_particle = false;
-  bool is_fragment = false;
-
-  if (ipart < fEvent->GetNpart())
-  {
-    is_particle = true;
-  }
-  if (ipart >= fEvent->GetNpart())
-  {
-    is_fragment = true;
-  }
-
-  if (!is_particle && !is_fragment)
-  {
-    return particle;
-  }
-
-  if (is_particle && is_fragment)
-  {
-    return particle;
-  }
-
-  if (is_particle)
-  {
-    fParticle = fEvent->GetParticle(ipart);
-    if (fParticle->IsInMST()) // Check whether the particle from PHSD was used to create MST fragment
-    {
-      return particle;
-    }
-    particle->SetEnergy(fParticle->E());
-    particle->SetPdg(fParticle->GetPdg());
-    particle->SetPxPyPz(fParticle->Px(), fParticle->Py(), fParticle->Pz());
-    particle->SetTime(0.);
-    particle->SetXYZ(0., 0., 0.);
-    particle->SetCharge(fParticle->GetCharge());
-  }
-  if (is_fragment)
-  {
-    fFragmentMST = fEventFrag->GetFragmentMST(ipart - fEvent->GetNpart());
-    particle->SetEnergy(fFragmentMST->E());
-    particle->SetPdg(fFragmentMST->GetPdg());
-    particle->SetPxPyPz(fFragmentMST->Px(), fFragmentMST->Py(), fFragmentMST->Pz());
-    particle->SetTime(0.);
-    particle->SetXYZ(0., 0., 0.);
-    particle->SetCharge(fFragmentMST->GetZ());
-  }
-
-  return particle;
-}

+ 0 - 48
readers/mciReader_hsd_root.h

@@ -1,48 +0,0 @@
-#ifndef MODELCONVERTER_READERS_HSD_ROOT_H
-#define MODELCONVERTER_READERS_HSD_ROOT_H
-
-#include <Rtypes.h>
-#include <TChain.h>
-#include <TLorentzVector.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-#include <mciReader_manager.h>
-
-#include <phqmd2root/src/libPHQMDEvent.h>
-
-class mciReader_hsd_root : virtual public mciReader_manager
-{
-private:
-  TChain *fChainPHSD, *fChainFrag;
-
-  const char *fChainPHSDName = "PHQMDtree";
-  const char *fChainFragName = "FRAGtree";
-
-  bool is_init;
-  Long64_t fCurrentEvent;
-
-  Event *fEvent;
-  EventClust *fEventFrag;
-  Particle *fParticle;
-  Baryon *fBaryonMST;
-  Fragment *fFragmentMST;
-  TLorentzVector fMomentum;
-
-  Bool_t ChainCheck();
-
-public:
-  mciReader_hsd_root(/* args */);
-  virtual ~mciReader_hsd_root();
-
-  virtual void SetChain(const TString &inputFileName);
-  virtual Long64_t GetEntries() { return fChainFrag->GetEntries(); }
-  virtual mciEvent *ReadEvent(Long64_t iev);
-  virtual mciParticle* ReadParticle(Int_t ipart);
-
-  ClassDef(mciReader_hsd_root, 0);
-};
-
-#endif

+ 0 - 7
readers/mciReader_manager.cxx

@@ -1,7 +0,0 @@
-#include <mciReader_manager.h>
-
-ClassImp(mciReader_manager);
-
-mciReader_manager::~mciReader_manager()
-{
-}

+ 0 - 26
readers/mciReader_manager.h

@@ -1,26 +0,0 @@
-#ifndef MODELCONVERTER_READERS_MANAGER_H
-#define MODELCONVERTER_READERS_MANAGER_H
-
-#include <Rtypes.h>
-#include <TString.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-class mciReader_manager
-{
-private:
-  /* data */
-public:
-  virtual ~mciReader_manager();
-
-  virtual void SetChain(const TString &inputFileName) = 0;
-  virtual Long64_t GetEntries() = 0;
-  virtual mciEvent *ReadEvent(Long64_t iev) = 0;
-  virtual mciParticle* ReadParticle(Int_t ipart) = 0;
-
-  ClassDef(mciReader_manager,0);
-};
-
-#endif

+ 0 - 84
readers/mciReader_mcini.cxx

@@ -1,84 +0,0 @@
-#include <mciReader_mcini.h>
-
-ClassImp(mciReader_mcini);
-
-mciReader_mcini::mciReader_mcini(/* args */) : is_init(false), fCurrentEvent(-1), fEvent(nullptr), fParticle(nullptr)
-{
-}
-
-mciReader_mcini::~mciReader_mcini()
-{
-}
-
-Bool_t mciReader_mcini::ChainCheck()
-{
-  if (!is_init)
-  {
-    return false;
-  }
-
-  if (fCurrentEvent == -1)
-  {
-    return false;
-  }
-
-  if (!fChain->GetEntry(fCurrentEvent))
-  {
-    return false;
-  }
-
-  return true;
-}
-
-void mciReader_mcini::SetChain(const TString &inputFileName)
-{
-  fChain = (TChain *)mciUtility::GetInstance()->initChain(inputFileName, fChainName);
-
-  fChain->SetBranchAddress("event", &fEvent);
-
-  is_init = kTRUE;
-}
-
-mciEvent *mciReader_mcini::ReadEvent(Long64_t iev)
-{
-  mciEvent *event = new mciEvent();
-  fCurrentEvent = iev;
-
-  if (!ChainCheck())
-  {
-    return event;
-  }
-
-  event->SetB(fEvent->GetB());
-  event->SetPhiRP(fEvent->GetPhi());
-  event->SetNparticles(fEvent->GetNpa());
-
-  return event;
-}
-
-mciParticle *mciReader_mcini::ReadParticle(Int_t ipart)
-{
-  mciParticle *particle = new mciParticle();
-
-  if (!ChainCheck())
-  {
-    return particle;
-  }
-
-  if (ipart >= fEvent->GetNpa())
-  {
-    return particle;
-  }
-
-  fParticle = fEvent->GetParticle(ipart);
-  fMomentum = fParticle->GetMomentum();
-
-  particle->SetEnergy(fMomentum.E());
-  particle->SetPdg(fParticle->GetPdg());
-  particle->SetPxPyPz(fMomentum.Px(), fMomentum.Py(), fMomentum.Pz());
-  particle->SetTime(0.);
-  particle->SetXYZ(0., 0., 0.);
-  particle->SetCharge(mciUtility::GetInstance()->GetCharge(fParticle->GetPdg()));
-
-  return particle;
-}

+ 0 - 47
readers/mciReader_mcini.h

@@ -1,47 +0,0 @@
-#ifndef MODELCONVERTER_READERS_MCINI_H
-#define MODELCONVERTER_READERS_MCINI_H
-
-#include <Rtypes.h>
-#include <TChain.h>
-#include <TLorentzVector.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-#include <mciReader_manager.h>
-
-#include <URun.h>
-#include <UEvent.h>
-#include <UParticle.h>
-#include <EventInitialState.h>
-
-class mciReader_mcini : virtual public mciReader_manager
-{
-private:
-  TChain *fChain;
-
-  const char *fChainName = "events";
-
-  bool is_init;
-  Long64_t fCurrentEvent;
-
-  UEvent *fEvent;
-  UParticle *fParticle;
-  TLorentzVector fMomentum;
-
-  Bool_t ChainCheck();
-
-public:
-  mciReader_mcini(/* args */);
-  virtual ~mciReader_mcini();
-
-  virtual void SetChain(const TString &inputFileName);
-  virtual Long64_t GetEntries() { return fChain->GetEntries(); }
-  virtual mciEvent *ReadEvent(Long64_t iev);
-  virtual mciParticle* ReadParticle(Int_t ipart);
-
-  ClassDef(mciReader_mcini, 0);
-};
-
-#endif

+ 0 - 94
readers/mciReader_mcpico.cxx

@@ -1,94 +0,0 @@
-#include <mciReader_mcpico.h>
-
-ClassImp(mciReader_mcpico);
-
-mciReader_mcpico::mciReader_mcpico(/* args */) : is_init(false), fCurrentEvent(-1)
-{
-}
-
-mciReader_mcpico::~mciReader_mcpico()
-{
-}
-
-Bool_t mciReader_mcpico::ChainCheck()
-{
-  if (!is_init)
-  {
-    return false;
-  }
-
-  if (fCurrentEvent == -1)
-  {
-    return false;
-  }
-
-  if (!fChain->GetEntry(fCurrentEvent))
-  {
-    return false;
-  }
-
-  return true;
-}
-
-void mciReader_mcpico::SetChain(const TString &inputFileName)
-{
-  fChain = (TChain *)mciUtility::GetInstance()->initChain(inputFileName, fChainName);
-
-  fChain->SetBranchAddress("bimp", &bimp);
-  fChain->SetBranchAddress("phi2", &phi2);
-  fChain->SetBranchAddress("phi3", &phi3);
-  fChain->SetBranchAddress("ecc2", &ecc2);
-  fChain->SetBranchAddress("ecc3", &ecc3);
-  fChain->SetBranchAddress("npart", &npart);
-  fChain->SetBranchAddress("nh", &nh);
-  fChain->SetBranchAddress("momx", momx);
-  fChain->SetBranchAddress("momy", momy);
-  fChain->SetBranchAddress("momz", momz);
-  fChain->SetBranchAddress("ene", ene);
-  fChain->SetBranchAddress("hid", hid);
-  fChain->SetBranchAddress("pdg", pdg);
-  fChain->SetBranchAddress("charge", charge);
-
-  is_init = kTRUE;
-}
-
-mciEvent *mciReader_mcpico::ReadEvent(Long64_t iev)
-{
-  mciEvent *event = new mciEvent();
-  fCurrentEvent = iev;
-
-  if (!ChainCheck())
-  {
-    return event;
-  }
-
-  event->SetB(bimp);
-  event->SetPhiRP(phi2);
-  event->SetNparticles(nh);
-  event->SetNparticipants(npart);
-
-  return event;
-}
-
-mciParticle *mciReader_mcpico::ReadParticle(Int_t ipart)
-{
-  mciParticle *particle = new mciParticle();
-  if (!ChainCheck())
-  {
-    return particle;
-  }
-
-  if (ipart >= nh)
-  {
-    return particle;
-  }
-
-  particle->SetEnergy(ene[ipart]);
-  particle->SetPdg(pdg[ipart]);
-  particle->SetPxPyPz(momx[ipart], momy[ipart], momz[ipart]);
-  particle->SetTime(0.);
-  particle->SetXYZ(0., 0., 0.);
-  particle->SetCharge(mciUtility::GetInstance()->GetCharge(pdg[ipart]));
-
-  return particle;
-}

+ 0 - 52
readers/mciReader_mcpico.h

@@ -1,52 +0,0 @@
-#ifndef MODELCONVERTER_READERS_MCPICO_H
-#define MODELCONVERTER_READERS_MCPICO_H
-
-#include <Rtypes.h>
-#include <TChain.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-#include <mciReader_manager.h>
-
-class mciReader_mcpico : virtual public mciReader_manager
-{
-private:
-  TChain *fChain;
-
-  const char *fChainName = "mctree";
-
-  bool is_init;
-  Long64_t fCurrentEvent;
-
-  Float_t         bimp;
-  Float_t         phi2;
-  Float_t         phi3;
-  Float_t         ecc2;
-  Float_t         ecc3;
-  Int_t           npart;
-  Int_t           nh;
-  Float_t         momx[MAX_TRACKS];   //[nh]
-  Float_t         momy[MAX_TRACKS];   //[nh]
-  Float_t         momz[MAX_TRACKS];   //[nh]
-  Float_t         ene[MAX_TRACKS];   //[nh]
-  Int_t           hid[MAX_TRACKS];   //[nh]
-  Int_t           pdg[MAX_TRACKS];   //[nh]
-  Short_t         charge[MAX_TRACKS];   //[nh]
-
-  Bool_t ChainCheck();
-
-public:
-  mciReader_mcpico(/* args */);
-  virtual ~mciReader_mcpico();
-
-  virtual void SetChain(const TString &inputFileName);
-  virtual Long64_t GetEntries() { return fChain->GetEntries(); }
-  virtual mciEvent *ReadEvent(Long64_t iev);
-  virtual mciParticle* ReadParticle(Int_t ipart);
-
-  ClassDef(mciReader_mcpico, 0);
-};
-
-#endif

+ 0 - 142
readers/mciReader_phqmd.cxx

@@ -1,142 +0,0 @@
-#include <mciReader_phqmd.h>
-
-ClassImp(mciReader_phqmd);
-
-mciReader_phqmd::mciReader_phqmd(/* args */) : is_init(false), fCurrentEvent(-1), fEvent(nullptr), fParticle(nullptr), fNpart(0)
-{
-}
-
-mciReader_phqmd::~mciReader_phqmd()
-{
-}
-
-Bool_t mciReader_phqmd::ChainCheck()
-{
-  if (!is_init)
-  {
-    return false;
-  }
-
-  if (fCurrentEvent == -1)
-  {
-    return false;
-  }
-
-  if (!fChainPHSD->GetEntry(fCurrentEvent))
-  {
-    return false;
-  }
-  if (!fChainFrag->GetEntry(fCurrentEvent))
-  {
-    return false;
-  }
-
-  return true;
-}
-
-void mciReader_phqmd::SetChain(const TString &inputFileName)
-{
-  fChainPHSD = (TChain *)mciUtility::GetInstance()->initChain(inputFileName, fChainPHSDName);
-
-  fChainPHSD->SetBranchAddress("event", &fEvent);
-
-  fChainFrag = (TChain *)mciUtility::GetInstance()->initChain(inputFileName, fChainFragName);
-
-  fChainFrag->SetBranchAddress("eventFrag", &fEventFrag);
-
-  is_init = kTRUE;
-}
-
-mciEvent *mciReader_phqmd::ReadEvent(Long64_t iev)
-{
-  fCurrentEvent = iev;
-
-  if (!ChainCheck())
-  {
-    return nullptr;
-  }
-
-  mciEvent *event = new mciEvent();
-
-  event->SetB(fEvent->GetB());
-  // event->SetPhiRP(0.); // in PHQMD axis orientation is rotated by 180 deg. In HSD/PHSD it's ok.
-  event->SetPhiRP(TMath::Pi()); // in PHQMD axis orientation is rotated by 180 deg. In HSD/PHSD it's ok.
-  event->SetNparticles(fEvent->GetNpart() + fEventFrag->GetNfragMST()); // number of particles from PHSD and number of MST fragments
-
-  return event;
-}
-
-mciParticle *mciReader_phqmd::ReadParticle(Int_t ipart)
-{
-  mciParticle *particle = new mciParticle();
-
-  if (!ChainCheck())
-  {
-    if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: Failed chain check!" << std::endl;
-    return particle;
-  }
-
-  if (ipart >= fEvent->GetNpart() + fEventFrag->GetNfragMST())
-  {
-    if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: ipart >= Nparticlpants + Nfragments (" << ipart << " >= " << fEvent->GetNpart() << " + " << fEventFrag->GetNfragMST() << ")!" << std::endl;
-    return particle;
-  }
-
-  if (ipart < 0)
-  {
-    if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: ipart < 0!" << std::endl;
-    return particle;
-  }
-
-  bool is_particle = false;
-  bool is_fragment = false;
-
-  if (ipart < fEvent->GetNpart())
-  {
-    is_particle = true;
-  }
-  if (ipart >= fEvent->GetNpart())
-  {
-    is_fragment = true;
-  }
-
-  if (!is_particle && !is_fragment)
-  {
-    if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: particle is neither participant nor spectator!" << std::endl;
-    return particle;
-  }
-
-  if (is_particle && is_fragment)
-  {
-    if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: particle is both participant and spectator!" << std::endl;
-    return particle;
-  }
-
-  if (is_particle)
-  {
-    fParticle = fEvent->GetParticle(ipart);
-    if (fParticle->IsInMST()) // Check whether the particle from PHSD was used to create MST fragment
-    {
-      if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: particle was used to create MST fragment!" << std::endl;
-      return particle;
-    }
-    particle->SetEnergy(fParticle->E());
-    particle->SetPdg(fParticle->GetPdg());
-    particle->SetPxPyPz(fParticle->Px(), fParticle->Py(), fParticle->Pz());
-    particle->SetTime(0.);
-    particle->SetXYZ(0., 0., 0.);
-    particle->SetCharge(fParticle->GetCharge());
-  }
-  if (is_fragment)
-  {
-    fFragmentMST = fEventFrag->GetFragmentMST(ipart - fEvent->GetNpart());
-    particle->SetEnergy(fFragmentMST->E());
-    particle->SetPdg(fFragmentMST->GetPdg());
-    particle->SetPxPyPz(fFragmentMST->Px(), fFragmentMST->Py(), fFragmentMST->Pz());
-    particle->SetTime(0.);
-    particle->SetXYZ(0., 0., 0.);
-    particle->SetCharge(fFragmentMST->GetZ());
-  }
-
-  return particle;
-}

+ 0 - 49
readers/mciReader_phqmd.h

@@ -1,49 +0,0 @@
-#ifndef MODELCONVERTER_READERS_PHQMD_H
-#define MODELCONVERTER_READERS_PHQMD_H
-
-#include <Rtypes.h>
-#include <TChain.h>
-#include <TLorentzVector.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-#include <mciReader_manager.h>
-
-#include <phqmd2root/src/libPHQMDEvent.h>
-
-class mciReader_phqmd : virtual public mciReader_manager
-{
-private:
-  TChain *fChainPHSD, *fChainFrag;
-
-  const char *fChainPHSDName = "PHQMDtree";
-  const char *fChainFragName = "FRAGtree";
-
-  bool is_init;
-  Long64_t fCurrentEvent;
-
-  Event *fEvent;
-  EventClust *fEventFrag;
-  Particle *fParticle;
-  Baryon *fBaryonMST;
-  Fragment *fFragmentMST;
-  TLorentzVector fMomentum;
-  Int_t fNpart;
-
-  Bool_t ChainCheck();
-
-public:
-  mciReader_phqmd(/* args */);
-  virtual ~mciReader_phqmd();
-
-  virtual void SetChain(const TString &inputFileName);
-  virtual Long64_t GetEntries() { return fChainFrag->GetEntries(); }
-  virtual mciEvent *ReadEvent(Long64_t iev);
-  virtual mciParticle* ReadParticle(Int_t ipart);
-
-  ClassDef(mciReader_phqmd, 0);
-};
-
-#endif

+ 0 - 90
readers/mciReader_smash_root.cxx

@@ -1,90 +0,0 @@
-#include <mciReader_smash_root.h>
-
-ClassImp(mciReader_smash_root);
-
-mciReader_smash_root::mciReader_smash_root(/* args */) : is_init(false), fCurrentEvent(-1)
-{
-}
-
-mciReader_smash_root::~mciReader_smash_root()
-{
-}
-
-Bool_t mciReader_smash_root::ChainCheck()
-{
-  if (!is_init)
-  {
-    return false;
-  }
-
-  if (fCurrentEvent == -1)
-  {
-    return false;
-  }
-
-  if (!fChain->GetEntry(fCurrentEvent))
-  {
-    return false;
-  }
-
-  return true;
-}
-
-void mciReader_smash_root::SetChain(const TString &inputFileName)
-{
-  fChain = (TChain *)mciUtility::GetInstance()->initChain(inputFileName, fChainName);
-
-  fChain->SetBranchAddress("npart", &npart);
-  fChain->SetBranchAddress("impact_b", &impact_b);
-  fChain->SetBranchAddress("pdgcode", pdgcode);
-  fChain->SetBranchAddress("p0", p0);
-  fChain->SetBranchAddress("px", px);
-  fChain->SetBranchAddress("py", py);
-  fChain->SetBranchAddress("pz", pz);
-  fChain->SetBranchAddress("t", t);
-  fChain->SetBranchAddress("x", x);
-  fChain->SetBranchAddress("y", y);
-  fChain->SetBranchAddress("z", z);
-
-  is_init = kTRUE;
-}
-
-mciEvent *mciReader_smash_root::ReadEvent(Long64_t iev)
-{
-  mciEvent *event = new mciEvent();
-  fCurrentEvent = iev;
-
-  if (!ChainCheck())
-  {
-    return event;
-  }
-
-  event->SetB(impact_b);
-  event->SetPhiRP(0.);
-  event->SetNparticles(npart);
-
-  return event;
-}
-
-mciParticle *mciReader_smash_root::ReadParticle(Int_t ipart)
-{
-  mciParticle *particle = new mciParticle();
-  if (!ChainCheck())
-  {
-    return particle;
-  }
-
-  if (ipart >= npart)
-  {
-    return particle;
-  }
-
-  particle->SetEnergy(p0[ipart]);
-  particle->SetPdg(pdgcode[ipart]);
-  particle->SetPxPyPz(px[ipart], py[ipart], pz[ipart]);
-  particle->SetTime(t[ipart]);
-  particle->SetXYZ(x[ipart], y[ipart], z[ipart]);
-  particle->SetCharge(mciUtility::GetInstance()->GetCharge(pdgcode[ipart]));
-
-  return particle;
-}

+ 0 - 53
readers/mciReader_smash_root.h

@@ -1,53 +0,0 @@
-#ifndef MODELCONVERTER_READERS_SMASH_ROOT_H
-#define MODELCONVERTER_READERS_SMASH_ROOT_H
-
-#include <Rtypes.h>
-#include <TChain.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-#include <mciReader_manager.h>
-
-#define MAX_TRACKS 15000
-
-class mciReader_smash_root : virtual public mciReader_manager
-{
-private:
-  TChain *fChain;
-
-  const char *fChainName = "particles";
-
-  bool is_init;
-  Long64_t fCurrentEvent;
-
-  Int_t npart;
-  Double_t impact_b;
-  Int_t ev;
-  Int_t tcounter;
-  Int_t pdgcode[MAX_TRACKS]; //[npart]
-  Double_t p0[MAX_TRACKS];   //[npart]
-  Double_t px[MAX_TRACKS];   //[npart]
-  Double_t py[MAX_TRACKS];   //[npart]
-  Double_t pz[MAX_TRACKS];   //[npart]
-  Double_t t[MAX_TRACKS];    //[npart]
-  Double_t x[MAX_TRACKS];    //[npart]
-  Double_t y[MAX_TRACKS];    //[npart]
-  Double_t z[MAX_TRACKS];    //[npart]
-
-  Bool_t ChainCheck();
-
-public:
-  mciReader_smash_root(/* args */);
-  virtual ~mciReader_smash_root();
-
-  virtual void SetChain(const TString &inputFileName);
-  virtual Long64_t GetEntries() { return fChain->GetEntries(); }
-  virtual mciEvent *ReadEvent(Long64_t iev);
-  virtual mciParticle* ReadParticle(Int_t ipart);
-
-  ClassDef(mciReader_smash_root, 0);
-};
-
-#endif

+ 0 - 7
writers/mciWriter_manager.cxx

@@ -1,7 +0,0 @@
-#include <mciWriter_manager.h>
-
-ClassImp(mciWriter_manager);
-
-mciWriter_manager::~mciWriter_manager()
-{
-}

+ 0 - 28
writers/mciWriter_manager.h

@@ -1,28 +0,0 @@
-#ifndef MODELCONVERTER_WRITER_MANAGER_H
-#define MODELCONVERTER_WRITER_MANAGER_H
-
-#include <Rtypes.h>
-#include <TString.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-class mciWriter_manager
-{
-private:
-  /* data */
-public:
-  virtual ~mciWriter_manager();
-
-  virtual void SetFile(const TString &outputFileName) = 0;
-  virtual void SetEvent(mciEvent *const& _ievent) = 0;
-  virtual void SetParticle(mciParticle *const& _iparticle, Int_t id) = 0;
-  virtual void Fill() = 0;
-  virtual void Write() = 0;
-  virtual void Close() = 0;
-
-  ClassDef(mciWriter_manager,0);
-};
-
-#endif

+ 0 - 71
writers/mciWriter_mcpico.cxx

@@ -1,71 +0,0 @@
-#include <mciWriter_mcpico.h>
-
-ClassImp(mciWriter_mcpico);
-
-mciWriter_mcpico::mciWriter_mcpico(/* args */) : fOutFile(nullptr)
-{
-  fTree = new TTree(fTreeName, "Hadrons tree from MC RHIC models");
-  fTree->Branch("bimp",&bimp,"bimp/F"); // impact parametr
-  fTree->Branch("phi2",&phi2,"phi2/F"); // phiRP2
-  fTree->Branch("phi3",&phi3,"phi3/F"); // phiRP3
-  fTree->Branch("ecc2",&ecc2,"ecc2/F"); // eccentricity2
-  fTree->Branch("ecc3",&ecc3,"ecc3/F"); // eccentricity3
-  fTree->Branch("npart",&npart,"npart/I"); // number of participants
-  fTree->Branch("nh",&nh,"nh/I");  // number of particles
-  fTree->Branch("momx",&momx,"momx[nh]/F");
-  fTree->Branch("momy",&momy,"momy[nh]/F");
-  fTree->Branch("momz",&momz,"momz[nh]/F");
-  fTree->Branch("ene",&ene,"ene[nh]/F");//[energy]
-  fTree->Branch("hid",&hid,"hid[nh]/I");//[histrory id]
-  fTree->Branch("pdg",&pdg,"pdg[nh]/I");//[particle data group code]
-  fTree->Branch("charge",&charge,"charge[nh]/S");//[electric charge]
-}
-
-mciWriter_mcpico::~mciWriter_mcpico()
-{
-  delete fTree;
-  delete fOutFile;
-}
-
-void mciWriter_mcpico::SetFile(const TString &outputFileName)
-{
-  if (!fOutFile) fOutFile = new TFile(outputFileName.Data(), "recreate");
-}
-
-void mciWriter_mcpico::SetEvent(mciEvent *const& _ievent)
-{
-  bimp  = _ievent->GetB();
-  phi2  = _ievent->GetPhiRP();
-  phi3  = 0.;
-  ecc2  = 0.;
-  ecc3  = 0.;
-  npart = _ievent->GetNparticipants();
-  nh    = _ievent->GetNparticles();
-}
-
-void mciWriter_mcpico::SetParticle(mciParticle *const& _iparticle, Int_t id)
-{
-  momx[id]   = _iparticle->GetPx();
-  momy[id]   = _iparticle->GetPy();
-  momz[id]   = _iparticle->GetPz();
-  ene[id]    = _iparticle->GetEnergy();
-  pdg[id]    = _iparticle->GetPdg();
-  hid[id]    = 0.;
-  charge[id] = _iparticle->GetCharge();
-}
-
-void mciWriter_mcpico::Fill()
-{
-  fTree->Fill();
-}
-
-void mciWriter_mcpico::Write()
-{
-  fOutFile->cd();
-  fTree->Write();
-}
-
-void mciWriter_mcpico::Close()
-{
-  fOutFile->Close();
-}

+ 0 - 53
writers/mciWriter_mcpico.h

@@ -1,53 +0,0 @@
-#ifndef MODELCONVERTER_WRITERS_MCPICO_H
-#define MODELCONVERTER_WRITERS_MCPICO_H
-
-#include <Rtypes.h>
-#include <TFile.h>
-#include <TTree.h>
-
-#include <mciEvent.h>
-#include <mciParticle.h>
-#include <Utility.h>
-
-#include <mciWriter_manager.h>
-
-class mciWriter_mcpico : virtual public mciWriter_manager
-{
-private:
-  
-  TFile *fOutFile;
-  TTree *fTree;
-
-  const char *fTreeName = "mctree";
-
-  Float_t         bimp;
-  Float_t         phi2;
-  Float_t         phi3;
-  Float_t         ecc2;
-  Float_t         ecc3;
-  Int_t           npart;
-  Int_t           nh;
-  Float_t         momx[MAX_TRACKS];   //[nh]
-  Float_t         momy[MAX_TRACKS];   //[nh]
-  Float_t         momz[MAX_TRACKS];   //[nh]
-  Float_t         ene[MAX_TRACKS];   //[nh]
-  Int_t           hid[MAX_TRACKS];   //[nh]
-  Int_t           pdg[MAX_TRACKS];   //[nh]
-  Short_t         charge[MAX_TRACKS];   //[nh]
-
-public:
-  mciWriter_mcpico(/* args */);
-  virtual ~mciWriter_mcpico();
-
-  virtual void SetFile(const TString &outputFileName);
-  virtual void SetEvent(mciEvent *const& _ievent);
-  virtual void SetParticle(mciParticle *const& _iparticle, Int_t id);
-  virtual void Fill();
-  virtual void Write();
-  virtual void Close();
-
-  ClassDef(mciWriter_mcpico, 0);
-};
-
-
-#endif