106 G4cerr <<
"Illegal application state - Trace() ignored." <<
G4endl;
112 G4cerr <<
"Figure file maker class is not specified - Trace() ignored." <<
G4endl;
118 if(storeTrajectory==0) UI->
ApplyCommand(
"/tracking/storeTrajectory 1");
133 G4cerr <<
"You might set the eye position outside of the world volume" <<
G4endl; }
136 if(storeTrajectory==0) UI->
ApplyCommand(
"/tracking/storeTrajectory 0");
197 GetNavigatorForTracking()->GetWorldVolume();
202 for (
G4int j=0; j < pVector->
size(); ++j) {
223 G4int iCoord = iRow * nColumn + iColumn;
226 G4double angleX = -(viewSpanX/2. - (iColumn+dColumn)*stepAngle);
227 G4double angleY = viewSpanY/2. - (iRow+dRow)*stepAngle;
231 rayDirection =
G4ThreeVector(-std::tan(angleX)/std::cos(angleY),std::tan(angleY)/std::cos(angleX),1.0);
235 rayDirection =
G4ThreeVector(-std::tan(angleX),std::tan(angleY),1.0);
246 G4bool interceptable =
true;
254 DistanceToIn(rayPosition,rayDirection);
255 if (outsideDistance != kInfinity) {
260 rayPosition = rayPosition+(outsideDistance+0.001)*rayDirection;
263 interceptable =
false;
284 if(!succeeded)
return false;
303 if(!trajectory)
return false;
306 if(nPoint==0)
return false;
313 for(
int i=nPoint-2;i>=0;i--)
331 return G4Colour(red,green,blue,alpha);
344 if(!preVis&&!postVis)
return transparent;
359 (red*brill,green*brill,blue*brill,preAttColour.
GetAlpha());
362 { preCol = transparent; }
372 (red*brill,green*brill,blue*brill,postAttColour.
GetAlpha());
375 { postCol = transparent; }
377 if(!preVis)
return postCol;
378 if(!postVis)
return preCol;
389 G4bool visible = ValidColour(preAtt);
390 if(!visible)
return sourceCol;
400 if(stepAlpha > 0.9999999){ stepAlpha = 0.9999999; }
401 attenuationFuctor = -stepAlpha/(1.0-stepAlpha)*stepLength/attenuationLength;
403 G4double KtRed = std::exp((1.0-stepRed)*attenuationFuctor);
404 G4double KtGreen = std::exp((1.0-stepGreen)*attenuationFuctor);
405 G4double KtBlue = std::exp((1.0-stepBlue)*attenuationFuctor);
406 if(KtRed>1.0){KtRed=1.0;}
407 if(KtGreen>1.0){KtGreen=1.0;}
408 if(KtBlue>1.0){KtBlue=1.0;}
virtual void StoreUserActions()
static G4Geantino * GeantinoDefinition()
G4double GetAlpha() const
void UpdateMaterialList(G4VPhysicalVolume *currentWorld=0)
G4Colour GetSurfaceColour(G4RayTrajectoryPoint *point)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector targetPosition
static G4VVisManager * GetConcreteInstance()
G4Colour Attenuate(G4RayTrajectoryPoint *point, const G4Colour &sourceCol)
G4UserStackingAction * theRayTracerStackingAction
G4UserStackingAction * theUserStackingAction
G4RTSteppingAction * theRayTracerSteppingAction
G4UserTrackingAction * theUserTrackingAction
G4RayShooter * theRayShooter
G4UserSteppingAction * theUserSteppingAction
virtual void RestoreUserActions()
const G4VisAttributes * GetPreStepAtt() const
G4Navigator * GetNavigatorForTracking() const
const G4Colour & GetColour() const
static G4RTMessenger * GetInstance(G4TheRayTracer *p1)
virtual G4bool Coords(G4int &iRow, G4int &iColumn)=0
void CreateFigureFile(const G4String &fileName)
G4VRTScanner * theScanner
G4ThreeVector eyeDirection
G4ProcessManager * GetProcessManager() const
G4TrajectoryContainer * GetTrajectoryContainer() const
G4UserEventAction * GetUserEventAction()
virtual int GetPointEntries() const
G4UserEventAction * theUserEventAction
static G4UImanager * GetUIpointer()
static G4RegionStore * GetInstance()
G4ThreeVector lightDirection
static G4StateManager * GetStateManager()
virtual void Draw(unsigned char red, unsigned char green, unsigned char blue)
virtual void Trace(const G4String &fileName)
G4bool SetNewState(G4ApplicationState requestedState)
virtual void IgnoreStateChanges(G4bool)
virtual void Initialize(G4int nRow, G4int nColumn)=0
virtual EInside Inside(const G4ThreeVector &p) const =0
void Activate(G4String dName, G4bool activeFlag)
G4UserSteppingAction * GetUserSteppingAction()
G4double GetGreen() const
Hep3Vector & rotateUz(const Hep3Vector &)
Hep3Vector & rotateZ(double)
G4Colour GetMixedColour(const G4Colour &surfCol, const G4Colour &transCol, G4double weight=0.5)
virtual G4bool CreateBitMap()
G4ThreeVector GetSurfaceNormal() const
G4ApplicationState GetCurrentState() const
static G4GeometryManager * GetInstance()
G4int GetCurrentIntValue(const char *aCommand, G4int parameterNumber=1, G4bool reGet=true)
static G4TransportationManager * GetTransportationManager()
const G4VisAttributes * GetPostStepAtt() const
G4EventManager * theEventManager
G4bool ValidColour(const G4VisAttributes *visAtt)
static G4ProductionCutsTable * GetProductionCutsTable()
G4RTTrackingAction * theRayTracerTrackingAction
G4LogicalVolume * GetLogicalVolume() const
G4VFigureFileMaker * theFigMaker
void Shoot(G4Event *evt, G4ThreeVector vtx, G4ThreeVector direc)
void SetUserAction(G4UserEventAction *userAction)
G4RayTrajectoryPoint * GetPointC(G4int i) const
G4UserTrackingAction * GetUserTrackingAction()
G4bool IsForceDrawingStyle() const
G4UserEventAction * theRayTracerEventAction
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)
void UpdateCoupleTable(G4VPhysicalVolume *currentWorld)
G4Colour backgroundColour
G4double GetStepLength() const
G4ThreeVector eyePosition
G4TheRayTracer(G4VFigureFileMaker *figMaker=0, G4VRTScanner *scanner=0)
G4double attenuationLength
G4RTMessenger * theMessenger
ForcedDrawingStyle GetForcedDrawingStyle() const
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=0)
G4bool GenerateColour(G4Event *anEvent)
G4UserStackingAction * GetUserStackingAction()
virtual ~G4TheRayTracer()
G4int ApplyCommand(const char *aCommand)
G4ProcessVector * GetProcessList() const
G4VSolid * GetSolid() const
G4GLOB_DLL std::ostream G4cerr
static G4SDManager * GetSDMpointerIfExist()