50 type_of_adjoint_source=
"Spherical";
65 delete theSingleParticleSource;
74 if (type_of_adjoint_source ==
"ExternalSurfaceOfAVolume")
82 theG4AdjointPosOnPhysVolGenerator
85 if (costh_to_normal <1.e-4) { costh_to_normal = 1.e-4; }
107 if (type_of_adjoint_source ==
"ExternalSurfaceOfAVolume")
115 theG4AdjointPosOnPhysVolGenerator
118 if (costh_to_normal <1.e-4) { costh_to_normal =1.e-4; }
136 radius_spherical_source = radius;
137 center_spherical_source = center_pos;
138 type_of_adjoint_source =
"Spherical";
154 type_of_adjoint_source =
"ExternalSurfaceOfAVolume";
166 if (fLinearNavigator ==
nullptr)
177 delete theAccumulatedDepthVector;
182 theAccumulatedDepthVector->
InsertValues(acc_length,acc_depth);
184 while (newStep > 0. && thePhysVolume !=
nullptr)
189 theAccumulatedDepthVector->
InsertValues(acc_length,acc_depth);
191 thePhysVolume = fLinearNavigator
CLHEP::Hep3Vector G4ThreeVector
void GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume(G4ThreeVector &p, G4ThreeVector &direction)
void DefinePhysicalVolume1(const G4String &aName)
static G4AdjointPosOnPhysVolGenerator * GetInstance()
void SetSphericalAdjointPrimarySource(G4double radius, G4ThreeVector pos)
void SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(const G4String &v_name)
void GenerateAdjointPrimaryVertex(G4Event *anEvt, G4ParticleDefinition *adj_part, G4double E1, G4double E2)
G4double SampleDistanceAlongBackRayAndComputeWeightCorrection(G4double &weight_corr)
void GenerateFwdPrimaryVertex(G4Event *anEvt, G4ParticleDefinition *adj_part, G4double E1, G4double E2)
void ComputeAccumulatedDepthVectorAlongBackRay(G4ThreeVector glob_pos, G4ThreeVector direction, G4double ekin, G4ParticleDefinition *aPDef)
G4AdjointPrimaryGenerator()
~G4AdjointPrimaryGenerator()
G4Material * GetMaterial() const
G4double GetDensity() const
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=nullptr, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
void InsertValues(const G4double energy, const G4double value)
G4double FindLinearEnergy(const G4double rand) const
void SetAngDistType(const G4String &)
void SetMaxTheta(G4double)
void SetMinTheta(G4double)
void SetParticleMomentumDirection(const G4ParticleMomentum &aMomDirection)
void SetEnergyDisType(const G4String &)
void SetPosDisShape(const G4String &)
void SetCentreCoords(const G4ThreeVector &)
void SetPosDisType(const G4String &)
void GeneratePrimaryVertex(G4Event *evt) override
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4SPSAngDistribution * GetAngDist() const
G4SPSEneDistribution * GetEneDist() const
G4SPSPosDistribution * GetPosDist() const
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4LogicalVolume * GetLogicalVolume() const