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