Message: Re: Different energy loss in two method Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Different energy loss in two method 

Forum: Analysis
Re: None Different energy loss in two method (Kavita Lalwani)
Date: 31 May, 2012
From: Kavita Lalwani <Kavita Lalwani>

--20cf3079bea83fcfc504c1549fde
Content-Type: text/plain; charset=ISO-8859-1

Hi

Thanks!

But if second method is wrong then if you see my output, it is giving same
kinetic energy at entry point of phantom (commented via variable
"Ek_in_water" ) and exit point ( "Ek_out_water") as obtain in verbose
output.

Why I am using second method, because I need to calculate angular
spread/scattering (theta_in - theta_out) at phantom.

Using G4Steppoint, I calculate theta_in and theta_out like below

if(fTrack->GetVolume()->GetName() == "water"){
         if (point1->GetStepStatus() ==fGeomBoundary)
           {
      G4ThreeVector direction = fTrack->GetMomentumDirection();
       theta_in_water = direction.theta()/ rad;
        }
}


Above will calculate theta at entry point of phantom.

Is this correct?
On Thu, May 31, 2012 at 6:03 PM, Vladimir IVANTCHENKO <vnivanch@mail.cern.ch
> wrote:

>
> Hello,
>
> There many posts in HyperNews on the subject and also sections in FAQ and
> UserReferenceMethod : only first method is correct.
>
> Vi
>
>
> On Thu, 31 May 2012, Kavita Lalwani wrote:
>
>
>> *** Discussion title: Analysis
>>
>> Hi G4users,
>>
>> I was trying to calculate energy loss of proton in water phantom (it is
>> sphere of diameter 230mm) using two different method.
>>
>> First method:
>>
>> if(fTrack->GetVolume()->**GetName() == "water"){
>> totEdepwater += fStep->GetTotalEnergyDeposit() / MeV;//calculate total
>> deposited energy in phantom
>> }
>>
>> Second method: Using entry and exit point in G4stepPoint, like below
>>
>> G4StepPoint* point1 = fStep->GetPreStepPoint();
>> G4StepPoint* point2 = fStep->GetPostStepPoint();
>>
>> if(fTrack->GetVolume()->**GetName() == "water"){
>>  if (point1->GetStepStatus() ==fGeomBoundary){
>>     Ek_in_water = fTrack->GetKineticEnergy() / MeV;//calculate kinetic
>> energy at entry point of phantom
>>      }
>>
>> if (point2->GetStepStatus() == fGeomBoundary){
>>    analysis->Ek_out_water = fTrack->GetKineticEnergy() / MeV;//calculate
>> kinetic energy at exit point of phantom
>>    }
>> Eloss_water = Ek_in_water -Ek_out_water;
>>
>> }
>>
>> Then I am plotting these variables in histograms event by event.
>>
>> Using two method, I am getting different distributions for energy loss
>> in water phantom.
>>
>> I have attached plots for energy loss (for 1k and one event) using two
>> method and verbose output (for one event). You can have a look via
>> comments "Ek_in_water" and "Ek_out_water".
>>
>> Please suggest where I am wrong?
>>
>> Brief description: Beam: proton pencil beam, KE: 200 MeV Geometry: Two
>> fibers before water phantom and two after phantom to measure the
>> incoming and outgoing position of proton and at the end, a calorimeter
>> made up of 100 layers of scintillators to measure the energy of outgoing
>> proton.
>>
>>  Attachment:
>>     http://hypernews.slac.**stanford.edu/HyperNews/geant4/**
>> get/AUX/2012/05/31/05.02-**93457-ElossEdep.pdf<http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2012/05/31/05.02-93457-ElossEdep.pdf>
>>     http://hypernews.slac.**stanford.edu/HyperNews/geant4/**
>> get/AUX/2012/05/31/05.02-**29179-OUTPUT.text<http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2012/05/31/05.02-29179-OUTPUT.text>
>>
>> ------------------------------**------------------------------**-
>> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or
>> unsubscribe) at:
>> http://hypernews.slac.**stanford.edu/HyperNews/geant4/**
>> get/analysis/422.html<http://hypernews.slac.stanford.edu/HyperNews/geant4/get/analysis/422.html>
>>
>>


-- 
Regards
Kavita Lalwani
Research Associate
Physics Department
University of Delhi.

Mobile No.9250913499
Land line No.25081060

--20cf3079bea83fcfc504c1549fde
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi <br><br>Thanks!<br><br>But if second method is wrong then if you see my =
output, it is giving same kinetic energy at entry point of phantom (comment=
ed via variable &quot;Ek_in_water&quot; ) and exit point ( &quot;Ek_out_wat=
er&quot;) as obtain in verbose output.<br>
<br>Why I am using second method, because I need to calculate angular sprea=
d/scattering (theta_in - theta_out) at phantom.<br><br>Using G4Steppoint, I=
 calculate theta_in and theta_out like below<br><br>if(fTrack-&gt;GetVolume=
()-&gt;GetName() =3D=3D &quot;water&quot;){<br>
=A0=A0=A0 =A0=A0=A0=A0 if (point1-&gt;GetStepStatus() =3D=3DfGeomBoundary)<=
br>=A0=A0=A0 =A0=A0=A0 =A0=A0 { <br>=A0=A0=A0=A0=A0 G4ThreeVector direction=
 =3D fTrack-&gt;GetMomentumDirection();=A0 <br>=A0=A0=A0=A0=A0=A0 theta_in_=
water =3D direction.theta()/ rad;<br><div class=3D"gmail_quote">
=A0=A0=A0=A0=A0=A0=A0 }<br>}<br><br><br>Above will calculate theta at entry=
 point of phantom.<br><br>Is this correct?<br>On Thu, May 31, 2012 at 6:03 =
