Message: RE: How to use ROhist->GetReplicaNumber() ? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RE: How to use ROhist->GetReplicaNumber() ? 

Forum: Hits, Digitization and Pileup
Re: None How to use ROhist->GetReplicaNumber() ? (Bill)
Re: None RE: How to use ROhist->GetReplicaNumber() ? (Makoto Asai)
Date: 21 Apr, 2010
From: Bill <Bill>

This is a multi-part message in MIME format.

------_=_NextPart_001_01CAE1C7.973715A3
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Makoto,
=20
Yes, I do check the deposited energy at the beginning of ProcessHits().
=20
Your second point makes sense to me.  It looks =
ROhist->GetReplicaNumber() gives out the prestep point.  Actuall, the =
interaction (for example, the low energy Compton in step4) happens in =
the poststep point.  Am I right?
=20
Thanks,
YC

________________________________

From: Asai, Makoto [mailto:asai@slac.stanford.edu]
Sent: Wed 4/21/2010 5:11 PM
To: hitsdigits-g4hn@slac.stanford.edu
Subject: RE: How to use ROhist->GetReplicaNumber() ?




*** Discussion title: Hits, Digitization and Pileup

Hi

There seems to be two things.

1) Could you please check if your ProcessHits() method checks
the amount of energy deposition and skips the output if it is
zero? This may be the potential reason you did not get SD output
for step #3.

2) The copy number of ReadOut Geometry corresponds to the
location of the PreStep point of the step. Please note that
the position shown by G4Verbose is the position of PostStep.
Please also note that volume boundaries of ReadOut geometry
do *NOT* limit a step. Thus PreStep point and PostStep point
may belong to different voxels in your ReadOut geometry.
If you need to get energy deposition (associated to PostStep)
be deposited to the correct voxel in your ReadOut geometry,
you may want to consider using the parallel world.

Hope they help.
Makoto

