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

* Fixing detector skeleton class to work with any geant4 version

parent 7ee40339
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "MaterialManager.hh" #include "MaterialManager.hh"
#include "NPSDetectorFactory.hh" #include "NPSDetectorFactory.hh"
#include "NPOptionManager.h" #include "NPOptionManager.h"
#include "NPSHitsMap.hh"
// CLHEP header // CLHEP header
#include "CLHEP/Random/RandGauss.h" #include "CLHEP/Random/RandGauss.h"
...@@ -228,11 +229,11 @@ void DETECTORNAME::ReadSensitive(const G4Event* event){ ...@@ -228,11 +229,11 @@ void DETECTORNAME::ReadSensitive(const G4Event* event){
/////////// ///////////
// Calorimeter scorer // Calorimeter scorer
G4THitsMap<G4double*>* CaloHitMap; NPS::HitsMap<G4double*>* CaloHitMap;
std::map<G4int, G4double**>::iterator Calo_itr; std::map<G4int, G4double**>::iterator Calo_itr;
G4int CaloCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("DETECTORNAMEScorer/Calorimeter"); G4int CaloCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("DETECTORNAMEScorer/Calorimeter");
CaloHitMap = (G4THitsMap<G4double*>*)(event->GetHCofThisEvent()->GetHC(CaloCollectionID)); CaloHitMap = (NPS::HitsMap<G4double*>*)(event->GetHCofThisEvent()->GetHC(CaloCollectionID));
// Loop on the Calo map // Loop on the Calo map
for (Calo_itr = CaloHitMap->GetMap()->begin() ; Calo_itr != CaloHitMap->GetMap()->end() ; Calo_itr++){ for (Calo_itr = CaloHitMap->GetMap()->begin() ; Calo_itr != CaloHitMap->GetMap()->end() ; Calo_itr++){
......
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