Back to home page

EIC code displayed by LXR

 
 

    


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

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 //  Class:    G4AdjointBremsstrahlungModel
0028 //  Author:         L. Desorgher
0029 //  Organisation:   SpaceIT GmbH
0030 ////////////////////////////////////////////////////////////////////////////////
0031 //
0032 //  Adjoint Model for e- Bremsstrahlung.Adapted from G4eBremsstrahlungModel
0033 //  Use of a simple biased differential cross section (C(Z)/Egamma) allowing a
0034 //  rapid computation of adjoint CS and rapid sampling of adjoint secondaries.
0035 //  In this way cross section matrices are not used anymore, avoiding a long
0036 //  computation of adjoint brem cross section matrices for each material
0037 //  at initialisation. This mode can be switched on/off by selecting
0038 //  SetUseMatrix(false)/ SetUseMatrix(true) in the constructor.
0039 //
0040 //-------------------------------------------------------------
0041 
0042 #ifndef G4AdjointBremsstrahlungModel_h
0043 #define G4AdjointBremsstrahlungModel_h 1
0044 
0045 #include "globals.hh"
0046 #include "G4VEmAdjointModel.hh"
0047 
0048 class G4AdjointCSManager;
0049 class G4EmModelManager;
0050 class G4ParticleDefinition;
0051 
0052 class G4AdjointBremsstrahlungModel : public G4VEmAdjointModel
0053 {
0054  public:
0055   explicit G4AdjointBremsstrahlungModel(G4VEmModel* aModel);
0056 
0057   G4AdjointBremsstrahlungModel();
0058 
0059   ~G4AdjointBremsstrahlungModel() override;
0060 
0061   void SampleSecondaries(const G4Track& aTrack, G4bool isScatProjToProj,
0062                          G4ParticleChange* fParticleChange) override;
0063 
0064   void RapidSampleSecondaries(const G4Track& aTrack, G4bool isScatProjToProj,
0065                               G4ParticleChange* fParticleChange);
0066 
0067   G4double DiffCrossSectionPerVolumePrimToSecond(
0068     const G4Material* aMaterial,
0069     G4double kinEnergyProj,  // kinetic energy of the primary particle before
0070                              // the interaction
0071     G4double kinEnergyProd   // kinetic energy of the secondary particle
0072     ) override;
0073 
0074   G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
0075                                G4double primEnergy,
0076                                G4bool isScatProjToProj) override;
0077 
0078   G4AdjointBremsstrahlungModel(G4AdjointBremsstrahlungModel&) = delete;
0079   G4AdjointBremsstrahlungModel& operator=(
0080     const G4AdjointBremsstrahlungModel& right) = delete;
0081 
0082  private:
0083   void Initialize();
0084 
0085   G4EmModelManager* fEmModelManagerForFwdModels;
0086   G4AdjointCSManager* fCSManager;
0087   G4ParticleDefinition* fElectron;
0088   G4ParticleDefinition* fGamma;
0089 
0090   G4double fLastCZ = 0.;
0091 
0092   G4bool fIsDirectModelInitialised = false;
0093 };
0094 
0095 #endif