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;