// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * 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. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: G4VProcess.cc,v 1.16 2007/11/15 04:10:18 kurasige Exp $ // GEANT4 tag $Name: geant4-09-03 $ // // // -------------------------------------------------------------- // GEANT 4 class implementation file // // History: first implementation, based on object model of // 2nd December 1995, G.Cosmo // -------------------------------------------------------------- // New Physics scheme 8 Jan. 1997 H.Kurahige // ------------------------------------------------------------ // removed thePhysicsTable 02 Aug. 1998 H.Kurashige // Modified DumpInfo 15 Aug. 1998 H.Kurashige #include "G4PhysicsTable.hh" #include "G4MaterialTable.hh" #include "G4ElementTable.hh" #include "G4ElementVector.hh" #include "G4VProcess.hh" G4VProcess::G4VProcess(const G4String& aName, G4ProcessType aType ) : pParticleChange(0), theNumberOfInteractionLengthLeft(-1.0), currentInteractionLength(-1.0), theProcessName(aName), theProcessType(aType), theProcessSubType(-1), thePILfactor(1.0), enableAtRestDoIt(true), enableAlongStepDoIt(true), enablePostStepDoIt(true), verboseLevel(0) { pParticleChange = &aParticleChange; } G4VProcess::~G4VProcess() { } G4VProcess::G4VProcess(const G4VProcess& right) : pParticleChange(0), theNumberOfInteractionLengthLeft(-1.0), currentInteractionLength(-1.0), theProcessName(right.theProcessName), theProcessType(right.theProcessType), theProcessSubType(right.theProcessSubType), thePILfactor(1.0), enableAtRestDoIt(right.enableAtRestDoIt), enableAlongStepDoIt(right.enableAlongStepDoIt), enablePostStepDoIt(right.enablePostStepDoIt), verboseLevel(right.verboseLevel) { } void G4VProcess::SubtractNumberOfInteractionLengthLeft( G4double previousStepSize ) { if (currentInteractionLength>0.0) { theNumberOfInteractionLengthLeft -= previousStepSize/currentInteractionLength; if(theNumberOfInteractionLengthLeft<0.) { theNumberOfInteractionLengthLeft=perMillion; } } else { #ifdef G4VERBOSE if (verboseLevel>0) { G4cerr << "G4VProcess::SubtractNumberOfInteractionLengthLeft()"; G4cerr << " [" << theProcessName << "]" <2) { G4cout << "G4VProcess::StartTracking() [" << theProcessName << "]" <2) { G4cout << "G4VProcess::EndTracking() [" << theProcessName << "]" <GetParticleName() + thePhysicsTableFileExt; return thePhysicsTableFileName; }