// // ******************************************************************** // * 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. * // ******************************************************************** // // // $Id: G4StepLimiterBuilder.cc,v 1.2 2005/04/14 08:22:46 vnivanch Exp $ // GEANT4 tag $Name: geant4-08-00-patch-01 $ // //--------------------------------------------------------------------------- // // ClassName: G4StepLimiterBuilder // // Author: V.Ivanchenko 24.11.2004 // // Modified: // //---------------------------------------------------------------------------- // // //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... #include "G4StepLimiterBuilder.h" #include "G4ParticleDefinition.hh" #include "G4ProcessManager.hh" #include "G4StepLimiterPerRegion.h" #include "G4Electron.hh" #include "G4Positron.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4StepLimiterBuilder::G4StepLimiterBuilder(const G4String& name) : G4VPhysicsConstructor(name), stepMax() { } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4StepLimiterBuilder::~G4StepLimiterBuilder() {} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void G4StepLimiterBuilder::ConstructParticle() {} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void G4StepLimiterBuilder::ConstructProcess() { theParticleIterator->reset(); while( (*theParticleIterator)() ){ G4ParticleDefinition* particle = theParticleIterator->value(); G4ProcessManager* pmanager = particle->GetProcessManager(); if (stepMax->IsApplicable(*particle) && !particle->IsShortLived()) { pmanager->AddProcess(stepMax, -1,-1,6); } } } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......