57 theUserEventAction = 0;
58 theUserStackingAction = 0;
59 theUserTrackingAction = 0;
60 theUserSteppingAction = 0;
62 theMatScannerEventAction = 0;
63 theMatScannerStackingAction = 0;
64 theMatScannerTrackingAction = 0;
65 theMatScannerSteppingAction = 0;
75 regionSensitive =
false;
76 regionName =
"notDefined";
83 delete theMatScannerSteppingAction;
93 G4cerr <<
"Illegal application state - Scan() ignored." <<
G4endl;
97 if(!theMatScannerSteppingAction)
101 RestoreUserActions();
104 void G4MaterialScanner::StoreUserActions()
125 void G4MaterialScanner::RestoreUserActions()
137 void G4MaterialScanner::DoScan()
164 for(
G4int iTheta=0;iTheta<nTheta;iTheta++)
172 G4cout <<
" Theta(deg) Phi(deg) Length(mm) x0 lambda0" <<
G4endl;
174 for(
G4int iPhi=0;iPhi<nPhi;iPhi++)
180 std::cos(theta)*std::sin(phi),
182 theRayShooter->
Shoot(anEvent,eyePosition,eyeDirection);
183 theMatScannerSteppingAction->
Initialize(regionSensitive,theRegion);
190 << std::setw(11) << theta/
deg <<
" "
191 << std::setw(11) << phi/
deg <<
" "
192 << std::setw(11) << length/
mm <<
" "
193 << std::setw(11) << x0 <<
" "
194 << std::setw(11) << lambda <<
G4endl;
195 aveLength += length/
mm;
202 G4cout <<
" ave. for theta = " << std::setw(11) << theta/
deg <<
" : "
203 << std::setw(11) << aveLength/nPhi <<
" "
204 << std::setw(11) << aveX0/nPhi <<
" "
205 << std::setw(11) << aveLambda/nPhi <<
G4endl;
224 G4cerr <<
"Region <" << val <<
"> not found. Command ignored." <<
G4endl;
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
CLHEP::Hep3Vector G4ThreeVector
G4bool SetRegionName(const G4String &val)
G4Navigator * GetNavigatorForTracking() const
void Initialize(G4bool rSens, G4Region *reg)
static G4RunManagerKernel * GetRunManagerKernel()
G4UserEventAction * GetUserEventAction()
static G4RegionStore * GetInstance()
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4bool SetNewState(G4ApplicationState requestedState)
void Activate(G4String dName, G4bool activeFlag)
G4UserSteppingAction * GetUserSteppingAction()
G4ApplicationState GetCurrentState() const
static G4GeometryManager * GetInstance()
G4double GetTotalStepLength() const
static G4TransportationManager * GetTransportationManager()
G4double GetLambda0() const
void Shoot(G4Event *evt, G4ThreeVector vtx, G4ThreeVector direc)
void SetUserAction(G4UserEventAction *userAction)
G4UserTrackingAction * GetUserTrackingAction()
static G4EventManager * GetEventManager()
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
void OpenGeometry(G4VPhysicalVolume *vol=0)
void ProcessOneEvent(G4Event *anEvent)
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=0)
G4UserStackingAction * GetUserStackingAction()
G4GLOB_DLL std::ostream G4cerr
static G4SDManager * GetSDMpointerIfExist()