Message: detectin particles leaving a volume. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None detectin particles leaving a volume. 

Forum: Event and Track Management
Date: 18 Feb, 2010
From: naima <naima>

--_3bedfd65-4ed8-46d1-a1da-4df99fa41c22_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


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 "<<name<<G4endl=3B
                                                   and=20
G4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* RO=
hist)
{
  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 point2->GetTouchableHandle()=3B
  G4VPhysicalVolume* volume2 =3D touch2->GetVolume()=3B
  G4String name =3D volume2->GetName()=3B
  G4cout<<"volume "<<name<<G4endl=3B
=20
 In the file ''neutronTrackerSD.cc ' 'If I use=20
G4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* RO=
hist)
{
  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 "<<name<<G4endl=3B
I get this results volume Tubs1
>>> 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 "<<name<<G4endl=3B=20

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~/draw/current
volume Tubs1

 *** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
Attaching to program: /proc/9544/exe=2C process 9544
(no debugging symbols found)...done.
(no debugging symbols found)...done.

> 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

=20




=20
           =20
_________________________________________________________________
Hotmail : une messagerie fiable avec la protection anti-spam performante de=
 Microsoft
https://signup.live.com/signup.aspx?id=3D60969=

--_3bedfd65-4ed8-46d1-a1da-4df99fa41c22_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
--></style>
</head>
<body class=3D'hmmessage'>
Hi there =2C<BR>In fact in my works=2CI try to simulate interactions of neu=
trons with materials(this is for neutron diffraction experiment).In particu=
lar =2Cnow I try to optimize the dimensions of shielding material composed =
of Al2O3 (sapphire ) as filter of thermal neutrons ....the geometries are v=
ery simple=2CI use only cylinders or cubes . In other&nbsp=3Bwords =2Csuppo=
se I use&nbsp=3B 12 cm of Al2O3&nbsp=3Bas shielding material&nbsp=3B=2C and=
 I&nbsp=3Bwould like to determine the efficiency of this shielding material=
=2Cthen I have to determine the fraction of neutrons that are transmitted .=
<BR>After the shielding material =2CI'm created a vacuum geometry in ''Dete=
ctorConstruction'' and defined it as sensitive detector .I use&nbsp=3B Post=
StepPoint =3D=3DfGeometryBoundary to detect a particle leaving from shieldi=
ng material Al2O3 =2Cand I use touchable to verified (gives volume or regio=
n which locate the particle leaved from the shielding material Al2O3).<BR>B=
ut we have 2 procedure to make in file ''SD'' &nbsp=3B<BR>&nbsp=3B<STRONG>G=
4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* ROh=
ist)<BR>{<BR>&nbsp=3B G4Track* aTrack =3D aStep-&gt=3BGetTrack()=3B<BR>&nbs=
p=3B G4double edep =3D aStep-&gt=3BGetTotalEnergyDeposit()=3B<BR>&nbsp=3B G=
4StepPoint* point1=3DaStep-&gt=3BGetPreStepPoint()=3B<BR>&nbsp=3B G4StepPoi=
nt* point2=3DaStep-&gt=3BGetPostStepPoint()=3B<BR>&nbsp=3B <BR>&nbsp=3B <FO=
NT color=3D#ff0000>if (point2-&gt=3BGetStepStatus()=3D=3DfGeomBoundary)<BR>=
</FONT>&nbsp=3B {<BR>&nbsp=3B G4TouchableHandle touch2 =3D <FONT color=3D#f=
f0000>point1</FONT>-&gt=3BGetTouchableHandle()=3B<BR>&nbsp=3B G4VPhysicalVo=
lume* volume2 =3D touch2-&gt=3BGetVolume()=3B<BR>&nbsp=3B G4String name =3D=
 volume2-&gt=3BGetName()=3B<BR>&nbsp=3B G4cout&lt=3B&lt=3B"volume "&lt=3B&l=
t=3Bname&lt=3B&lt=3BG4endl=3B</STRONG><BR><STRONG><FONT color=3D#002060>&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B=
&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B=
&nbsp=3B&nbsp=3B&nbsp=3B and</FONT> </STRONG><BR><STRONG>G4bool neutronTrac=
kerSD::ProcessHits(G4Step* aStep=2CG4TouchableHistory* ROhist)<BR>{<BR>&nbs=
p=3B G4Track* aTrack =3D aStep-&gt=3BGetTrack()=3B<BR>&nbsp=3B G4double ede=
p =3D aStep-&gt=3BGetTotalEnergyDeposit()=3B<BR>&nbsp=3B G4StepPoint* point=
1=3DaStep-&gt=3BGetPreStepPoint()=3B<BR>&nbsp=3B G4StepPoint* point2=3DaSte=
p-&gt=3BGetPostStepPoint()=3B<BR></STRONG>&nbsp=3B <BR><FONT color=3D#ff000=
0>&nbsp=3B <STRONG>if (point2-&gt=3BGetStepStatus()=3D=3DfGeomBoundary)</ST=
RONG></FONT><BR>&nbsp=3B<STRONG> {<BR>&nbsp=3B G4TouchableHandle touch2 =3D=
</STRONG> <STRONG><FONT color=3D#ff0000>point2</FONT>-&gt=3BGetTouchableHan=
dle()=3B<BR></STRONG>&nbsp=3B <STRONG>G4VPhysicalVolume* volume2 =3D touch2=
-&gt=3BGetVolume()=3B<BR>&nbsp=3B G4String name =3D volume2-&gt=3BGetName()=
=3B<BR>&nbsp=3B G4cout&lt=3B&lt=3B"volume "&lt=3B&lt=3Bname&lt=3B&lt=3BG4en=
dl=3B<BR></STRONG>&nbsp=3B<BR>&nbsp=3BIn the file ''neutronTrackerSD.cc ' '=
If I use <BR><STRONG>G4bool neutronTrackerSD::ProcessHits(G4Step* aStep=2CG=
4TouchableHistory* ROhist)<BR>{<BR>&nbsp=3B G4Track* aTrack =3D aStep-&gt=
=3BGetTrack()=3B<BR>&nbsp=3B G4double edep =3D aStep-&gt=3BGetTotalEnergyDe=
posit()=3B<BR>&nbsp=3B G4StepPoint* point1=3DaStep-&gt=3BGetPreStepPoint()=
=3B<BR>&nbsp=3B G4StepPoint* point2=3DaStep-&gt=3BGetPostStepPoint()=3B<BR>=
&nbsp=3B <BR>&nbsp=3B </STRONG><STRONG><FONT color=3D#ff0000>if (point2-&gt=
=3BGetStepStatus()=3D=3DfGeomBoundary)<BR></FONT>&nbsp=3B {<BR>&nbsp=3B G4T=
ouchableHandle touch2 =3D <FONT color=3D#ff0000>point1</FONT>-&gt=3BGetTouc=
hableHandle()=3B<BR>&nbsp=3B G4VPhysicalVolume* volume2 =3D touch2-&gt=3BGe=
tVolume()=3B<BR>&nbsp=3B G4String name =3D volume2-&gt=3BGetName()=3B<BR>&n=
bsp=3B G4cout&lt=3B&lt=3B"volume "&lt=3B&lt=3Bname&lt=3B&lt=3BG4endl=3B</ST=
RONG><BR>I get this results volume Tubs1<BR>&gt=3B&gt=3B&gt=3B Event 62<BR>=
&nbsp=3B&nbsp=3B&nbsp=3B 420 trajectories stored in this event.<BR>volume T=
ubs<BR>volume Tubs1<BR>volume Tubs<BR>volume Tubs1<BR>volume Tubs<BR>volume=
 Tubs1<BR>volume Tubs<BR>volume Tubstransmission<BR>volume Tubs1<BR>volume =
Tubs<BR>volume Tubs1<BR>volume Tubs<BR>volume Tubs1<BR>volume Tubs<BR>volum=
e Tubs1<BR>(such as <FONT color=3D#ff0000>tubs1</FONT> is the name of the w=
orld volume(vacuum)=2C <FONT color=3D#ff0000>Tubs</FONT> is&nbsp=3Bthe name=
 of &nbsp=3Bshielding material(Al2O3) and Tubstransmission is the name&nbsp=
=3Bof vaccum geometry('detector' after shielding material)).<BR><BR>
&gt=3B If I use&nbsp=3B in the file ''SD''<BR><STRONG><FONT color=3D#ff0000=
>if (point2-&gt=3BGetStepStatus()=3D=3DfGeomBoundary)<BR></FONT></STRONG>&n=
bsp=3B<STRONG> {<BR>&nbsp=3B G4TouchableHandle touch2 =3D</STRONG> <STRONG>=
<FONT color=3D#ff0000>point2</FONT>-&gt=3BGetTouchableHandle()=3B<BR></STRO=
NG>&nbsp=3B <STRONG>G4VPhysicalVolume* volume2 =3D touch2-&gt=3BGetVolume()=
=3B<BR>&nbsp=3B G4String name =3D volume2-&gt=3BGetName()=3B<BR>&nbsp=3B G4=
cout&lt=3B&lt=3B"volume "&lt=3B&lt=3Bname&lt=3B&lt=3BG4endl=3B </STRONG><BR=
>
<STRONG>I get this result</STRONG><BR>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>### Run 0 start.<BR>/tracking/store=
Trajectory 1<BR>/vis~/clear/view<BR>/vis~/draw/current<BR>volume Tubs1<BR>
&nbsp=3B*** Break *** segmentation violation<BR>(no debugging symbols found=
)<BR>Using host libthread_db library "/lib64/tls/libthread_db.so.1".<BR>Att=
aching to program: /proc/9544/exe=2C process 9544<BR>(no debugging symbols =
found)...done.<BR>(no debugging symbols found)...done.<BR>
<STRONG>&gt=3B</STRONG> My problem is what's the difference between<STRONG>=
<FONT color=3D#ff0000>if (point2-&gt=3BGetStepStatus()=3D=3DfGeomBoundary)<=
BR></FONT></STRONG>&nbsp=3B<STRONG> {<BR>&nbsp=3B G4TouchableHandle touch2 =
=3D</STRONG> <STRONG><FONT color=3D#ff0000>point2</FONT>-&gt=3BGetTouchable=
Handle()=3B </STRONG><BR>
<STRONG>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B=
&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <FONT color=3D#002060>and</FONT></STR=
ONG><BR>
<STRONG><FONT color=3D#002060>&nbsp=3B<FONT color=3D#ff0000>if (point2-&gt=
=3BGetStepStatus()=3D=3DfGeomBoundary)<BR></FONT><FONT color=3D#000000>&nbs=
p=3B {<BR>&nbsp=3B G4TouchableHandle touch2 =3D </FONT><FONT color=3D#ff000=
0>point1</FONT><FONT color=3D#000000>-&gt=3BGetTouchableHandle()=3B</FONT><=
/FONT></STRONG><BR>
<FONT color=3D#002060><FONT color=3D#000000><STRONG>&gt=3B</STRONG>what's t=
he corectness result I use to give the fraction of particle are transmitted=
 and how to resolve&nbsp=3Berror of segmentation violation.</FONT></FONT><B=
R>
<FONT color=3D#002060><FONT color=3D#000000>Many thanks.</FONT></FONT><BR>
<FONT color=3D#002060><FONT color=3D#000000>Naima. </FONT><BR><BR></FONT>&n=
bsp=3B<BR><BR><BR>
<STRONG><BR>&nbsp=3B<BR></STRONG>            <br /><hr />Hotmail : une mess=
agerie fiable avec la protection anti-spam performante de Microsoft <a href=
=3D'https://signup.live.com/signup.aspx?id=3D60969' target=3D'_new'>Inscriv=
ez-vous</a></body>
</html>=

--_3bedfd65-4ed8-46d1-a1da-4df99fa41c22_--

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

1 Feedback: Re: detectin particles leaving a volume.   (Gumplinger Peter - 18 Feb, 2010)
(_ None: Re: detectin particles leaving a volume.   (michel maire - 19 Feb, 2010)
 Add Message Add Message
to: "detectin particles leaving a volume."

 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 ]