// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // #ifndef G4GeneralNNCollision_h #define G4GeneralNNCollision_h #include "G4CollisionComposite.hh" #include "G4Proton.hh" #include "G4Neutron.hh" #include "G4HadParticleCodes.hh" #include "G4Pair.hh" class G4GeneralNNCollision : public G4CollisionComposite { public: G4bool IsInCharge(const G4KineticTrack& trk1, const G4KineticTrack& trk2) const { G4bool result = false; G4ParticleDefinition * aD = trk1.GetDefinition(); G4ParticleDefinition * bD = trk2.GetDefinition(); if( (aD==G4Proton::Proton() || aD == G4Neutron::Neutron()) &&(bD==G4Proton::Proton() || bD == G4Neutron::Neutron()) ) result = true; return result; } protected: template struct MakeNNToNDelta { static void Make(G4CollisionComposite * aC) { typedef INT4 theC1; typedef INT4 theC2; typedef INT4 theC3; typedef INT4 theC4; typedef INT4 theC5; typedef INT4 theC6; typedef GROUP6(theC1, theC2, theC3, theC4, theC5, theC6) theChannels; G4CollisionComposite::Resolve aR; G4ForEach::Apply(&aR, aC); }}; template struct MakeNNToNNStar{ static void Make(G4CollisionComposite * aC) { typedef INT4 theC1; typedef INT4 theC2; typedef INT4 theC3; typedef INT4 theC4; typedef GROUP4(theC1, theC2, theC3, theC4) theChannels; G4CollisionComposite::Resolve aR; G4ForEach::Apply(&aR, aC); }}; template struct MakeNNStarToNN{ static void Make(G4CollisionComposite * aC) { typedef INT4 theC1; typedef INT4 theC2; typedef INT4 theC3; typedef INT4 theC4; typedef GROUP4(theC1, theC2, theC3, theC4) theChannels; G4CollisionComposite::Resolve aR; G4ForEach::Apply(&aR, aC); }}; template struct MakeNNToDeltaNstar{ static void Make(G4CollisionComposite * aC) { typedef INT4 theC1; typedef INT4 theC2; typedef INT4 theC3; typedef INT4 theC4; typedef INT4 theC5; typedef INT4 theC6; typedef GROUP6(theC1, theC2, theC3, theC4, theC5, theC6) theChannels; G4CollisionComposite::Resolve aR; G4ForEach::Apply(&aR, aC); }}; template struct MakeNNToDeltaDelta{ static void Make(G4CollisionComposite * aC) { typedef INT4 theC1; typedef INT4 theC2; typedef INT4 theC3; typedef INT4 theC4; typedef INT4 theC5; typedef INT4 theC6; typedef INT4 theC7; typedef INT4 theC8; typedef INT4 theC9; typedef INT4 theC10; typedef GROUP10(theC1, theC2, theC3, theC4, theC5, theC6, theC7, theC8, theC9, theC10) theChannels; G4CollisionComposite::Resolve aR; G4ForEach::Apply(&aR, aC); }}; }; #endif