Message: dose deposit problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None dose deposit problem 

Forum: Biasing and Scoring
Date: 08 Sep, 2011
From: Sun Liang <Sun Liang>

------=_Part_14664_1269685679.1315529877390
Content-Type: text/plain; charset=GBK
Content-Transfer-Encoding: 7bit

Hi, I am quite new in Geant4. I had a strange problem about dose deposit using G4MultiFunctionalDetector and G4PSDoseDeposit classes.
 
The geometry is very simple, three homocentric spheres with radius 10.0m(World), 0.999m, 1.001m respectively, a Co-60 isotropic point source locate at center, all materials are NIST 


G4_AIR. My purpose is to get the dose deposited in the shell between 0.999m and 1.001m to verify the air kerma constant of Co-60 at 1m with events 5e6, namely beamOn(5e6) and 


standard EM processes, indeed I think it's only a exercise.
 
According to exN07, I wrote my scorer like below in DetectorConstruct:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
G4MultiFunctionalDetector* mydosescorer = new 4MultiFunctionalDetector("MyScorer");
G4SDManager::GetSDMpointer()->AddNewDetector(mydosescorer); 
logicChamber->SetSensitiveDetector(mydosescorer); 
G4VPrimitiveScorer* totalenergy = new G4PSEnergyDeposit("TotalEnergy"); 
G4VPrimitiveScorer* totaldose = new G4PSDoseDeposit("TotalDose",0);
 mydosescorer->RegisterPrimitive(totaldose);
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The codes of paticles shoot like below:
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CoPrimaryGeneratorAction::CoPrimaryGeneratorAction()
{
  G4int n_particle = 1;
  particleGun = new G4ParticleGun(n_particle);
  particleGun->SetParticleDefinition(G4Gamma::GammaDefinition());
  particleGun->SetParticlePosition(G4ThreeVector(0.*m,0.*m,0.*m));
}
void CoPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)//
{   
     if (G4UniformRand()>0.5)
     {
         particleGun->SetParticleEnergy(1.17*MeV);
     }
     else
     {
         particleGun->SetParticleEnergy(1.33*MeV);
     }
     particleGun->SetParticleMomentumDirection(G4RandomDirection());
  particleGun->GeneratePrimaryVertex(anEvent);
}
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
And the scoring code like below in my run.cc
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CoRun::CoRun():nEvent(0)
{
     G4SDManager* SDman = G4SDManager::GetSDMpointer();
     totaldoseID = SDman->GetCollectionID("MyScorer/TotalDose");
}
void CoRun::RecordEvent(const G4Event* evt)
{   
     G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
     if(!HCE) {return;}
     nEvent++;
     eventtotaldose = (G4THitsMap<G4double>*)(HCE->GetHC(totaldoseID));       
     totaldose += *eventtotaldose;
}
G4double CoRun::GetTotal() const//get the dose value to double val
{
     G4double tot=0;
     std::map<G4int,G4double*>::iterator itr =
         (&totaldose)->GetMap()->begin();
     G4double val = *(itr->second);
     return val;
}
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
But the result of dose is 1.10958e-010 Gy, and divided by activity 2.5MBq, I get the air kerma constant is 44.38e-18 Gym2/(Bqs). You know, that value of ICRU or NIST is about 85e-18. 


Anybody tell me Why?
 
For another verification, I construct the same geometry in MCNP5, and use F6 tally and photon mode only, the result is very close to correct value.
Thanks in advance for the help!
------=_Part_14664_1269685679.1315529877390
Content-Type: text/html; charset=GBK
Content-Transfer-Encoding: 7bit

