118 G4warn <<
"Illegal application state - Trace() ignored." <<
G4endl;
124 G4warn <<
"Figure file maker class is not specified - Trace() ignored." <<
G4endl;
130 if(storeTrajectory==0) UI->
ApplyCommand(
"/tracking/storeTrajectory 1");
145 G4warn <<
"You might set the eye position outside of the world volume" <<
G4endl; }
148 if(storeTrajectory==0) UI->
ApplyCommand(
"/tracking/storeTrajectory 0");
209 GetNavigatorForTracking()->GetWorldVolume();
238 G4double angleX = -(viewSpanX/2. - (iColumn+dColumn)*stepAngle);
239 G4double angleY = viewSpanY/2. - (iRow+dRow)*stepAngle;
243 rayDirection =
G4ThreeVector(-std::tan(angleX)/std::cos(angleY),std::tan(angleY)/std::cos(angleX),1.0);
247 rayDirection =
G4ThreeVector(-std::tan(angleX),std::tan(angleY),1.0);
258 G4bool interceptable =
true;
266 DistanceToIn(rayPosition,rayDirection);
267 if (outsideDistance != kInfinity) {
272 rayPosition = rayPosition+(outsideDistance+0.001)*rayDirection;
275 interceptable =
false;
296 if(!succeeded)
return false;
315 if(!trajectory)
return false;
318 if(nPoint==0)
return false;
325 for(
G4int i=nPoint-2;i>=0;--i)
343 return G4Colour(red,green,blue,alpha);
356 if(!preVis&&!postVis)
return transparent;
371 (red*brill,green*brill,blue*brill,preAttColour.
GetAlpha());
374 { preCol = transparent; }
384 (red*brill,green*brill,blue*brill,postAttColour.
GetAlpha());
387 { postCol = transparent; }
389 if(!preVis)
return postCol;
390 if(!postVis)
return preCol;
402 if(!visible)
return sourceCol;
412 if(stepAlpha > 0.9999999){ stepAlpha = 0.9999999; }
415 G4double KtRed = std::exp((1.0-stepRed)*attenuationFuctor);
416 G4double KtGreen = std::exp((1.0-stepGreen)*attenuationFuctor);
417 G4double KtBlue = std::exp((1.0-stepBlue)*attenuationFuctor);
418 if(KtRed>1.0){KtRed=1.0;}
419 if(KtGreen>1.0){KtGreen=1.0;}
420 if(KtBlue>1.0){KtBlue=1.0;}
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector & rotateZ(double)
Hep3Vector & rotateUz(const Hep3Vector &)
G4double GetAlpha() const
G4double GetGreen() const
G4UserTrackingAction * GetUserTrackingAction()
void SetUserAction(G4UserEventAction *userAction)
G4UserSteppingAction * GetUserSteppingAction()
G4UserStackingAction * GetUserStackingAction()
G4UserEventAction * GetUserEventAction()
static G4EventManager * GetEventManager()
void ProcessOneEvent(G4Event *anEvent)
G4TrajectoryContainer * GetTrajectoryContainer() const
static G4Geantino * GeantinoDefinition()
static G4GeometryManager * GetInstance()
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=nullptr)
void OpenGeometry(G4VPhysicalVolume *vol=nullptr)
G4VSolid * GetSolid() const
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=nullptr, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4ProcessManager * GetProcessManager() const
G4ProcessVector * GetProcessList() const
void UpdateCoupleTable(G4VPhysicalVolume *currentWorld)
static G4ProductionCutsTable * GetProductionCutsTable()
static G4RTMessenger * GetInstance(G4TheRayTracer *p1)
void Shoot(G4Event *evt, G4ThreeVector vtx, G4ThreeVector direc)
G4ThreeVector GetSurfaceNormal() const
const G4VisAttributes * GetPostStepAtt() const
G4double GetStepLength() const
const G4VisAttributes * GetPreStepAtt() const
G4RayTrajectoryPoint * GetPointC(G4int i) const
virtual G4int GetPointEntries() const
static G4RegionStore * GetInstance()
void UpdateMaterialList(G4VPhysicalVolume *currentWorld=nullptr)
void Activate(G4String dName, G4bool activeFlag)
static G4SDManager * GetSDMpointerIfExist()
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()
G4bool SetNewState(const G4ApplicationState &requestedState)
G4ThreeVector eyeDirection
G4RTTrackingAction * theRayTracerTrackingAction
G4UserTrackingAction * theUserTrackingAction
G4bool GenerateColour(G4Event *anEvent)
G4RTSteppingAction * theRayTracerSteppingAction
virtual void StoreUserActions()
static G4VRTScanner * theScanner
G4ThreeVector lightDirection
G4EventManager * theEventManager
static G4VFigureFileMaker * theFigMaker
G4UserStackingAction * theRayTracerStackingAction
G4UserEventAction * theUserEventAction
virtual void Trace(const G4String &fileName)
G4UserSteppingAction * theUserSteppingAction
G4Colour Attenuate(G4RayTrajectoryPoint *point, const G4Colour &sourceCol)
virtual ~G4TheRayTracer()
G4Colour backgroundColour
G4double attenuationLength
virtual G4bool CreateBitMap()
G4Colour GetSurfaceColour(G4RayTrajectoryPoint *point)
G4ThreeVector targetPosition
void CreateFigureFile(const G4String &fileName)
G4UserEventAction * theRayTracerEventAction
G4UserStackingAction * theUserStackingAction
G4ThreeVector eyePosition
virtual void RestoreUserActions()
G4TheRayTracer(G4VFigureFileMaker *figMaker=0, G4VRTScanner *scanner=0)
G4RTMessenger * theMessenger
G4RayShooter * theRayShooter
G4bool ValidColour(const G4VisAttributes *visAtt)
G4Colour GetMixedColour(const G4Colour &surfCol, const G4Colour &transCol, G4double weight=0.5)
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4int ApplyCommand(const char *aCommand)
G4int GetCurrentIntValue(const char *aCommand, G4int parameterNumber=1, G4bool reGet=true)
static G4UImanager * GetUIpointer()
G4LogicalVolume * GetLogicalVolume() const
virtual void Initialize(G4int nRow, G4int nColumn)=0
virtual void Draw(unsigned char red, unsigned char green, unsigned char blue)
virtual G4bool Coords(G4int &iRow, G4int &iColumn)=0
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual void IgnoreStateChanges(G4bool)
static G4VVisManager * GetConcreteInstance()
const G4Colour & GetColour() const
ForcedDrawingStyle GetForcedDrawingStyle() const
G4bool IsForceDrawingStyle() const