123 std::vector< std::pair< G4int, G4ThreeVector > > proton;
124 std::vector< std::pair< G4int, G4ThreeVector > > neutron;
125 std::vector< std::pair< G4int, G4ThreeVector > > antiproton;
126 std::vector< std::pair< G4int, G4ThreeVector > > antineutron;
127 for (
unsigned int i = 0; i < result->size(); ++i ) {
128 G4int pdgid = result->operator[](i)->GetDefinition()->GetPDGEncoding();
129 if ( pdgid == 2212 ) {
130 proton.push_back( std::make_pair( i, result->operator[](i)->GetMomentum() ) );
131 result->erase( result->begin() + i );
134 for (
unsigned int i = 0; i < result->size(); ++i ) {
135 G4int pdgid = result->operator[](i)->GetDefinition()->GetPDGEncoding();
136 if ( pdgid == 2112 ) {
137 neutron.push_back( std::make_pair( i, result->operator[](i)->GetMomentum() ) );
138 result->erase( result->begin() + i );
141 for (
unsigned int i = 0; i < result->size(); ++i ) {
142 G4int pdgid = result->operator[](i)->GetDefinition()->GetPDGEncoding();
143 if ( pdgid == -2212 ) {
144 antiproton.push_back( std::make_pair( i, result->operator[](i)->GetMomentum() ) );
145 result->erase( result->begin() + i );
148 for (
unsigned int i = 0; i < result->size(); ++i ) {
149 G4int pdgid = result->operator[](i)->GetDefinition()->GetPDGEncoding();
150 if ( pdgid == -2112 ) {
151 antineutron.push_back( std::make_pair( i, result->operator[](i)->GetMomentum() ) );
152 result->erase( result->begin() + i );
156 for (
unsigned int i = 0; i < proton.size(); ++i ) {
157 if ( proton.at(i).first == -1 )
continue;
161 if ( partner1 == -1 ) {
166 G4double totalEnergy = std::sqrt( p1.
mag()*p1.
mag() + massp*massp );
170 result->push_back( finalp );
174 PushDeuteron( p1, p2, 1, result );
175 neutron.at(partner1).first = -1;
178 for (
unsigned int i = 0; i < neutron.size(); ++i ) {
179 if ( neutron.at(i).first == -1 )
continue;
185 G4double totalEnergy = std::sqrt( p2.
mag()*p2.
mag() + massn*massn );
189 result->push_back( finaln );
192 for (
unsigned int i = 0; i < antiproton.size(); ++i ) {
193 if ( antiproton.at(i).first == -1 )
continue;
195 int partner1 = FindPartner( p1,
G4Proton::Proton()->GetPDGMass(), antineutron,
197 if ( partner1 == -1 ) {
202 G4double totalEnergy = std::sqrt( p1.
mag()*p1.
mag() + massp*massp );
206 result->push_back( finalpbar );
210 PushDeuteron( p1, p2, -1, result );
211 antineutron.at(partner1).first = -1;
214 for (
unsigned int i = 0; i < antineutron.size(); ++i ) {
215 if ( antineutron.at(i).first == -1 )
continue;
221 G4double totalEnergy = std::sqrt( p2.
mag()*p2.
mag() + massn*massn );
225 result->push_back( finalnbar );
292 G4double deltaP = GetPcm( p1x, p1y, p1z, m1, p2x, p2y, p2z, m2 );
308 G4double scm = GetS( p1x, p1y, p1z, m1, p2x, p2y, p2z, m2 );
G4double GetPDGMass() const
G4int GetPDGEncoding() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * FindAntiParticle(G4int PDGEncoding)