Back to home page

EIC code displayed by LXR

 
 

    


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

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 // *                                                                  *
0021 // * Parts of this code which have been  developed by QinetiQ Ltd     *
0022 // * under contract to the European Space Agency (ESA) are the        *
0023 // * intellectual property of ESA. Rights to use, copy, modify and    *
0024 // * redistribute this software for general public use are granted    *
0025 // * in compliance with any licensing, distribution and development   *
0026 // * policy adopted by the Geant4 Collaboration. This code has been   *
0027 // * written by QinetiQ Ltd for the European Space Agency, under ESA  *
0028 // * contract 17191/03/NL/LvH (Aurora Programme).                     *
0029 // *                                                                  *
0030 // * By using,  copying,  modifying or  distributing the software (or *
0031 // * any work based  on the software)  you  agree  to acknowledge its *
0032 // * use  in  resulting  scientific  publications,  and indicate your *
0033 // * acceptance of all terms of the Geant4 Software license.          *
0034 // ********************************************************************
0035 //
0036 #ifndef G4WilsonAbrasionModel_h
0037 #define G4WilsonAbrasionModel_h
0038 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0039 //
0040 // MODULE:              G4WilsonAbrasionModel.hh
0041 //
0042 // Version:     1.0
0043 // Date:        08/12/2009
0044 // Author:      P R Truscott
0045 // Organisation:    QinetiQ Ltd, UK
0046 // Customer:        ESA/ESTEC, NOORDWIJK
0047 // Contract:        17191/03/NL/LvH
0048 //
0049 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0050 //
0051 // CHANGE HISTORY
0052 // --------------
0053 //
0054 // 6 October 2003, P R Truscott, QinetiQ Ltd, UK
0055 // Created.
0056 //
0057 // 15 March 2004, P R Truscott, QinetiQ Ltd, UK
0058 // Beta release
0059 //
0060 // 08 December 2009, P R Truscott, QinetiQ Ltd, Ltd
0061 // ver 1.0
0062 // Variable fradius defined. See .cc file for more details.
0063 //
0064 
0065 #include "globals.hh"
0066 
0067 #include "G4HadronicInteraction.hh"
0068 #include "G4WilsonAblationModel.hh"
0069 #include "G4ExcitationHandler.hh"
0070 #include "G4HadFinalState.hh"
0071 #include "G4Track.hh"
0072 #include "G4Nucleus.hh"
0073 #include "G4Fragment.hh"
0074 #include "G4HadProjectile.hh"
0075 
0076 
0077 class G4WilsonAbrasionModel : public G4HadronicInteraction
0078 {
0079   public:
0080     G4WilsonAbrasionModel(G4bool useAblation1 = false);
0081     G4WilsonAbrasionModel(G4ExcitationHandler*);
0082     ~G4WilsonAbrasionModel();
0083 
0084     G4WilsonAbrasionModel(const G4WilsonAbrasionModel& right) = delete;
0085     const G4WilsonAbrasionModel& operator=(G4WilsonAbrasionModel& right) = delete;
0086 
0087     virtual G4HadFinalState* ApplyYourself(const G4HadProjectile&, G4Nucleus&);
0088     void SetVerboseLevel(G4int);
0089     void SetUseAblation(G4bool);
0090     G4bool GetUseAblation();
0091     void SetConserveMomentum(G4bool);
0092     G4bool GetConserveMomentum();    
0093     void SetExcitationHandler(G4ExcitationHandler*);
0094     G4ExcitationHandler* GetExcitationHandler();
0095 
0096     virtual void ModelDescription(std::ostream&) const;
0097 
0098   private:
0099     void PrintWelcomeMessage();
0100     G4Fragment* GetAbradedNucleons(G4int, G4double, G4double, G4double);
0101     G4double GetNucleonInducedExcitation(G4double, G4double, G4double);
0102     void SetConserveEnergy(G4bool);
0103     G4bool GetConserveEnergy();
0104     
0105   private:
0106     G4double r0sq;
0107     G4double npK;
0108     G4bool useAblation;
0109     G4WilsonAblationModel* theAblation;
0110     G4ExcitationHandler* theExcitationHandler;
0111     G4bool conserveEnergy;
0112     G4bool conserveMomentum;
0113     G4double B;
0114     G4double third;
0115     G4double fradius;
0116     G4int secID;  // Creator model ID for the secondaries created by this model
0117 };
0118 
0119 inline void
0120 G4WilsonAbrasionModel::SetExcitationHandler(G4ExcitationHandler* aExcitationHandler)
0121   {theExcitationHandler = aExcitationHandler;}
0122   
0123 inline G4ExcitationHandler* G4WilsonAbrasionModel::GetExcitationHandler()
0124   {return theExcitationHandler;}
0125   
0126 inline G4bool G4WilsonAbrasionModel::GetUseAblation()
0127   {return useAblation;}
0128   
0129 inline void G4WilsonAbrasionModel::SetConserveEnergy(G4bool conserveEnergy1)
0130   {conserveEnergy = conserveEnergy1;}
0131 
0132 inline G4bool G4WilsonAbrasionModel::GetConserveEnergy()
0133   {return conserveEnergy;}
0134   
0135 inline void G4WilsonAbrasionModel::SetConserveMomentum(G4bool conserveMomentum1)
0136   {conserveMomentum = conserveMomentum1;}
0137 
0138 inline G4bool G4WilsonAbrasionModel::GetConserveMomentum()
0139   {return conserveMomentum;}
0140   
0141 inline void G4WilsonAbrasionModel::SetVerboseLevel(G4int verboseLevel1)
0142 {
0143   verboseLevel = verboseLevel1;
0144   if (useAblation) theAblation->SetVerboseLevel(verboseLevel);
0145 }
0146 
0147 #endif