G4BinaryCascade.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 //
00028 // -------------------------------------------------------------------
00029 //      GEANT4 Class file
00030 //
00031 //
00032 //      File name:    G4BinaryCascade.hh
00033 //
00034 //      Authors: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
00035 //               Hans-Peter Wellisch
00036 //               Gunter Folger
00037 //
00038 //      Creation date: 8 June 2000
00039 //
00040 // -----------------------------------------------------------------------------
00041 
00042 #ifndef G4BinaryCascade_hh
00043 #define G4BinaryCascade_hh
00044 
00045 #include "G4VIntraNuclearTransportModel.hh"
00046 #include "G4ReactionProductVector.hh"
00047 #include "G4KineticTrackVector.hh"
00048 #include "G4ListOfCollisions.hh"
00049 #include "G4V3DNucleus.hh"
00050 #include "G4Fancy3DNucleus.hh"
00051 #include "G4Fragment.hh"
00052 #include "G4VFieldPropagation.hh"
00053 #include "G4VScatterer.hh"
00054 #include "G4LorentzVector.hh"
00055 #include "G4LorentzRotation.hh"
00056 
00057 #include "G4BCDecay.hh"
00058 #include "G4BCLateParticle.hh"
00059 #include "G4BCAction.hh"
00060 
00061 #include "G4DecayKineticTracks.hh"
00062 
00063 class G4CollisionManager;
00064 
00065 class G4Track;
00066 class G4KineticTrack;
00067 class G43DNucleus;
00068 class G4Scatterer;
00069 
00070 class G4BinaryCascade : public G4VIntraNuclearTransportModel
00071 {
00072 public:
00073 
00074   G4BinaryCascade(G4VPreCompoundModel* ptr = 0);
00075 
00076   virtual ~G4BinaryCascade();
00077 
00078   G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
00079                                               G4Nucleus& theNucleus);
00080   virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *,
00081                                               G4V3DNucleus *);
00082 
00083   virtual void ModelDescription(std::ostream&) const;
00084   virtual void PropagateModelDescription(std::ostream&) const;
00085 
00086 private:
00087 
00088   G4BinaryCascade(const G4BinaryCascade & right);
00089   const G4BinaryCascade& operator=(G4BinaryCascade & right);
00090   G4int operator==(G4BinaryCascade& right) {return (this == &right);}
00091   G4int operator!=(G4BinaryCascade& right) {return (this != &right);}
00092 
00093 // Implementation
00094   void PrintWelcomeMessage();
00095   void BuildTargetList();
00096   G4bool  BuildLateParticleCollisions(G4KineticTrackVector * secondaries);
00097   void FindCollisions(G4KineticTrackVector *);
00098   void FindDecayCollision(G4KineticTrack *);
00099   void FindLateParticleCollision(G4KineticTrack *);
00100 
00101 //  void PropagateInit();
00102 //  void Cascade();
00103   G4ReactionProductVector * DeExcite();
00104   G4ReactionProductVector *  DecayVoidNucleus();
00105   G4ReactionProductVector * ProductsAddFinalState (G4ReactionProductVector * products, G4KineticTrackVector & finalState  );
00106   G4ReactionProductVector * ProductsAddPrecompound(G4ReactionProductVector * products ,G4ReactionProductVector * preco );
00107 
00108   G4bool ApplyCollision(G4CollisionInitialState *);
00109   G4bool Capture(G4bool verbose=false);
00110   G4bool Absorb();
00111   G4bool CheckPauliPrinciple(G4KineticTrackVector *);
00112   G4double GetExcitationEnergy();
00113   void CorrectFinalPandE();
00114 
00115   G4double CorrectShortlivedPrimaryForFermi(
00116       G4KineticTrack* primary,G4KineticTrackVector target_collection);
00117   G4bool CorrectShortlivedFinalsForFermi(
00118         G4KineticTrackVector * products, G4double initial_Efermi);
00119 
00120   void UpdateTracksAndCollisions(G4KineticTrackVector * oldSecondaries,
00121              G4KineticTrackVector * oldTarget,
00122              G4KineticTrackVector * newSecondaries);
00123   G4bool DoTimeStep(G4double timeStep);
00124   G4KineticTrackVector* CorrectBarionsOnBoundary(G4KineticTrackVector *in,
00125                                                G4KineticTrackVector *out);
00126   G4Fragment * FindFragments();
00127   void StepParticlesOut();
00128 
00129   G4LorentzVector GetFinal4Momentum();
00130   G4LorentzVector GetFinalNucleusMomentum();
00131 
00132   G4ReactionProductVector * Propagate1H1(G4KineticTrackVector *,
00133                 G4V3DNucleus *);
00134   G4double GetIonMass(G4int Z, G4int A);
00135 
00136   G4int GetTotalCharge(std::vector<G4KineticTrack *> & aV)
00137   {
00138     G4int result = 0;
00139     std::vector<G4KineticTrack *>::iterator i;
00140     for(i = aV.begin(); i != aV.end(); ++i)
00141     {
00142        result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
00143     }
00144     return result;
00145   }
00146   G4int GetTotalBaryonCharge(std::vector<G4KineticTrack *> & aV)
00147   {
00148     G4int result = 0;
00149     std::vector<G4KineticTrack *>::iterator i;
00150     for(i = aV.begin(); i != aV.end(); ++i)
00151     {
00152        if ( (*i)->GetDefinition()->GetBaryonNumber() != 0 ){
00153              result += G4lrint((*i)->GetDefinition()->GetPDGCharge());
00154        }
00155     }
00156     return result;
00157   }
00158 
00159   G4ReactionProductVector * HighEnergyModelFSProducts(G4ReactionProductVector *,
00160                                          G4KineticTrackVector * secondaries);                                // add secondaries of string model to G4RPV
00161   G4ReactionProductVector * FillVoidNucleusProducts(G4ReactionProductVector * );    // nucleus destroyed, add secondaries to G4RPV
00162 // utility methods
00163 
00164   G4ThreeVector GetSpherePoint(G4double r, const G4LorentzVector & momentumdirection);
00165 
00166   void ClearAndDestroy(G4KineticTrackVector * ktv);
00167   void ClearAndDestroy(G4ReactionProductVector * rpv);
00168 
00169 // for debugging purpose
00170 
00171   G4ReactionProductVector * ProductsAddFakeGamma(G4ReactionProductVector * products );
00172 
00173   void PrintKTVector(G4KineticTrackVector * ktv, std::string comment=std::string(""));
00174   void PrintKTVector(G4KineticTrack* kt, std::string comment=std::string(""));
00175   void DebugApplyCollisionFail(G4CollisionInitialState * collision,
00176                                                    G4KineticTrackVector * products);
00177   void DebugApplyCollision(G4CollisionInitialState * collision,
00178                            G4KineticTrackVector *products);
00179   G4bool DebugEpConservation(const G4HadProjectile & aTrack, G4ReactionProductVector* products);
00180   G4bool CheckChargeAndBaryonNumber(G4String where);
00181 
00182 private:
00183   G4KineticTrackVector theProjectileList;       // replaced by theProjectile4Momentum
00184   G4KineticTrackVector theTargetList;           // list of nucleons in Nucleus
00185   G4KineticTrackVector theSecondaryList;        // particles being followed
00186   G4KineticTrackVector theCapturedList;         // captured particles
00187   G4KineticTrackVector theFinalState;           // particles for final state
00188 
00189 
00190   G4ExcitationHandler * theExcitationHandler;
00191   G4CollisionManager * theCollisionMgr;
00192 
00193   G4Scatterer * theH1Scatterer;
00194 
00195   std::vector<G4BCAction *> theImR;
00196   G4BCDecay * theDecay;
00197   G4BCLateParticle * theLateParticle;
00198   G4VFieldPropagation * thePropagator;
00199   G4DecayKineticTracks decayKTV;
00200 
00201   G4double theCurrentTime;
00202   G4double theBCminP;
00203   G4double theCutOnP;
00204   G4double theCutOnPAbsorb;
00205   G4LorentzVector theInitial4Mom;   // suppress?
00206   G4LorentzVector theProjectile4Momentum;
00207   G4int currentA, currentZ, lateA, lateZ;
00208   G4int initialZ, initialA,projectileA,projectileZ;
00209   G4double massInNucleus, initial_nuclear_mass;
00210   G4double currentInitialEnergy;   // for debugging
00211   G4LorentzRotation precompoundLorentzboost;
00212   G4double theOuterRadius;
00213   G4bool thePrimaryEscape;
00214   G4ParticleDefinition * thePrimaryType;
00215   G4ThreeVector theMomentumTransfer;
00216 
00217 
00218 
00219 };
00220 
00221 #endif
00222 
00223 
00224 
00225 

Generated on Mon May 27 17:47:45 2013 for Geant4 by  doxygen 1.4.7