44 particle_definition = 0;
45 particle_energy = 1.0*CLHEP::GeV;
47 particle_polarization = zero;
78 G4int iRow = evId / nColumn;
79 G4int iColumn = evId % nColumn;
84 { rayDirection =
G4ThreeVector(-std::tan(angleX)/std::cos(angleY),std::tan(angleY)/std::cos(angleX),1.0); }
86 { rayDirection =
G4ThreeVector(-std::tan(angleX),std::tan(angleY),1.0); }
91 G4double gam = std::atan2(ct*cp*up.
x()+ct*sp*up.
y()-st*up.
z(), -sp*up.
x()+cp*up.
y());
93 rayDirection.
rotateZ(headAngle);
100 DistanceToIn(rayPosition,rayDirection);
101 if(outsideDistance != kInfinity)
102 { rayPosition = rayPosition + (outsideDistance+0.001)*rayDirection; }
121 particle_polarization.
y(),
122 particle_polarization.
z());
131 particle_definition = particleTable->
FindParticle(
"geantino");
132 if(!particle_definition)
135 msg =
" G4RayTracer uses geantino to trace the ray, but your physics list does not\n";
136 msg +=
"define G4Geantino. Please add G4Geantino in your physics list.";
146 stepAngle = viewSpan/100.;
147 viewSpanX = stepAngle*nColumn;
148 viewSpanY = stepAngle*nRow;
152 GetNavigatorForTracking()->GetWorldVolume();
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector & rotateZ(double)
Hep3Vector & rotateUz(const Hep3Vector &)
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
G4VSolid * GetSolid() const
G4double GetPDGMass() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
void SetPolarization(const G4ThreeVector &pol)
void SetKineticEnergy(G4double eKin)
void SetMomentumDirection(const G4ThreeVector &p)
void SetMass(G4double mas)
void SetPrimary(G4PrimaryParticle *pp)
virtual void GeneratePrimaries(G4Event *anEvent)
virtual ~G4RTPrimaryGeneratorAction()
G4RTPrimaryGeneratorAction()
G4ThreeVector eyeDirection
G4ThreeVector eyePosition
static G4TransportationManager * GetTransportationManager()
G4LogicalVolume * GetLogicalVolume() const
virtual EInside Inside(const G4ThreeVector &p) const =0