44 #ifndef CEXMC_CHARGE_EXCHANGE_PRODUCTION_MODEL_HH
45 #define CEXMC_CHARGE_EXCHANGE_PRODUCTION_MODEL_HH
59 template <
typename OutputParticle >
79 template <
typename OutputParticle >
84 nucleusParticleMass( 0 ), phaseSpaceGenerator( NULL )
112 #ifdef CEXMC_USE_GENBOD
122 template <
typename OutputParticle >
126 delete phaseSpaceGenerator;
130 template <
typename OutputParticle >
135 theParticleChange.
Clear();
141 const_cast< const G4LorentzRotation & >(
142 theProjectile.GetTrafoToLab() ) );
143 productionModelData.incidentParticleLAB = projectile.
Get4Momentum();
144 productionModelData.incidentParticleLAB.
transform( projToLab );
145 productionModelData.nucleusParticleLAB.
setPx( 0 );
146 productionModelData.nucleusParticleLAB.setPy( 0 );
147 productionModelData.nucleusParticleLAB.setPz( 0 );
148 productionModelData.nucleusParticleLAB.setE( nucleusParticleMass );
150 if ( fermiMotionIsOn )
155 std::sqrt( targetNucleusMomentum.mag2() +
156 nucleusParticleMass * nucleusParticleMass ) );
158 targetNucleusMomentum, targetNucleusEnergy );
160 productionModelData.nucleusParticleLAB.transform( projToLab );
162 productionModelData.nucleusParticleLAB );
165 productionModelData.incidentParticleSCM =
166 productionModelData.incidentParticleLAB;
167 productionModelData.nucleusParticleSCM =
168 productionModelData.nucleusParticleLAB;
170 productionModelData.incidentParticleSCM.boost( -boostVec );
171 productionModelData.nucleusParticleSCM.boost( -boostVec );
173 triggeredAngularRanges.clear();
175 if ( ! phaseSpaceGenerator->CheckKinematics() )
177 theParticleChange.SetEnergyChange( kinEnergy );
178 theParticleChange.SetMomentumChange(
180 return &theParticleChange;
185 phaseSpaceGenerator->Generate();
186 G4double cosTheta( productionModelData.outputParticleSCM.cosTheta() );
187 for ( CexmcAngularRangeList::iterator k( angularRanges.begin() );
188 k != angularRanges.end(); ++k )
190 if ( cosTheta <= k->top && cosTheta > k->bottom )
192 k->top, k->bottom, k->index ) );
194 }
while ( triggeredAngularRanges.empty() );
196 productionModelData.outputParticleLAB =
197 productionModelData.outputParticleSCM;
198 productionModelData.nucleusOutputParticleLAB =
199 productionModelData.nucleusOutputParticleSCM;
201 productionModelData.outputParticleLAB.boost( boostVec );
202 productionModelData.nucleusOutputParticleLAB.boost( boostVec );
205 theParticleChange.SetEnergyChange( 0.0 );
209 productionModelData.outputParticleLAB ) );
210 theParticleChange.AddSecondary( secOutParticle );
212 nucleusOutputParticle,
213 productionModelData.nucleusOutputParticleLAB ) );
214 theParticleChange.AddSecondary( secNeutron );
219 productionModelData.incidentParticle = projectile.
GetDefinition();
221 return &theParticleChange;
G4ParticleDefinition * outputParticle
G4LorentzVector nucleusParticleSCM
const G4ParticleDefinition * nucleusOutputParticle
static G4Proton * Definition()
HepLorentzVector & transform(const HepRotation &)
static G4Neutron * Definition()
const G4ParticleDefinition * incidentParticle
std::vector< CexmcPhaseSpaceOutVectorElement > CexmcPhaseSpaceOutVector
CexmcProductionModelData productionModelData
G4ParticleDefinition * incidentParticle
CexmcChargeExchangeProductionModel()
G4double nucleusParticleMass
G4double GetPDGMass() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &projectile, G4Nucleus &targetNucleus)
~CexmcChargeExchangeProductionModel()
G4ParticleDefinition * nucleusOutputParticle
std::vector< const G4LorentzVector * > CexmcPhaseSpaceInVector
static G4PionMinus * Definition()
const G4ParticleDefinition * outputParticle
const G4ParticleDefinition * nucleusParticle
G4LorentzVector nucleusOutputParticleSCM
const G4LorentzVector & Get4Momentum() const
G4double GetKineticEnergy() const
const G4ParticleDefinition * GetDefinition() const
void SetParticles(const CexmcPhaseSpaceInVector &inVec_, const CexmcPhaseSpaceOutVector &outVec_)
G4LorentzVector incidentParticleSCM
G4LorentzVector outputParticleSCM
G4ThreeVector GetFermiMomentum()
const G4String CexmcChargeExchangeProductionModelName("ChargeExchange")
const G4String CexmcChargeExchangeInteractionName("Cexmc"+CexmcChargeExchangeProductionModelName)
Hep3Vector boostVector() const
CLHEP::HepLorentzVector G4LorentzVector
G4ParticleDefinition * nucleusParticle
CexmcPhaseSpaceGenerator * phaseSpaceGenerator