54 : radius_spherical_source(0.),fLinearNavigator(0),theAccumulatedDepthVector(0)
57 type_of_adjoint_source=
"Spherical";
72 delete theSingleParticleSource;
78 if (type_of_adjoint_source ==
"ExternalSurfaceOfAVolume") {
87 if (costh_to_normal <1.e-4) costh_to_normal =1.e-4;
107 if (type_of_adjoint_source ==
"ExternalSurfaceOfAVolume") {
116 if (costh_to_normal <1.e-4) costh_to_normal =1.e-4;
131 radius_spherical_source = radius;
132 center_spherical_source = center_pos;
133 type_of_adjoint_source =
"Spherical";
147 type_of_adjoint_source =
"ExternalSurfaceOfAVolume";
159 {
if (!fLinearNavigator) fLinearNavigator =
168 if (theAccumulatedDepthVector)
delete theAccumulatedDepthVector;
177 theAccumulatedDepthVector->
InsertValues(acc_length,acc_depth);
179 while (newStep > 0. && thePhysVolume) {
192 theAccumulatedDepthVector->
InsertValues(acc_length,acc_depth);
193 position=position+newStep*direction;
196 newStep =fLinearNavigator->
ComputeStep(position,direction,1.e50,
G4SPSAngDistribution * GetAngDist() const
G4SPSEneDistribution * GetEneDist() const
void SetSphericalAdjointPrimarySource(G4double radius, G4ThreeVector pos)
G4double FindLinearEnergy(G4double rand) const
G4SPSPosDistribution * GetPosDist() const
G4Material * GetMaterial() const
void SetPosDisType(G4String)
void ComputeAccumulatedDepthVectorAlongBackRay(G4ThreeVector glob_pos, G4ThreeVector direction, G4double ekin, G4ParticleDefinition *aPartDef)
CLHEP::Hep3Vector G4ThreeVector
void GenerateAdjointPrimaryVertex(G4Event *anEvt, G4ParticleDefinition *adj_part, G4double E1, G4double E2)
void SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(const G4String &volume_name)
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4double GetDensity() const
G4Navigator * GetNavigatorForTracking() const
G4double SampleDistanceAlongBackRayAndComputeWeightCorrection(G4double &weight_corr)
void InsertValues(G4double energy, G4double value)
void SetMinTheta(G4double)
void SetCentreCoords(G4ThreeVector)
void SetEnergyDisType(G4String)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
void SetPosDisShape(G4String)
void GenerateFwdPrimaryVertex(G4Event *anEvt, G4ParticleDefinition *adj_part, G4double E1, G4double E2)
static G4TransportationManager * GetTransportationManager()
G4AdjointPrimaryGenerator()
void SetAngDistType(G4String)
G4LogicalVolume * GetLogicalVolume() const
void GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume(G4ThreeVector &p, G4ThreeVector &direction)
void DefinePhysicalVolume1(const G4String &aName)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
static G4AdjointPosOnPhysVolGenerator * GetInstance()
static constexpr double pi
static constexpr double halfpi
void GeneratePrimaryVertex(G4Event *evt)
~G4AdjointPrimaryGenerator()
void SetMaxTheta(G4double)
static const G4double pos