00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // $Id: MyPionPhysics.cc,v 1.2 2010-06-03 14:37:24 gunter Exp $ 00027 // GEANT4 tag $Name: not supported by cvs2svn $ 00028 // 00029 //--------------------------------------------------------------------------- 00030 // 00031 // ClassName: MyPionPhysics 00032 // 00033 // Author: 2002 J.P. Wellisch 00034 // 00035 // Modified: 00036 // 10.11.2005 V.Ivanchenko edit to provide a standard 00037 // 05.12.2005 V.Ivanchenko add controlled verbosity 00038 // 25.04.2006 V.Ivanchenko fix problem of destructor 00039 // 00040 //---------------------------------------------------------------------------- 00041 // 00042 00043 #include "MyPionPhysics.hh" 00044 00045 #include "G4ParticleDefinition.hh" 00046 #include "G4ProcessManager.hh" 00047 00048 // TODO: 00049 // /home/chen/MyWorkArea/g4sim/src/MyPionPhysics.cc:48:40: fatal error: G4PiMinusAbsorptionAtRest.hh: No such file or directory 00050 //#include "G4PiMinusAbsorptionAtRest.hh" 00051 00052 #include "G4ParticleTypes.hh" 00053 #include "G4ParticleTable.hh" 00054 00055 MyPionPhysics::MyPionPhysics(G4int ver) 00056 : G4VPhysicsConstructor("MyPionPhysics"), verbose(ver), wasActivated(false) 00057 { 00058 fPiMinusAbsorptionAtRest = 0; 00059 } 00060 00061 MyPionPhysics::MyPionPhysics(const G4String& name, G4int ver) 00062 : G4VPhysicsConstructor(name), verbose(ver), wasActivated(false) 00063 { 00064 fPiMinusAbsorptionAtRest = 0; 00065 } 00066 00067 MyPionPhysics::~MyPionPhysics() 00068 { 00069 delete fPiMinusAbsorptionAtRest; 00070 } 00071 00072 void MyPionPhysics::ConstructParticle() 00073 { 00074 00075 // G4cout << "MyPionPhysics::ConstructParticle" << G4endl; 00076 00077 } 00078 00079 void MyPionPhysics::ConstructProcess() 00080 { 00081 if(wasActivated) { return; } 00082 wasActivated = true; 00083 00084 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 00085 00086 // Add Decay Process 00087 // fPiMinusAbsorptionAtRest = new G4PiMinusAbsorptionAtRest(); 00088 // theParticleIterator->reset(); 00089 G4ParticleDefinition* particle=0; 00090 00091 // while( (*theParticleIterator)() ) 00092 // { 00093 // particle = theParticleIterator->value(); 00094 // if ( particle->GetParticleName() == "pi-" ){ 00095 // // Add the pion capture process 00096 // G4ProcessManager* pmanager = particle->GetProcessManager(); 00097 // pmanager->AddRestProcess(fPiMinusAbsorptionAtRest); 00098 // } 00099 // } 00100 00101 }