> -----Original Message-----
> From: Bill [mailto:ycui@bnl.gov]
> Sent: Wednesday, April 21, 2010 1:47 PM
> To: hitsdigits-g4hn
> Subject: How to use ROhist->GetReplicaNumber() ?
>
>
> *** Discussion title: Hits, Digitization and Pileup
>
> Hi,
>
> I have some problems with the HitProcess of my SD. GetReplicaNumber
> always gets the position of the
>
> *** Here is my SD geometry *** G4VPhysicalVolume*
> MySDROGeometry::Build() {
>
>         // A dummy material is used to fill the volumes of the readout
> geometry.
>         // (It will be allowed to set a NULL pointer in volumes of =
such
> virtual
>         // division in future, since this material is irrelevant for
> tracking.)
>
>         G4Material* dummyMat =3D new G4Material(name=3D"dummyMat",
>                                         1., 1.*g/mole, 1.*g/cm3);
>
>         // variables for division ...
>         G4double VoxelSizeX =3D sdROSizeX / numberOfVoxelsAlongX;
>         G4double VoxelSizeY =3D sdROSizeY / numberOfVoxelsAlongY;
>
>         // world volume of ROGeometry ...
>         G4Box *ROWorld =3D new G4Box("ROWorld",
>                                                            worldSizeX,
>                                                            worldSizeY,
>                                                            =
worldSizeZ);
>         G4LogicalVolume *ROWorldLog =3D new G4LogicalVolume(ROWorld,
>
> dummyMat,
>
> "ROWorldLog",
>
> 0, 0, 0);
>         G4VPhysicalVolume *ROWorldPhys =3D new G4PVPlacement(0,
>
> G4ThreeVector(),
>
> "ROWorldPhys",
>
> ROWorldLog,
>
> 0, false, 0);
>
>         // Detector ROGeometry ...
>         G4Box *DetectorRO =3D new G4Box("DetectorRO",
>
> sdROSizeX,
>
> sdROSizeY,
>
> sdROSizeZ);
>         G4LogicalVolume *DetectorROLog =3D new =
G4LogicalVolume(DetectorRO,
>
> dummyMat,
>
> "DetectorROLog",
>
> 0, 0, 0);
>         G4VPhysicalVolume *DetectorROPhys =3D new G4PVPlacement(0,
>
> G4ThreeVector(0, 0, sdROPosZ),
>
> "DetectorROPhys",
>
> DetectorROLog,
>
> ROWorldPhys,
>
> false,0);
>
>         // ROGeometry: Voxel division
>
>         // X division first...
>         G4Box *DetectorROXDivision =3D new =
G4Box("DetectorROXDivision",
>
> VoxelSizeX,
>
> sdROSizeY,
>
> sdROSizeZ);
>         G4LogicalVolume *DetectorROXDivisionLog =3D new
> G4LogicalVolume(DetectorROXDivision,
>
> dummyMat,
>
> "DetectorROXDivisionLog",
>
> 0, 0, 0);
>         G4VPhysicalVolume *DetectorROXDivisionPhys =3D new
> G4PVReplica("DetectorROXDivisionPhys",
>
> DetectorROXDivisionLog,
>
> DetectorROPhys,
>
> kXAxis,
>
> numberOfVoxelsAlongX,
>
> VoxelSizeX * 2);
>         // ...then Y  division
>
>         G4Box *DetectorROYDivision =3D new =
G4Box("DetectorROYDivision",
>
> VoxelSizeX,
>
> VoxelSizeY,
>
> sdROSizeZ);
>         G4LogicalVolume *DetectorROYDivisionLog =3D new
> G4LogicalVolume(DetectorROYDivision,
>
> dummyMat,
>
> "DetectorROYDivisionLog",
>
> 0, 0, 0);
>         DetectorROYDivisionPhys =3D new
> G4PVReplica("DetectorROYDivisionPhys",
>
> DetectorROYDivisionLog,
>
> DetectorROXDivisionPhys,
>
> kYAxis,
>
> numberOfVoxelsAlongY,
>
> VoxelSizeY * 2);
>
>         MyDummySD *dummySD =3D new MyDummySD;
>         DetectorROYDivisionLog -> SetSensitiveDetector(dummySD);
>
>         return ROWorldPhys;
> }
>
> **** Here is my HitProcess **** G4int j =3D ROhist -> =
GetReplicaNumber();
> G4int i =3D ROhist -> GetReplicaNumber(1); G4cout << "process hit:
> replica
> x " << i << "\treplica y " << j << G4endl;
>
> **** And, here is the output ****
>
> Apparently, the hit occurred at step 4, but the output showed the
> position (replicas) of step 3.
>
> How do I get the XYZ of step 4?
>
> =
***********************************************************************
> **********************************
> * G4Track Information:   Particle =3D gamma,   Track ID =3D 1,   =
Parent ID
> =3D 0
> =
***********************************************************************
> **********************************
>
> Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng
> NextVolume ProcName
>     0    0.555    0.209     9.85     0.141        0        0         0
> WorldPhys initStep
>     1   -0.365     2.44        1     0.141        0     9.17      9.17
> HolePhys Transportation
>     2    -0.47     2.69 -9.59e-17     0.141        0     1.04      =
10.2
> CZTDetPhys Transportation
>     3   -0.533     2.85   -0.605     0.141        0    0.628      10.8
> CZTDetPhys LowEnRayleigh
>     4    -4.11     1.66    -3.79     0.105 1.77e-05     4.93      15.8
> CZTDetPhys LowEnCompton
>     :----- List of 2ndaries - #SpawnInStep=3D  1(Rest=3D 0,Along=3D =
0,Post=3D
> 1), #SpawnTotal=3D  1 ---------------
>     :     -4.11      1.66     -3.79     0.035                 e-
>     :-----------------------------------------------------------------
> EndOf2ndaries Info ---------------
> process hit: replica x 7        replica y 26
>     5    -3.72    0.784     -3.7         0   0.0318    0.963      16.7
> CZTDetPhys LowEnPhotoElec
>     :----- List of 2ndaries - #SpawnInStep=3D  1(Rest=3D 0,Along=3D =
0,Post=3D
> 1), #SpawnTotal=3D  2 ---------------
>     :     -3.72     0.784      -3.7    0.0736                 e-
>     :-----------------------------------------------------------------
> EndOf2ndaries Info ---------------
> process hit: replica x 3        replica y 25
>
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or
> unsubscribe) at:
> =
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/hitsdigits/241.
> html

-------------------------------------------------------------
Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or =
unsubscribe) at:
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/hitsdigits/241/1.=
html



