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 // GEANT4 tag $Name: not supported by cvs2svn $ 00027 // 00028 //--------------------------------------------------------------------------- 00029 // 00030 // Author: 2010 G.Folger 00031 // devired from G4LEPPiKBuilder 00032 // 00033 // 00034 // Modified: 00035 // 00036 //---------------------------------------------------------------------------- 00037 // 00038 #include "G4ChipsKaonBuilder.hh" 00039 00040 #include "globals.hh" 00041 #include "G4ios.hh" 00042 #include "G4MesonConstructor.hh" 00043 #include "G4ProcessManager.hh" 00044 00045 G4ChipsKaonBuilder::G4ChipsKaonBuilder(G4int ver) 00046 : verb(ver) 00047 { 00048 theInelastic = new G4QInelastic(); 00049 } 00050 00051 G4ChipsKaonBuilder:: 00052 ~G4ChipsKaonBuilder() 00053 { 00054 delete theInelastic; 00055 } 00056 00057 void G4ChipsKaonBuilder::Build() 00058 { 00059 static G4bool onceOnly(true); 00060 if ( onceOnly ) 00061 { 00062 if (verb > 0 ) 00063 {G4cout << "Info - G4ChipsKaonBuilder::Build() not adding elastic" << 00064 G4endl;} 00065 00066 attachProcess(G4KaonPlus::KaonPlus()); 00067 attachProcess(G4KaonMinus::KaonMinus()); 00068 attachProcess(G4KaonZeroShort::KaonZeroShort()); 00069 attachProcess(G4KaonZeroLong::KaonZeroLong()); 00070 onceOnly=false; 00071 } 00072 } 00073 00074 void G4ChipsKaonBuilder::attachProcess(G4ParticleDefinition * pDef) 00075 { 00076 if ( verb > 0 ) { 00077 G4cout << " Using G4Qinelastic for " << pDef->GetParticleName() 00078 << G4endl; 00079 } 00080 G4ProcessManager* pMan = pDef->GetProcessManager(); 00081 pMan->AddDiscreteProcess(theInelastic); 00082 }