// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // #include "EmHadronElasticBuilder.h" #include "G4ParticleDefinition.hh" #include "G4ProcessManager.hh" #include "G4LElastic.hh" #include "G4HadronElasticProcess.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... EmHadronElasticBuilder::EmHadronElasticBuilder(const G4String& name) : G4VPhysicsConstructor(name) {} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... EmHadronElasticBuilder::~EmHadronElasticBuilder() { delete theElasticProcess; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EmHadronElasticBuilder::ConstructProcess() { // Hadron elastic process theElasticProcess = new G4HadronElasticProcess(); theElasticProcess->RegisterMe( new G4LElastic() ); aParticleIterator->reset(); while( (*aParticleIterator)() ){ G4ParticleDefinition* particle = aParticleIterator->value(); G4ProcessManager* pManager = particle->GetProcessManager(); if (particle->GetPDGMass() > 110.*CLHEP::MeV && theElasticProcess->IsApplicable(*particle) && !particle->IsShortLived()) { pManager->AddDiscreteProcess(theElasticProcess); /* G4cout << "### Elastic model are registered for " << particle->GetParticleName() << G4endl; */ } } } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......