------_=_NextPart_001_01CAE1C7.973715A3
Content-Type: text/html;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<HTML dir=3Dltr><HEAD><TITLE>RE: How to use ROhist->GetReplicaNumber() =
?</TITLE>=0A=
<META content=3D"text/html; charset=3Dunicode" http-equiv=3DContent-Type>=0A=
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18904"></HEAD>=0A=
<BODY>=0A=
<DIV dir=3Dltr id=3DidOWAReplyText55338>=0A=
<DIV dir=3Dltr><FONT color=3D#000000 size=3D2 face=3DArial>Hi =
Makoto,</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>Yes, I do check the deposited =
energy at the beginning of ProcessHits().</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>Your second point makes sense =
to me.&nbsp; It looks ROhist-&gt;GetReplicaNumber() gives out the =
prestep point.&nbsp; Actuall, the interaction (for example, the low =
energy Compton in step4) happens in the poststep point.&nbsp; Am I =
right?</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>Thanks,</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>YC</FONT></DIV></DIV>=0A=
<DIV dir=3Dltr><BR>=0A=
<HR tabIndex=3D-1>=0A=
<FONT size=3D2 face=3DTahoma><B>From:</B> Asai, Makoto =
[mailto:asai@slac.stanford.edu]<BR><B>Sent:</B> Wed 4/21/2010 5:11 =
PM<BR><B>To:</B> hitsdigits-g4hn@slac.stanford.edu<BR><B>Subject:</B> =
RE: How to use ROhist-&gt;GetReplicaNumber() ?<BR></FONT><BR></DIV>=0A=
<DIV><BR>=0A=
<P><FONT size=3D2>*** Discussion title: Hits, Digitization and =
Pileup<BR><BR>Hi<BR><BR>There seems to be two things.<BR><BR>1) Could =
you please check if your ProcessHits() method checks<BR>the amount of =
energy deposition and skips the output if it is<BR>zero? This may be the =
potential reason you did not get SD output<BR>for step #3.<BR><BR>2) The =
copy number of ReadOut Geometry corresponds to the<BR>location of the =
PreStep point of the step. Please note that<BR>the position shown by =
G4Verbose is the position of PostStep.<BR>Please also note that volume =
boundaries of ReadOut geometry<BR>do *NOT* limit a step. Thus PreStep =
point and PostStep point<BR>may belong to different voxels in your =
ReadOut geometry.<BR>If you need to get energy deposition (associated to =
PostStep)<BR>be deposited to the correct voxel in your ReadOut =
geometry,<BR>you may want to consider using the parallel =
world.<BR><BR>Hope they help.<BR>Makoto<BR><BR>&gt; -----Original =
Message-----<BR>&gt; From: Bill [<A =
href=3D"mailto:ycui@bnl.gov">mailto:ycui@bnl.gov</A>]<BR>&gt; Sent: =
Wednesday, April 21, 2010 1:47 PM<BR>&gt; To: hitsdigits-g4hn<BR>&gt; =
Subject: How to use ROhist-&gt;GetReplicaNumber() =
?<BR>&gt;<BR>&gt;<BR>&gt; *** Discussion title: Hits, Digitization and =
Pileup<BR>&gt;<BR>&gt; Hi,<BR>&gt;<BR>&gt; I have some problems with the =
HitProcess of my SD. GetReplicaNumber<BR>&gt; always gets the position =
of the<BR>&gt;<BR>&gt; *** Here is my SD geometry *** =
G4VPhysicalVolume*<BR>&gt; MySDROGeometry::Build() =
{<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // A =
dummy material is used to fill the volumes of the readout<BR>&gt; =
geometry.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // (It =
will be allowed to set a NULL pointer in volumes of such<BR>&gt; =
virtual<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // =
division in future, since this material is irrelevant for<BR>&gt; =
tracking.)<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; G4Material* dummyMat =3D new =
G4Material(name=3D"dummyMat",<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1., =
1.*g/mole, =
1.*g/cm3);<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; // variables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sp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; =
worldSizeY,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; =
worldSizeZ);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4LogicalVolume *ROWorldLog =3D new =
G4LogicalVolume(ROWorld,<BR>&gt;<BR>&gt; dummyMat,<BR>&gt;<BR>&gt; =
"ROWorldLog",<BR>&gt;<BR>&gt; 0, 0, =
0);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4VPhysicalVolume *ROWorldPhys =3D new G4PVPlacement(0,<BR>&gt;<BR>&gt; =
G4ThreeVector(),<BR>&gt;<BR>&gt; "ROWorldPhys",<BR>&gt;<BR>&gt; =
ROWorldLog,<BR>&gt;<BR>&gt; 0, false, =
0);<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // =
Detector ROGeometry =
...<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; G4Box =
*DetectorRO =3D new G4Box("DetectorRO",<BR>&gt;<BR>&gt; =
sdROSizeX,<BR>&gt;<BR>&gt; sdROSizeY,<BR>&gt;<BR>&gt; =
sdROSizeZ);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4LogicalVolume *DetectorROLog =3D new =
G4LogicalVolume(DetectorRO,<BR>&gt;<BR>&gt; dummyMat,<BR>&gt;<BR>&gt; =
"DetectorROLog",<BR>&gt;<BR>&gt; 0, 0, =
0);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4VPhysicalVolume *DetectorROPhys =3D new =
G4PVPlacement(0,<BR>&gt;<BR>&gt; G4ThreeVector(0, 0, =
sdROPosZ),<BR>&gt;<BR>&gt; "DetectorROPhys",<BR>&gt;<BR>&gt; =
DetectorROLog,<BR>&gt;<BR>&gt; ROWorldPhys,<BR>&gt;<BR>&gt; =
false,0);<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 // ROGeometry: Voxel =
division<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
// X division =
first...<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; G4Box =
*DetectorROXDivision =3D new =
G4Box("DetectorROXDivision",<BR>&gt;<BR>&gt; VoxelSizeX,<BR>&gt;<BR>&gt; =
sdROSizeY,<BR>&gt;<BR>&gt; =
sdROSizeZ);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4LogicalVolume *DetectorROXDivisionLog =3D new<BR>&gt; =
G4LogicalVolume(DetectorROXDivision,<BR>&gt;<BR>&gt; =
dummyMat,<BR>&gt;<BR>&gt; "DetectorROXDivisionLog",<BR>&gt;<BR>&gt; 0, =
0, 0);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4VPhysicalVolume *DetectorROXDivisionPhys =3D new<BR>&gt; =
G4PVReplica("DetectorROXDivisionPhys",<BR>&gt;<BR>&gt; =
DetectorROXDivisionLog,<BR>&gt;<BR>&gt; DetectorROPhys,<BR>&gt;<BR>&gt; =
kXAxis,<BR>&gt;<BR>&gt; numberOfVoxelsAlongX,<BR>&gt;<BR>&gt; VoxelSizeX =
* 2);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ...then =
Y&nbsp; =
division<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4Box *DetectorROYDivision =3D new =
G4Box("DetectorROYDivision",<BR>&gt;<BR>&gt; VoxelSizeX,<BR>&gt;<BR>&gt; =
VoxelSizeY,<BR>&gt;<BR>&gt; =
sdROSizeZ);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
G4LogicalVolume *DetectorROYDivisionLog =3D new<BR>&gt; =
G4LogicalVolume(DetectorROYDivision,<BR>&gt;<BR>&gt; =
dummyMat,<BR>&gt;<BR>&gt; "DetectorROYDivisionLog",<BR>&gt;<BR>&gt; 0, =
0, 0);<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
DetectorROYDivisionPhys =3D new<BR>&gt; =
G4PVReplica("DetectorROYDivisionPhys",<BR>&gt;<BR>&gt; =
DetectorROYDivisionLog,<BR>&gt;<BR>&gt; =
DetectorROXDivisionPhys,<BR>&gt;<BR>&gt; kYAxis,<BR>&gt;<BR>&gt; =
numberOfVoxelsAlongY,<BR>&gt;<BR>&gt; VoxelSizeY * =
2);<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
MyDummySD *dummySD =3D new =
MyDummySD;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
DetectorROYDivisionLog -&gt; =
SetSensitiveDetector(dummySD);<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; return ROWorldPhys;<BR>&gt; }<BR>&gt;<BR>&gt; **** =
Here is my HitProcess **** G4int j =3D ROhist -&gt; =
GetReplicaNumber();<BR>&gt; G4int i =3D ROhist -&gt; =
GetReplicaNumber(1); G4cout &lt;&lt; "process hit:<BR>&gt; =
replica<BR>&gt; x " &lt;&lt; i &lt;&lt; "\treplica y " &lt;&lt; j =
&lt;&lt; G4endl;<BR>&gt;<BR>&gt; **** And, here is the output =
****<BR>&gt;<BR>&gt; Apparently, the hit occurred at step 4, but the =
output showed the<BR>&gt; position (replicas) of step 3.<BR>&gt;<BR>&gt; =
How do I get the XYZ of step 4?<BR>&gt;<BR>&gt; =
***********************************************************************<B=
R>&gt; **********************************<BR>&gt; * G4Track =
Information:&nbsp;&nbsp; Particle =3D gamma,&nbsp;&nbsp; Track ID =3D =
1,&nbsp;&nbsp; Parent ID<BR>&gt; =3D 0<BR>&gt; =
***********************************************************************<B=
R>&gt; **********************************<BR>&gt;<BR>&gt; =
Step#&nbsp;&nbsp;&nbsp; X(mm)&nbsp;&nbsp;&nbsp; Y(mm)&nbsp;&nbsp;&nbsp; =
Z(mm) KinE(MeV)&nbsp; dE(MeV) StepLeng TrackLeng<BR>&gt; NextVolume =
ProcName<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; =
0.555&nbsp;&nbsp;&nbsp; 0.209&nbsp;&nbsp;&nbsp;&nbsp; =
9.85&nbsp;&nbsp;&nbsp;&nbsp; =
0.141&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
0&nbsp;&nbsp;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bsp;&nbsp;&nbsp;&nbsp; 15.8<BR>&gt; CZTDetPhys =
LowEnCompton<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; :----- List of 2ndaries - =
#SpawnInStep=3D&nbsp; 1(Rest=3D 0,Along=3D 0,Post=3D<BR>&gt; 1), =
#SpawnTotal=3D&nbsp; 1 ---------------<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
:&nbsp;&nbsp;&nbsp;&nbsp; -4.11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
1.66&nbsp;&nbsp;&nbsp;&nbsp; -3.79&nbsp;&nbsp;&nbsp;&nbsp; =
0.035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; e-<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
:-----------------------------------------------------------------<BR>&gt=
; EndOf2ndaries Info ---------------<BR>&gt; process hit: replica x =
7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; replica y =
26<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp; =
-3.72&nbsp;&nbsp;&nbsp; 0.784&nbsp;&nbsp;&nbsp;&nbsp; =
-3.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; =
0.0318&nbsp;&nbsp;&nbsp; 0.963&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
16.7<BR>&gt; CZTDetPhys LowEnPhotoElec<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
:----- List of 2ndaries - #SpawnInStep=3D&nbsp; 1(Rest=3D 0,Along=3D =
0,Post=3D<BR>&gt; 1), #SpawnTotal=3D&nbsp; 2 =
---------------<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
:&nbsp;&nbsp;&nbsp;&nbsp; -3.72&nbsp;&nbsp;&nbsp;&nbsp; =
0.784&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -3.7&nbsp;&nbsp;&nbsp; =
0.0736&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e-<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
:-----------------------------------------------------------------<BR>&gt=
; EndOf2ndaries Info ---------------<BR>&gt; process hit: replica x =
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; replica y 25<BR>&gt;<BR>&gt; =
-------------------------------------------------------------<BR>&gt; =
Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply =
or<BR>&gt; unsubscribe) at:<BR>&gt; <A =
href=3D"http://hypernews.slac.stanford.edu/HyperNews/geant4/get/hitsdigit=
s/241">http://hypernews.slac.stanford.edu/HyperNews/geant4/get/hitsdigits=
/241</A>.<BR>&gt; =
html<BR><BR>-------------------------------------------------------------=
<BR>Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply =
or unsubscribe) at:<BR><A =
href=3D"http://hypernews.slac.stanford.edu/HyperNews/geant4/get/hitsdigit=
s/241/1.html">http://hypernews.slac.stanford.edu/HyperNews/geant4/get/hit=
sdigits/241/1.html</A><BR></FONT></P></DIV></BODY></HTML>
------_=_NextPart_001_01CAE1C7.973715A3--

 Add Message Add Message
to: "RE: How to use ROhist->GetReplicaNumber() ?"

 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 ]