Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:22

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // -----------------------------------------------------------------------------
0028 //      GEANT 4 class header file
0029 //
0030 //      History: first implementation, A. Feliciello, 30th June 1998
0031 //      A.Pavliouk 26.11.98
0032 //          In Set...() methods a pointer is deleted now before new
0033 //          value will be asigned.
0034 //  M.Kelsey 07.03.2011
0035 //      Add data member and Set method to store original projectile
0036 //      V.Ivanchenko 03.01.2012
0037 //          Added G4VPreCompoundModel pointer to the constructor and cleanup
0038 //      V. Uzhinsky Nov. 2012
0039 //          Added method PropagateNuclNucl for simulation of nucleus-nucleus inter. 
0040 // -----------------------------------------------------------------------------
0041 
0042 #ifndef G4VIntraNuclearTransportModel_h
0043 #define G4VIntraNuclearTransportModel_h 1
0044 
0045 // Class Description
0046 // Base class for intra-nuclear transport models in geant4. By merit 
0047 // of inheriting from this class a intra-nuclear transport model can 
0048 // be used in conjunction with any precompound, string parton model 
0049 // or other high energy generator in the generation of final states 
0050 // for inelastic scattering.
0051 // Class Description - End
0052 
0053 #include "G4V3DNucleus.hh"
0054 #include "G4VPreCompoundModel.hh"
0055 #include "G4HadronicInteraction.hh"
0056 #include "G4ReactionProductVector.hh"
0057 #include "G4ReactionProduct.hh"
0058 #include "G4HadProjectile.hh"
0059 #include "G4HadFinalState.hh"
0060 
0061 class G4KineticTrackVector;
0062 
0063 class G4VIntraNuclearTransportModel : public G4HadronicInteraction
0064 {
0065 public:
0066 
0067   explicit G4VIntraNuclearTransportModel(const G4String& mName = "CascadeModel",
0068                      G4VPreCompoundModel* ptr = nullptr);
0069 
0070   virtual ~G4VIntraNuclearTransportModel();
0071 
0072   virtual 
0073   G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries,
0074                      G4V3DNucleus* theNucleus) = 0;
0075 
0076   virtual 
0077   G4ReactionProductVector* PropagateNuclNucl(G4KineticTrackVector* theSecondaries,
0078                      G4V3DNucleus* theNucleus,
0079                                      G4V3DNucleus* theProjectileNucleus);    // Uzhi Nov. 2012
0080 
0081   inline void SetDeExcitation(G4VPreCompoundModel* ptr);
0082 
0083   inline void Set3DNucleus(G4V3DNucleus* const value);
0084 
0085   inline void SetPrimaryProjectile(const G4HadProjectile &aPrimary);
0086 
0087   inline const G4String& GetModelName() const;
0088 
0089   virtual void ModelDescription(std::ostream& outFile) const ;
0090   virtual void PropagateModelDescription(std::ostream& outFile) const ;
0091 
0092   G4VIntraNuclearTransportModel(const G4VIntraNuclearTransportModel& right) = delete;
0093   const G4VIntraNuclearTransportModel& operator=(const G4VIntraNuclearTransportModel &right) = delete;
0094   G4bool operator==(const G4VIntraNuclearTransportModel& right) const = delete;
0095   G4bool operator!=(const G4VIntraNuclearTransportModel& right) const = delete;
0096 
0097 protected:
0098 
0099   inline G4V3DNucleus* Get3DNucleus() const;
0100 
0101   inline G4VPreCompoundModel* GetDeExcitation() const;
0102 
0103   inline const G4HadProjectile* GetPrimaryProjectile() const;
0104 
0105   G4String theTransportModelName;
0106 
0107   G4V3DNucleus* the3DNucleus;
0108 
0109   G4VPreCompoundModel* theDeExcitation;
0110 
0111   const G4HadProjectile* thePrimaryProjectile;
0112 };
0113 
0114 inline const G4String& G4VIntraNuclearTransportModel::GetModelName() const
0115 {
0116   return theTransportModelName;
0117 }
0118 
0119 inline G4V3DNucleus* G4VIntraNuclearTransportModel::Get3DNucleus() const
0120 {
0121   return the3DNucleus;
0122 }
0123 
0124 inline void G4VIntraNuclearTransportModel::Set3DNucleus(G4V3DNucleus* const value)
0125 {
0126   delete the3DNucleus;  the3DNucleus = value;
0127 }
0128 
0129 inline G4VPreCompoundModel* G4VIntraNuclearTransportModel::GetDeExcitation() const
0130 {
0131   return theDeExcitation;
0132 }
0133 
0134 inline void 
0135 G4VIntraNuclearTransportModel::SetDeExcitation(G4VPreCompoundModel* value)
0136 {
0137   // previous pre-compound model will be deleted at the end of job 
0138   theDeExcitation = value;
0139 }
0140 
0141 inline const G4HadProjectile* 
0142 G4VIntraNuclearTransportModel::GetPrimaryProjectile() const
0143 {
0144   return thePrimaryProjectile;
0145 }
0146 
0147 inline void  
0148 G4VIntraNuclearTransportModel::SetPrimaryProjectile(const G4HadProjectile &aPrimary)
0149 {
0150   // NOTE:  Previous pointer is NOT deleted: passed by reference, no ownership
0151   thePrimaryProjectile = &aPrimary;
0152 }
0153 
0154 #endif
0155 
0156