|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
ClassImp(mciReader_phqmd);
|
|
|
|
|
|
-mciReader_phqmd::mciReader_phqmd(/* args */) : is_init(false), fCurrentEvent(-1), fEvent(nullptr), fParticle(nullptr)
|
|
|
+mciReader_phqmd::mciReader_phqmd(/* args */) : is_init(false), fCurrentEvent(-1), fEvent(nullptr), fParticle(nullptr), fNpart(0)
|
|
|
{
|
|
|
}
|
|
|
|
|
@@ -68,19 +68,24 @@ mciEvent *mciReader_phqmd::ReadEvent(Long64_t iev)
|
|
|
|
|
|
mciParticle *mciReader_phqmd::ReadParticle(Int_t ipart)
|
|
|
{
|
|
|
+ mciParticle *particle = new mciParticle();
|
|
|
+
|
|
|
if (!ChainCheck())
|
|
|
{
|
|
|
- return nullptr;
|
|
|
+ if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: Failed chain check!" << std::endl;
|
|
|
+ return particle;
|
|
|
}
|
|
|
|
|
|
if (ipart >= fEvent->GetNpart() + fEventFrag->GetNfragMST())
|
|
|
{
|
|
|
- return nullptr;
|
|
|
+ if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: ipart >= Nparticlpants + Nfragments (" << ipart << " >= " << fEvent->GetNpart() << " + " << fEventFrag->GetNfragMST() << ")!" << std::endl;
|
|
|
+ return particle;
|
|
|
}
|
|
|
|
|
|
if (ipart < 0)
|
|
|
{
|
|
|
- return nullptr;
|
|
|
+ if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: ipart < 0!" << std::endl;
|
|
|
+ return particle;
|
|
|
}
|
|
|
|
|
|
bool is_particle = false;
|
|
@@ -97,22 +102,23 @@ mciParticle *mciReader_phqmd::ReadParticle(Int_t ipart)
|
|
|
|
|
|
if (!is_particle && !is_fragment)
|
|
|
{
|
|
|
- return nullptr;
|
|
|
+ if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: particle is neither participant nor spectator!" << std::endl;
|
|
|
+ return particle;
|
|
|
}
|
|
|
|
|
|
if (is_particle && is_fragment)
|
|
|
{
|
|
|
- return nullptr;
|
|
|
+ if (mciUtility::GetInstance()->debug) std::cerr << "mciReader_phqmd::ReadParticle: particle is both participant and spectator!" << std::endl;
|
|
|
+ return particle;
|
|
|
}
|
|
|
|
|
|
- mciParticle *particle = new mciParticle();
|
|
|
-
|
|
|
if (is_particle)
|
|
|
{
|
|
|
fParticle = fEvent->GetParticle(ipart);
|
|
|
if (fParticle->IsInMST()) // Check whether the particle from PHSD was used to create MST fragment
|
|
|
{
|
|
|
- return nullptr;
|
|
|
+ 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());
|