diff --git a/src/TRestGeant4AnalysisProcess.cxx b/src/TRestGeant4AnalysisProcess.cxx index 0d9fff8..ca2083b 100644 --- a/src/TRestGeant4AnalysisProcess.cxx +++ b/src/TRestGeant4AnalysisProcess.cxx @@ -507,9 +507,17 @@ TRestEvent* TRestGeant4AnalysisProcess::ProcessEvent(TRestEvent* inputEvent) { Double_t zDirection = fOutputG4Event->GetPrimaryEventDirection(0).Z(); SetObservableValue("zDirectionPrimary", zDirection); + SetObservableValue("eventPrimaryParticleName", fOutputG4Event->GetPrimaryEventParticleName(0)); + string subEventPrimaryParticleName; + if (fOutputG4Event->GetSubID() != 0) { + subEventPrimaryParticleName = fOutputG4Event->GetSubEventPrimaryEventParticleName(); + } + SetObservableValue("subEventPrimaryParticleName", subEventPrimaryParticleName); + TVector3 v(xDirection, yDirection, zDirection); SetObservableValue("thetaPrimary", v.Theta()); SetObservableValue("phiPrimary", v.Phi()); + SetObservableValue("zenithYDegrees", TMath::ACos(-1 * yDirection) * TMath::RadToDeg()); Double_t energyPrimary = fOutputG4Event->GetPrimaryEventEnergy(0); SetObservableValue("energyPrimary", energyPrimary); diff --git a/src/TRestGeant4QuenchingProcess.cxx b/src/TRestGeant4QuenchingProcess.cxx index ece3d8c..e2f1d56 100644 --- a/src/TRestGeant4QuenchingProcess.cxx +++ b/src/TRestGeant4QuenchingProcess.cxx @@ -166,9 +166,9 @@ void TRestGeant4QuenchingProcess::InitProcess() { } } - cout << "TRestGeant4QuenchingProcess initialized with volumes" << endl; + RESTDebug << "TRestGeant4QuenchingProcess initialized with volumes" << RESTendl; for (const auto& volume : fVolumes) { - cout << " " << volume << endl; + RESTDebug << " " << volume << RESTendl; } } @@ -244,9 +244,8 @@ void TRestGeant4QuenchingProcess::EndProcess() {} void TRestGeant4QuenchingProcess::PrintMetadata() { BeginPrintProcess(); - cout << "Printing TRestGeant4QuenchingProcess user configuration" << endl; for (auto const& volume : fVolumes) { - cout << "Volume: " << volume << endl; + RESTMetadata << "Volume: " << volume << RESTendl; } EndPrintProcess(); }