<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>Hi, I am quite new in Geant4. I had a strange problem about dose deposit using G4MultiFunctionalDetector and G4PSDoseDeposit classes.</div><div>&nbsp;</div><div>The geometry is very simple, three homocentric spheres with radius 10.0m(World), 0.999m, 1.001m respectively, a Co-60 isotropic point source locate at center, all materials are NIST&nbsp;</div><div><br></div><div>G4_AIR. My purpose is to get the dose deposited in the shell between 0.999m and 1.001m to verify the air kerma constant of Co-60 at 1m with events 5e6, namely beamOn(5e6) and&nbsp;</div><div><br></div><div>standard EM processes, indeed I think it's only a exercise.</div><div>&nbsp;</div><div>According to exN07, I wrote my scorer like below in DetectorConstruct:</div><div>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div><div>G4MultiF!
 unctionalDetector* mydosescorer = new 4MultiFunctionalDetector("MyScorer");</div><div>G4SDManager::GetSDMpointer()-&gt;AddNewDetector(mydosescorer);&nbsp;</div><div>logicChamber-&gt;SetSensitiveDetector(mydosescorer);&nbsp;</div><div>G4VPrimitiveScorer* totalenergy = new G4PSEnergyDeposit("TotalEnergy");&nbsp;</div><div>G4VPrimitiveScorer* totaldose = new G4PSDoseDeposit("TotalDose",0);</div><div>&nbsp;mydosescorer-&gt;RegisterPrimitive(totaldose);</div><div>&nbsp;/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div><div>The codes of paticles shoot like below:</div><div>&nbsp;/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div><div>CoPrimaryGeneratorAction::CoPrimaryGeneratorAction()</div><div>{</div><div>&nbsp;&nbsp;G4int n_particle = 1;</div><div>&nbsp;&nbsp;particleGun = new G4Particle!
 Gun(n_particle);</div><div>&nbsp;&nbsp;particleGun-&gt;SetParticleDefinition(G4Gamma::GammaDefinition());</div><div>&nbsp;&nbsp;particleGun-&gt;SetParticlePosition(G4ThreeVector(0.*m,0.*m,0.*m));</div><div>}</div><div>void CoPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)//</div><div>{ &nbsp;&nbsp;</div><div>&nbsp;&nbsp; &nbsp; if (G4UniformRand()&gt;0.5)</div><div>&nbsp;&nbsp; &nbsp; {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; particleGun-&gt;SetParticleEnergy(1.17*MeV);</div><div>&nbsp;&nbsp; &nbsp; }</div><div>&nbsp;&nbsp; &nbsp; else</div><div>&nbsp;&nbsp; &nbsp; {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; particleGun-&gt;SetParticleEnergy(1.33*MeV);</div><div>&nbsp;&nbsp; &nbsp; }</div><div>&nbsp;&nbsp; &nbsp; particleGun-&gt;SetParticleMomentumDirection(G4RandomDirection());</div><div>&nbsp;&nbsp;particleGun-&gt;GeneratePrimaryVertex(anEvent);</div><div>}</div><div>&nbsp;/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div><div>A!
 nd the scoring code like below in my run.cc</div><div>&nbsp;/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div><div>CoRun::CoRun():nEvent(0)</div><div>{</div><div>&nbsp;&nbsp; &nbsp; G4SDManager* SDman = G4SDManager::GetSDMpointer();</div><div>&nbsp;&nbsp; &nbsp; totaldoseID = SDman-&gt;GetCollectionID("MyScorer/TotalDose");</div><div>}</div><div>void CoRun::RecordEvent(const G4Event* evt)</div><div>{ &nbsp;&nbsp;</div><div>&nbsp;&nbsp; &nbsp; G4HCofThisEvent* HCE = evt-&gt;GetHCofThisEvent();</div><div>&nbsp;&nbsp; &nbsp; if(!HCE) {return;}</div><div>&nbsp;&nbsp; &nbsp; nEvent++;</div><div>&nbsp;&nbsp; &nbsp; eventtotaldose = (G4THitsMap&lt;G4double&gt;*)(HCE-&gt;GetHC(totaldoseID)); &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp;&nbsp; &nbsp; totaldose += *eventtotaldose;</div><div>}</div><div>G4double CoRun::GetTotal() const//get the dose value to double val</div><div>{</div><div>!
 &nbsp;&nbsp; &nbsp; G4double tot=0;</div><div>&nbsp;&nbsp; &nbsp; std::map&lt;G4int,G4double*&gt;::iterator itr =</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; (&amp;totaldose)-&gt;GetMap()-&gt;begin();</div><div>&nbsp;&nbsp; &nbsp; G4double val = *(itr-&gt;second);</div><div>&nbsp;&nbsp; &nbsp; return val;</div><div>}</div><div>&nbsp;/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div><div>But the result of dose is 1.10958e-010 Gy, and divided by activity 2.5MBq, I get the air kerma constant is 44.38e-18 Gym2/(Bqs). You know, that value of ICRU or NIST is about 85e-18.&nbsp;</div><div><br></div><div>Anybody tell me Why?</div><div>&nbsp;</div><div>For another verification, I construct the same geometry in MCNP5, and use F6 tally and photon mode only, the result is very close to correct value.</div><div>Thanks in advance for the help!</div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>
------=_Part_14664_1269685679.1315529877390--

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

1 None: Re: dose deposit problem   (Tsukasa Aso - 08 Sep, 2011)
(_ More: Re: dose deposit problem   (Sun Liang - 09 Sep, 2011)
(_ None: Re: dose deposit problem   (Tsukasa Aso - 10 Sep, 2011)
(_ More: Re: dose deposit problem   (Sun Liang - 10 Sep, 2011)
(_ None: Re: dose deposit problem   (Tsukasa Aso - 11 Sep, 2011)
 Add Message Add Message
to: "dose deposit problem"

 Subscribe Subscribe

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