G4StoppingPhysics.cc

Go to the documentation of this file.
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$
00027 //
00028 //---------------------------------------------------------------------------
00029 //
00030 // ClassName:  G4StoppingPhysics
00031 //
00032 // Author:     Alberto Ribon
00033 //
00034 // Date:       27 July 2012
00035 //
00036 // Modified:  
00037 // 20120921  M. Kelsey -- Move MuonMinusCapture.hh here; replace G4MMCAtRest
00038 //              with new G4MuonMinusCapture.
00039 // 16-Oct-2012 A. Ribon: renamed G4BertiniAndFritiofStoppingPhysics as 
00040 //                       G4StoppingPhysics.
00041 // 17-Oct-2012 A. Ribon: added nuclear capture at rest of anti-nuclei with
00042 //                       Fritof/Precompound.
00043 //
00044 //----------------------------------------------------------------------------
00045 
00046 #include "G4StoppingPhysics.hh"
00047 #include "G4SystemOfUnits.hh"
00048 #include "G4HadronicAbsorptionBertini.hh"
00049 #include "G4HadronicAbsorptionFritiof.hh"
00050 #include "G4MuonMinusCapture.hh"
00051 #include "G4ParticleDefinition.hh"
00052 #include "G4ProcessManager.hh"
00053 #include "G4LeptonConstructor.hh"
00054 #include "G4MesonConstructor.hh"
00055 #include "G4BaryonConstructor.hh"
00056 #include "G4MuonMinus.hh"
00057 #include "G4PionMinus.hh"
00058 
00059 // factory
00060 #include "G4PhysicsConstructorFactory.hh"
00061 //
00062 G4_DECLARE_PHYSCONSTR_FACTORY(G4StoppingPhysics);
00063 
00064 G4StoppingPhysics::
00065 G4StoppingPhysics( G4int ver ) :  
00066   G4VPhysicsConstructor( "stopping" ),
00067   muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
00068   verbose( ver ), wasActivated( false ) , 
00069   useMuonMinusCapture( true ) 
00070 {
00071   if ( verbose > 1 ) G4cout << "### G4StoppingPhysics" << G4endl;
00072 }
00073 
00074 
00075 G4StoppingPhysics::
00076 G4StoppingPhysics( const G4String& name, G4int ver, 
00077                                     G4bool UseMuonMinusCapture ) :
00078   G4VPhysicsConstructor( name ),
00079   muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
00080   verbose( ver ), wasActivated( false ) ,
00081   useMuonMinusCapture( UseMuonMinusCapture ) 
00082 {
00083   if ( verbose > 1 ) G4cout << "### G4StoppingPhysics" << G4endl;
00084 }
00085 
00086 
00087 G4StoppingPhysics::~G4StoppingPhysics() {}
00088 
00089 
00090 void G4StoppingPhysics::ConstructParticle() {
00091   // G4cout << "G4StoppingPhysics::ConstructParticle" << G4endl;
00092   G4LeptonConstructor pLeptonConstructor;
00093   pLeptonConstructor.ConstructParticle();
00094 
00095   G4MesonConstructor pMesonConstructor;
00096   pMesonConstructor.ConstructParticle();
00097 
00098   G4BaryonConstructor pBaryonConstructor;
00099   pBaryonConstructor.ConstructParticle();
00100 }
00101 
00102 
00103 void G4StoppingPhysics::ConstructProcess() {
00104   if ( verbose > 1 ) G4cout << "### G4StoppingPhysics::ConstructProcess " 
00105                             << wasActivated << G4endl;
00106   if ( wasActivated ) return;
00107   wasActivated = true;
00108 
00109   if ( useMuonMinusCapture ) {
00110     muProcess = new G4MuonMinusCapture();
00111   } else {
00112     muProcess = 0;
00113   }   
00114 
00115   hBertiniProcess = new G4HadronicAbsorptionBertini();
00116   hFritiofProcess = new G4HadronicAbsorptionFritiof();
00117 
00118   G4double mThreshold = 130.0*MeV;
00119 
00120   // Add Stopping Process
00121   G4ParticleDefinition* particle = 0;
00122   G4ProcessManager* pmanager = 0;
00123 
00124   theParticleIterator->reset();
00125 
00126   while ( (*theParticleIterator)() ) {
00127 
00128     particle = theParticleIterator->value();
00129     pmanager = particle->GetProcessManager();
00130 
00131     if ( particle == G4MuonMinus::MuonMinus() ) {
00132       if ( useMuonMinusCapture ) {
00133          pmanager->AddRestProcess( muProcess );
00134          if ( verbose > 1 ) {
00135            G4cout << "### G4StoppingPhysics added G4MuonMinusCapture for " 
00136                   << particle->GetParticleName() << G4endl;
00137          }
00138       }
00139     }
00140 
00141     if ( particle->GetPDGCharge() < 0.0       && 
00142          particle->GetPDGMass() > mThreshold  &&
00143          ! particle->IsShortLived() ) {
00144 
00145       // Use Fritiof/Precompound for: anti-protons, anti-sigma+, and
00146       // anti-nuclei.
00147       if ( particle == G4AntiProton::AntiProton() ||
00148            particle == G4AntiSigmaPlus::AntiSigmaPlus() ||
00149            particle->GetBaryonNumber() < -1 ) {  // Anti-nuclei
00150         if ( hFritiofProcess->IsApplicable( *particle ) ) {
00151           pmanager->AddRestProcess( hFritiofProcess );
00152           if ( verbose > 1 ) {
00153             G4cout << "### G4HadronicAbsorptionFritiof added for "
00154                    << particle->GetParticleName() << G4endl;
00155           }
00156         }
00157 
00158       // Use Bertini/Precompound for pi-, K-, Sigma-, Xi-, and Omega-
00159       } else if ( particle == G4PionMinus::PionMinus() ||
00160                   particle == G4KaonMinus::KaonMinus() ||
00161                   particle == G4SigmaMinus::SigmaMinus() ||
00162                   particle == G4XiMinus::XiMinus() ||
00163                   particle == G4OmegaMinus::OmegaMinus() ) {
00164         if ( hBertiniProcess->IsApplicable( *particle ) ) {
00165           pmanager->AddRestProcess( hBertiniProcess );
00166           if ( verbose > 1 ) {
00167             G4cout << "### G4HadronicAbsorptionBertini added for "
00168                    << particle->GetParticleName() << G4endl;
00169           }
00170         }
00171 
00172       } else {
00173         if ( verbose > 1 ) {
00174           G4cout << "WARNING in G4StoppingPhysics::ConstructProcess: \
00175                      not able to deal with nuclear stopping of " 
00176                  << particle->GetParticleName() << G4endl;
00177         }
00178       }
00179     }
00180 
00181   } // end of while loop
00182 }

Generated on Mon May 27 17:49:55 2013 for Geant4 by  doxygen 1.4.7