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 // $Id$ 00027 // 00028 // ----------------------------------------------------------------------------- 00029 // GEANT 4 class header file 00030 // 00031 // History: first implementation, A. Feliciello, 30th June 1998 00032 // A.Pavliouk 26.11.98 00033 // In Set...() methods a pointer is deleted now before new 00034 // value will be asigned. 00035 // M.Kelsey 07.03.2011 00036 // Add data member and Set method to store original projectile 00037 // V.Ivanchenko 03.01.2012 00038 // Added G4VPreCompoundModel pointer to the constructor and cleanup 00039 // ----------------------------------------------------------------------------- 00040 00041 #ifndef G4VIntraNuclearTransportModel_h 00042 #define G4VIntraNuclearTransportModel_h 1 00043 00044 // Class Description 00045 // Base class for intra-nuclear transport models in geant4. By merit 00046 // of inheriting from this class a intra-nuclear transport model can 00047 // be used in conjunction with any precompound, string parton model 00048 // or other high energy generator in the generation of final states 00049 // for inelastic scattering. 00050 // Class Description - End 00051 00052 #include "G4V3DNucleus.hh" 00053 #include "G4VPreCompoundModel.hh" 00054 #include "G4HadronicInteraction.hh" 00055 #include "G4ReactionProductVector.hh" 00056 #include "G4ReactionProduct.hh" 00057 #include "G4HadProjectile.hh" 00058 #include "G4HadFinalState.hh" 00059 00060 class G4KineticTrackVector; 00061 00062 class G4VIntraNuclearTransportModel : public G4HadronicInteraction 00063 { 00064 public: 00065 00066 G4VIntraNuclearTransportModel(const G4String& modelName = "CascadeModel", 00067 G4VPreCompoundModel* ptr = 0); 00068 00069 virtual ~G4VIntraNuclearTransportModel(); 00070 00071 virtual 00072 G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, 00073 G4V3DNucleus* theNucleus) = 0; 00074 00075 inline void SetDeExcitation(G4VPreCompoundModel* ptr); 00076 00077 inline void Set3DNucleus(G4V3DNucleus* const value); 00078 00079 inline void SetPrimaryProjectile(const G4HadProjectile &aPrimary); 00080 00081 inline const G4String& GetModelName() const; 00082 00083 virtual void ModelDescription(std::ostream& outFile) const ; 00084 virtual void PropagateModelDescription(std::ostream& outFile) const ; 00085 00086 private: 00087 00088 G4VIntraNuclearTransportModel(const G4VIntraNuclearTransportModel& right); 00089 const G4VIntraNuclearTransportModel& operator=(const G4VIntraNuclearTransportModel &right); 00090 int operator==(const G4VIntraNuclearTransportModel& right) const; 00091 int operator!=(const G4VIntraNuclearTransportModel& right) const; 00092 00093 protected: 00094 00095 inline G4V3DNucleus* Get3DNucleus() const; 00096 00097 inline G4VPreCompoundModel* GetDeExcitation() const; 00098 00099 inline const G4HadProjectile* GetPrimaryProjectile() const; 00100 00101 G4String theTransportModelName; 00102 00103 G4V3DNucleus* the3DNucleus; 00104 00105 G4VPreCompoundModel* theDeExcitation; 00106 00107 const G4HadProjectile* thePrimaryProjectile; 00108 }; 00109 00110 inline const G4String& G4VIntraNuclearTransportModel::GetModelName() const 00111 { 00112 return theTransportModelName; 00113 } 00114 00115 inline G4V3DNucleus* G4VIntraNuclearTransportModel::Get3DNucleus() const 00116 { 00117 return the3DNucleus; 00118 } 00119 00120 inline void G4VIntraNuclearTransportModel::Set3DNucleus(G4V3DNucleus* const value) 00121 { 00122 delete the3DNucleus; the3DNucleus = value; 00123 } 00124 00125 inline G4VPreCompoundModel* G4VIntraNuclearTransportModel::GetDeExcitation() const 00126 { 00127 return theDeExcitation; 00128 } 00129 00130 inline void 00131 G4VIntraNuclearTransportModel::SetDeExcitation(G4VPreCompoundModel* value) 00132 { 00133 // previous pre-compound model will be deleted at the end of job 00134 theDeExcitation = value; 00135 } 00136 00137 inline const G4HadProjectile* 00138 G4VIntraNuclearTransportModel::GetPrimaryProjectile() const 00139 { 00140 return thePrimaryProjectile; 00141 } 00142 00143 inline void 00144 G4VIntraNuclearTransportModel::SetPrimaryProjectile(const G4HadProjectile &aPrimary) 00145 { 00146 // NOTE: Previous pointer is NOT deleted: passed by reference, no ownership 00147 thePrimaryProjectile = &aPrimary; 00148 } 00149 00150 #endif 00151 00152