Loading src/modules/DepositionGeant4/TrackInfoG4.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -21,13 +21,14 @@ TrackInfoG4::TrackInfoG4(int custom_track_id, int parent_track_id, const G4Track particle_id_ = aTrack->GetDynamicParticle()->GetPDGcode(); start_point_ = static_cast<ROOT::Math::XYZPoint>(aTrack->GetPosition()); start_time_ = aTrack->GetGlobalTime(); origin_g4_vol_name_ = aTrack->GetVolume()->GetName(); initial_g4_vol_name_ = aTrack->GetVolume()->GetName(); origin_g4_process_name_ = (G4Process != nullptr) ? static_cast<std::string>(G4Process->GetProcessName()) : "none"; initial_kin_E_ = aTrack->GetKineticEnergy(); initial_tot_E_ = aTrack->GetTotalEnergy(); } void TrackInfoG4::finalizeInfo(const G4Track* const aTrack) { final_g4_vol_name_ = aTrack->GetVolume()->GetName(); final_kin_E_ = aTrack->GetKineticEnergy(); final_tot_E_ = aTrack->GetTotalEnergy(); end_point_ = static_cast<ROOT::Math::XYZPoint>(aTrack->GetPosition()); Loading Loading @@ -84,7 +85,11 @@ double TrackInfoG4::getTotalEnergyFinal() const { } std::string TrackInfoG4::getOriginatingVolumeName() const { return origin_g4_vol_name_; return initial_g4_vol_name_; } std::string TrackInfoG4::getTerminatingVolumeName() const { return final_g4_vol_name_; } std::string TrackInfoG4::getCreationProcessName() const { Loading src/modules/DepositionGeant4/TrackInfoG4.hpp +9 −1 Original line number Diff line number Diff line Loading @@ -120,6 +120,12 @@ namespace allpix { */ std::string getOriginatingVolumeName() const; /** * @brief Getter for the Geant4 name of the physical volume in which the track ends * @return The name of the phyical volume */ std::string getTerminatingVolumeName() const; /** * @brief Getter for the name of the process which created this particle * @return The process name, or "none" if no such process exists Loading @@ -144,7 +150,9 @@ namespace allpix { // Ending time (in ns) double end_time_{}; // Geant4 volume in which the track was created std::string origin_g4_vol_name_{}; std::string initial_g4_vol_name_{}; // Geant4 volume in which the track was terminated std::string final_g4_vol_name_{}; // Name of Geant4 process which created this track std::string origin_g4_process_name_{}; // Initial kinetic energy (MeV) Loading Loading
src/modules/DepositionGeant4/TrackInfoG4.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -21,13 +21,14 @@ TrackInfoG4::TrackInfoG4(int custom_track_id, int parent_track_id, const G4Track particle_id_ = aTrack->GetDynamicParticle()->GetPDGcode(); start_point_ = static_cast<ROOT::Math::XYZPoint>(aTrack->GetPosition()); start_time_ = aTrack->GetGlobalTime(); origin_g4_vol_name_ = aTrack->GetVolume()->GetName(); initial_g4_vol_name_ = aTrack->GetVolume()->GetName(); origin_g4_process_name_ = (G4Process != nullptr) ? static_cast<std::string>(G4Process->GetProcessName()) : "none"; initial_kin_E_ = aTrack->GetKineticEnergy(); initial_tot_E_ = aTrack->GetTotalEnergy(); } void TrackInfoG4::finalizeInfo(const G4Track* const aTrack) { final_g4_vol_name_ = aTrack->GetVolume()->GetName(); final_kin_E_ = aTrack->GetKineticEnergy(); final_tot_E_ = aTrack->GetTotalEnergy(); end_point_ = static_cast<ROOT::Math::XYZPoint>(aTrack->GetPosition()); Loading Loading @@ -84,7 +85,11 @@ double TrackInfoG4::getTotalEnergyFinal() const { } std::string TrackInfoG4::getOriginatingVolumeName() const { return origin_g4_vol_name_; return initial_g4_vol_name_; } std::string TrackInfoG4::getTerminatingVolumeName() const { return final_g4_vol_name_; } std::string TrackInfoG4::getCreationProcessName() const { Loading
src/modules/DepositionGeant4/TrackInfoG4.hpp +9 −1 Original line number Diff line number Diff line Loading @@ -120,6 +120,12 @@ namespace allpix { */ std::string getOriginatingVolumeName() const; /** * @brief Getter for the Geant4 name of the physical volume in which the track ends * @return The name of the phyical volume */ std::string getTerminatingVolumeName() const; /** * @brief Getter for the name of the process which created this particle * @return The process name, or "none" if no such process exists Loading @@ -144,7 +150,9 @@ namespace allpix { // Ending time (in ns) double end_time_{}; // Geant4 volume in which the track was created std::string origin_g4_vol_name_{}; std::string initial_g4_vol_name_{}; // Geant4 volume in which the track was terminated std::string final_g4_vol_name_{}; // Name of Geant4 process which created this track std::string origin_g4_process_name_{}; // Initial kinetic energy (MeV) Loading