-
Problem with very small stepsize caused by transportation process?
Keywords: small stepsize, transportation
by Henning Gast
<Henning Gast>,
10 Jan, 2007
|
|
Hi,
I am simulating a cosmic-ray detector in G4.8.2 and have encountered the following problem:
In some (1/1000) events, there is a very tiny step size in one of my
"TrdLayer" volumes, leading to the event being practically stuck, for example:
(description continues below)
*********************************************************************************************************
* G4Track Information: Particle = e-, Track ID = 391, Parent ID = 319
*********************************************************************************************************
Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
0 132 262 -136 2.93 0 0 0 TrdRadiator initStep
1 134 265 -125 2.81 0.122 11.3 11.3 TrdRadiator msc
2 134 265 -125 2.8 0.00425 0.535 11.9 TrdRadiator msc
3 134 265 -125 2.8 0.00012 0.00768 11.9 TrdModule Transportation
4 135 265 -124 2.8 0.000112 1.35 13.2 TrdModule msc
5 136 265 -123 2.8 0.000321 1.35 14.6 TrdModule msc
6 137 265 -122 2.8 8.46e-05 1.35 16 TrdModule msc
7 137 265 -122 2.8 4.34e-05 0.138 16.1 TrdStrawTubeWall2 Transportation
8 137 265 -122 2.78 0.0224 0.135 16.2 TrdStrawTubeWall2 msc
9 137 265 -122 2.75 0.025 0.135 16.4 TrdStrawTubeWall2 msc
10 137 265 -121 2.74 0.0143 0.075 16.4 TrdStrawTubeWall2 msc
11 137 265 -121 2.74 0 0.00011 16.4 TrdStrawTubeGas2 Transportation
12 138 266 -121 2.74 0.000465 1.08 17.5 TrdStrawTubeGas2 msc
13 139 266 -120 2.74 3.31e-05 1.08 18.6 TrdStrawTubeGas2 msc
14 140 266 -120 2.74 8.01e-05 1.08 19.7 TrdStrawTubeGas2 msc
15 141 266 -119 2.74 2.18e-05 1.06 20.7 TrdStrawTubeGas2 msc
16 141 266 -119 2.74 1.4e-05 0.188 20.9 TrdStrawTubeGas2 msc
17 141 266 -119 2.74 0 0.0078 20.9 TrdStrawTubeWall2 Transportation
18 142 266 -119 2.59 0.151 0.28 21.2 TrdStrawTubeWall2 msc
19 142 266 -119 2.52 0.0693 0.28 21.5 TrdStrawTubeWall2 msc
20 142 266 -119 2.51 0.00798 0.0414 21.5 TrdStrawTubeGas2 Transportation
21 145 267 -119 2.51 0.000523 3.56 25.1 TrdStrawTubeGas2 msc
22 148 269 -120 2.51 0.000431 3.56 28.6 TrdStrawTubeGas2 msc
23 150 271 -123 2.51 0.000999 3.56 32.2 TrdStrawTubeGas2 msc
24 151 271 -123 2.51 0.000195 0.529 32.7 TrdStrawTubeWall2 Transportation
25 151 271 -123 2.5 0.00469 0.0242 32.8 TrdStrawTubeWall2 msc
26 151 271 -123 2.5 0.00342 0.0242 32.8 TrdStrawTubeWall2 msc
27 151 271 -123 2.5 0.00262 0.0242 32.8 TrdStrawTubeWall2 msc
28 151 271 -123 2.49 0.00219 0.017 32.8 TrdStrawTubeWall2 msc
29 151 271 -123 2.49 3.8e-07 1.72e-06 32.8 TrdModule Transportation
30 151 271 -123 2.49 0.000203 0.677 33.5 TrdModule msc
31 151 272 -124 2.49 1.66e-05 0.677 34.2 TrdModule msc
32 152 272 -124 2.49 2.13e-05 0.677 34.8 TrdModule msc
33 152 272 -125 2.49 1.75e-05 0.525 35.4 TrdRadiator Transportation
34 154 278 -132 2.41 0.084 9.2 44.6 TrdRadiator msc
35 151 282 -139 2.31 0.103 9.2 53.8 TrdRadiator msc
36 144 286 -143 2.22 0.0882 9.1 62.9 TrdRadiator msc
37 136 291 -142 2.13 0.0881 9.2 72.1 TrdRadiator msc
38 129 293 -136 2.05 0.0843 9.2 81.3 TrdRadiator msc
39 127 297 -128 1.95 0.0997 9.2 90.5 TrdRadiator msc
40 129 299 -125 1.91 0.0342 4.19 94.7 TrdRadiator msc
41 130 300 -125 1.9 0.00977 0.987 95.6 TrdRadiator msc
42 130 300 -125 1.9 0.000779 0.055 95.7 TrdRadiator msc
43 130 300 -125 1.9 9.59e-07 9.4e-05 95.7 TrdModule Transportation
44 130 300 -125 1.9 0 0.267 96 TrdModule msc
45 130 300 -124 1.9 0 0.267 96.2 TrdModule msc
46 130 300 -124 1.9 9.27e-06 0.0642 96.3 TrdStrawTubeWall7 Transportation
47 130 300 -124 1.9 0.0062 0.0328 96.3 TrdStrawTubeWall7 msc
48 130 300 -124 1.89 0.00481 0.0328 96.4 TrdStrawTubeWall7 msc
49 130 300 -124 1.88 0.0121 0.0328 96.4 TrdStrawTubeWall7 msc
50 130 300 -124 1.87 0.00599 0.0328 96.4 TrdStrawTubeWall7 msc
51 130 300 -124 1.87 0.00671 0.0328 96.5 TrdStrawTubeWall7 msc
52 130 300 -124 1.86 0.00223 0.0102 96.5 TrdStrawTubeWall7 msc
53 130 300 -124 1.86 4.3e-06 1.93e-05 96.5 TrdStrawTubeGas7 Transportation
54 130 301 -124 1.86 0.000166 0.436 96.9 TrdStrawTubeGas7 msc
55 130 301 -124 1.86 0.000733 0.436 97.3 TrdStrawTubeGas7 msc
56 131 301 -124 1.86 0.000134 0.436 97.8 TrdStrawTubeGas7 msc
57 131 301 -124 1.86 0.000116 0.162 97.9 TrdStrawTubeGas7 eIoni
58 131 302 -124 1.86 8.8e-05 0.183 98.1 TrdStrawTubeWall7 Transportation
59 131 302 -124 1.84 0.0169 0.0992 98.2 TrdStrawTubeWall7 msc
60 131 302 -124 1.83 0.0147 0.0992 98.3 TrdStrawTubeWall7 msc
61 131 302 -124 1.81 0.0176 0.0992 98.4 TrdStrawTubeWall7 msc
62 131 302 -124 1.81 0.00361 0.017 98.4 TrdModule Transportation
63 131 303 -124 1.81 5.91e-05 0.84 99.3 TrdModule msc
64 132 303 -124 1.81 0.000893 0.84 100 TrdModule msc
65 132 304 -123 1.81 4.51e-05 0.67 101 TrdModule msc
66 132 304 -123 1.81 1.06e-06 0.00734 101 TrdStrawTubeWall8 Transportation
67 132 304 -123 1.79 0.0139 0.0532 101 TrdStrawTubeWall8 msc
68 132 304 -123 1.78 0.0129 0.0532 101 TrdStrawTubeWall8 msc
69 132 304 -123 1.78 0.00086 0.0081 101 TrdStrawTubeWall8 msc
70 132 304 -123 1.78 9.78e-07 4.4e-06 101 TrdStrawTubeGas8 Transportation
71 134 306 -124 1.78 0.000717 3.11 104 TrdStrawTubeGas8 msc
72 135 308 -124 1.78 0.000352 1.57 106 TrdStrawTubeWall8 Transportation
73 135 308 -124 1.77 0.0134 0.0751 106 TrdStrawTubeWall8 msc
74 135 308 -124 1.75 0.0148 0.0658 106 TrdModule Transportation
75 136 308 -124 1.75 6.12e-05 0.917 107 TrdModule msc
76 136 309 -124 1.75 0.0001 0.917 108 TrdModule msc
77 136 309 -124 1.75 0 0.22 108 TrdLongStiffener3 Transportation
78 137 309 -124 1.73 0.0259 0.0991 108 TrdLongStiffener3 msc
79 137 309 -124 1.68 0.0412 0.0902 108 TrdModule Transportation
80 137 310 -125 1.68 0 0.574 109 TrdModule msc
81 137 310 -125 1.68 6.89e-05 0.447 109 TrdRadiator Transportation
82 143 322 -135 1.47 0.161 16.9 126 TrdRadiator eIoni
83 141 329 -143 1.33 0.145 11.3 137 TrdRadiator msc
84 138 331 -144 1.29 0.0385 3.32 141 TrdRadiator msc
85 135 334 -144 1.25 0.0424 5.04 146 TrdRadiator msc
86 134 351 -131 1.05 0.197 21.2 167 TrdRadiator msc
87 137 351 -126 0.998 0.0537 6.19 173 TrdRadiator msc
88 138 351 -125 0.985 0.0132 1.47 175 TrdRadiator msc
89 139 351 -125 0.982 0.00315 0.404 175 TrdRadiator msc
90 139 351 -125 0.982 2.46e-05 0.00647 175 TrdModule Transportation
91 139 351 -125 0.982 0.000123 0.526 175 TrdModule msc
92 140 352 -124 0.982 9.75e-06 0.526 176 TrdModule msc
93 140 352 -124 0.982 0 0.213 176 TrdStrawTubeWall15 Transportation
94 140 352 -124 0.954 0.0275 0.153 176 TrdStrawTubeWall15 msc
95 140 352 -124 0.9 0.0538 0.153 177 TrdStrawTubeWall15 msc
96 140 352 -124 0.887 0.0137 0.0531 177 TrdModule Transportation
97 140 352 -124 0.887 7.62e-05 0.351 177 TrdModule msc
98 141 352 -125 0.886 3.12e-05 0.351 177 TrdModule msc
99 141 352 -125 0.886 0 0.11 177 TrdRadiator Transportation
100 142 353 -128 0.846 0.0408 4.08 181 TrdRadiator msc
101 141 352 -132 0.805 0.0406 4.08 186 TrdRadiator msc
102 139 352 -135 0.763 0.0417 4.08 190 TrdRadiator msc
103 135 352 -136 0.724 0.0398 4.08 194 TrdRadiator msc
104 132 352 -134 0.677 0.0468 4.08 198 TrdRadiator msc
105 130 353 -130 0.63 0.0467 4.08 202 TrdRadiator msc
106 131 353 -127 0.586 0.0443 4.08 206 TrdRadiator msc
107 134 353 -126 0.555 0.0303 3.35 209 TrdRadiator msc
108 136 353 -129 0.513 0.0428 4.08 213 TrdRadiator msc
109 134 353 -132 0.468 0.0448 2.99 216 TrdRadiator msc
110 134 353 -132 0.467 0.000904 0.0512 216 TrdRadiator msc
111 134 354 -132 0.467 3.81e-08 3.16e-06 216 TrdLayer Transportation
112 128 355 -128 0.466 0.00138 9.91 226 TrdLayer msc
113 130 356 -125 0.464 0.00111 3.66 230 TrdLayer msc
114 131 356 -125 0.464 0.00065 1.13 231 TrdLayer msc
115 131 356 -125 0.464 4.4e-05 0.471 232 TrdLayer msc
116 131 356 -125 0.464 2.08e-05 0.124 232 TrdLayer Transportation
117 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
118 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
119 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
120 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
121 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
122 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
123 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
124 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
125 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
126 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
127 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
128 131 356 -125 0.464 7.58e-13 4.58e-09 232 TrdLayer Transportation
129 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
130 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
131 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
132 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
133 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
134 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
135 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
136 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
137 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
138 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
139 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
140 131 356 -125 0.464 7.58e-13 4.58e-09 232 TrdLayer Transportation
141 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
142 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
143 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
144 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
145 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
146 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
147 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
148 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
149 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
150 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
151 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
152 131 356 -125 0.464 7.58e-13 4.58e-09 232 TrdLayer Transportation
153 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
154 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
155 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
156 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
157 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
158 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
159 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
160 131 356 -125 0.464 1.66e-13 1e-09 232 TrdLayer Transportation
161 131 356 -125 0.464 1.69e-13 1.02e-09 232 TrdLayer Transportation
... and so on...
In some events, G4 seems to be able to recognize and amend the
situation:
WARNING - G4Navigator::ComputeStep()
Track stuck, not moving for 10 steps
in volume -TrdLayer- at point (-9.019548462,-67.04845417,311.976)
direction: (0.9993687785,0.004953406355,0.03517823564).
Potential geometry or navigation problem !
Trying pushing it of 9e-10 mm ...
WARNING - G4Navigator::ComputeStep()
Track stuck, not moving for 10 steps
in volume -TrdLayer- at point (-9.019548454,-67.04845417,311.976)
direction: (0.9993687787,0.004953406355,0.03517823201).
Potential geometry or navigation problem !
Trying pushing it of 9e-10 mm ...
... and so on ...
I also attach some output from /tracking/verbose 6 which seems to
indicate a problem in the transportation process:
#Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
1082 -89.7 -63.5 -285 0.207 1.17e-10 6.93e-09 32.1 TrdModule Transportation
>>DefinePhysicalStepLength (List of proposed StepLengths):
++ProposedStep(PostStep ) = 1.797693134862316e+308 : ProcName = GammaXTRadiator (No ForceCondition)
++ProposedStep(PostStep ) = 1.797693134862316e+308 : ProcName = ElectroNuclear (No ForceCondition)
++ProposedStep(PostStep ) = 66843.92633942491 : ProcName = eBrem (No ForceCondition)
++ProposedStep(PostStep ) = 43.73431611726596 : ProcName = eIoni (No ForceCondition)
++ProposedStep(PostStep ) = 1.797693134862316e+308 : ProcName = msc (Forced)
++ProposedStep(PostStep ) = 1.797693134862316e+308 : ProcName = Transportation (Forced)
++ProposedStep(AlongStep) = 1.797693134862316e+308 : ProcName = eBrem (CandidateForSelection)
++ProposedStep(AlongStep) = 559.1135940543439 : ProcName = eIoni (CandidateForSelection)
++ProposedStep(AlongStep) = 0.1951978999090939 : ProcName = msc (CandidateForSelection)
++ProposedStep(AlongStep) = 0 : ProcName = Transportation (CandidateForSelection)
>>AlongStepDoIt (process by process): Process Name = Transportation
++G4Step Information
Address of G4Track : 0xc7b28c8
Step Length (mm) : 0
Energy Deposit (MeV) : 0
-----------------------------------------------------------------------
StepPoint Information PreStep PostStep
-----------------------------------------------------------------------
Position - x (mm) : -89.70796591921498 -89.70796591921498
Position - y (mm) : -63.48666293803226 -63.48666293803226
Position - z (mm) : -285.232 -285.232
Global Time (ns) : 4.079087373687271 4.079087373687271
Local Time (ns) : 0.1366161237314643 0.1366161237314643
Proper Time (ns) : 0.08792145067135242 0.08792145067135242
Momentum Direct - x : -0.9805329125797901 -0.9805329125797901
Momentum Direct - y : 0.1807490143955495 0.1807490143955494
Momentum Direct - z : -0.07671376110471373-0.07671376110471372
Momentum - x (MeV/c): -0.4943958688733998 -0.4943958688733998
Momentum - y (MeV/c): 0.09113571291042878 0.09113571291042877
Momentum - z (MeV/c): -0.03867995259447763-0.03867995259447762
Total Energy (MeV) : 0.717878242726697 0.717878242726697
Kinetic Energy (MeV): 0.2068791827266971 0.2068791827266971
Velocity (mm/ns) : 210.5632471109914 210.5632471109914
Volume Name : TrdModule TrdModule
Safety (mm) : 0 0
Polarization - x : 0 0
Polarization - y : 0 0
Polarization - Z : 0 0
Weight : 1 1
Step Status : Geom Limit Geom Limit
Process defined Step: Transportation Transportation
-----------------------------------------------------------------------
!Note! Safety of PostStep is only valid after all DoIt invocations.
++G4ParticleChange Information
-----------------------------------------------
G4ParticleChange Information
-----------------------------------------------
# of 2ndaries : 0
-----------------------------------------------
Energy Deposit (MeV): 0
Track Status : Alive
True Path Length (mm) : 0
Stepping Control : 0
Mass (GeV) : 0
Charge (eplus) : 0
Position - x (mm) : -89.7
Position - y (mm) : -63.5
Position - z (mm) : -285
Time (ns) : 4.08
Proper Time (ns) : 0.0879
Momentum Direct - x : -0.981
Momentum Direct - y : 0.181
Momentum Direct - z : -0.0767
Kinetic Energy (MeV): 0.207
Polarization - x : 0
Polarization - y : 0
Polarization - z : 0
Track Weight : 0
Touchable (pointer) : 0xce40500
++List of secondaries generated (x,y,z,kE,t,PID): No. of secodaries = 0
... and so on ...
The following output is generated by my SteppingAction, for every
100th tiny step:
/tracking/verbose 0
PROBLEM! 1100 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791823444467 MeV
Position: (-89.70796597055939,-63.48666292857455,-285.2320000000736)
Currently in volume TrdModule
PROBLEM! 1200 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791822041985 MeV
Position: (-89.70796601061012,-63.48666292118423,-285.2320000002578)
Currently in volume TrdLayer
PROBLEM! 1300 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791819313116 MeV
Position: (-89.70796605944828,-63.48666291218628,-285.2320000004788)
Currently in volume TrdRadiator
PROBLEM! 1400 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791815863 MeV
Position: (-89.70796611145013,-63.48666290259673,-285.2320000001471)
Currently in volume TrdModule
PROBLEM! 1500 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791813122284 MeV
Position: (-89.70796615936021,-63.48666289376921,-285.232000000331)
Currently in volume TrdLayer
PROBLEM! 1600 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791810473755 MeV
Position: (-89.70796620763744,-63.48666288485973,-285.2320000000367)
Currently in volume TrdRadiator
PROBLEM! 1700 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791806160801 MeV
Position: (-89.70796626474066,-63.48666287434693,-285.232000000257)
Currently in volume TrdModule
PROBLEM! 1800 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791804162851 MeV
Position: (-89.70796630829986,-63.48666286632119,-285.2320000004406)
Currently in volume TrdLayer
PROBLEM! 1900 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791796872486 MeV
Position: (-89.70796638370334,-63.4866628524233,-285.2320000001464)
Currently in volume TrdRadiator
PROBLEM! 2000 tiny steps for Track ID 24, created by hIoni
Particle: e- E= 0.2068791794378897 MeV
Position: (-89.70796643017182,-63.48666284385618,-285.2320000003289)
Currently in volume TrdModule
The interesting part is the current volume that fluctuates although
the position of the particle remains virtually constant. The hierarchy
in my geometry is as follows:
TrdLayer
|
|__ TrdModule
|
|__TrdRadiator (among others)
So, a particle should never really enter a "TrdLayer" volume explicitly
because the daughter volume "TrdRadiator" in each "TrdModule" fills
the upper part of the layer completely.
My setup contains a homogeneous magnetic field. What also puzzles me
is the fact that the minimum stepsize in the G4MagInt_Driver
should prevent steps from being as small as I observe them, shouldn't
it? The parameters for tracking in the magnetic field are as follows:
Magnetic field: min epsilon step: 5e-05 mm
Magnetic field: max epsilon step: 0.001 mm
Magnetic field: delta one step: 0.01 mm
Magnetic field: delta intersection: 0.001 mm
Unfortunately, the G4MagInt_Driver doesn't have a Get() for the
minimum stepsize, so I assume it is the default value of
stepMinimum = 1.0e-2 * mm (see G4ChordFinder). Can this be ignored by
the transportation process?
I carefully checked the geometry for volume overlaps.
Any insight would be appreciated,
kind regards
Henning
|
|
-
-
Re: Problem with very small stepsize caused by transportation process?
Keywords: small stepsize, transportation
by John Apostolakis
<John Apostolakis>,
11 Jan, 2007
Re:
Problem with very small stepsize caused by transportation process?
(Henning Gast)
|
|
[ I started writing this before you last posting - but I have now read it.]
Your problem is unusual, and could suggest a difficulty in the Navigator
or in your setup. My first suggestion would be to run overlap checking.
Since you report doing this already, I will provide a different suggestion.
[ However, if you can try to check for overlaps a second time, using a different
method, it could help too. ]
Could you please see whether you can reproduce the problem when locating
a point by yourself with just the Navigator.
From your output I see that the difficulty is at
Position - x (mm) : -89.70796591921498
Position - y (mm) : -63.48666293803226
Position - z (mm) : -285.232
Can you call the Navigator at this point, (you can get its pointer from
the G4TransportationManager), using LocateGlobalPointAndSetup ? I suggest
to call it repeatedly and compare its output.
Then add the direction, which from your print out appears to be
Momentum Direct - x : -0.9805329125797901
Momentum Direct - y : 0.1807490143955495
Momentum Direct - z : -0.07671376110471373
From the values of the position, it is my guess that there is a boundary
exactly at this z value:
Position - z (mm) : -285.232
Can you confirm whether the point is at a boundary of one of the
TrdLayer volumes at this point ?
If so, it would be very useful to create a custom sub-class of G4SteppingVerbose
that prints out the copy number of the current TrdLayer (and potentially
the parent volume's copy number as well.) This way we can check whether
it is confused by bouncing between different copies at their interface.
After this, please try to call the Navigator's ComputeStep method yourself.
If it returns zero, you are seeing the same problem.
I suggest to repeat
Locate( point, direction, ...
step= ComputeStep( point, direction, ...
point += step * direction;
a few more times (say 20 times in a loop) to confirm that the problem
is with Navigation, not the field.
The code for propagating in a magnetic field should take care for difficult cases,
where it can be unclear what volume a track is actually crossing. In this
case, though, it appears that it is the Navigator which is having difficulties.
I noted that you said that "" a particle should never really enter a "TrdLayer" volume explicitly
because the daughter volume "TrdRadiator" in each "TrdModule" fills
the upper part of the layer completely. ""
This seems to indicate that it is experiencing significant difficult at
this level. What type of volume is a 'TrdModule'? A box, a tubs, or other ??
Also what is the TrdRadiator ?
|
|
-
-
Re: Problem with very small stepsize caused by transportation process?
by Henning Gast
<Henning Gast>,
12 Jan, 2007
Re:
Re: Problem with very small stepsize caused by transportation process?
(John Apostolakis)
|
Dear John,
thank you for your detailed proposals. Please see my findings below:
John Apostolakis wrote:
> *** Discussion title: Fast Simulation, Transportation & Others
> Email replies to PublicHyperNews@slac.stanford.edu must include:
> In-Reply-To: <"/fastsim/22/2"@geant4-hn.slac.stanford.edu>
> Subject: ...change this to be about your reply.
>
> From the values of the position, it is my guess that there is a boundary
> exactly at this z value:
> Position - z (mm) : -285.232
> Can you confirm whether the point is at a boundary of one of the
> TrdLayer volumes at this point ?
Yes indeed, I find that the problem seems to occur at the boundary
between two TrdLayer volumes.
> If so, it would be very useful to create a custom sub-class of
> G4SteppingVerbose that prints out the copy number of the current
> TrdLayer (and potentially the parent volume's copy number as well.) This
> way we can check whether it is confused by bouncing between different
> copies at their interface.
That is exactly what happens:
#Step# X Y Z KineE dEStep StepLeng
TrakLeng Volume Process
514 31.1 cm -35.7 cm -23.2 cm 990 keV1.45e-07 eV 1e+03 fm
2.94 cm TrdLayer Transportation
PreStepPoint:
at 0: TrdLayer replica 3 copy 3
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
PostStepPoint:
at 0: TrdLayer replica 2 copy 2
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
#Step# X Y Z KineE dEStep StepLeng
TrakLeng Volume Process
515 31.1 cm -35.7 cm -23.2 cm 990 keV1.47e-07 eV 1.01e+03 fm
2.94 cm TrdLayer Transportation
PreStepPoint:
at 0: TrdLayer replica 2 copy 2
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
PostStepPoint:
at 0: TrdLayer replica 3 copy 3
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
#Step# X Y Z KineE dEStep StepLeng
TrakLeng Volume Process
516 31.1 cm -35.7 cm -23.2 cm 990 keV1.45e-07 eV 1e+03 fm
2.94 cm TrdLayer Transportation
PreStepPoint:
at 0: TrdLayer replica 3 copy 3
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
PostStepPoint:
at 0: TrdLayer replica 2 copy 2
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
#Step# X Y Z KineE dEStep StepLeng
TrakLeng Volume Process
517 31.1 cm -35.7 cm -23.2 cm 990 keV1.47e-07 eV 1.01e+03 fm
2.94 cm TrdLayer Transportation
PreStepPoint:
at 0: TrdLayer replica 2 copy 2
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
PostStepPoint:
at 0: TrdLayer replica 3 copy 3
at 1: TrdLowerSuperLayer replica 0 copy 0
at 2: Tracker replica 0 copy 0
at 3: World replica 0 copy 0
... and so on ...
> After this, please try to call the Navigator's ComputeStep method
> yourself. If it returns zero, you are seeing the same problem.
>
> I suggest to repeat
> Locate( point, direction, ...
> step= ComputeStep( point, direction, ...
> point += step * direction;
> a few more times (say 20 times in a loop) to confirm that the problem
> is with Navigation, not the field.
>
I put the following code in my SteppingAction:
G4cout << "LOOP:" << G4endl;
for( G4int i=0 ; i<20 ; ++i ){
G4cout << " physVol: " << navigator->LocateGlobalPointAndSetup(
position, &direction )->GetName() << G4endl;
G4double safety = 0.0;
G4double step = navigator->ComputeStep( position, direction,
1.0*km,safety);
G4cout << "STEP: " << step/mm << " mm." << G4endl;
position += step*direction;
G4cout << " new pos: " << position << G4endl;
}
The result is curious:
LOOP:
physVol: TrdLayer
STEP: 3.7272604e-09 mm.
new pos: (311.25547,-357.47662,-231.744)
physVol: TrdLayer
STEP: 1e-09 mm.
new pos: (311.25547,-357.47662,-231.744)
physVol: TrdLayer
STEP: 1e-09 mm.
new pos: (311.25547,-357.47662,-231.744)
physVol: TrdLayer
STEP: 1e-09 mm.
new pos: (311.25547,-357.47662,-231.744)
physVol: TrdLayer
STEP: 1e-09 mm.
new pos: (311.25547,-357.47662,-231.744)
physVol: TrdLayer
STEP: 167.71476 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 0 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 9e-10 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 9e-10 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: TrdLayer
STEP: 9e-10 mm.
new pos: (149.96333,-397.5,-254.35406)
physVol: CFCtube
STEP: 10.476048 mm.
new pos: (139.88846,-400,-255.76636)
physVol: CFCtube
STEP: 0 mm.
new pos: (139.88846,-400,-255.76636)
> The code for propagating in a magnetic field should take care for
> difficult cases, where it can be unclear what volume a track is actually
> crossing. In this case, though, it appears that it is the Navigator
> which is having difficulties.
>
> I noted that you said that "" a particle should never really enter a
> "TrdLayer" volume explicitly because the daughter volume "TrdRadiator"
> in each "TrdModule" fills the upper part of the layer completely. ""
I have to change my statement regarding this point. As a matter of fact,
the problem occurs most frequently (only??) in a part of TrdLayer that
is not filled by further daughters. You see, the inner part of a
TrdLayer is filled with TrdModules but there is some remaining gap at
the fringe which is just filled with air.
> This seems to indicate that it is experiencing significant difficult at
> this level. What type of volume is a 'TrdModule'? A box, a tubs, or
> other ?? Also what is the TrdRadiator ?
>
TrdLayer, TrdModule and TrdRadiator are all simple boxes. TrdLayer is a
G4PVReplica slicing a TrdSuperLayer into eight divisions along z.
Cheers
Henning
|
|
-
|
|
-
Re: Problem with very small stepsize caused by transportation process?
by Vladimir IVANTCHENKO
<vnivanch@mail.cern.ch>,
10 Jan, 2007
Re:
Problem with very small stepsize caused by transportation process?
(Henning Gast)
|
On Wed, 10 Jan 2007, Henning Gast wrote:
> *** Discussion title: Fast Simulation, Transportation & Others
> Email replies to PublicHyperNews@slac.stanford.edu must include:
> In-Reply-To: <"/fastsim/22"@geant4-hn.slac.stanford.edu>
> Subject: ...change this to be about your reply.
>
> Hi,
>
> I am simulating a cosmic-ray detector in G4.8.2 and have encountered the
> following problem:
>
> In some (1/1000) events, there is a very tiny step size in one of my
> "TrdLayer" volumes, leading to the event being practically stuck, for
> example: (description continues below)
Hello,
Can I ask you to try following:
/process/eLoss/MscStepLimit 0.2 false
This command switches off step limitation from multiple scattering. Doing
this test we can distinguish msc and transportation in field problems.
VI
|
|
-
-
-
-
Re: Problem with very small stepsize caused by transportation process?
by Henning Gast
<Henning Gast>,
11 Jan, 2007
Re:
Re: Problem with very small stepsize caused by transportation process?
(Henning Gast)
|
Hi,
I have investigated some more, and have come to a puzzling conclusion:
First, when I take my troublesome "TrdSuperLayer" volume, which forms
part of a larger detector system, and make a separate program where I
put it into its own world volume, everything works fine.
Second, and more importantly, in my detector construction I had the
following code:
physiTrdLayer = new G4PVReplica( "TrdLayer", logicTrdLayer,
logicTrdSuperLayer, kZAxis, NbOfTrdLayersPerSuperLayer,
TrdLayerHeight );
I created a G4PVReplica of single layers which I then filled with some
stuff. When I change this part as follows, replacing the replica by
manual placements of layers, the problem disappears. Or to be more
precise, it becomes at least two orders of magnitude less frequent.
G4double trdLayerZ = -0.5*TrdSuperLayerHeight+0.5*TrdLayerHeight;
for( G4int i=0 ; i<NbOfTrdLayersPerSuperLayer ; ++i ){
new G4PVPlacement( 0, G4ThreeVector( 0.0,0.0,trdLayerZ),
logicTrdLayer, "TrdLayer", logicTrdSuperLayer, false, i );
trdLayerZ += TrdLayerHeight;
}
Greetings
Henning
Henning Gast wrote:
> *** Discussion title: Fast Simulation, Transportation & Others
> Email replies to PublicHyperNews@slac.stanford.edu must include:
> In-Reply-To: <45A504FA.7030400@physik.rwth-aachen.de>
> Subject: ...change this to be about your reply.
>
|
|
-
|
|
|
|