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 // Authors: G.Depaola & F.Longo
0028 //
0029 
0030 #ifndef G4LivermorePolarizedComptonModel_h
0031 #define G4LivermorePolarizedComptonModel_h 1
0032 
0033 #include "G4VEmModel.hh"
0034 #include "G4PhysicsFreeVector.hh"
0035 
0036 class G4ParticleChangeForGamma;
0037 class G4VAtomDeexcitation;
0038 class G4ShellData;
0039 class G4DopplerProfile;
0040 
0041 #include "G4VEMDataSet.hh"
0042 #include "G4CompositeEMDataSet.hh"
0043 
0044 class G4LivermorePolarizedComptonModel : public G4VEmModel
0045 {
0046 public:
0047   explicit G4LivermorePolarizedComptonModel(const G4ParticleDefinition* p = nullptr, 
0048                            const G4String& nam = "LivermorePolarizedCompton");
0049 
0050   virtual ~G4LivermorePolarizedComptonModel();
0051 
0052   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0053   void InitialiseLocal(const G4ParticleDefinition*, G4VEmModel* masterModel) override;
0054   void InitialiseForElement(const G4ParticleDefinition*, G4int Z) override;
0055   G4double ComputeCrossSectionPerAtom(
0056                       const G4ParticleDefinition*,
0057                                       G4double kinEnergy, 
0058                                       G4double Z, 
0059                                       G4double A=0, 
0060                                       G4double cut=0,
0061                                       G4double emax=DBL_MAX) override;
0062 
0063   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0064              const G4MaterialCutsCouple*,
0065              const G4DynamicParticle*,
0066              G4double tmin,
0067              G4double maxEnergy) override;
0068 
0069   G4LivermorePolarizedComptonModel & operator=(const  G4LivermorePolarizedComptonModel &right) = delete;
0070   G4LivermorePolarizedComptonModel(const  G4LivermorePolarizedComptonModel&) = delete;
0071 
0072 private:
0073    // specific methods for polarization   
0074   G4ThreeVector GetRandomPolarization(G4ThreeVector& direction0); // Random Polarization
0075   G4ThreeVector GetPerpendicularPolarization(const G4ThreeVector& direction0, const G4ThreeVector& polarization0) const;
0076   G4ThreeVector SetPerpendicularVector(G4ThreeVector& a); // temporary
0077   G4ThreeVector SetNewPolarization(G4double epsilon, G4double sinSqrTheta, 
0078                    G4double phi, G4double cosTheta);
0079   G4double SetPhi(G4double, G4double);
0080   void SystemOfRefChange(G4ThreeVector& direction0, G4ThreeVector& direction1, 
0081              G4ThreeVector& polarization0, G4ThreeVector& polarization1);
0082   void ReadData(size_t Z, const char* path = 0);
0083 
0084 
0085   G4ParticleChangeForGamma* fParticleChange;
0086   G4VAtomDeexcitation* fAtomDeexcitation;
0087 
0088   // Doppler Broadening
0089   static G4ShellData* shellData;
0090   static G4DopplerProfile* profileData;
0091 
0092   // Cross Section Handling 
0093   static const G4int maxZ = 99;
0094   static G4PhysicsFreeVector* data[100];
0095  
0096   // Scattering function 
0097   static G4CompositeEMDataSet* scatterFunctionData;
0098 
0099   G4int verboseLevel;
0100   G4bool isInitialised;
0101   G4int fEntanglementModelID;
0102 };
0103 
0104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0105 
0106 #endif