source: trunk/source/processes/hadronic/models/low_energy/src/G4LETritonInelastic.cc @ 1055

Last change on this file since 1055 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 5.4 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27 // Hadronic Process: Triton Inelastic Process
28 // J.L. Chuma, TRIUMF, 25-Feb-1997
29 // Last modified: 27-Mar-1997
30 // J.L. Chuma, 08-May-2001: Update original incident passed back in vec[0]
31 //                          from NuclearReaction
32 //
33#include "G4LETritonInelastic.hh"
34#include "Randomize.hh"
35#include "G4Electron.hh"
36 
37 G4HadFinalState *
38  G4LETritonInelastic::ApplyYourself( const G4HadProjectile &aTrack,
39                                      G4Nucleus &targetNucleus )
40  {
41    bool triton_debug = false;
42    if(getenv("TritonLEDebug")) triton_debug = true;
43    theParticleChange.Clear();
44    const G4HadProjectile *originalIncident = &aTrack;
45    if(triton_debug)  std::cout << "entering LETritonInelastic "<<originalIncident->GetKineticEnergy()<<std::endl;
46    if (originalIncident->GetKineticEnergy()<= 0.1*MeV) 
47    {
48      theParticleChange.SetStatusChange(isAlive);
49      theParticleChange.SetEnergyChange(aTrack.GetKineticEnergy());
50      theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit()); 
51      return &theParticleChange;     
52    }
53   
54    if( verboseLevel > 1 )
55    {
56      const G4Material *targetMaterial = aTrack.GetMaterial();
57      G4cout << "G4LETritonInelastic::ApplyYourself called" << G4endl;
58      G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
59      G4cout << "target material = " << targetMaterial->GetName() << ", ";
60    }
61   
62    if(triton_debug)std::cout << "running LETritonInelastic 1"<<std::endl;
63    // Work-around for lack of model above 100 MeV
64    if (originalIncident->GetKineticEnergy()/MeV > 100. ||
65        originalIncident->GetKineticEnergy() <= 0.) 
66      {
67        theParticleChange.SetStatusChange(isAlive);
68        theParticleChange.SetEnergyChange(aTrack.GetKineticEnergy());
69        theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit()); 
70        return &theParticleChange;
71      }
72
73    if(triton_debug)std::cout << "running LETritonInelastic 2"<<std::endl;
74    G4double A = targetNucleus.GetN();
75    G4double Z = targetNucleus.GetZ();
76    G4double theAtomicMass = targetNucleus.AtomicMass( A, Z );
77    G4double massVec[9];
78    massVec[0] = targetNucleus.AtomicMass( A+3.0, Z+1.0 );
79    massVec[1] = targetNucleus.AtomicMass( A+2.0, Z+1.0 );
80    massVec[2] = targetNucleus.AtomicMass( A+2.0, Z     );
81    massVec[3] = targetNucleus.AtomicMass( A+1.0, Z     );
82    massVec[4] = theAtomicMass;
83    massVec[5] = 0.;
84    if (A > 1.0 && Z > 1.0) 
85        massVec[5] = targetNucleus.AtomicMass( A-1.0, Z-1.0 );
86    massVec[6] = targetNucleus.AtomicMass( A+1.0, Z+1.0 );
87    massVec[7] = massVec[3];
88    massVec[8] = 0.;
89    if (Z > 1.0) 
90        massVec[8] = targetNucleus.AtomicMass( A+1.0, Z-1.0 );
91   
92    G4FastVector<G4ReactionProduct,4> vec;  // vec will contain the secondary particles
93    G4int vecLen = 0;
94    vec.Initialize( 0 );
95   
96    if(triton_debug)std::cout << "running LETritonInelastic 3"<<std::endl;
97    theReactionDynamics.NuclearReaction( vec, vecLen, originalIncident,
98                                         targetNucleus, theAtomicMass, massVec );
99    if(triton_debug)std::cout << "running LETritonInelastic 4"<<std::endl;
100    //
101    G4double p = vec[0]->GetMomentum().mag();
102    theParticleChange.SetMomentumChange( vec[0]->GetMomentum()*(1./p) );
103    theParticleChange.SetEnergyChange( vec[0]->GetKineticEnergy() );
104    delete vec[0];
105    //
106    G4DynamicParticle *pd;
107    for( G4int i=1; i<vecLen; ++i )
108    {
109      pd = new G4DynamicParticle();
110      pd->SetDefinition( vec[i]->GetDefinition() );
111      pd->SetMomentum( vec[i]->GetMomentum() );
112      theParticleChange.AddSecondary( pd );
113      delete vec[i];
114    }
115   
116    if(triton_debug)std::cout << "leaving LETritonInelastic"<<std::endl;
117    return &theParticleChange;
118  }
119 
120 /* end of file */
121 
Note: See TracBrowser for help on using the repository browser.