59 outputParticleMass( 0 ), nucleusOutputParticleMass( 0 ),
60 useTableMass(
false ), useMassCut(
false ), massCutOPCenter( 0 ),
61 massCutNOPCenter( 0 ), massCutOPWidth( 0 ), massCutNOPWidth( 0 ),
62 massCutEllipseAngle( 0 ), useAbsorbedEnergyCut(
false ),
63 absorbedEnergyCutCLCenter( 0 ), absorbedEnergyCutCRCenter( 0 ),
64 absorbedEnergyCutCLWidth( 0 ), absorbedEnergyCutCRWidth( 0 ),
65 absorbedEnergyCutEllipseAngle( 0 ), expectedMomentumAmp( -1 ),
67 hasMassCutTriggered(
false ), hasAbsorbedEnergyCutTriggered(
false ),
68 beamParticleIsInitialized(
false ), particleGun( NULL ), messenger( NULL )
70 if ( ! productionModel )
79 static_cast< const CexmcPrimaryGeneratorAction * >(
82 const_cast< CexmcPrimaryGeneratorAction * >(
83 primaryGeneratorAction ) );
157 calorimeterEDRight * ( 1 - cosTheAngle ) );
160 opdpLeftMomentum.
setMag( calorimeterEDLeft );
162 opdpRightMomentum.
setMag( calorimeterEDRight );
163 G4ThreeVector opMomentum( opdpLeftMomentum + opdpRightMomentum );
180 incidentParticleMomentum *= incidentParticleMomentumAmp;
184 G4double incidentParticlePDGMass2( incidentParticlePDGMass *
185 incidentParticlePDGMass );
187 std::sqrt( incidentParticleMomentumAmp * incidentParticleMomentumAmp +
188 incidentParticlePDGMass2 ) );
191 incidentParticleMomentum, incidentParticleEnergy );
218 G4ThreeVector nopMomentum( incidentParticleMomentum - opMomentum );
219 G4double nopEnergy( incidentParticleEnergy + nucleusParticlePDGMass -
222 nopMomentum.
mag2() );
240 cosMassCutEllipseAngle +
242 sinMassCutEllipseAngle, 2 ) / massCutOPWidth2 +
244 sinMassCutEllipseAngle +
246 cosMassCutEllipseAngle, 2 ) / massCutNOPWidth2 <
253 G4double cosAbsorbedEnergyCutEllipseAngle(
255 G4double sinAbsorbedEnergyCutEllipseAngle(
271 cosAbsorbedEnergyCutEllipseAngle +
273 sinAbsorbedEnergyCutEllipseAngle, 2 ) /
274 absorbedEnergyCutCLWidth2 +
276 sinAbsorbedEnergyCutEllipseAngle +
278 cosAbsorbedEnergyCutEllipseAngle, 2 ) /
279 absorbedEnergyCutCRWidth2 <