114 G4cerr <<
"Illegal application state - Trace() ignored." <<
G4endl;
120 G4cerr <<
"Figure file maker class is not specified - Trace() ignored." <<
G4endl;
126 if(storeTrajectory==0) UI->
ApplyCommand(
"/tracking/storeTrajectory 1");
141 G4cerr <<
"You might set the eye position outside of the world volume" <<
G4endl; }
144 if(storeTrajectory==0) UI->
ApplyCommand(
"/tracking/storeTrajectory 0");
205 GetNavigatorForTracking()->GetWorldVolume();
210 for (
G4int j=0; j < pVector->
size(); ++j) {
231 G4int iCoord = iRow * nColumn + iColumn;
234 G4double angleX = -(viewSpanX/2. - (iColumn+dColumn)*stepAngle);
235 G4double angleY = viewSpanY/2. - (iRow+dRow)*stepAngle;
239 rayDirection =
G4ThreeVector(-std::tan(angleX)/std::cos(angleY),std::tan(angleY)/std::cos(angleX),1.0);
243 rayDirection =
G4ThreeVector(-std::tan(angleX),std::tan(angleY),1.0);
254 G4bool interceptable =
true;
262 DistanceToIn(rayPosition,rayDirection);
268 rayPosition = rayPosition+(outsideDistance+0.001)*rayDirection;
271 interceptable =
false;
292 if(!succeeded)
return false;
311 if(!trajectory)
return false;
314 if(nPoint==0)
return false;
321 for(
int i=nPoint-2;i>=0;i--)
339 return G4Colour(red,green,blue,alpha);
352 if(!preVis&&!postVis)
return transparent;
367 (red*brill,green*brill,blue*brill,preAttColour.
GetAlpha());
370 { preCol = transparent; }
380 (red*brill,green*brill,blue*brill,postAttColour.
GetAlpha());
383 { postCol = transparent; }
385 if(!preVis)
return postCol;
386 if(!postVis)
return preCol;
397 G4bool visible = ValidColour(preAtt);
398 if(!visible)
return sourceCol;
408 if(stepAlpha > 0.9999999){ stepAlpha = 0.9999999; }
409 attenuationFuctor = -stepAlpha/(1.0-stepAlpha)*stepLength/attenuationLength;
411 G4double KtRed = std::exp((1.0-stepRed)*attenuationFuctor);
412 G4double KtGreen = std::exp((1.0-stepGreen)*attenuationFuctor);
413 G4double KtBlue = std::exp((1.0-stepBlue)*attenuationFuctor);
414 if(KtRed>1.0){KtRed=1.0;}
415 if(KtGreen>1.0){KtGreen=1.0;}
416 if(KtBlue>1.0){KtBlue=1.0;}
G4bool ValidColour(const G4VisAttributes *visAtt)
G4RTSteppingAction * theRayTracerSteppingAction
virtual void Initialize(G4int nRow, G4int nColumn)=0
G4ThreeVector targetPosition
virtual G4bool Coords(G4int &iRow, G4int &iColumn)=0
G4ThreeVector eyePosition
G4bool SetNewState(G4ApplicationState requestedState)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector lightDirection
virtual G4bool CreateBitMap()
G4LogicalVolume * GetLogicalVolume() const
static const G4double kInfinity
static G4RTMessenger * GetInstance(G4TheRayTracer *p1)
G4int ApplyCommand(const char *aCommand)
G4ThreeVector GetSurfaceNormal() const
void ProcessOneEvent(G4Event *anEvent)
ForcedDrawingStyle GetForcedDrawingStyle() const
G4UserStackingAction * theRayTracerStackingAction
static double normal(HepRandomEngine *eptr)
Hep3Vector & rotateUz(const Hep3Vector &)
virtual void RestoreUserActions()
G4VFigureFileMaker * theFigMaker
G4Colour GetMixedColour(const G4Colour &surfCol, const G4Colour &transCol, G4double weight=0.5)
G4Navigator * GetNavigatorForTracking() const
G4RayTrajectoryPoint * GetPointC(G4int i) const
G4bool GenerateColour(G4Event *anEvent)
void CreateFigureFile(const G4String &fileName)
G4double GetStepLength() const
G4ProcessVector * GetProcessList() const
void UpdateMaterialList(G4VPhysicalVolume *currentWorld=0)
void SetUserAction(G4UserEventAction *userAction)
static G4UImanager * GetUIpointer()
virtual int GetPointEntries() const
G4UserSteppingAction * theUserSteppingAction
virtual EInside Inside(const G4ThreeVector &p) const =0
static G4VVisManager * GetConcreteInstance()
virtual void StoreUserActions()
virtual ~G4TheRayTracer()
static constexpr double m
virtual void Trace(const G4String &fileName)
G4UserEventAction * theRayTracerEventAction
G4VRTScanner * theScanner
static constexpr double deg
G4Colour backgroundColour
static G4SDManager * GetSDMpointerIfExist()
static G4GeometryManager * GetInstance()
G4TrajectoryContainer * GetTrajectoryContainer() const
static const G4double alpha
static G4EventManager * GetEventManager()
G4Colour GetSurfaceColour(G4RayTrajectoryPoint *point)
G4UserEventAction * GetUserEventAction()
G4RayShooter * theRayShooter
virtual void IgnoreStateChanges(G4bool)
void OpenGeometry(G4VPhysicalVolume *vol=0)
virtual void Draw(unsigned char red, unsigned char green, unsigned char blue)
G4ThreeVector eyeDirection
G4double attenuationLength
G4GLOB_DLL std::ostream G4cerr
G4UserSteppingAction * GetUserSteppingAction()
G4RTMessenger * theMessenger
Hep3Vector & rotateZ(double)
static G4TransportationManager * GetTransportationManager()
void Activate(G4String dName, G4bool activeFlag)
static G4ProductionCutsTable * GetProductionCutsTable()
const G4VisAttributes * GetPostStepAtt() const
G4EventManager * theEventManager
G4RTTrackingAction * theRayTracerTrackingAction
G4UserStackingAction * GetUserStackingAction()
G4UserTrackingAction * theUserTrackingAction
static G4RegionStore * GetInstance()
G4bool IsForceDrawingStyle() const
G4ApplicationState GetCurrentState() const
G4ProcessManager * GetProcessManager() const
const G4VisAttributes * GetPreStepAtt() const
G4int GetCurrentIntValue(const char *aCommand, G4int parameterNumber=1, G4bool reGet=true)
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=0)
G4double GetAlpha() const
G4VSolid * GetSolid() const
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
void Shoot(G4Event *evt, G4ThreeVector vtx, G4ThreeVector direc)
G4double GetGreen() const
static G4Geantino * GeantinoDefinition()
G4Colour Attenuate(G4RayTrajectoryPoint *point, const G4Colour &sourceCol)
G4TheRayTracer(G4VFigureFileMaker *figMaker=0, G4VRTScanner *scanner=0)
void UpdateCoupleTable(G4VPhysicalVolume *currentWorld)
const G4Colour & GetColour() const
G4UserStackingAction * theUserStackingAction
static G4StateManager * GetStateManager()
G4UserTrackingAction * GetUserTrackingAction()
G4UserEventAction * theUserEventAction