13 #include "Zincidentv.h" 15 integer moreptcl, jold, icon
22 common /showshow/ show
28 call cpop(trackbefmove, moreptcl)
29 if(moreptcl .eq. 0)
goto 100
31 call cifdead(trackbefmove, icon)
37 if(observeas .and. icon .le. 1 )
then 38 if(trackbefmove%p%code .eq.
kelec)
then 39 if(trackbefmove%asflag .eq. 0)
then 40 if(trackbefmove%p%fm%p(4) .le. easwait)
then 41 if(trackbefmove%p%fm%p(4) .gt. smallas)
then 43 * dcatobsxyz, cosfromaxis)
45 write(0,*)
' cosfromaxis=',cosfromaxis
46 write(0, *)
' Track dc =',trackbefmove%vec%w
47 write(0,*)
' DcAtObsXyz=', dcatobsxyz
49 if(cosfromaxis .gt. 0.5 )
then 51 call cobas(trackbefmove)
54 trackbefmove%asflag =1
57 elseif(trackbefmove%p%code .eq.
kphoton)
then 59 if(trackbefmove%asflag .eq. 0)
then 60 if(trackbefmove%p%fm%p(4) .gt. smallas)
then 82 use modxsecmedia
, only: targetnucleonno, targetprotonno,
92 #include "Zincidentv.h" 94 #include "Zmanagerp.h" 100 common /showshow/ show
108 integer nextwhere, never, ptclidx
150 if(trackbefmove%p%charge .ne. 0 .and. eabsorb(1) .ne. 0)
then 152 call chookeabsorb(trackbefmove, movedtrack, energyloss, 0)
157 if(trace .ne. 0)
then 158 if( mod(trace, 10) .le. 2)
then 160 elseif(mod(trace,10) .le. 4)
then 161 if( trackbefmove%pos%height .le. heightlist(1))
then 166 #if DETAILED_TRACKING >= 3 175 if(job .eq.
'newskel' .and.
176 * (movedtrack%p%fm%p(4) - movedtrack%p%mass) .lt.
183 call cpush(movedtrack)
185 if(zfirst%pos%depth .eq. 0.)
then 190 if( (incidentcopy%p%code .ge.
kpion .and.
191 * incidentcopy%p%code .le.
knuc ) .or.
192 * incidentcopy%p%code .eq.
kgnuc )
then 199 if( stack_pos .eq. 0 .and.
200 * intinfarray(processno)%process .eq.
'coll')
then 216 firstcola = targetnucleonno
217 firstcolz = targetprotonno
218 firstcolxs = targetxs
221 #if DETAILED_TRACKING >= 1 233 ptclidx = movedtrack%p%code
234 ptclidx = min(ptclidx, 8)
235 if(movedtrack%p%fm%p(4)-movedtrack%p%mass
236 * .ge. keminobs(ptclidx) )
then 242 if(job .eq.
'newskel' .and.
243 * endlevel .lt. noofsites .and.
244 * movedtrack%where .eq. endlevel )
then 249 movedtrack%where = movedtrack%where + 1
252 movedtrack%where = movedtrack%where - 1
254 elseif(job .eq.
'newskel' .and.
255 * endlevel .eq. noofsites .and.
256 * movedtrack%where .lt. endlevel )
then 259 movedtrack%where = movedtrack%where + 1
262 movedtrack%where = movedtrack%where - 1
267 movedtrack%where = nextwhere
269 if(.not. upgoing)
then 270 if(movedtrack%where .gt. endlevel)
then 273 movedtrack%where =max( movedtrack%where*1, 1)
274 call cpush(movedtrack)
277 if(movedtrack%where .lt.1 )
then 281 * min(movedtrack%where*1, endlevel)
282 call cpush(movedtrack)
289 elseif(movestat .eq.
borderl)
then 291 call cpush(movedtrack)
292 elseif(movestat .eq.
borderh)
then 294 call cpush(movedtrack)
296 write(msg, *)
' movestat=',movestat,
' invalid' 309 #include "Zincidentv.h" 311 #include "Zmanagerp.h" 316 if(mod(howgeomag, 2) .eq. 1 .or.
317 * incidentcopy%p%charge .eq. 0 .and.
318 * obsplane .ne. 3)
then 346 write(0,*)
' ActiveModel=',activemdl
347 write(0,*) str,
' code=',trackbefmove%p%code,
348 *
' sub',trackbefmove%p%subcode,
349 *
' chg',trackbefmove%p%charge
350 write(0,*)
'Px,y,z e=', trackbefmove%p%fm%p(1:4)
351 write(0,*)
'Move stat=',movestat
352 write(0, *)
' where', trackbefmove%where
353 write(0,*)
' h==', trackbefmove%pos%height,
354 *
' d=', trackbefmove%pos%depth
355 write(0,*)
' cos=',trackbefmove%vec%coszenith
356 do i = 1, numberofinte
357 write(0, *)
' process=',intinfarray(i)%process
358 write(0, *)
' thickness=',intinfarray(i)%thickness
359 write(0, *)
' length=',intinfarray(i)%length
361 write(0,*)
' ProcessNo=', processno
362 write(0,*)
'--------------' 377 real*8 x/0./, y/0./, z/0./
383 if(howgeomag .le. 2 .or. howgeomag .eq. 31)
then 387 if( (trackbefmove%pos%xyz%r(1) - x)**2 +
388 * (trackbefmove%pos%xyz%r(2) - y)**2 +
389 * (trackbefmove%pos%xyz%r(3) - z)**2
390 * .gt. distant**2)
then 394 call cgeomag(yearofgeomag, trackbefmove%pos%xyz,
399 x = trackbefmove%pos%xyz%r(1)
400 y = trackbefmove%pos%xyz%r(2)
401 z = trackbefmove%pos%xyz%r(3)
447 common /showshow/ show
453 if(reverse .ne. 0)
then 457 if(trackbefmove%p%code .eq.
kelec)
then 459 elseif(trackbefmove%p%code .eq.
kphoton)
then 466 if( intinfarray(processno)%process ==
'coll' )
then 477 elseif( intinfarray(processno)%process ==
'photop')
then 479 elseif( intinfarray(processno)%process ==
'munuci')
then 483 if(.not. freec .and. zfirst%pos%depth .eq. 0.)
then 484 intinfarray(processno)%length = 0.
485 intinfarray(processno)%thickness = 0.
494 #include "Zglobalc.h" 500 real*8 h, leng, t, minlen, clen2thick, pcut
504 minlen = infty + infty
506 h = trackbefmove%pos%height
507 do i = 1, numberofinte
508 if(.not. intinfarray(i)%decay)
then 510 if(numberofinte .eq. 1 .or.
511 * intinfarray(i)%thickness .ne. infty)
then 513 * intinfarray(i)%thickness, leng, t, jcut)
515 if( jcut .ne. 0)
then 516 intinfarray(i)%thickness = t
519 if(leng .lt. 0.)
then 521 intinfarray(i)%thickness = clen2thick(h,
522 * trackbefmove%vec%coszenith,
523 * intinfarray(i)%length )
530 leng = intinfarray(i)%length
533 if(leng .lt. minlen)
then 540 intinfarray(i)%length = leng
549 if(intinfarray(processno)%decay )
then 556 if( trackbefmove%vec%coszenith .lt. 0.)
then 561 if(intinfarray(processno)%length .gt. pcut)
then 563 intinfarray(processno)%length = pcut
565 intinfarray(processno)%thickness = clen2thick(h,
566 * trackbefmove%vec%coszenith,
567 * intinfarray(processno)%length )
581 real(8),
parameter::veryshort=0.1
582 real(8),
parameter::verylow=2
d-3
586 common /showshow/ show
589 if(leng .lt. intinfarray(processno)%length )
then 591 intinfarray(processno)%length = leng
592 intinfarray(processno)%thickness = thick
593 if(leng < veryshort )
then 603 if( movedtrack%p%code ==
kmuon .or.
604 * movedtrack%p%code ==
kpion .or.
605 * movedtrack%p%code ==
kkaon )
then 606 if( movedtrack%p%fm%p(4)- movedtrack%p%mass
633 if(atrack%p%code .eq.
kgnuc)
then 635 if(activemdl .eq.
'dpmjet3' .and.
636 * atrack%p%subcode .gt. 18)
then 638 elseif( activemdl .eq.
'incdpm3')
then 642 if( icon .eq. 1 )
then 644 pj%p%fm%p(4) = atrack%p%fm%p(4)/atrack%p%subcode
650 p = sqrt(pj%p%fm%p(4)**2 -
masp**2)
656 po = atrack%p%fm%p(1)**2 + atrack%p%fm%p(2)**2
657 po = po + atrack%p%fm%p(3)**2
662 pj%p%fm%p(j) = atrack%p%fm%p(j)*pr
664 do i = 1, atrack%p%charge
669 p = sqrt(pj%p%fm%p(4)**2 -
masn**2)
673 pj%p%fm%p(j) = atrack%p%fm%p(j)*pr
675 do i = 1, atrack%p%subcode - atrack%p%charge
subroutine cerrormsg(msg, needrtn)
subroutine clengsmallbc(aTrack, r)
subroutine csetmintime(from)
subroutine cmaxmovlen(leng, thick)
max ptcl codes in the kgnuc
subroutine cfixmodel(aPtcl)
subroutine cseecolpossible(pj, icon)
subroutine cthick2len(aTrack, tin, leng, t, jcut)
block data cblkIncident data *Za1ry *HeightOfInj d3
max ptcl codes in the kkaon
max ptcl codes in the kelec
subroutine cpop(a, remain)
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
subroutine cgeomag(yearin, llh, h, icon)
subroutine cobservation(id)
subroutine checkstat(str)
subroutine cifdead(a, icon)
subroutine csetintinf(lenOrThick, decay, procname)
subroutine cifxobssite(nextwhere)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
dE dx *! Nuc Int sampling table d
subroutine cresettimer(aTrack)
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon ! knockon is considered Obsolete *PhotoProd false
subroutine ctransmagto(sys, pos, a, b)
subroutine cfixtarget(media)
subroutine cforcessp(atrack, icon)
max ptcl codes in the kpion
subroutine chookeabsorb(a, b, dE, info)
This is called when Eabsorb != 0 and when a charged particle runs from a to b and deposits energy dE ...
max ptcl codes in the kmuon
subroutine chookeint(never)
subroutine cfixtargetmuni(media)
subroutine cscalerprod(a, b, c)