Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:38

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 //
0029 //
0030 // ClassName:   G4LowEIonFragmentation
0031 //
0032 // Author:  H.P. Wellisch
0033 //
0034 // Modified:
0035 // 01.06.2010 V.Ivanchenko moved constructor and destructor to the source
0036 // 14.02.2013 V.Ivanchenko remove all static declarations
0037 // 
0038 
0039 #ifndef G4LowEIonFragmentation_h
0040 #define G4LowEIonFragmentation_h 1
0041 
0042 
0043 #include "G4PreCompoundModel.hh"
0044 #include "G4HadronicInteraction.hh"
0045 #include "G4ExcitationHandler.hh"
0046 
0047 class G4ParticleDefinition;
0048 
0049 class G4LowEIonFragmentation : public G4HadronicInteraction
0050 {
0051 public:
0052   
0053   G4LowEIonFragmentation(G4ExcitationHandler * const value = nullptr);
0054 
0055   virtual ~G4LowEIonFragmentation();
0056 
0057   G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary, 
0058                   G4Nucleus & theNucleus) override;
0059 
0060   inline G4double GetCrossSection() 
0061   {
0062     //    G4cout << "area/millibarn = "<<area/millibarn<<G4endl;
0063     //    G4cout << "hits = "<<hits<<G4endl;
0064     //    G4cout << "totalTries = "<<totalTries<<G4endl;
0065     return area*hits/(static_cast<G4double>(totalTries)*CLHEP::millibarn);
0066   }
0067 
0068   G4LowEIonFragmentation(const G4LowEIonFragmentation &) = delete;
0069   const G4LowEIonFragmentation& operator=
0070   (const G4LowEIonFragmentation &right) = delete;
0071   G4bool operator==(const G4LowEIonFragmentation &right) const = delete;
0072   G4bool operator!=(const G4LowEIonFragmentation &right) const = delete;
0073 
0074 private:  
0075   
0076   G4HadFinalState theResult;
0077   const G4ParticleDefinition* proton;
0078    
0079   G4PreCompoundModel * theModel = nullptr;
0080   G4ExcitationHandler * theHandler = nullptr;
0081   
0082   G4int hits = 0;
0083   G4int totalTries = 1;
0084   G4int secID = -1;  // ID for the secondaries created by this model
0085   G4double area = 0.0;
0086 
0087 };
0088 
0089 
0090 #endif
0091 
0092