// track back to the original primary?
if (fUseOnlyPrimary && !isPrimary) continue;
- const AliMCParticle* mother = GetMother(iTr, event);
+ const AliMCParticle* mother = isPrimary ? particle : GetMother(iTr, event);
ProcessTrack(particle, mother);
} // Loop over tracks
{
return fWeights.CalcWeight(eta, pt, phi, id, fPhiR, fB);
}
+
+#define PF(N,V,...) \
+ AliForwardUtil::PrintField(N,V, ## __VA_ARGS__)
+#define PFB(N,FLAG) \
+ do { \
+ AliForwardUtil::PrintName(N); \
+ std::cout << std::boolalpha << (FLAG) << std::noboolalpha << std::endl; \
+ } while(false)
+#define PFV(N,VALUE) \
+ do { \
+ AliForwardUtil::PrintName(N); \
+ std::cout << (VALUE) << std::endl; } while(false)
+
//____________________________________________________________________
void
AliBaseMCTrackDensity::Print(Option_t* /*option*/) const
{
- char ind[gROOT->GetDirLevel()+1];
- for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
- ind[gROOT->GetDirLevel()] = '\0';
- std::cout << ind << ClassName() << ": " << GetName() << '\n'
- << std::boolalpha
- << ind << " Only primary tracks: " << fUseOnlyPrimary << '\n'
- << ind << " Use flow after burner: " << fUseFlowWeights
- << std::noboolalpha << std::endl;
+ AliForwardUtil::PrintTask(*this);
+ gROOT->IncreaseDirLevel();
+ PFB("Only primary tracks", fUseOnlyPrimary);
+ PFB("Use flow after burner", fUseFlowWeights);
+ gROOT->DecreaseDirLevel();
}