Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:52

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 //      GEANT 4 class header file
0028 //
0029 //      History:
0030 //      1 July 2009 creation by L. Desorgher based on a modification of G4Ions
0031 //
0032 //-------------------------------------------------------------
0033 //  Documentation:
0034 //      Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
0035 //      processes act on adjoint particles when they are  tracked backward in the geometry.
0036 //      The use of adjoint particles instead of "normal" particles during a reverse simulation
0037 //      is based on an idea of M. Asai.
0038 //
0039 
0040 #ifndef G4AdjointIons_h
0041 #define G4AdjointIons_h 1
0042 
0043 #include "G4ParticleDefinition.hh"
0044 #include "G4String.hh"
0045 #include "G4Types.hh"
0046 
0047 class G4AdjointIons : public G4ParticleDefinition
0048 {
0049     // Class Description
0050     //  This is the base class for all nuclei including pre-defined
0051     //  light nuclei such as deuteron, alpha, and proton (Hydrogen)
0052     //  All nuclei/ions created on the fly are objects of this class
0053     //  Atomic number and atomic mass are vaild only for particles derived
0054     //  from this class.  This class has Excitation Energy in addition to
0055     //  the normal particle properties.
0056 
0057   public:
0058     // clang-format off
0059    G4AdjointIons(
0060        const G4String&     aName,        G4double            mass,
0061        G4double            width,        G4double            charge,   
0062        G4int               iSpin,        G4int               iParity,    
0063        G4int               iConjugation, G4int               iIsospin,   
0064        G4int               iIsospin3,    G4int               gParity,
0065        const G4String&     pType,        G4int               lepton,      
0066        G4int               baryon,       G4int               encoding,
0067        G4bool              stable,       G4double            lifetime,
0068        G4DecayTable        *decaytable,  G4bool              shortlived,
0069        const G4String&     subType ="",
0070        G4int               anti_encoding =0,
0071        G4double            excitation = 0.0
0072    );
0073     // clang-format on
0074 
0075     ~G4AdjointIons() override = default;
0076 
0077     G4AdjointIons* IonsDefinition();
0078     G4AdjointIons* Ions();
0079 
0080     // Get excitation energy of nucleus
0081     G4double GetExcitationEnergy() const;
0082 
0083   protected:
0084     G4AdjointIons() = default;
0085 
0086   private:
0087     G4double theExcitationEnergy;
0088 };
0089 
0090 inline G4AdjointIons* G4AdjointIons::Ions()
0091 {
0092   return this;
0093 }
0094 
0095 inline G4double G4AdjointIons::GetExcitationEnergy() const
0096 {
0097   return theExcitationEnergy;
0098 }
0099 
0100 #endif