49 PrepareHitsAccumulation();
55 if (i != (GAMMAKNIFE_SOURCES - 1))
72 mesh->
RotateX( thetaAngles[position] );
73 mesh->
RotateZ( phiAngles[position] );
78 void GammaKnifeController::RotateBack(
G4int position )
86 mesh->
RotateZ( - phiAngles[position] );
87 mesh->
RotateX( - thetaAngles[position] );
92 void GammaKnifeController::PrepareHitsAccumulation()
99 for (
size_t i = 0; i < size; i++)
106 MeshScoreMap::iterator it = scoreMap.begin();
107 for( ; it != scoreMap.end(); it++)
109 std::string hitMapName = it->first;
111 storedScoreMap[ hitMapName ] = hitMapToStore;
117 void GammaKnifeController::StoreHits()
130 MeshScoreMap::iterator it = scoreMap.begin();
131 for( ; it != scoreMap.end(); it++)
133 std::string hitMapName = it->first;
134 *storedScoreMap[hitMapName] += *(it->second);
140 void GammaKnifeController::AccumulateAllHits()
149 MeshScoreMap::iterator it = storedScoreMap.begin();
150 for( ; it != storedScoreMap.end(); it++)
168 ifs.open( fileName.c_str() );
175 for (
G4int c = 0;
c < 4;
c++) ifs.get();
178 ifs.getline(buf, SZ);
180 phiAngles.push_back( phi *
degree );
181 thetaAngles.push_back( theta * degree );
std::map< G4String, G4THitsMap< G4double > * > MeshScoreMap
void ReadFile(std::string fileName)
void Accumulate(G4THitsMap< G4double > *map)
void RotateX(G4double delta)
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
GammaKnifeController(GammaKnifeDetectorConstruction *)
static G4ScoringManager * GetScoringManagerIfExist()
void RotateZ(G4double delta)
static G4RunManager * GetRunManager()
#define GAMMAKNIFE_SOURCES
MeshScoreMap GetScoreMap() const
size_t GetNumberOfMesh() const
G4VScoringMesh * GetMesh(G4int i) const