COSMOS v7.655  COSMOSv7655
(AirShowerMC)
creset1ryRange.f
Go to the documentation of this file.
1  subroutine creset1ryrange(cmpn, E1, E2)
2 ! this subroutine may be called when the user wants to
3 ! reset the 1ry energy range during the execution (normally
4 ! at start time)
5 ! If called, those given in the table is overriden.
6 #include "Zprimary.h"
7 #include "Zprimaryv.h"
8  implicit none
9 
10  integer,intent(in):: cmpn ! 1 ry component #
11  ! 1 to Prim%no_of_comps
12  real(8),intent(in):: E1, E2 ! min and max of
13  ! 1ry energy to be smapled: in the same unit as
14  ! gvien in the input table. must be E1<E2.
15  ! If E1<min in the table, the min is used.
16  ! If E2>max in the table, the max is used.
17 
18 
19  integer::nseg
20 
21  if( e2 <= e1 ) then
22  write(0,*) ' E1=',e1, ' is not < E2=',e2
23  write(0,*) ' error in creset1ryRange '
24  stop
25  endif
26  if( cmpn < 1 .or. cmpn > prim%no_of_comps) then
27  write(0,*) ' cmpn given to creset1ryRange=',cmpn,
28  * ' must be in 1 to', prim%no_of_comps
29  stop
30  endif
31  if( e1< prim%each(cmpn)%energy(1) ) then
32  prim%each(cmpn)%cut = prim%each(cmpn)%energy(1)
33  else
34  prim%each(cmpn)%cut = e1
35  endif
36 
37  nseg = prim%each(cmpn)%no_of_seg
38  if( e2> prim%each(cmpn)%energy(nseg) ) then
39  prim%each(cmpn)%cut2 = prim%each(cmpn)%energy(nseg)
40  else
41  prim%each(cmpn)%cut2 = e2
42  endif
43  call cprocprimdt(prim)
44  end subroutine creset1ryrange
45 
46 
subroutine cprocprimdt(prm)
Definition: cprocPrimDt.f:3
subroutine creset1ryrange(cmpn, E1, E2)
Definition: creset1ryRange.f:2