Skip to content
Snippets Groups Projects
Commit f82e8f59 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* Fixing issue in Resisitve scorer

parent 522bc9b8
No related branches found
No related tags found
No related merge requests found
Pipeline #181389 passed
...@@ -320,6 +320,8 @@ void SuperX3::ReadSensitive(const G4Event*) { ...@@ -320,6 +320,8 @@ void SuperX3::ReadSensitive(const G4Event*) {
m_Event->SetBackE(det, strip, energy); m_Event->SetBackE(det, strip, energy);
m_Event->SetBackT(det, strip, time); m_Event->SetBackT(det, strip, time);
} }
resistive->clear();
backstrip->clear();
} }
void SuperX3::InitializeMaterials() { void SuperX3::InitializeMaterials() {
......
...@@ -370,21 +370,22 @@ G4bool PS_Resistive::ProcessHits(G4Step* aStep, G4TouchableHistory*) { ...@@ -370,21 +370,22 @@ G4bool PS_Resistive::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
// Up // Up
vector<DSSDData>::iterator it; vector<DSSDData>::iterator it;
it = m_HitUp.find(DSSDData::CalculateIndex(t_DetectorNumber, t_StripWidthNumber)); it = m_HitUp.find(DSSDData::CalculateIndex(t_StripWidthNumber, t_DetectorNumber));
if (it != m_HitUp.end()) if (it != m_HitUp.end()) {
it->Add(t_EnergyUp); it->Add(t_EnergyUp);
else }
else {
m_HitUp.Set(t_EnergyUp, t_Time, t_StripWidthNumber, t_DetectorNumber); m_HitUp.Set(t_EnergyUp, t_Time, t_StripWidthNumber, t_DetectorNumber);
}
// Down // Down
it = m_HitDown.find(DSSDData::CalculateIndex(t_DetectorNumber, t_StripWidthNumber)); it = m_HitDown.find(DSSDData::CalculateIndex(t_StripWidthNumber, t_DetectorNumber));
if (it != m_HitDown.end()) if (it != m_HitDown.end())
it->Add(t_EnergyDown); it->Add(t_EnergyDown);
else else
m_HitDown.Set(t_EnergyDown, t_Time, t_StripWidthNumber, t_DetectorNumber); m_HitDown.Set(t_EnergyDown, t_Time, t_StripWidthNumber, t_DetectorNumber);
// Back // Back
it = m_HitBack.find(DSSDData::CalculateIndex(t_DetectorNumber, t_StripWidthNumber)); it = m_HitBack.find(DSSDData::CalculateIndex(t_StripWidthNumber, t_DetectorNumber));
if (it != m_HitBack.end()) if (it != m_HitBack.end())
it->Add(t_Energy); it->Add(t_Energy);
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment