Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Ultra Cold Neutron (UCN) Multiple Scattering Class Definition
0031 ////////////////////////////////////////////////////////////////////////
0032 //
0033 // File:         G4UCNMultiScattering.hh
0034 // Description:  Discrete Process -- MultiScattering of UCNs
0035 // Version:      1.0
0036 // Created:      2014-05-05
0037 // Author:       Peter Gumplinger
0038 // Adopted from: UCNMultiScattering by Peter Fierlinger 7.9.2004
0039 // Updated:
0040 // mail:         gum@triumf.ca
0041 //
0042 ////////////////////////////////////////////////////////////////////////
0043 
0044 #ifndef G4UCNMULTISCATTERING_HH
0045 #define G4UCNMULTISCATTERING_HH 1
0046 
0047 /////////////
0048 // Includes
0049 /////////////
0050 
0051 #include "G4VDiscreteProcess.hh"
0052 
0053 #include "G4Neutron.hh"
0054 
0055 // Class Description:
0056 // Discrete Process -- Multiple Scattering of Ultra Cold Neutrons.
0057 // Multiple scatters UCN due to multi-scattering cross section of the material.
0058 // Class inherits publicly from G4VDiscreteProcess.
0059 // Class Description - End:
0060 
0061 /////////////////////
0062 // Class Definition
0063 /////////////////////
0064 
0065 class G4UCNMultiScattering : public G4VDiscreteProcess
0066 {
0067 
0068 public:
0069 
0070         ////////////////////////////////
0071         // Constructors and Destructor
0072         ////////////////////////////////
0073 
0074         G4UCNMultiScattering(const G4String& processName = "UCNMultiScattering",
0075                                       G4ProcessType type = fUCN);
0076     virtual ~G4UCNMultiScattering();
0077 
0078 private:
0079 
0080         G4UCNMultiScattering(const G4UCNMultiScattering &right);
0081 
0082         //////////////
0083         // Operators
0084         //////////////
0085 
0086         G4UCNMultiScattering& operator=(const G4UCNMultiScattering &right);
0087 
0088 public:
0089 
0090         ////////////
0091         // Methods
0092         ////////////
0093 
0094         G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
0095         // Returns true -> 'is applicable' only for an UCN.
0096 
0097     G4double GetMeanFreePath(const G4Track& aTrack,
0098                                  G4double ,
0099                                  G4ForceCondition* condition);
0100 
0101     G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
0102                                         const G4Step&  aStep);
0103 
0104         G4ThreeVector Scatter();
0105 
0106 private:
0107 
0108 };
0109 
0110 ////////////////////
0111 // Inline methods
0112 ////////////////////
0113 
0114 inline G4bool
0115 G4UCNMultiScattering::IsApplicable(const G4ParticleDefinition& aParticleType)
0116 {
0117    return ( &aParticleType == G4Neutron::NeutronDefinition() );
0118 }
0119 
0120 #endif /* G4UCNMULTISCATTERING_HH */