Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GammaKnifeController Class Reference

#include <GammaKnifeController.hh>

Public Member Functions

 GammaKnifeController (GammaKnifeDetectorConstruction *)
 
 ~GammaKnifeController ()
 
void BeamOn (G4int)
 
void ReadFile (std::string fileName)
 

Detailed Description

Definition at line 44 of file GammaKnifeController.hh.

Constructor & Destructor Documentation

GammaKnifeController::GammaKnifeController ( GammaKnifeDetectorConstruction det)

Definition at line 35 of file GammaKnifeController.cc.

35  : scoreMaps( 0 )
36 {
37  detector = det;
38 
39  messenger = new GammaKnifeMessenger( this );
40 }
GammaKnifeController::~GammaKnifeController ( )

Definition at line 42 of file GammaKnifeController.cc.

43 {
44  delete messenger;
45 }

Member Function Documentation

void GammaKnifeController::BeamOn ( G4int  n_event)

Definition at line 47 of file GammaKnifeController.cc.

48 {
49  PrepareHitsAccumulation();
50  for (G4int i = 0; i < GAMMAKNIFE_SOURCES; i++)
51  {
52  RotateForward(i);
54 
55  if (i != (GAMMAKNIFE_SOURCES - 1))
56  StoreHits();
57 
58  RotateBack(i);
59  }
60  AccumulateAllHits();
61 }
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
int G4int
Definition: G4Types.hh:78
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define GAMMAKNIFE_SOURCES

Here is the call graph for this function:

Here is the caller graph for this function:

void GammaKnifeController::ReadFile ( std::string  fileName)

Definition at line 169 of file GammaKnifeController.cc.

170 {
171  //G4cout << "Enter ReadFile()...";
172  const int SZ = 100;
173  char buf[SZ];
174 
175  phiAngles.clear(); // If called for the second time
176  thetaAngles.clear(); // we won't have 402 positions...
177 
178  std::ifstream ifs;
179  ifs.open( fileName.c_str() );
180 
181  for (G4int i = 0; i < GAMMAKNIFE_SOURCES; i++)
182  {
183  G4double phi, theta;
184 
185  /* Skip the "Axx" at the beginning of the line */
186  for (G4int c = 0; c < 4; c++) ifs.get();
187 
188  ifs >> phi >> theta;
189  ifs.getline(buf, SZ); // Next line
190 
191  phiAngles.push_back( phi * degree );
192  thetaAngles.push_back( theta * degree );
193  }
194  ifs.close();
195  //G4cout << "... done " << G4endl;
196 }
int G4int
Definition: G4Types.hh:78
static constexpr double degree
Definition: G4SIunits.hh:144
#define GAMMAKNIFE_SOURCES
double G4double
Definition: G4Types.hh:76
tuple c
Definition: test.py:13

Here is the caller graph for this function:


The documentation for this class was generated from the following files: