Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:21:11

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 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0028 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0029 
0030 #include "G4ChannelingPhysics.hh"
0031 
0032 #include "G4BaryonConstructor.hh"
0033 #include "G4BosonConstructor.hh"
0034 #include "G4Channeling.hh"
0035 #include "G4IonConstructor.hh"
0036 #include "G4LeptonConstructor.hh"
0037 #include "G4LogicalCrystalVolume.hh"
0038 #include "G4MesonConstructor.hh"
0039 #include "G4ProcessManager.hh"
0040 #include "G4ProcessTable.hh"
0041 
0042 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0043 
0044 G4ChannelingPhysics::G4ChannelingPhysics(const G4String& name) : G4VPhysicsConstructor(name)
0045 {
0046   ;
0047 }
0048 
0049 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0050 
0051 G4ChannelingPhysics::~G4ChannelingPhysics()
0052 {
0053   ;
0054 }
0055 
0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0057 
0058 void G4ChannelingPhysics::ConstructParticle()
0059 {
0060   G4BosonConstructor pBosonConstructor;
0061   pBosonConstructor.ConstructParticle();
0062 
0063   G4LeptonConstructor pLeptonConstructor;
0064   pLeptonConstructor.ConstructParticle();
0065 
0066   G4MesonConstructor pMesonConstructor;
0067   pMesonConstructor.ConstructParticle();
0068 
0069   G4BaryonConstructor pBaryonConstructor;
0070   pBaryonConstructor.ConstructParticle();
0071 
0072   G4IonConstructor pIonConstructor;
0073   pIonConstructor.ConstructParticle();
0074 }
0075 
0076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0077 
0078 void G4ChannelingPhysics::ConstructProcess()
0079 {
0080   auto ptable = G4ProcessTable::GetProcessTable();
0081   G4int verb = ptable->GetVerboseLevel();
0082   ptable->SetVerboseLevel(2);
0083   ptable->SetProcessActivation("CoulombScat", false);
0084   ptable->SetVerboseLevel(verb);
0085 
0086   G4Channeling* channeling = new G4Channeling();
0087 
0088   G4ParticleTable::G4PTblDicIterator* aParticleIterator =
0089     G4ParticleTable::GetParticleTable()->GetIterator();
0090   aParticleIterator->reset();
0091 
0092   while ((*aParticleIterator)()) {
0093     G4ParticleDefinition* particle = aParticleIterator->value();
0094     G4double particleCharge = particle->GetPDGCharge();
0095     G4ProcessManager* pManager = particle->GetProcessManager();
0096 
0097     if (particleCharge != 0) {
0098       pManager->AddDiscreteProcess(channeling);
0099     }
0100   }
0101 }
0102 
0103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......