PM, Vladimir IVANTCHENKO <span dir=3D"ltr">&lt;<a href=3D"mailto:vnivanch@m=
ail.cern.ch" target=3D"_blank">vnivanch@mail.cern.ch</a>&gt;</span> wrote:<=
br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><br>
Hello,<br>
<br>
There many posts in HyperNews on the subject and also sections in FAQ and U=
serReferenceMethod : only first method is correct.<span class=3D"HOEnZb"><f=
ont color=3D"#888888"><br>
<br>
Vi</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
<br>
On Thu, 31 May 2012, Kavita Lalwani wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<br>
*** Discussion title: Analysis<br>
<br>
Hi G4users,<br>
<br>
I was trying to calculate energy loss of proton in water phantom (it is<br>
sphere of diameter 230mm) using two different method.<br>
<br>
First method:<br>
<br>
if(fTrack-&gt;GetVolume()-&gt;<u></u>GetName() =3D=3D &quot;water&quot;){<b=
r>
totEdepwater +=3D fStep-&gt;GetTotalEnergyDeposit() / MeV;//calculate total=
 deposited energy in phantom<br>
}<br>
<br>
Second method: Using entry and exit point in G4stepPoint, like below<br>
<br>
G4StepPoint* point1 =3D fStep-&gt;GetPreStepPoint();<br>
G4StepPoint* point2 =3D fStep-&gt;GetPostStepPoint();<br>
<br>
if(fTrack-&gt;GetVolume()-&gt;<u></u>GetName() =3D=3D &quot;water&quot;){<b=
r>
 =A0if (point1-&gt;GetStepStatus() =3D=3DfGeomBoundary){<br>
 =A0 =A0 Ek_in_water =3D fTrack-&gt;GetKineticEnergy() / MeV;//calculate ki=
netic energy at entry point of phantom<br>
 =A0 =A0 =A0}<br>
<br>
if (point2-&gt;GetStepStatus() =3D=3D fGeomBoundary){<br>
 =A0 =A0analysis-&gt;Ek_out_water =3D fTrack-&gt;GetKineticEnergy() / MeV;/=
/calculate kinetic energy at exit point of phantom<br>
 =A0 =A0}<br>
Eloss_water =3D Ek_in_water -Ek_out_water;<br>
<br>
}<br>
<br>
Then I am plotting these variables in histograms event by event.<br>
<br>
Using two method, I am getting different distributions for energy loss<br>
in water phantom.<br>
<br>
I have attached plots for energy loss (for 1k and one event) using two<br>
method and verbose output (for one event). You can have a look via<br>
comments &quot;Ek_in_water&quot; and &quot;Ek_out_water&quot;.<br>
<br>
Please suggest where I am wrong?<br>
<br>
Brief description: Beam: proton pencil beam, KE: 200 MeV Geometry: Two<br>
fibers before water phantom and two after phantom to measure the<br>
incoming and outgoing position of proton and at the end, a calorimeter<br>
made up of 100 layers of scintillators to measure the energy of outgoing<br=
>
proton.<br>
<br>
 =A0Attachment:<br>
 =A0 =A0 <a href=3D"http://hypernews.slac.stanford.edu/HyperNews/geant4/get=
/AUX/2012/05/31/05.02-93457-ElossEdep.pdf" target=3D"_blank">http://hyperne=
ws.slac.<u></u>stanford.edu/HyperNews/geant4/<u></u>get/AUX/2012/05/31/05.0=
2-<u></u>93457-ElossEdep.pdf</a><br>

 =A0 =A0 <a href=3D"http://hypernews.slac.stanford.edu/HyperNews/geant4/get=
/AUX/2012/05/31/05.02-29179-OUTPUT.text" target=3D"_blank">http://hypernews=
.slac.<u></u>stanford.edu/HyperNews/geant4/<u></u>get/AUX/2012/05/31/05.02-=
<u></u>29179-OUTPUT.text</a><br>

<br>
------------------------------<u></u>------------------------------<u></u>-=
<br>
Visit this GEANT4 at <a href=3D"http://hypernews.slac.stanford.edu" target=
=3D"_blank">hypernews.slac.stanford.edu</a> message (to reply or unsubscrib=
e) at:<br>
<a href=3D"http://hypernews.slac.stanford.edu/HyperNews/geant4/get/analysis=
/422.html" target=3D"_blank">http://hypernews.slac.<u></u>stanford.edu/Hype=
rNews/geant4/<u></u>get/analysis/422.html</a><br>
<br>
</blockquote>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Regards<br>=
<font style=3D"color:rgb(0,0,0)" color=3D"#888888"><span>Kavita</span> Lalw=
ani<br>Research Associate<br>Physics Department</font><br style=3D"color:rg=
b(0,0,0)">
<span style=3D"color:rgb(0,0,0)">University of Delhi.<br><br>Mobile No.9250=
913499<br>Land line No.25081060<br></span><br>

--20cf3079bea83fcfc504c1549fde--

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

1 None: Re: Different energy loss in two method   (Kavita Lalwani - 31 May, 2012)
(_ None: Re: Different energy loss in two method   (Tsukasa Aso - 31 May, 2012)
(_ None: Re: Different energy loss in two method   (Kavita Lalwani - 04 Jun, 2012)
(_ None: Re: Different energy loss in two method   (Tsukasa Aso - 05 Jun, 2012)
 Add Message Add Message
to: "Re: Different energy loss in two method"

 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 ]