Skip to content
Snippets Groups Projects
Commit 640367fb authored by FU Chengdong's avatar FU Chengdong
Browse files

keep step position for unmerge case

parent cb264201
No related branches found
No related tags found
No related merge requests found
...@@ -52,11 +52,14 @@ CaloSensitiveDetector::ProcessHits(G4Step* step, G4TouchableHistory*) { ...@@ -52,11 +52,14 @@ CaloSensitiveDetector::ProcessHits(G4Step* step, G4TouchableHistory*) {
//G4ThreeVector local(0,0,0); //G4ThreeVector local(0,0,0);
//G4ThreeVector global = h.preTouchable()->GetHistory()->GetTopTransform().InverseTransformPoint(local); //G4ThreeVector global = h.preTouchable()->GetHistory()->GetTopTransform().InverseTransformPoint(local);
//hit = new CalorimeterHit(dd4hep::Position(global.x(), global.y(), global.z())); //hit = new CalorimeterHit(dd4hep::Position(global.x(), global.y(), global.z()));
dd4hep::Position posCellCenter = getNominalPosition(step, id); if(m_isMergeEnabled){
hit = new CalorimeterHit(posCellCenter); dd4hep::Position posCellCenter = getNominalPosition(step, id);
hit = new CalorimeterHit(posCellCenter);
m_hitMap[id] = hit;
}
else hit = new CalorimeterHit(pos);
hit->cellID = id; //getCellID( step ); hit->cellID = id; //getCellID( step );
m_hc->insert(hit); m_hc->insert(hit);
if(m_isMergeEnabled) m_hitMap[id] = hit;
} }
hit->truth.push_back(contrib); hit->truth.push_back(contrib);
hit->energyDeposit += contrib.deposit; hit->energyDeposit += contrib.deposit;
......
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