Message: Re: Different energy loss in two method Not Logged In (login)

## Re: Different energy loss in two method

Forum: Analysis
Re: 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 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-**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 >> >> -- 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

Thanks!

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 "Ek_in_water" ) and exit point ( "Ek_out_wat= er") as obtain in verbose output.

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

Using G4Steppoint, I= calculate theta_in and theta_out like below

if(fTrack->GetVolume= ()->GetName() =3D=3D "water"){
=A0=A0=A0 =A0=A0=A0=A0 if (point1->GetStepStatus() =3D=3DfGeomBoundary)<= br>=A0=A0=A0 =A0=A0=A0 =A0=A0 {
=A0=A0=A0=A0=A0 G4ThreeVector direction= =3D fTrack->GetMomentumDirection();=A0
=A0=A0=A0=A0=A0=A0 theta_in_= water =3D direction.theta()/ rad;
=A0=A0=A0=A0=A0=A0=A0 }
}

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:<= br>

Hello,

There many posts in HyperNews on the subject and also sections in FAQ and U= serReferenceMethod : 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() =3D=3D "water"){ totEdepwater +=3D fStep->GetTotalEnergyDeposit() / MeV;//calculate total= deposited energy in phantom
}

Second method: Using entry and exit point in G4stepPoint, like below

G4StepPoint* point1 =3D fStep->GetPreStepPoint();
G4StepPoint* point2 =3D fStep->GetPostStepPoint();

if(fTrack->GetVolume()->GetName() =3D=3D "water"){ =A0if (point1->GetStepStatus() =3D=3DfGeomBoundary){
=A0 =A0 Ek_in_water =3D fTrack->GetKineticEnergy() / MeV;//calculate ki= netic energy at entry point of phantom
=A0 =A0 =A0}

if (point2->GetStepStatus() =3D=3D fGeomBoundary){
=A0 =A0analysis->Ek_out_water =3D fTrack->GetKineticEnergy() / MeV;/= /calculate kinetic energy at exit point of phantom
=A0 =A0}
Eloss_water =3D 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

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.

=A0Attachment:
=A0 =A0 http://hyperne= ws.slac.stanford.edu/HyperNews/geant4/get/AUX/2012/05/31/05.0= 2-93457-ElossEdep.pdf
=A0 =A0 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 unsubscrib= e) at:
http://hypernews.slac.stanford.edu/Hype= rNews/geant4/get/analysis/422.html

--
Regards
= Kavita Lalw= ani
Research Associate
Physics Department

University of Delhi.

Mobile No.9250= 913499
Land line No.25081060

--20cf3079bea83fcfc504c1549fde-- ```

1 Re: Different energy loss in two method   (Kavita Lalwani - 31 May, 2012)  Re: Different energy loss in two method   (Tsukasa Aso - 31 May, 2012)  Re: Different energy loss in two method   (Kavita Lalwani - 04 Jun, 2012)  Re: Different energy loss in two method   (Tsukasa Aso - 05 Jun, 2012)
 to: "Re: Different energy loss in two method"
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 ]