Message: Cross Section problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Cross Section problem  

Keywords: CrossSection
Forum: Hadronic Processes
Date: 25 Dec, 2007
From: yuchun zhang <zhangyc@ihep.ac.cn>

Hello,I am a novice at geant 4.,I simulate Gamma(2GEV) interaction with a target(C) in order to get pion using G4.9.0.and the very important things that I also want to get is the CrossSection information of this process! So I wrote the code as follows:

#include "G4Material.hh"
#include "G4CrossSectionDataStore.hh"
#include "G4DynamicParticle.hh"
#include "G4Gamma.hh"
#include "G4ParticleTable.hh"
G4double a, z;
G4double density;
G4Material* Al = new G4Material("Aliumn",z=13.,a=26.98*g/mole,density=2.702*g/cm3);
G4CrossSectionDataStore *pcs=new G4CrossSectionDataStore;
G4PhotoNuclearCrossSection*pcs_pn=new PhotoNuclearCrossSection(); pcs->AddDataSet(pcs_pn);
G4ThreeVector aMomentumDirection = G4ThreeVector(0,0,-1*m);
G4double aKineticEnergy=200*MeV ;
G4DynamicParticle*pgamma=new 4DynamicParticle(G4Gamma::GammaDefinition(),aMomentumDirection,aKineticEnergy);
G4cout<<"*******************************************************\n";
while(aKineticEnergy <=1805) 
{
  aKineticEnergy += 10*MeV;
  pgamma->SetKineticEnergy(aKineticEnergy);
  G4cout<<aKineticEnergy<<"\t"<<(pcs->GetCrossSection(pgamma,Al))<<G4endl;
}

Indeed I got the the information of Cross Section.however I found it did not depended on G4ThreeVector(it may be use to control the degree of gun particle ). That is to say the Cross Section is constant . so I think this method may be wrong. Please could someone tell me exactly what the correct code is or how to solve it? thank you in advance.

I would appreciate any help.... Best regards!!

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Cross Section problem   (Vladimir IVANTCHENKO - 25 Dec, 2007)
1 None: Re: Cross Section problem   (yuchun zhang - 25 Dec, 2007)
3 None: Re: Cross Section problem   (yuchun zhang - 25 Dec, 2007)
1 None: Re: Cross Section problem   (Vladimir IVANTCHENKO - 27 Dec, 2007)
...
 Add Message Add Message
to: "Cross Section problem "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]