Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Optical Photon Absorption Class Definition
0030 ////////////////////////////////////////////////////////////////////////
0031 //
0032 // File:        G4OpAbsorption.hh
0033 // Description: Discrete Process -- Bulk absorption of Optical Photons
0034 // Version:     1.0
0035 // Created:     1996-05-21
0036 // Author:      Juliet Armstrong
0037 // Updated:     2005-07-28 add G4ProcessType to constructor
0038 //              1999-10-29 add method and class descriptors
0039 //              1997-04-09 by Peter Gumplinger
0040 //              > new physics/tracking scheme
0041 //              1998-08-25 by Stefano Magni
0042 //              > Change process to use G4MaterialPropertiesTables
0043 //
0044 ////////////////////////////////////////////////////////////////////////
0045 
0046 #ifndef G4OpAbsorption_h
0047 #define G4OpAbsorption_h 1
0048 
0049 #include "G4VDiscreteProcess.hh"
0050 #include "G4OpticalPhoton.hh"
0051 
0052 class G4OpAbsorption : public G4VDiscreteProcess
0053 {
0054  public:
0055   explicit G4OpAbsorption(const G4String& processName = "OpAbsorption",
0056                           G4ProcessType type          = fOptical);
0057   virtual ~G4OpAbsorption();
0058 
0059   virtual G4bool IsApplicable(
0060     const G4ParticleDefinition& aParticleType) override;
0061   // Returns true -> 'is applicable' only for an optical photon.
0062 
0063   virtual G4double GetMeanFreePath(const G4Track& aTrack, G4double,
0064                                    G4ForceCondition*) override;
0065   // Returns the absorption length for bulk absorption of optical
0066   // photons in media with a specified attenuation length.
0067 
0068   virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
0069                                           const G4Step& aStep) override;
0070   // Method implementing bulk absorption of optical photons.
0071 
0072   virtual void PreparePhysicsTable(const G4ParticleDefinition&) override;
0073 
0074   virtual void Initialise();
0075 
0076   void SetVerboseLevel(G4int);
0077 
0078  private:
0079   G4OpAbsorption(const G4OpAbsorption& right) = delete;
0080   G4OpAbsorption& operator=(const G4OpAbsorption& right) = delete;
0081 
0082   size_t idx_absorption = 0;
0083 };
0084 
0085 // Inline methods
0086 
0087 inline G4bool G4OpAbsorption::IsApplicable(
0088   const G4ParticleDefinition& aParticleType)
0089 {
0090   return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
0091 }
0092 
0093 #endif /* G4OpAbsorption_h */