Message: RE: detecting particle leaving a volume Not Logged In (login)

## RE: detecting particle leaving a volume

Forum: Fast Simulation, Transportation & Others
Date: 18 Feb, 2010
From: naima <naima>

 ```--_b683cf6c-26f2-4e8a-bcc9-d2653a00bf9b_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20 =20 Hi there =2C In fact in my works=2CI try to simulate interactions of neutrons with mater= ials(this is for neutron diffraction experiment).In particular =2Cnow I try= to optimize the dimensions of shielding material composed of Al2O3 (sapphi= re ) as filter of thermal neutrons ....the geometries are very simple=2CI u= se only cylinders or cubes . In other words =2Csuppose I use 12 cm of Al2O= 3 as shielding material =2C and I would like to determine the efficiency of= this shielding material=2Cthen I have to determine the fraction of neutron= s that are transmitted . After the shielding material =2CI'm created a vacuum geometry in ''Detector= Construction'' and defined it as sensitive detector .I use PostStepPoint = =3D=3DfGeometryBoundary to detect a particle leaving from shielding materia= l Al2O3 =2Cand I use touchable to verified (gives volume or region which lo= cate the particle leaved from the shielding material Al2O3). But we have 2 procedure to make in file ''SD'' =20 G4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* R= Ohist) { G4Track* aTrack =3D aStep->GetTrack()=3B G4double edep =3D aStep->GetTotalEnergyDeposit()=3B G4StepPoint* point1=3DaStep->GetPreStepPoint()=3B G4StepPoint* point2=3DaStep->GetPostStepPoint()=3B =20 if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point1->GetTouchableHandle()=3B G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B G4String name =3D volume2->GetName()=3B G4cout<<"volume "<GetTrack()=3B G4double edep =3D aStep->GetTotalEnergyDeposit()=3B G4StepPoint* point1=3DaStep->GetPreStepPoint()=3B G4StepPoint* point2=3DaStep->GetPostStepPoint()=3B =20 if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point2->GetTouchableHandle()=3B G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B G4String name =3D volume2->GetName()=3B G4cout<<"volume "<GetTrack()=3B G4double edep =3D aStep->GetTotalEnergyDeposit()=3B G4StepPoint* point1=3DaStep->GetPreStepPoint()=3B G4StepPoint* point2=3DaStep->GetPostStepPoint()=3B =20 if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point1->GetTouchableHandle()=3B G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B G4String name =3D volume2->GetName()=3B G4cout<<"volume "<>> Event 62 420 trajectories stored in this event. volume Tubs volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubstransmission volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubs1 (such as tubs1 is the name of the world volume(vacuum)=2C Tubs is the name = of shielding material(Al2O3) and Tubstransmission is the name of vaccum ge= ometry('detector' after shielding material)). Hi there =2C In fact in my works=2CI try to simulate interactions of neutrons with mater= ials(this is for neutron diffraction experiment).In particular =2Cnow I try= to optimize the dimensions of shielding material composed of Al2O3 (sapphi= re ) as filter of thermal neutrons ....the geometries are very simple=2CI u= se only cylinders or cubes . In other words =2Csuppose I use 12 cm of Al2O= 3 as shielding material =2C and I would like to determine the efficiency of= this shielding material=2Cthen I have to determine the fraction of neutron= s that are transmitted . After the shielding material =2CI'm created a vacuum geometry in ''Detector= Construction'' and defined it as sensitive detector .I use PostStepPoint = =3D=3DfGeometryBoundary to detect a particle leaving from shielding materia= l Al2O3 =2Cand I use touchable to verified (gives volume or region which lo= cate the particle leaved from the shielding material Al2O3). But we have 2 procedure to make in file ''SD'' =20 G4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* R= Ohist) { G4Track* aTrack =3D aStep->GetTrack()=3B G4double edep =3D aStep->GetTotalEnergyDeposit()=3B G4StepPoint* point1=3DaStep->GetPreStepPoint()=3B G4StepPoint* point2=3DaStep->GetPostStepPoint()=3B =20 if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point1->GetTouchableHandle()=3B G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B G4String name =3D volume2->GetName()=3B G4cout<<"volume "<GetTrack()=3B G4double edep =3D aStep->GetTotalEnergyDeposit()=3B G4StepPoint* point1=3DaStep->GetPreStepPoint()=3B G4StepPoint* point2=3DaStep->GetPostStepPoint()=3B =20 if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point2->GetTouchableHandle()=3B G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B G4String name =3D volume2->GetName()=3B G4cout<<"volume "<GetTrack()=3B G4double edep =3D aStep->GetTotalEnergyDeposit()=3B G4StepPoint* point1=3DaStep->GetPreStepPoint()=3B G4StepPoint* point2=3DaStep->GetPostStepPoint()=3B =20 if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point1->GetTouchableHandle()=3B G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B G4String name =3D volume2->GetName()=3B G4cout<<"volume "<>> Event 62 420 trajectories stored in this event. volume Tubs volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubstransmission volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubs1 volume Tubs volume Tubs1 (such as tubs1 is the name of the world volume(vacuum)=2C Tubs is the name = of shielding material(Al2O3) and Tubstransmission is the name of vaccum ge= ometry('detector' after shielding material)). > If I use in the file ''SD'' if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point2->GetTouchableHandle()=3B G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B G4String name =3D volume2->GetName()=3B G4cout<<"volume "< My problem is what's the difference betweenif (point2->GetStepStatus()=3D= =3DfGeomBoundary) { G4TouchableHandle touch2 =3D point2->GetTouchableHandle()=3B=20 and if (point2->GetStepStatus()=3D=3DfGeomBoundary) { G4TouchableHandle touch2 =3D point1->GetTouchableHandle()=3B >what's the corectness result I use to give the fraction of particle are tr= ansmitted and how to resolve error of segmentation violation. Many thanks. Naima.=20 Hotmail : une messagerie performante et gratuite avec une s=E9curit=E9 sign= =E9e Microsoft Profitez-en Hotmail : un service de messagerie gratuit=2C fiable et complet Profitez-en Hotmail : une messagerie performante et gratuite avec une s=E9curit=E9 sign= =E9e Microsoft Profitez-en =20 _________________________________________________________________ Hotmail : une messagerie fiable avec la protection anti-spam performante de= Microsoft https://signup.live.com/signup.aspx?id=3D60969= --_b683cf6c-26f2-4e8a-bcc9-d2653a00bf9b_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
=3B
=3B
=3BHi there  =3B=2C
In fact in my works=2CI try to simulate int= eractions of neutrons with materials(this is for neutron diffraction experi= ment).In particular =2Cnow I try to optimize the dimensions of shielding ma= terial composed of Al2O3 (sapphire ) as filter of thermal neutrons ....the = geometries are very simple=2CI use only cylinders or cubes . In other = =3Bwords =2Csuppose I use =3B 12 cm of Al2O3 =3Bas shielding materi= al =3B=2C and I =3Bwould like to determine the efficiency of this s= hielding material=2Cthen I have to determine the fraction of neutrons that = are transmitted .
After the shielding material =2CI'm created a vacuum g= eometry in ''DetectorConstruction'' and defined it as sensitive detector .I= use =3B PostStepPoint =3D=3DfGeometryBoundary to detect a particle lea= ving from shielding material Al2O3 =2Cand I use touchable to verified (give= s volume or region which locate the particle leaved from the shielding mate= rial Al2O3).
But we have 2 procedure to make in file ''SD''  =3B
=  =3BG4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG4Touc= hableHistory* ROhist)
{
=3B G4Track* aTrack =3D aStep->=3BGetT= rack()=3B
=3B G4double edep =3D aStep->=3BGetTotalEnergyDeposit()= =3B
=3B G4StepPoint* point1=3DaStep->=3BGetPreStepPoint()=3B
&= nbsp=3B G4StepPoint* point2=3DaStep->=3BGetPostStepPoint()=3B
=3B=  =3B
if (point2->=3BGetStep= Status()=3D=3DfGeomBoundary)
=3B {
=3B G4TouchableHa= ndle touch2 =3D point1->=3BGetTouchableHandl= e()=3B
=3B G4VPhysicalVolume* volume2 =3D touch2->=3BGetVolume()= =3B
=3B G4String name =3D volume2->=3BGetName()=3B
=3B G4= cout<=3B<=3B"volume "<=3B<=3Bname<=3B<=3BG4endl=3B
=3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B and
G4bool neutronTrack= erSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* ROhist)
{
= =3B G4Track* aTrack =3D aStep->=3BGetTrack()=3B
=3B G4double edep= =3D aStep->=3BGetTotalEnergyDeposit()=3B
=3B G4StepPoint* point1= =3DaStep->=3BGetPreStepPoint()=3B
=3B G4StepPoint* point2=3DaStep= ->=3BGetPostStepPoint()=3B
=3B
=3B if (point2->=3BGetStepStatus()=3D=3DfGeomBoundary)
=3B {
=3B G4TouchableHandle touch2 =3D<= /STRONG> point2->=3BGetTouchableHand= le()=3B
=3B G4VPhysicalVolume* volume2 =3D touch2-= >=3BGetVolume()=3B
=3B G4String name =3D volume2->=3BGetName()= =3B
=3B G4cout<=3B<=3B"volume "<=3B<=3Bname<=3B<=3BG4en= dl=3B
=3B
=3BIn the file ''neutronTrackerSD.cc ' '= If I use
G4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG= 4TouchableHistory* ROhist)
{
=3B G4Track* aTrack =3D aStep->= =3BGetTrack()=3B
=3B G4double edep =3D aStep->=3BGetTotalEnergyDe= posit()=3B
=3B G4StepPoint* point1=3DaStep->=3BGetPreStepPoint()= =3B
=3B G4StepPoint* point2=3DaStep->=3BGetPostStepPoint()=3B
=  =3B
=3B
if (point2->= =3BGetStepStatus()=3D=3DfGeomBoundary)
=3B {
=3B G4T= ouchableHandle touch2 =3D point1->=3BGetTouc= hableHandle()=3B
=3B G4VPhysicalVolume* volume2 =3D touch2->=3BGe= tVolume()=3B
=3B G4String name =3D volume2->=3BGetName()=3B
&n= bsp=3B G4cout<=3B<=3B"volume "<=3B<=3Bname<=3B<=3BG4endl=3B
=
I get this results volume Tubs1
>=3B>=3B>=3B Event 62
=  =3B =3B =3B 420 trajectories stored in this event.
volume T= ubs
volume Tubs1
volume Tubs
volume Tubs1
volume Tubs
volume= Tubs1
volume Tubs
volume Tubstransmission
volume Tubs1
volume = Tubs
volume Tubs1
volume Tubs
volume Tubs1
volume Tubs
volum= e Tubs1
(such as tubs1 is the name of the w= orld volume(vacuum)=2C Tubs is =3Bthe name= of  =3Bshielding material(Al2O3) and Tubstransmission is the name = =3Bof vaccum geometry('detector' after shielding material)).

Hi ther= e =2C
In fact in my works=2CI try to simulate interactions of neutrons w= ith materials(this is for neutron diffraction experiment).In particular =2C= now I try to optimize the dimensions of shielding material composed of Al2O= 3 (sapphire ) as filter of thermal neutrons ....the geometries are very sim= ple=2CI use only cylinders or cubes . In other =3Bwords =2Csuppose I us= e =3B 12 cm of Al2O3 =3Bas shielding material =3B=2C and I = =3Bwould like to determine the efficiency of this shielding material=2Cthen= I have to determine the fraction of neutrons that are transmitted .
Aft= er the shielding material =2CI'm created a vacuum geometry in ''DetectorCon= struction'' and defined it as sensitive detector .I use =3B PostStepPoi= nt =3D=3DfGeometryBoundary to detect a particle leaving from shielding mate= rial Al2O3 =2Cand I use touchable to verified (gives volume or region which= locate the particle leaved from the shielding material Al2O3).
But we h= ave 2 procedure to make in file ''SD''  =3B
=3BG4bool n= eutronTrackerSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* ROhist){
=3B G4Track* aTrack =3D aStep->=3BGetTrack()=3B
=3B G4= double edep =3D aStep->=3BGetTotalEnergyDeposit()=3B
=3B G4StepPo= int* point1=3DaStep->=3BGetPreStepPoint()=3B
=3B G4StepPoint* poi= nt2=3DaStep->=3BGetPostStepPoint()=3B
=3B
=3B if (point2->=3BGetStepStatus()=3D=3DfGeomBoundary)
=  =3B {
=3B G4TouchableHandle touch2 =3D p= oint1->=3BGetTouchableHandle()=3B
=3B G4VPhysicalVolume* v= olume2 =3D touch2->=3BGetVolume()=3B
=3B G4String name =3D volume= 2->=3BGetName()=3B
=3B G4cout<=3B<=3B"volume "<=3B<=3Bnam= e<=3B<=3BG4endl=3B

=3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B and
G4bool neutronTrackerSD::P= rocessHits(G4Step* aStep=2CG4TouchableHistory* ROhist)
{
=3B G4T= rack* aTrack =3D aStep->=3BGetTrack()=3B
=3B G4double edep =3D aS= tep->=3BGetTotalEnergyDeposit()=3B
=3B G4StepPoint* point1=3DaSte= p->=3BGetPreStepPoint()=3B
=3B G4StepPoint* point2=3DaStep->=3B= GetPostStepPoint()=3B
=3B
= =3B if (point2->=3BGetStepStatus()=3D=3DfGeomBoundary)
=3B {
=3B G4TouchableHandle touch2 =3D point2->=3BGetTouchableHandle()= =3B
=3B G4VPhysicalVolume* volume2 =3D touch2->= =3BGetVolume()=3B
=3B G4String name =3D volume2->=3BGetName()=3B<= BR> =3B G4cout<=3B<=3B"volume "<=3B<=3Bname<=3B<=3BG4endl= =3B
=3B
=3BIn the file ''neutronTrackerSD.cc ' 'If= I use
G4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG4T= ouchableHistory* ROhist)
{
=3B G4Track* aTrack =3D aStep->=3BG= etTrack()=3B
=3B G4double edep =3D aStep->=3BGetTotalEnergyDeposi= t()=3B
=3B G4StepPoint* point1=3DaStep->=3BGetPreStepPoint()=3B =3B G4StepPoint* point2=3DaStep->=3BGetPostStepPoint()=3B
= =3B
=3B
if (point2->=3BGe= tStepStatus()=3D=3DfGeomBoundary)
=3B {
=3B G4Toucha= bleHandle touch2 =3D point1->=3BGetTouchable= Handle()=3B
=3B G4VPhysicalVolume* volume2 =3D touch2->=3BGetVolu= me()=3B
=3B G4String name =3D volume2->=3BGetName()=3B
= =3B G4cout<=3B<=3B"volume "<=3B<=3Bname<=3B<=3BG4endl=3B
I get this results volume Tubs1
>=3B>=3B>=3B Event 62
&nb= sp=3B =3B =3B 420 trajectories stored in this event.
volume Tubs=
volume Tubs1
volume Tubs
volume Tubs1
volume Tubs
volume Tu= bs1
volume Tubs
volume Tubstransmission
volume Tubs1
volume Tub= s
volume Tubs1
volume Tubs
volume Tubs1
volume Tubs
volume T= ubs1
(such as tubs1 is the name of the worl= d volume(vacuum)=2C Tubs is =3Bthe name of=  =3Bshielding material(Al2O3) and Tubstransmission is the name =3B= of vaccum geometry('detector' after shielding material)).

>=3B If = I use =3B in the file ''SD''
if (point= 2->=3BGetStepStatus()=3D=3DfGeomBoundary)
=3B {
=3B G4TouchableHandle touch2 =3D
point2->=3BGetTouchableHandle()=3B
= =3B G4VPhysicalVolume* volume2 =3D touch2->=3BGetVolume()=3B
&= nbsp=3B G4String name =3D volume2->=3BGetName()=3B
=3B G4cout<= =3B<=3B"volume "<=3B<=3Bname<=3B<=3BG4endl=3B

I get this result

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
###= Run 0 start.
/tracking/storeTrajectory 1
/vis~/clear/view
/vis~/d= raw/current
volume Tubs1
=3B*** Break *** segmentation violation=
(no debugging symbols found)
Attaching to program: /proc/9544/exe=2C process= 9544
(no debugging symbols found)...done.
(no debugging symbols foun= d)...done.
>=3B My problem is what's the difference b= etweenif (point2->=3BGetStepStatus()=3D=3Df= GeomBoundary)
=3B {
=3B G4Touchable= Handle touch2 =3D
point2->= =3BGetTouchableHandle()=3B
=3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B and
=3Bif (point2->=3BGetStepStatus()=3D=3DfGe= omBoundary)
=3B {
=3B G4Toucha= bleHandle touch2 =3D
point1->=3BGetTouchableHandle()=3B

>=3Bwhat's the core= ctness result I use to give the fraction of particle are transmitted and ho= w to resolve =3Berror of segmentation violation.
Many thanks.

Naima.

Hotmail : une messagerie performante et gratuite avec une s=E9curit=E9 sign= =E9e Microsoft P= rofitez-en

Hotmail : un service de messagerie gratuit=2C fiable et complet Profitez-en

Hotmail : une messagerie performante et gratuite avec une s=E9curit=E9 sign= =E9e Microsoft P= rofitez-en

Hotmail : une messagerie fiable a= vec la protection anti-spam performante de Microsoft Inscrivez-vous = --_b683cf6c-26f2-4e8a-bcc9-d2653a00bf9b_-- ```

1 Re: RE: detecting particle leaving a volume   (smith - 08 Oct, 2012)
 to: "RE: detecting particle leaving a volume"
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 ]