Loading AUTHORS.md +1 −0 Original line number Diff line number Diff line Loading @@ -69,3 +69,4 @@ The following authors, in alphabetical order, have developed or contributed to A * Andy Wharton, Lancaster University, [awharton](https://gitlab.cern.ch/awharton) * Morag Williams, University of Glasgow, [williamm](https://gitlab.cern.ch/williamm) * Koen Wolters, [kwolters](https://gitlab.cern.ch/kwolters) * Samuel Wood, University of Oxford, [sam-sw](https://github.com/sam-sw) src/modules/DepositionGeant4/SensitiveDetectorActionG4.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ G4bool SensitiveDetectorActionG4::ProcessHits(G4Step* step, G4TouchableHistory*) track_parents_.emplace(trackID, parentTrackID); track_time_.emplace(trackID, step_time); track_pdg_.emplace(trackID, track->GetDynamicParticle()->GetPDGcode()); track_total_energy_start_.emplace(trackID, track->GetTotalEnergy()); track_kinetic_energy_start_.emplace(trackID, track->GetKineticEnergy()); } // Update current end point with the current last step Loading Loading @@ -153,6 +155,8 @@ void SensitiveDetectorActionG4::clearEventInfo() { track_pdg_.clear(); track_time_.clear(); track_charge_.clear(); track_total_energy_start_.clear(); track_kinetic_energy_start_.clear(); deposit_position_.clear(); deposit_charge_.clear(); Loading Loading @@ -190,6 +194,8 @@ void SensitiveDetectorActionG4::dispatchMessages(Module* module, Messenger* mess // Count electrons and holes: mc_particles.back().setTotalDepositedCharge(2 * charge); mc_particles.back().setTrack(track_info_manager_->findMCTrack(track_id)); mc_particles.back().setTotalEnergyStart(track_total_energy_start_.at(track_id)); mc_particles.back().setKineticEnergyStart(track_kinetic_energy_start_.at(track_id)); id_to_particle_[track_id] = mc_particles.size() - 1; LOG(DEBUG) << "Found MC particle " << pdg_code << " crossing detector " << detector_->getName() << " from " Loading src/modules/DepositionGeant4/SensitiveDetectorActionG4.hpp +4 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ namespace allpix { std::map<int, double> track_time_; // Total charge by track std::map<int, unsigned int> track_charge_; // Total energy by track at start point std::map<int, double> track_total_energy_start_; // Kinetic energy by track at start point std::map<int, double> track_kinetic_energy_start_; // Map from deposit index to track id std::vector<int> deposit_to_id_; Loading src/objects/MCParticle.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,22 @@ ROOT::Math::XYZPoint MCParticle::getLocalReferencePoint() const { } } double MCParticle::getTotalEnergyStart() const { return total_energy_start_; } void MCParticle::setTotalEnergyStart(double total_energy) { total_energy_start_ = total_energy; } double MCParticle::getKineticEnergyStart() const { return kinetic_energy_start_; } void MCParticle::setKineticEnergyStart(double kinetic_energy) { kinetic_energy_start_ = kinetic_energy; } unsigned int MCParticle::getTotalDepositedCharge() const { return deposited_charge_; } Loading src/objects/MCParticle.hpp +26 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,30 @@ namespace allpix { */ double getLocalTime() const; /** * @brief Set the starting total energy of this particle in the respective sensor * @param total_energy Total energy of this particle at its start point */ void setTotalEnergyStart(double total_energy); /** * @brief Return the starting total energy of this particle in the respective sensor * @return Total energy of this particle at its start point */ double getTotalEnergyStart() const; /** * @brief Set the starting kinetic energy of this particle in the respective sensor * @param kinetic_energy Kinetic energy of this particle at its start point */ void setKineticEnergyStart(double kinetic_energy); /** * @brief Return the starting kinetic energy of this particle in the respective sensor * @return Kinetic energy of this particle at its start point */ double getKineticEnergyStart() const; /** * @brief Set the total number of charge carriers produced by this particle * @param total_charge Total charge deposited by this particle Loading Loading @@ -170,6 +194,8 @@ namespace allpix { double local_time_{}; double global_time_{}; unsigned int deposited_charge_{}; double total_energy_start_{}; double kinetic_energy_start_{}; PointerWrapper<MCParticle> parent_; PointerWrapper<MCTrack> track_; Loading Loading
AUTHORS.md +1 −0 Original line number Diff line number Diff line Loading @@ -69,3 +69,4 @@ The following authors, in alphabetical order, have developed or contributed to A * Andy Wharton, Lancaster University, [awharton](https://gitlab.cern.ch/awharton) * Morag Williams, University of Glasgow, [williamm](https://gitlab.cern.ch/williamm) * Koen Wolters, [kwolters](https://gitlab.cern.ch/kwolters) * Samuel Wood, University of Oxford, [sam-sw](https://github.com/sam-sw)
src/modules/DepositionGeant4/SensitiveDetectorActionG4.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ G4bool SensitiveDetectorActionG4::ProcessHits(G4Step* step, G4TouchableHistory*) track_parents_.emplace(trackID, parentTrackID); track_time_.emplace(trackID, step_time); track_pdg_.emplace(trackID, track->GetDynamicParticle()->GetPDGcode()); track_total_energy_start_.emplace(trackID, track->GetTotalEnergy()); track_kinetic_energy_start_.emplace(trackID, track->GetKineticEnergy()); } // Update current end point with the current last step Loading Loading @@ -153,6 +155,8 @@ void SensitiveDetectorActionG4::clearEventInfo() { track_pdg_.clear(); track_time_.clear(); track_charge_.clear(); track_total_energy_start_.clear(); track_kinetic_energy_start_.clear(); deposit_position_.clear(); deposit_charge_.clear(); Loading Loading @@ -190,6 +194,8 @@ void SensitiveDetectorActionG4::dispatchMessages(Module* module, Messenger* mess // Count electrons and holes: mc_particles.back().setTotalDepositedCharge(2 * charge); mc_particles.back().setTrack(track_info_manager_->findMCTrack(track_id)); mc_particles.back().setTotalEnergyStart(track_total_energy_start_.at(track_id)); mc_particles.back().setKineticEnergyStart(track_kinetic_energy_start_.at(track_id)); id_to_particle_[track_id] = mc_particles.size() - 1; LOG(DEBUG) << "Found MC particle " << pdg_code << " crossing detector " << detector_->getName() << " from " Loading
src/modules/DepositionGeant4/SensitiveDetectorActionG4.hpp +4 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ namespace allpix { std::map<int, double> track_time_; // Total charge by track std::map<int, unsigned int> track_charge_; // Total energy by track at start point std::map<int, double> track_total_energy_start_; // Kinetic energy by track at start point std::map<int, double> track_kinetic_energy_start_; // Map from deposit index to track id std::vector<int> deposit_to_id_; Loading
src/objects/MCParticle.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,22 @@ ROOT::Math::XYZPoint MCParticle::getLocalReferencePoint() const { } } double MCParticle::getTotalEnergyStart() const { return total_energy_start_; } void MCParticle::setTotalEnergyStart(double total_energy) { total_energy_start_ = total_energy; } double MCParticle::getKineticEnergyStart() const { return kinetic_energy_start_; } void MCParticle::setKineticEnergyStart(double kinetic_energy) { kinetic_energy_start_ = kinetic_energy; } unsigned int MCParticle::getTotalDepositedCharge() const { return deposited_charge_; } Loading
src/objects/MCParticle.hpp +26 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,30 @@ namespace allpix { */ double getLocalTime() const; /** * @brief Set the starting total energy of this particle in the respective sensor * @param total_energy Total energy of this particle at its start point */ void setTotalEnergyStart(double total_energy); /** * @brief Return the starting total energy of this particle in the respective sensor * @return Total energy of this particle at its start point */ double getTotalEnergyStart() const; /** * @brief Set the starting kinetic energy of this particle in the respective sensor * @param kinetic_energy Kinetic energy of this particle at its start point */ void setKineticEnergyStart(double kinetic_energy); /** * @brief Return the starting kinetic energy of this particle in the respective sensor * @return Kinetic energy of this particle at its start point */ double getKineticEnergyStart() const; /** * @brief Set the total number of charge carriers produced by this particle * @param total_charge Total charge deposited by this particle Loading Loading @@ -170,6 +194,8 @@ namespace allpix { double local_time_{}; double global_time_{}; unsigned int deposited_charge_{}; double total_energy_start_{}; double kinetic_energy_start_{}; PointerWrapper<MCParticle> parent_; PointerWrapper<MCTrack> track_; Loading