MODULE xsection
	USE input
	IMPLICIT NONE
	INTEGER::iz,ia,jz,ja
	REAL(4)::ej,qj
	REAL(8)::Emev
	CONTAINS
	SUBROUTINE xsections_BC(e,xsec)
		IMPLICIT NONE
		INTEGER,INTENT(in)::e
		REAL(8),INTENT(in out)::xsec(min_Z:max_Z,min_A:max_A,min_cell_E:max_cell_E,min_Z:max_Z,min_A:max_A,min_cell_E:max_cell_E)
		REAL(8)::WSIGMA
		ej=10**(3+energy_grid*e)
		Emev=10**(3+energy_grid*e)
		DO iz=min_Z,max_Z
			DO ia=min_A,max_A
				DO jz=1,iz
					DO ja=MAX(jz,6),jz+ia-iz
						SELECT CASE(crossection)
							CASE('YIELDX')
								CALL YIELDX(iz,ia,jz,ja,ej,qj)
							CASE('WEBBER')
								qj=WSIGMA(iz,ia,jz,ja,Emev)
						END SELECT 
						IF(jz==3.and.ja==9)THEN
							xsec(iz,ia,e,4,9,e)=xsec(iz,ia,e,4,9,e)+qj*0.49						!Li9-->Be9 %49
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.51
						ELSE IF(jz==3.and.ja==10)THEN
							xsec(iz,ia,e,4,9,e)=xsec(iz,ia,e,4,9,e)+qj*0.49						!Li10-->Li9-->Be9 %49
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.51
						ELSE IF(jz==3.and.ja==11)THEN
							xsec(iz,ia,e,4,10,e)=xsec(iz,ia,e,4,10,e)+qj*0.85					!Li11-->Be10 %85
							xsec(iz,ia,e,4,9,e)=xsec(iz,ia,e,4,9,e)+qj*0.04						!Li11-->Be9 %4
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.11
						ELSE IF(jz==3.and.ja==12)THEN
							xsec(iz,ia,e,4,10,e)=xsec(iz,ia,e,4,10,e)+qj*0.85					!Li12-->Li11-->Be10 %85
							xsec(iz,ia,e,4,9,e)=xsec(iz,ia,e,4,9,e)+qj*0.04						!Li12-->Li11-->Be9 %4
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.11
						ELSE IF(jz==4.and.ja==9)THEN
							xsec(iz,ia,e,4,9,e)=xsec(iz,ia,e,4,9,e)+qj							!Be9 stable
						ELSE IF(jz==4.and.ja==10)THEN
							xsec(iz,ia,e,4,10,e)=xsec(iz,ia,e,4,10,e)+qj						!Be10 radioactive
						ELSE IF(jz==4.and.ja==11)THEN
							xsec(iz,ia,e,5,11,e)=xsec(iz,ia,e,5,11,e)+qj*0.97					!Be11-->B11 %97
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.03
						ELSE IF(jz==4.and.ja==12)THEN
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.98					!Be12-->B12-->C12 %98
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.02
						ELSE IF(jz==4.and.ja==13)THEN
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.98					!Be13-->Be12-->B12-->C12 %98
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.02
						ELSE IF(jz==4.and.ja==14)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.98					!Be14-->B13 %98-->C13
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.01					!Be14-->B12 1%-->C12
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.01
						ELSE IF(jz==4.and.ja==15)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.98					!Be15-->Be14-->B13 %98-->C13
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.01					!Be15-->Be14-->B12 1%-->C12
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.01
						ELSE IF(jz==4.and.ja==16)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.98					!Be16-->Be14-->B13 %98-->C13
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.01					!Be16-->Be14-->B12 1%-->C12
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.01
						ELSE IF(jz==5.and.ja==10)THEN
							xsec(iz,ia,e,5,10,e)=xsec(iz,ia,e,5,10,e)+qj						!B10 stable
						ELSE IF(jz==5.and.ja==11)THEN
							xsec(iz,ia,e,5,11,e)=xsec(iz,ia,e,5,11,e)+qj						!B11 stable
						ELSE IF(jz==5.and.ja==12)THEN
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.98					!B12-->C12 %98
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.02
						ELSE IF(jz==5.and.ja==13)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj						!B13-->C13
						ELSE IF(jz==5.and.ja==14)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.94					!B14-->C14 94%-->N14
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.06					!B14-->C13 stable 6%
						ELSE IF(jz==5.and.ja==15)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.94					!B15-->C14 94%-->N14
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.01					!B15-->C13 1%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.05
						ELSE IF(jz==5.and.ja==16)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.94					!B16-->B15-->C14 94%-->N14
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.01					!B16-->B15-->C13 1%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.05
						ELSE IF(jz==5.and.ja==17)THEN
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj*0.63*0.98				!B17-->C16 63%-->N15 98%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.63*0.02
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj*0.11					!B17-->C15 11%-->N15
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.03					!B17-->C14 3%-->N14
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.01					!B17-->C13 1%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.22
						ELSE IF(jz==5.and.ja==18)THEN
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj*0.63*0.98				!B18-->B17-->C16 63%-->N15 98%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.63*0.02
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj*0.11					!B18-->B17-->C15 11%-->N15
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.03					!B18-->B17-->C14 3%-->N14
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.01					!B18-->B17-->C13 stable 1%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.22
						ELSE IF(jz==5.and.ja==19)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.75*0.69*0.77			!B19-->C18 75%-->N18 69%-->O18 77%
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.75*0.69*0.12			!B19-->C18 75%-->N18 69%-->C14 12%-->N14
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj*0.75*0.69*0.11			!B19-->C18 75%-->N18 69%-->O17 11%
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.75*0.31*0.95			!B19-->C18 75%-->N17 31%-->O16 95%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.75*0.31*0.05
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.25*0.72*0.95			!B19-->C17 25%-->N17 72%-->O16 95%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.25*0.72*0.05
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.25*0.28				!B19-->C17 25%-->N16 28%-->O16
						ELSE IF(jz==6.and.ja==10)THEN
							xsec(iz,ia,e,5,10,e)=xsec(iz,ia,e,5,10,e)+qj						!C10-->B10
						ELSE IF(jz==6.and.ja==11)THEN
							xsec(iz,ia,e,5,11,e)=xsec(iz,ia,e,5,11,e)+qj						!C11-->B11
						ELSE IF(jz==6.and.ja==12)THEN
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj						!C12 stable
						ELSE IF(jz==6.and.ja==13)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj						!C13 stable
						ELSE IF(jz==6.and.ja==14)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj						!C14-->N14
						ELSE IF(jz==6.and.ja==15)THEN
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj						!C15-->N15
						ELSE IF(jz==6.and.ja==16)THEN
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj						!C16-->N15
						ELSE IF(jz==6.and.ja==17)THEN
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.72*0.95				!C17-->N17 72%-->O16 95%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.72*0.05
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.28					!C17-->N16 28%-->O16
						ELSE IF(jz==6.and.ja==18)THEN
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.31*0.95				!C18-->N17 31%-->O16 95%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.31*0.05
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.69*0.77				!C18-->N18 69%-->O18 77%
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj*0.69*0.11				!C18-->N18 69%-->O17 11%
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.69*0.12				!C18-->N18 69%-->C14 12%-->N14
						ELSE IF(jz==6.and.ja==19)THEN
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.07*0.95				!C19-->N17 7%-->O16 95%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.07*0.05
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.47*0.77				!C19-->N18 47%-->O18 77%
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj*0.47*0.11				!C19-->N18 47%-->O17 11%
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.47*0.12				!C19-->N18 47%-->C14 12%-->N14
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.46*0.55				!C19-->N19 46%-->O18 55%
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.46*0.45				!C19-->N19 46%-->O19 45%-->F19
						ELSE IF(jz==6.and.ja==20)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.72*0.55				!C20-->N19 72%-->O18 55%
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.72*0.45				!C20-->N19 72%-->O19 45%-->F19
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.28*0.43			!C20-->N20 28%-->O20 43%-->F20-->Ne20
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.28*0.57				!C20-->N20 28%-->O19 57%-->F19
						ELSE IF(jz==6.and.ja==21)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.72*0.55				!C21-->C20-->N19 72%-->O18 55%
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.72*0.45				!C21-->C20-->N19 72%-->O19 45%-->F19
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.28*0.43			!C21-->C20-->N20 28%-->O20 43%-->F20-->Ne20
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.28*0.57				!C21-->C20-->N20 28%-->O19 57%-->F19
						ELSE IF(jz==6.and.ja==22)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.99*0.8				!C22-->N21 99%-->O20 80%-->F20-->Ne20
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.99*0.2
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.01
						ELSE IF(jz==7.and.ja==11)THEN
							xsec(iz,ia,e,5,10,e)=xsec(iz,ia,e,5,10,e)+qj						!N11-->C10-->B10
						ELSE IF(jz==7.and.ja==12)THEN
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.96					!N12-->C12 96%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.04
						ELSE IF(jz==7.and.ja==13)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj						!N13-->C13
						ELSE IF(jz==7.and.ja==14)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj						!N14 stable
						ELSE IF(jz==7.and.ja==15)THEN
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj						!N15 stable
						ELSE IF(jz==7.and.ja==16)THEN
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj						!N16-->O16
						ELSE IF(jz==7.and.ja==17)THEN
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.95					!N17 72%-->O16 95%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.05
						ELSE IF(jz==7.and.ja==18)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.77					!N18-->O18 77%
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj*0.11					!N18-->O17 11%
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj*0.12					!N18-->C14 12%-->N14
						ELSE IF(jz==7.and.ja==19)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.55					!N19-->O18 55%
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.45					!N19-->O19 45%-->F19
						ELSE IF(jz==7.and.ja==20)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.43					!N20-->O20 43%-->F20-->Ne20
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.57					!N20-->O19 57%-->F19
						ELSE IF(jz==7.and.ja==21)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.8					!N21-->O20 80%-->F20-->Ne20
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.2
						ELSE IF(jz==7.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.65*0.78*0.89		!N22-->O22 65%-->F22 78%-->Ne22 89%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.65*0.78*0.11		!N22-->O22 65%-->F22 78%-->Ne21 11%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.65*0.22			!N22-->O22 65%-->F21 22%-->Ne21
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.35					!N22-->O21 35%-->F21-->Ne21
						ELSE IF(jz==7.and.ja==23)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.8*0.78*0.89		!N23-->O22 80%-->F22 78%-->Ne22 89%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.8*0.78*0.11		!N23-->O22 80%-->F22 78%-->Ne21 11%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.8*0.22				!N23-->O22 80%-->F21 22%-->Ne21
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.2
						ELSE IF(jz==8.and.ja==12)THEN
							xsec(iz,ia,e,5,10,e)=xsec(iz,ia,e,5,10,e)+qj*0.6					!O12-->C10 60%-->B10
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.4*0.96				!O12-->N12 40%-->C12 96%
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.4*0.04
						ELSE IF(jz==8.and.ja==13)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.89					!O13-->N13 89%-->C13
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.11					!O13-->C12 11%
						ELSE IF(jz==8.and.ja==14)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj						!O14-->N14
						ELSE IF(jz==8.and.ja==15)THEN
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj						!O15-->N15
						ELSE IF(jz==8.and.ja==16)THEN
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj						!O16 stable
						ELSE IF(jz==8.and.ja==17)THEN
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj						!O17 stable
						ELSE IF(jz==8.and.ja==18)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj						!O18 stable
						ELSE IF(jz==8.and.ja==19)THEN
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj						!O19-->F19
						ELSE IF(jz==8.and.ja==20)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj						!O20-->F20-->Ne20
						ELSE IF(jz==8.and.ja==21)THEN
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj						!O21-->F21-->Ne21
						ELSE IF(jz==8.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.78*0.89			!O22-->F22 78%-->Ne22 89%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.78*0.11			!O22-->F22 78%-->Ne21 11%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.22					!O22-->F21 22%-->Ne21
						ELSE IF(jz==8.and.ja==23)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.31*0.89			!O23-->F22 31%-->Ne22 89%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.31*0.11			!O23-->F22 31%-->Ne21 11%
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.69*0.14			!O23-->F23 69%-->Ne22 14%
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj*0.69*0.86			!O23-->F23 69%-->Ne23 86%-->Na23
						ELSE IF(jz==8.and.ja==24)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.18*0.14			!O24-->F23 18%-->Ne22 14%
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj*0.18*0.86			!O24-->F23 18%-->Ne23 86%-->Na23
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj*0.82*0.06			!O24-->F24 82%-->Ne23 6%-->Na23
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj*0.82*0.94			!O24-->F24 82%-->Ne24 94%-->Na24-->Mg24
						ELSE IF(jz==9.and.ja==14)THEN
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.89					!F14-->O13-->N13 89%-->C13
							xsec(iz,ia,e,6,12,e)=xsec(iz,ia,e,6,12,e)+qj*0.11					!F14-->O13-->C12 11%
						ELSE IF(jz==9.and.ja==15)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj						!F15-->O14-->N14
						ELSE IF(jz==9.and.ja==16)THEN
							xsec(iz,ia,e,7,15,e)=xsec(iz,ia,e,7,15,e)+qj						!F16-->O15-->N15
						ELSE IF(jz==9.and.ja==17)THEN
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj						!F17-->O17
						ELSE IF(jz==9.and.ja==18)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj						!F18-->O18
						ELSE IF(jz==9.and.ja==19)THEN
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj						!F19 stable
						ELSE IF(jz==9.and.ja==20)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj						!F20-->Ne20
						ELSE IF(jz==9.and.ja==21)THEN
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj						!F21-->Ne21
						ELSE IF(jz==9.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.89					!F22-->Ne22 89%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.11					!F22-->Ne21 11%
						ELSE IF(jz==9.and.ja==23)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.14					!F23-->Ne22 14%
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj*0.86					!F23-->Ne23 86%-->Na23
						ELSE IF(jz==9.and.ja==24)THEN
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj*0.06					!F24-->Ne23 6%-->Na23
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj*0.94					!F24-->Ne24 94%-->Na24-->Mg24
						ELSE IF(jz==9.and.ja==25)THEN
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj*0.14					!F25-->Ne24 14%-->Na24-->Mg24
							xsec(iz,ia,e,12,25,e)=xsec(iz,ia,e,12,25,e)+qj*0.86					!F25-->Ne25 86%-->Na25-->Mg25
						ELSE IF(jz==10.and.ja==16)THEN
							xsec(iz,ia,e,7,14,e)=xsec(iz,ia,e,7,14,e)+qj						!Ne16-->O14-->N14
						ELSE IF(jz==10.and.ja==17)THEN
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj*0.96					!Ne17-->O16 96%
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.03					!Ne17-->N13 3%-->C13
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.01
						ELSE IF(jz==10.and.ja==18)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj						!Ne18-->F18-->O18
						ELSE IF(jz==10.and.ja==19)THEN
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj						!Ne19-->F19
						ELSE IF(jz==10.and.ja==20)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj						!Ne20 stable
						ELSE IF(jz==10.and.ja==21)THEN
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj						!Ne21 stable
						ELSE IF(jz==10.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj						!Ne22 stable
						ELSE IF(jz==10.and.ja==23)THEN
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj						!Ne23-->Na23
						ELSE IF(jz==10.and.ja==24)THEN
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj						!Ne24-->Na24-->Mg24
						ELSE IF(jz==10.and.ja==25)THEN
							xsec(iz,ia,e,12,25,e)=xsec(iz,ia,e,12,25,e)+qj						!Ne25-->Na25-->Mg25
						ELSE IF(jz==10.and.ja==26)THEN
							xsec(iz,ia,e,12,26,e)=xsec(iz,ia,e,12,26,e)+qj						!Ne26-->Na26-->Mg26
						ELSE IF(jz==11.and.ja==18)THEN
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj*0.5*0.96				!Na18-->Ne17 50%-->O16 96%
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.5*0.03				!Na18-->Ne17 50%-->N13 3%-->C13
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.5*0.01
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj*0.5					!Na18-->Ne18 50%-->F18-->O18
						ELSE IF(jz==11.and.ja==19)THEN
							xsec(iz,ia,e,8,18,e)=xsec(iz,ia,e,8,18,e)+qj						!Na19-->Ne18-->F18-->O18
						ELSE IF(jz==11.and.ja==20)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.75					!Na20-->Ne20 75%
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.25					!Na20-->O16 25%
						ELSE IF(jz==11.and.ja==21)THEN
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj						!Na21-->Ne21
						ELSE IF(jz==11.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj						!Na22-->Ne22
						ELSE IF(jz==11.and.ja==23)THEN
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj						!Na23 stable
						ELSE IF(jz==11.and.ja==24)THEN
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj						!Na24-->Mg24
						ELSE IF(jz==11.and.ja==25)THEN
							xsec(iz,ia,e,12,25,e)=xsec(iz,ia,e,12,25,e)+qj						!Na25-->Mg25
						ELSE IF(jz==11.and.ja==26)THEN
							xsec(iz,ia,e,12,26,e)=xsec(iz,ia,e,12,26,e)+qj						!Na26-->Mg26
						ELSE IF(jz==11.and.ja==27)THEN
							xsec(iz,ia,e,13,27,e)=xsec(iz,ia,e,13,27,e)+qj						!Na27-->Mg27-->Al27
						ELSE IF(jz==12.and.ja==19)THEN
							xsec(iz,ia,e,8,17,e)=xsec(iz,ia,e,8,17,e)+qj*0.96					!Mg19-->Ne17-->O16 96%
							xsec(iz,ia,e,6,13,e)=xsec(iz,ia,e,6,13,e)+qj*0.03					!Mg19-->Ne17-->N13 3%-->C13
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.01
						ELSE IF(jz==12.and.ja==20)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.7*0.75				!Mg20-->Na20-->Ne20 75%
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.7*0.25				!Mg20-->Na20-->O16 25%
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.3					!Mg20-->Ne19-->F19
						ELSE IF(jz==12.and.ja==21)THEN
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.67					!Mg21-->Na21 67%-->Ne21
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.33					!Mg21-->Ne20 33%
						ELSE IF(jz==12.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj						!Mg22-->Na22-->Ne22
						ELSE IF(jz==12.and.ja==23)THEN
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj						!Mg23-->Na23
						ELSE IF(jz==12.and.ja==24)THEN
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj						!Mg24 stable
						ELSE IF(jz==12.and.ja==25)THEN
							xsec(iz,ia,e,12,25,e)=xsec(iz,ia,e,12,25,e)+qj						!Mg25 stable
						ELSE IF(jz==12.and.ja==26)THEN
							xsec(iz,ia,e,12,26,e)=xsec(iz,ia,e,12,26,e)+qj						!Mg26 stable
						ELSE IF(jz==12.and.ja==27)THEN
							xsec(iz,ia,e,13,27,e)=xsec(iz,ia,e,13,27,e)+qj						!Mg27-->Al27
						ELSE IF(jz==12.and.ja==28)THEN
							xsec(iz,ia,e,14,28,e)=xsec(iz,ia,e,14,28,e)+qj						!Mg28-->Al28-->Si28
						ELSE IF(jz==13.and.ja==21)THEN
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.7*0.75				!Al21-->Mg20-->Na20-->Ne20 75%
							xsec(iz,ia,e,8,16,e)=xsec(iz,ia,e,8,16,e)+qj*0.7*0.25				!Al21-->Mg20-->Na20-->O16 25%
							xsec(iz,ia,e,9,19,e)=xsec(iz,ia,e,9,19,e)+qj*0.3					!Al21-->Mg20-->Ne19-->F19
						ELSE IF(jz==13.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.55					!Al22-->Mg22 55%-->Na22-->Ne22
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.44					!Al22-->Na21 44%-->Ne21
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.01					!Al22-->Ne20 1%
						ELSE IF(jz==13.and.ja==23)THEN
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj*0.92					!Al23-->Mg23 92%-->Na23
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.08					!Al23-->Na22 8%-->Ne22
						ELSE IF(jz==13.and.ja==24)THEN
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj						!Al24-->Mg24
						ELSE IF(jz==13.and.ja==25)THEN
							xsec(iz,ia,e,12,25,e)=xsec(iz,ia,e,12,25,e)+qj						!Al25-->Mg25
						ELSE IF(jz==13.and.ja==26)THEN
							xsec(iz,ia,e,13,26,e)=xsec(iz,ia,e,13,26,e)+qj						!Al26 Radioactive
						ELSE IF(jz==13.and.ja==27)THEN
							xsec(iz,ia,e,13,27,e)=xsec(iz,ia,e,13,27,e)+qj						!Al27 stable
						ELSE IF(jz==13.and.ja==28)THEN
							xsec(iz,ia,e,14,28,e)=xsec(iz,ia,e,14,28,e)+qj						!Al28-->Si28
						ELSE IF(jz==13.and.ja==29)THEN
							xsec(iz,ia,e,14,29,e)=xsec(iz,ia,e,14,29,e)+qj						!Al29-->Si29
						ELSE IF(jz==14.and.ja==22)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.68*0.55			!Si22-->Al22 68%-->Mg22 55%-->Na22-->Ne22
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.68*0.44			!Si22-->Al22 68%-->Na21 44%-->Ne21
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.68*0.01			!Si22-->Al22 68%-->Ne20 1%
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.32*0.67			!Si22-->Mg21 32%-->Na21 67%-->Ne21
							xsec(iz,ia,e,10,20,e)=xsec(iz,ia,e,10,20,e)+qj*0.32*0.33			!Si22-->Mg21 32%-->Ne20 33%
						ELSE IF(jz==14.and.ja==23)THEN
							xsec(iz,ia,e,10,22,e)=xsec(iz,ia,e,10,22,e)+qj*0.88					!Si23-->Mg22 88%-->Na22-->Ne22
							xsec(iz,ia,e,10,21,e)=xsec(iz,ia,e,10,21,e)+qj*0.04					!Si23-->Na21 4%-->Ne21
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.08
						ELSE IF(jz==14.and.ja==24)THEN
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj*0.62					!Si24-->Al24 62%-->Mg24
							xsec(iz,ia,e,11,23,e)=xsec(iz,ia,e,11,23,e)+qj*0.38					!Si24-->Mg23 38%-->Na23
						ELSE IF(jz==14.and.ja==25)THEN
							xsec(iz,ia,e,12,25,e)=xsec(iz,ia,e,12,25,e)+qj*0.63					!Si25-->Al25 63%-->Mg25
							xsec(iz,ia,e,12,24,e)=xsec(iz,ia,e,12,24,e)+qj*0.37					!Si25-->Mg24 37%
						ELSE IF(jz==14.and.ja==26)THEN
							xsec(iz,ia,e,13,26,e)=xsec(iz,ia,e,13,26,e)+qj						!Si26-->Al26
						ELSE IF(jz==14.and.ja==27)THEN
							xsec(iz,ia,e,13,27,e)=xsec(iz,ia,e,13,27,e)+qj						!Si27-->Al27
						ELSE IF(jz==14.and.ja==28)THEN
							xsec(iz,ia,e,14,28,e)=xsec(iz,ia,e,14,28,e)+qj						!Si28 stable
						ELSE IF(jz==14.and.ja==29)THEN
							xsec(iz,ia,e,14,29,e)=xsec(iz,ia,e,14,29,e)+qj						!Si29 stable
						ELSE
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj
						END IF
					END DO
				END DO
				xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+70*((ia**0.333+4**0.3333)**2)/(16.8)
			END DO
		END DO
	END SUBROUTINE xsections_BC

	SUBROUTINE xsections_Iron(e,xsec)
		IMPLICIT NONE
		INTEGER,INTENT(in)::e
		REAL(8),INTENT(in out)::xsec(min_Z:max_Z,min_A:max_A,min_cell_E:max_cell_E,min_Z:max_Z,min_A:max_A,min_cell_E:max_cell_E)
		REAL(8)::WSIGMA
		ej=10**(3+energy_grid*e)
		Emev=10**(3+energy_grid*e)
		DO iz=min_Z,max_Z
			DO ia=min_A,max_A
				DO jz=1,iz
					DO ja=MAX(jz,6),jz+ia-iz
						SELECT CASE(crossection)
							CASE('YIELDX')
								CALL YIELDX(iz,ia,jz,ja,ej,qj)
							CASE('WEBBER')
								qj=WSIGMA(iz,ia,jz,ja,Emev)
						END SELECT 
						IF(jz==14.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.5*0.82*0.92		!Si44-->P44 50%-->S44-->Cl44 82%-->Ar44 92%-->K44-->Ca44 K capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.5
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.5*0.18
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.5*0.18*0.08
						ELSE IF(jz==15.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.82*0.92			!P44-->S44-->Cl44 82%-->Ar44 92%-->K44-->Ca44 K capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.18
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.18*0.08
						ELSE IF(jz==15.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.46*0.76			!P45-->S45-->Cl45 46%-->Ar45 76%-->K45-->Ca45-->Sc45 stable
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.46*0.24			!P45-->S45-->Cl45 46%-->Ar44 24%-->K44-->Ca44 K capture
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.54*0.92			!P45-->S45-->Cl44 54%-->Ar44 92%-->K44-->Ca44 K capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.54*0.18
						ELSE IF(jz==15.and.ja==46)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.6					!P46-->S46-->Cl46-->Ar45 60%-->K45-->Ca45-->Sc45 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.4
						ELSE IF(jz==16.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.82*0.92			!S44-->Cl44 82%-->Ar44 92%-->K44-->Ca44 K capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.18
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.18*0.08
						ELSE IF(jz==16.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.46*0.76			!S45-->Cl45 46%-->Ar45 76%-->K45-->Ca45-->Sc45 stable
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.46*0.24			!S45-->Cl45 46%-->Ar44 24%-->K44-->Ca44 K capture
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.54*0.92			!S45-->Cl44 54%-->Ar44 92%-->K44-->Ca44 K capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.54*0.18
						ELSE IF(jz==16.and.ja==46)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.6					!S46-->Cl46-->Ar45 60%-->K45-->Ca45-->Sc45 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.4
						ELSE IF(jz==16.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.97*0.99			!S47-->Cl47-->Ar47 97%-->K47 99%-->Ca47-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.97*0.01
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.03
						ELSE IF(jz==16.and.ja==48)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.01					!S48-->Cl48-->Ar48-->K48-->Ca47 1%-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.99
						ELSE IF(jz==16.and.ja==49)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.01					!S49-->S48-->Cl48-->Ar48-->K48-->Ca47 1%-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.99
						ELSE IF(jz==17.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.92					!Cl44-->Ar44 92%-->K44-->Ca44 K capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.08
						ELSE IF(jz==17.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.76					!Cl45-->Ar45 76%-->K45-->Ca45-->Sc45 stable
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj*0.24					!Cl45-->Ar44 24%-->K44-->Ca44 K capture
						ELSE IF(jz==17.and.ja==46)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.6					!Cl46-->Ar45 60%-->K45-->Ca45-->Sc45 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.4
						ELSE IF(jz==17.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.97*0.99			!Cl47-->Ar47 97%-->K47 99%-->Ca47-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.97*0.01
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.03
						ELSE IF(jz==17.and.ja==48)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.01					!Cl48-->Ar48-->K48-->Ca47 1%-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.99
						ELSE IF(jz==17.and.ja==49)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.65*0.01			!Cl49-->Ar49-->K48 65%-->Ca47 1%-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.65*0.99
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.35
						ELSE IF(jz==17.and.ja==50)THEN
							xsec(iz,ia,e,22,49,e)=xsec(iz,ia,e,22,49,e)+qj*0.65*0.29			!Cl50-->Ar50-->K50 65%-->Ca49 29%-->Sc49-->Ti49 stable
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.65*0.71			!Cl50-->Ar50-->K50 65%-->Ca50 71%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.35
						ELSE IF(jz==17.and.ja==51)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.47					!Cl51-->Ar51-->K51-->Ca50 47%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.53					!Cl51-->Ar51-->K51-->Ca51 53%-->Sc51-->Ti51-->V51 stable
						ELSE IF(jz==18.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj						!Ar44-->K44-->Ca44 K capture
						ELSE IF(jz==18.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj						!Ar45-->K45-->Ca45-->Sc45
						ELSE IF(jz==18.and.ja==46)THEN
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj
						ELSE IF(jz==18.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.99					!Ar47-->K47 99%-->Ca47-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.01
						ELSE IF(jz==18.and.ja==48)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.01					!Ar48-->K48-->Ca47 1%-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.99
						ELSE IF(jz==18.and.ja==49)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.65*0.01			!Ar49-->K48 65%-->Ca47 1%-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.65*0.99
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.35
						ELSE IF(jz==18.and.ja==50)THEN
							xsec(iz,ia,e,22,49,e)=xsec(iz,ia,e,22,49,e)+qj*0.65*0.29			!Ar50-->K50 65%-->Ca49 29%-->Sc49-->Ti49 stable
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.65*0.71			!Ar50-->K50 65%-->Ca50 71%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.35
						ELSE IF(jz==18.and.ja==51)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.47					!Ar51-->K51-->Ca50 47%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.53					!Ar51-->K51-->Ca51 53%-->Sc51-->Ti51-->V51 stable
						ELSE IF(jz==18.and.ja==52)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.21					!Ar52-->K52-->Ca50 21%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.64					!Ar52-->K52-->Ca51 64%-->Sc51-->Ti51-->V51 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.15
						ELSE IF(jz==18.and.ja==53)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.5*0.17				!Ar53-->K53 50%-->Ca50 17%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.5*0.67*0.02		!Ar53-->K53 50%-->Ca52 67%-->Sc51 2%-->Ti51-->V51 stable
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.5*0.67*0.98		!Ar53-->K53 50%-->Ca52 67%-->Sc52 98%-->Ti52-->V52-->Cr52 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.5*0.16
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.5*0.21				!Ar53-->K52 50%-->Ca50 21%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.5*0.64				!Ar53-->K52 50%-->Ca51 64%-->Sc51-->Ti51-->V51 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.5*0.15
						ELSE IF(jz==19.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj						!K44-->Ca44 K capture
         				ELSE IF(jz==19.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj						!K45-->Ca45-->Sc45 stable
						ELSE IF(jz==19.and.ja==46)THEN
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj
						ELSE IF(jz==19.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj						!K47-->Ca47-->Sc47-->Ti47 stable
						ELSE IF(jz==19.and.ja==48)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.01					!K48-->Ca47 1%-->Sc47-->Ti47 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.99
						ELSE IF(jz==19.and.ja==49)THEN
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj			!K49-->Ca48 stable
						ELSE IF(jz==19.and.ja==50)THEN
							xsec(iz,ia,e,22,49,e)=xsec(iz,ia,e,22,49,e)+qj*0.29					!K50-->Ca49 29%-->Sc49-->Ti49 stable
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.71					!K50-->Ca50 71%-->Sc50-->Ti50 stable
						ELSE IF(jz==19.and.ja==51)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.47					!K51-->Ca50 47%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.53					!K51-->Ca51 53%-->Sc51-->Ti51-->V51 stable
						ELSE IF(jz==19.and.ja==52)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj*0.21					!K52-->Ca50 21%-->Sc50-->Ti50 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.64					!K52-->Ca51 64%-->Sc51-->Ti51-->V51 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.15
						ELSE IF(jz==19.and.ja==53)THEN
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.17					!K53-->Ca51 17%-->Sc51-->Ti51-->V51 stable
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.67*0.02			!K53-->Ca52 67%-->Sc51 2%-->Ti51-->V51 stable
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.67*0.98			!K53-->Ca52 67%-->Sc52 98%-->Ti52-->V52-->Cr52 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.16
						ELSE IF(jz==19.and.ja==54)THEN
							xsec(iz,ia,e,24,53,e)=xsec(iz,ia,e,24,53,e)+qj*0.5					!K54-->Ca54-->Sc53 50%-->Ti53-->V53-->Cr53 stable
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj*0.5					!K54-->Ca54-->Sc54 50%-->Ti54-->V54-->Cr54 stable
						ELSE IF(jz==19.and.ja==55)THEN
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj*0.5*0.5				!K55-->Ca54 50%-->Sc54 50%-->Ti54-->V54-->Cr54 stable
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj*0.5*0.5				!K55-->Ca54 50%-->Sc54 50%-->Ti54-->V54-->Cr54 stable
							xsec(iz,ia,e,25,55,e)=xsec(iz,ia,e,25,55,e)+qj*0.5					!K55-->Ca55 50%-->Sc55-->Ti55-->V55-->Cr55-->Mn55 stable
						ELSE IF(jz==20.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj						!Ca44 K capture
						ELSE IF(jz==20.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj						!Ca45-->Sc45
						ELSE IF(jz==20.and.ja==46)THEN
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj			!Ca46 stable
						ELSE IF(jz==20.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj						!Ca47-->Sc47-->Ti47 stable
						ELSE IF(jz==20.and.ja==48)THEN
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj			!Ca48 stable
						ELSE IF(jz==20.and.ja==49)THEN
							xsec(iz,ia,e,22,49,e)=xsec(iz,ia,e,22,49,e)+qj						!Ca49-->Sc49-->Ti49 stable
						ELSE IF(jz==20.and.ja==50)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj						!Ca50-->Sc50-->Ti50 stable
						ELSE IF(jz==20.and.ja==51)THEN
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj						!Ca51-->Sc51-->Ti51-->V51 stable
						ELSE IF(jz==20.and.ja==52)THEN
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj*0.02					!Ca52-->Sc51 2%-->Ti51-->V51 stable
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.98					!Ca52-->Sc52 98%-->Ti52-->V52-->Cr52 stable
						ELSE IF(jz==20.and.ja==53)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.3					!Ca53-->Sc52 30%-->Ti52-->V52-->Cr52 stable
							xsec(iz,ia,e,24,53,e)=xsec(iz,ia,e,24,53,e)+qj*0.7					!Ca53-->Sc53 70%-->Ti53-->V53-->Cr53 stable
						ELSE IF(jz==20.and.ja==54)THEN
							xsec(iz,ia,e,24,53,e)=xsec(iz,ia,e,24,53,e)+qj*0.5					!Ca54-->Sc53 50%-->Ti53-->V53-->Cr53 stable
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj*0.5					!Ca54-->Sc54 50%-->Ti54-->V54-->Cr54 stable
						ELSE IF(jz==20.and.ja==55)THEN
							xsec(iz,ia,e,25,55,e)=xsec(iz,ia,e,25,55,e)+qj						!Ca55-->Sc55-->Ti55-->V55-->Cr55-->Mn55 stable
						ELSE IF(jz==20.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Ca56-->Sc56-->Ti56-->V56-->Cr56-->Mn56-->Fe56 stable
						ELSE IF(jz==21.and.ja==44)THEN
							xsec(iz,ia,e,20,44,e)=xsec(iz,ia,e,20,44,e)+qj						!Sc44-->Ca44 K capture
						ELSE IF(jz==21.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj						!Sc45 stable
						ELSE IF(jz==21.and.ja==46)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj						!Sc46-->Ti46 stable
						ELSE IF(jz==21.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj						!Sc47-->Ti47 stable
						ELSE IF(jz==21.and.ja==48)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj						!Sc48-->Ti48 stable
						ELSE IF(jz==21.and.ja==49)THEN
							xsec(iz,ia,e,22,49,e)=xsec(iz,ia,e,22,49,e)+qj						!Sc49-->Ti49 stable
						ELSE IF(jz==21.and.ja==50)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj						!Sc50-->Ti50 stable
						ELSE IF(jz==21.and.ja==51)THEN
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj						!Sc51-->Ti51-->V51 stable
						ELSE IF(jz==21.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj						!Sc52-->Ti52-->V52-->Cr52 stable
						ELSE IF(jz==21.and.ja==53)THEN
							xsec(iz,ia,e,24,53,e)=xsec(iz,ia,e,24,53,e)+qj						!Sc53-->Ti53-->V53-->Cr53 stable
						ELSE IF(jz==21.and.ja==54)THEN
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj						!Sc54-->Ti54-->V54-->Cr54 stable
						ELSE IF(jz==21.and.ja==55)THEN
							xsec(iz,ia,e,25,55,e)=xsec(iz,ia,e,25,55,e)+qj						!Sc55-->Ti55-->V55-->Cr55-->Mn55 stable
						ELSE IF(jz==21.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Sc56-->Ti56-->V56-->Cr56-->Mn56-->Fe56 stable
						ELSE IF(jz==21.and.ja==57)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj*0.33					!Sc57-->Ti56 33%-->V56-->Cr56-->Mn56-->Fe56 stable
							xsec(iz,ia,e,26,57,e)=xsec(iz,ia,e,26,57,e)+qj*0.67					!Sc57-->Ti57 67%-->V57-->Cr57-->Mn57-->Fe57 stable
						ELSE IF(jz==22.and.ja==44)THEN
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj						!Ti44 K-capture
						ELSE IF(jz==22.and.ja==45)THEN
 							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj						!Ti45-->Sc45 stable
						ELSE IF(jz==22.and.ja==46)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj						!Ti46 stable
						ELSE IF(jz==22.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj						!Ti47 stable
						ELSE IF(jz==22.and.ja==48)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj						!Ti48 stable
						ELSE IF(jz==22.and.ja==49)THEN
							xsec(iz,ia,e,22,49,e)=xsec(iz,ia,e,22,49,e)+qj						!Ti49 stable
						ELSE IF(jz==22.and.ja==50)THEN
							xsec(iz,ia,e,22,50,e)=xsec(iz,ia,e,22,50,e)+qj						!Ti50 stable
						ELSE IF(jz==22.and.ja==51)THEN
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj						!Ti51-->V51 stable
						ELSE IF(jz==22.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj						!Ti52-->V52-->Cr52 stable
						ELSE IF(jz==22.and.ja==53)THEN
							xsec(iz,ia,e,24,53,e)=xsec(iz,ia,e,24,53,e)+qj						!Ti53-->V53-->Cr53 stable
						ELSE IF(jz==22.and.ja==54)THEN
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj						!Ti54-->V54-->Cr54 stable
						ELSE IF(jz==22.and.ja==55)THEN
							xsec(iz,ia,e,25,55,e)=xsec(iz,ia,e,25,55,e)+qj						!Ti55-->V55-->Cr55-->Mn55 stable
						ELSE IF(jz==22.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Ti56-->V56-->Cr56-->Mn56-->Fe56 stable
						ELSE IF(jz==22.and.ja==57)THEN
							xsec(iz,ia,e,26,57,e)=xsec(iz,ia,e,26,57,e)+qj						!Ti57-->V57-->Cr57-->Mn57-->Fe57 stable
						ELSE IF(jz==22.and.ja==58)THEN
							xsec(iz,ia,e,26,58,e)=xsec(iz,ia,e,26,58,e)+qj						!Ti58-->V58-->Cr58-->Mn58-->Fe58 stable
						ELSE IF(jz==23.and.ja==44)THEN
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj						!V44-->Ti44 K-capture
						ELSE IF(jz==23.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj						!V45-->Ti45-->Sc45 stable
						ELSE IF(jz==23.and.ja==46)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj						!V46-->Ti46 stable
						ELSE IF(jz==23.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj						!V47-->Ti47 stable
						ELSE IF(jz==23.and.ja==48)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj						!V48-->Ti48 stable
						ELSE IF(jz==23.and.ja==49)THEN
							xsec(iz,ia,e,23,49,e)=xsec(iz,ia,e,23,49,e)+qj						!V49 K-capture
						ELSE IF(jz==23.and.ja==50)THEN
							xsec(iz,ia,e,23,50,e)=xsec(iz,ia,e,23,50,e)+qj						!V50 stable
						ELSE IF(jz==23.and.ja==51)THEN
							xsec(iz,ia,e,23,51,e)=xsec(iz,ia,e,23,51,e)+qj						!V51 stable
						ELSE IF(jz==23.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj						!V52-->Cr52 stable
						ELSE IF(jz==23.and.ja==53)THEN
							xsec(iz,ia,e,24,53,e)=xsec(iz,ia,e,24,53,e)+qj						!V53-->Cr53 stable
						ELSE IF(jz==23.and.ja==54)THEN
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj						!V54-->Cr54 stable
						ELSE IF(jz==23.and.ja==55)THEN
							xsec(iz,ia,e,25,55,e)=xsec(iz,ia,e,25,55,e)+qj						!V55--Cr55-->Mn55 stable
						ELSE IF(jz==23.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!V56-->Cr56-->Mn56-->Fe56 stable
						ELSE IF(jz==23.and.ja==57)THEN
							xsec(iz,ia,e,26,57,e)=xsec(iz,ia,e,26,57,e)+qj						!V57-->Cr57-->Mn57-->Fe57 stable
						ELSE IF(jz==23.and.ja==58)THEN
							xsec(iz,ia,e,26,58,e)=xsec(iz,ia,e,26,58,e)+qj						!V58-->Cr58-->Mn58-->Fe58 stable
						ELSE IF(jz==23.and.ja==59)THEN
							xsec(iz,ia,e,27,59,e)=xsec(iz,ia,e,27,59,e)+qj						!V59-->Cr59-->Mn59-->Fe59-->Co59 stable
						ELSE IF(jz==24.and.ja==44)THEN
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.93					!Cr44-->V44 93%-->Ti44 K-capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.07
						ELSE IF(jz==24.and.ja==45)THEN
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.73					!Cr45-->V45 73%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.27					!Cr45-->Ti44 27% K-capture
						ELSE IF(jz==24.and.ja==46)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj						!Cr46-->V46-->Ti46 stable
						ELSE IF(jz==24.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj						!Cr47-->V47-->Ti47 stable
						ELSE IF(jz==24.and.ja==48)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj						!Cr48-->V48-->Ti48 stable
						ELSE IF(jz==24.and.ja==49)THEN
							xsec(iz,ia,e,23,49,e)=xsec(iz,ia,e,23,49,e)+qj						!Cr49-->V49 K-capture
						ELSE IF(jz==24.and.ja==50)THEN
							xsec(iz,ia,e,24,50,e)=xsec(iz,ia,e,24,50,e)+qj						!Cr50 stable
						ELSE IF(jz==24.and.ja==51)THEN
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj						!Cr51 K capture
						ELSE IF(jz==24.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj						!Cr52 stable
						ELSE IF(jz==24.and.ja==53)THEN
							xsec(iz,ia,e,24,53,e)=xsec(iz,ia,e,24,53,e)+qj						!Cr53 stable
						ELSE IF(jz==24.and.ja==54)THEN
							xsec(iz,ia,e,24,54,e)=xsec(iz,ia,e,24,54,e)+qj						!Cr54 stable
						ELSE IF(jz==24.and.ja==55)THEN
							xsec(iz,ia,e,25,55,e)=xsec(iz,ia,e,25,55,e)+qj						!Cr55-->Mn55 stable
						ELSE IF(jz==24.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Cr56-->Mn56-->Fe56 stable
						ELSE IF(jz==24.and.ja==57)THEN
							xsec(iz,ia,e,26,57,e)=xsec(iz,ia,e,26,57,e)+qj						!Cr57-->Mn57-->Fe57 stable
						ELSE IF(jz==24.and.ja==58)THEN
							xsec(iz,ia,e,26,58,e)=xsec(iz,ia,e,26,58,e)+qj						!Cr58-->Mn58-->Fe58 stable
						ELSE IF(jz==24.and.ja==59)THEN
							xsec(iz,ia,e,27,59,e)=xsec(iz,ia,e,27,59,e)+qj						!Cr59-->Mn59-->Fe59-->Co59 stable
						ELSE IF(jz==24.and.ja==60)THEN
							xsec(iz,ia,e,26,60,e)=xsec(iz,ia,e,26,60,e)+qj						!Cr60-->Mn60-->Fe60 stable
						ELSE IF(jz==25.and.ja==45)THEN
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.93					!Mn45-->Cr44-->V44 93%-->Ti44 K-capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.07
						ELSE IF(jz==25.and.ja==46)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj*0.6					!Mn46-->Cr46 60%-->V46-->Ti46 stable
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.22					!Mn46-->V45 22%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.18					!Mn46-->Ti44 18% K-capture
						ELSE IF(jz==25.and.ja==47)THEN
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.97					!Mn47-->Cr47 97%-->V47-->Ti47 stable
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj*0.03					!Mn47-->V46 3%-->Ti46 stable
						ELSE IF(jz==25.and.ja==48)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj						!Mn48-->Cr48-->V48-->Ti48 stable
						ELSE IF(jz==25.and.ja==49)THEN
							xsec(iz,ia,e,23,49,e)=xsec(iz,ia,e,23,49,e)+qj						!Mn49-->Cr49-->V49 K-capture
						ELSE IF(jz==25.and.ja==50)THEN
							xsec(iz,ia,e,24,50,e)=xsec(iz,ia,e,24,50,e)+qj						!Mn50-->Cr50 stable
						ELSE IF(jz==25.and.ja==51)THEN
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj						!Mn51-->Cr51 K-capture
						ELSE IF(jz==25.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj						!Mn52-->Cr52 stable
						ELSE IF(jz==25.and.ja==53)THEN
							xsec(iz,ia,e,25,53,e)=xsec(iz,ia,e,25,53,e)+qj						!Mn53 K-capture&Radioactive
						ELSE IF(jz==25.and.ja==54)THEN
							xsec(iz,ia,e,25,54,e)=xsec(iz,ia,e,25,54,e)+qj						!Mn54 K-capture(have also beta decay modes)
						ELSE IF(jz==25.and.ja==55)THEN
							xsec(iz,ia,e,25,55,e)=xsec(iz,ia,e,25,55,e)+qj						!Mn55 stable
						ELSE IF(jz==25.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Mn56-->Fe56 stable
						ELSE IF(jz==25.and.ja==57)THEN
							xsec(iz,ia,e,26,57,e)=xsec(iz,ia,e,26,57,e)+qj						!Mn57-->Fe57 stable
						ELSE IF(jz==25.and.ja==58)THEN
							xsec(iz,ia,e,26,58,e)=xsec(iz,ia,e,26,58,e)+qj						!Mn58-->Fe58 stable
						ELSE IF(jz==25.and.ja==59)THEN
							xsec(iz,ia,e,27,59,e)=xsec(iz,ia,e,27,59,e)+qj						!Mn59-->Fe59-->Co59 stable
						ELSE IF(jz==25.and.ja==60)THEN
							xsec(iz,ia,e,26,60,e)=xsec(iz,ia,e,26,60,e)+qj						!Mn60-->Fe60 stable
						ELSE IF(jz==25.and.ja==61)THEN
							xsec(iz,ia,e,28,61,e)=xsec(iz,ia,e,28,61,e)+qj						!Mn61-->Fe61-->Co61-->Ni61 stable
						ELSE IF(jz==26.and.ja==45)THEN
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.25*0.93			!Fe45-->Cr44 25%-->V44 93%-->Ti44 K-capture
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.25*0.07
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.75
						ELSE IF(jz==26.and.ja==46)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj*0.64*0.6				!Fe46-->Mn46 64%-->Cr46 60%-->V46-->Ti46 stable
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.64*0.22			!Fe46-->Mn46 64%-->V45 22%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.64*0.18			!Fe46-->Mn46 64%-->Ti44 18% K-capture
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.36*0.73			!Fe46-->Cr45 36%-->V45 73%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.36*0.27			!Fe46-->Cr45 36%-->Ti44 27% K-capture
						ELSE IF(jz==26.and.ja==47)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj*0.87					!Fe47-->Cr46 87%-->V46-->Ti46 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.13
						ELSE IF(jz==26.and.ja==48)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj*0.96					!Fe48-->Mn48 96%-->Cr48-->V48-->Ti48 stable
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.04					!Fe48-->Cr47 4%-->V47-->Ti47 stable
						ELSE IF(jz==26.and.ja==49)THEN
							xsec(iz,ia,e,23,49,e)=xsec(iz,ia,e,23,49,e)+qj*0.48					!Fe49-->Mn49 48%-->Cr49-->V49 K-capture
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj*0.52					!Fe49-->Cr48 52%-->V48-->Ti48 stable
						ELSE IF(jz==26.and.ja==50)THEN
							xsec(iz,ia,e,24,50,e)=xsec(iz,ia,e,24,50,e)+qj						!Fe50-->Mn50-->Cr50 stable
						ELSE IF(jz==26.and.ja==51)THEN
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj						!Fe51-->Mn51-->Cr51 K-capture
						ELSE IF(jz==26.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj						!Fe52-->Mn52-->Cr52 stable
						ELSE IF(jz==26.and.ja==53)THEN
							xsec(iz,ia,e,25,53,e)=xsec(iz,ia,e,25,53,e)+qj						!Fe53-->Mn53 K-capture&Radioactive
						ELSE IF(jz==26.and.ja==54)THEN
							xsec(iz,ia,e,26,54,e)=xsec(iz,ia,e,26,54,e)+qj						!Fe54 stable
						ELSE IF(jz==26.and.ja==55)THEN
							xsec(iz,ia,e,26,55,e)=xsec(iz,ia,e,26,55,e)+qj						!Fe55 K-capture
						ELSE IF(jz==26.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Fe56 stable
						ELSE IF(jz==26.and.ja==57)THEN
							xsec(iz,ia,e,26,57,e)=xsec(iz,ia,e,26,57,e)+qj						!Fe57 stable	
						ELSE IF(jz==26.and.ja==58)THEN
							xsec(iz,ia,e,26,58,e)=xsec(iz,ia,e,26,58,e)+qj						!Fe58 stable
						ELSE IF(jz==26.and.ja==59)THEN
							xsec(iz,ia,e,27,59,e)=xsec(iz,ia,e,27,59,e)+qj						!Fe59-->Co59 stable
						ELSE IF(jz==26.and.ja==60)THEN
							xsec(iz,ia,e,26,60,e)=xsec(iz,ia,e,26,60,e)+qj						!Fe60 radioactive
						ELSE IF(jz==26.and.ja==61)THEN
							xsec(iz,ia,e,28,61,e)=xsec(iz,ia,e,28,61,e)+qj						!Fe61-->Co61-->Ni61 stable
						ELSE IF(jz==26.and.ja==62)THEN
							xsec(iz,ia,e,28,62,e)=xsec(iz,ia,e,28,62,e)+qj						!Fe62-->Co62-->Ni62 stable
						ELSE IF(jz==27.and.ja==47)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj*0.64*0.6				!Co47-->Fe46-->Mn46 64%-->Cr46 60%-->V46-->Ti46 stable
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.64*0.22			!Co47-->Fe46-->Mn46 64%-->V45 22%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.64*0.18			!Co47-->Fe46-->Mn46 64%-->Ti44 18% K-capture
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.36*0.73			!Co47-->Fe46-->Cr45 36%-->V45 73%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.36*0.27			!Co47-->Fe46-->Cr45 36%-->Ti44 27% K-capture
						ELSE IF(jz==27.and.ja==48)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj*0.83					!Co48-->Fe47-->Cr46-->V46-->Ti46 stable
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj*0.13
						ELSE IF(jz==27.and.ja==49)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj*0.96					!Co49-->Fe48-->Mn48 96%-->Cr48-->V48-->Ti48 stable
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.04					!Co49-->Fe48-->Cr48 4%-->V47-->Ti47 stable
						ELSE IF(jz==27.and.ja==50)THEN
							xsec(iz,ia,e,24,50,e)=xsec(iz,ia,e,24,50,e)+qj*0.46					!Co50-->Fe50 46%-->Mn50-->Cr50 stable
							xsec(iz,ia,e,23,49,e)=xsec(iz,ia,e,23,49,e)+qj*0.54					!Co50-->Mn49 54%-->Cr49-->V49 K-capture
						ELSE IF(jz==27.and.ja==51)THEN
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj						!Co51-->Fe51-->Mn51-->Cr51 K-capture
						ELSE IF(jz==27.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj						!Co52-->Fe52-->Mn52-->Cr52 stable
						ELSE IF(jz==27.and.ja==53)THEN
							xsec(iz,ia,e,25,53,e)=xsec(iz,ia,e,25,53,e)+qj						!Co53-->Fe53-->Mn53 K-capture&Radioactive
						ELSE IF(jz==27.and.ja==54)THEN
							xsec(iz,ia,e,26,54,e)=xsec(iz,ia,e,26,54,e)+qj						!Co54-->Fe54 stable
						ELSE IF(jz==27.and.ja==55)THEN
							xsec(iz,ia,e,26,55,e)=xsec(iz,ia,e,26,55,e)+qj						!Co55-->Fe55 K-capture
						ELSE IF(jz==27.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Co56-->Fe56 stable
						ELSE IF(jz==27.and.ja==57)THEN
							xsec(iz,ia,e,27,57,e)=xsec(iz,ia,e,27,57,e)+qj						!Co57 K-capture	
						ELSE IF(jz==27.and.ja==58)THEN
							xsec(iz,ia,e,26,58,e)=xsec(iz,ia,e,26,58,e)+qj						!Co58-->Fe58 stable
						ELSE IF(jz==27.and.ja==59)THEN
							xsec(iz,ia,e,27,59,e)=xsec(iz,ia,e,27,59,e)+qj						!Co59 stable
						ELSE IF(jz==27.and.ja==60)THEN
							xsec(iz,ia,e,28,60,e)=xsec(iz,ia,e,28,60,e)+qj						!Co60-->Ni60 stable
						ELSE IF(jz==27.and.ja==61)THEN
							xsec(iz,ia,e,28,61,e)=xsec(iz,ia,e,28,61,e)+qj						!Co61-->Ni61 stable
						ELSE IF(jz==27.and.ja==62)THEN
							xsec(iz,ia,e,28,62,e)=xsec(iz,ia,e,28,62,e)+qj						!Co62-->Ni62 stable
						ELSE IF(jz==27.and.ja==63)THEN
							xsec(iz,ia,e,29,63,e)=xsec(iz,ia,e,29,63,e)+qj						!Co63-->Ni63--Cu63 stable
						ELSE IF(jz==28.and.ja==48)THEN
							xsec(iz,ia,e,22,46,e)=xsec(iz,ia,e,22,46,e)+qj*0.64*0.6				!Ni48-->Fe46-->Mn46 64%-->Cr46 60%-->V46-->Ti46 stable
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.64*0.22			!Ni48-->Fe46-->Mn46 64%-->V45 22%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.64*0.18			!Ni48-->Fe46-->Mn46 64%-->Ti44 18% K-capture
							xsec(iz,ia,e,21,45,e)=xsec(iz,ia,e,21,45,e)+qj*0.36*0.73			!Ni48-->Fe46-->Cr45 36%-->V45 73%-->Ti45-->Sc45 stable
							xsec(iz,ia,e,22,44,e)=xsec(iz,ia,e,22,44,e)+qj*0.36*0.27			!Ni48-->Fe46-->Cr45 36%-->Ti44 27% K-capture
						ELSE IF(jz==28.and.ja==49)THEN
							xsec(iz,ia,e,22,48,e)=xsec(iz,ia,e,22,48,e)+qj*0.96					!Ni49-->Co49-->Fe48-->Mn48 96%-->Cr48-->V48-->Ti48 stable
							xsec(iz,ia,e,22,47,e)=xsec(iz,ia,e,22,47,e)+qj*0.04					!Ni49-->Co49-->Fe48-->Cr47 4%-->V47-->Ti47 stable
						ELSE IF(jz==28.and.ja==50)THEN
							xsec(iz,ia,e,24,50,e)=xsec(iz,ia,e,24,50,e)+qj*0.46					!Ni50-->Co50-->Fe50 46%-->Mn50-->Cr50 stable
							xsec(iz,ia,e,23,49,e)=xsec(iz,ia,e,23,49,e)+qj*0.54					!Ni50-->Co50-->Mn49 54%-->Cr49-->V49 K-capture
						ELSE IF(jz==28.and.ja==51)THEN
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj						!Ni51-->Co51-->Fe51-->Mn51-->Cr51 K-capture
						ELSE IF(jz==28.and.ja==52)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.83					!Ni52-->Co52 83%-->Fe52-->Mn52-->Cr52 stable
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj*0.17					!Ni52-->Fe51 17%-->Mn51-->Cr51 K-capture
						ELSE IF(jz==28.and.ja==53)THEN
							xsec(iz,ia,e,25,53,e)=xsec(iz,ia,e,25,53,e)+qj*0.55					!Ni53-->Co53 55%-->Fe53-->Mn53 K-capture&Radioactive
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.45					!Ni53-->Fe52 45%-->Mn52-->Cr52 stable
						ELSE IF(jz==28.and.ja==54)THEN
							xsec(iz,ia,e,26,54,e)=xsec(iz,ia,e,26,54,e)+qj						!Ni54-->Co54-->Fe54 stable
						ELSE IF(jz==28.and.ja==55)THEN
							xsec(iz,ia,e,26,55,e)=xsec(iz,ia,e,26,55,e)+qj						!Ni55-->Co55-->Fe55 K-capture
						ELSE IF(jz==28.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Ni56-->Co56-->Fe56 stable
						ELSE IF(jz==28.and.ja==57)THEN
							xsec(iz,ia,e,27,57,e)=xsec(iz,ia,e,27,57,e)+qj						!Ni57-->Co57 K-capture	
						ELSE IF(jz==28.and.ja==58)THEN
							xsec(iz,ia,e,28,58,e)=xsec(iz,ia,e,28,58,e)+qj						!Ni58 stable
						ELSE IF(jz==28.and.ja==59)THEN
							xsec(iz,ia,e,28,59,e)=xsec(iz,ia,e,28,59,e)+qj						!Ni59 Radioactive
						ELSE IF(jz==28.and.ja==60)THEN
							xsec(iz,ia,e,28,60,e)=xsec(iz,ia,e,28,60,e)+qj						!Ni60 stable
						ELSE IF(jz==28.and.ja==61)THEN
							xsec(iz,ia,e,28,61,e)=xsec(iz,ia,e,28,61,e)+qj						!Ni61 stable
						ELSE IF(jz==28.and.ja==62)THEN
							xsec(iz,ia,e,28,62,e)=xsec(iz,ia,e,28,62,e)+qj						!Ni62 stable
						ELSE IF(jz==28.and.ja==63)THEN
							xsec(iz,ia,e,29,63,e)=xsec(iz,ia,e,29,63,e)+qj						!Ni63-->Cu63 stable
						ELSE IF(jz==28.and.ja==64)THEN
							xsec(iz,ia,e,28,64,e)=xsec(iz,ia,e,28,64,e)+qj						!Ni64 stable
						ELSE IF(jz==29.and.ja==52)THEN
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj						!Cu52-->Ni51-->Co51-->Fe51-->Mn51-->Cr51 K-capture
						ELSE IF(jz==29.and.ja==53)THEN
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.5*0.83				!Cu53-->Ni52 50%-->Co52 83%-->Fe52-->Mn52-->Cr52 stable
							xsec(iz,ia,e,24,51,e)=xsec(iz,ia,e,24,51,e)+qj*0.5*0.17				!Cu53-->Ni52 50%-->Fe51 17%-->Mn51-->Cr51 K-capture
							xsec(iz,ia,e,25,53,e)=xsec(iz,ia,e,25,53,e)+qj*0.5*0.55				!Cu53-->Ni53 50%-->Co53 55%-->Fe53-->Mn53 K-capture&Radioactive
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.5*0.45				!Cu53-->Ni53 50%-->Fe52 45%-->Mn52-->Cr52 stable
						ELSE IF(jz==29.and.ja==54)THEN
							xsec(iz,ia,e,25,53,e)=xsec(iz,ia,e,25,53,e)+qj*0.55					!Cu54-->Ni53-->Co53 55%-->Fe53-->Mn53 K-capture&Radioactive
							xsec(iz,ia,e,24,52,e)=xsec(iz,ia,e,24,52,e)+qj*0.45					!Cu54-->Ni53-->Fe52 45%-->Mn52-->Cr52 stable
						ELSE IF(jz==29.and.ja==55)THEN
							xsec(iz,ia,e,26,55,e)=xsec(iz,ia,e,26,55,e)+qj*0.5					!Cu55-->Ni55 50%-->Co55-->Fe55  	K-capture
							xsec(iz,ia,e,26,54,e)=xsec(iz,ia,e,26,54,e)+qj*0.5					!Cu55-->Ni54 50%-->Co54-->Fe54  	stable
						ELSE IF(jz==29.and.ja==56)THEN
							xsec(iz,ia,e,26,56,e)=xsec(iz,ia,e,26,56,e)+qj						!Cu56-->Ni56-->Co56-->Fe56 stable
						ELSE IF(jz==29.and.ja==57)THEN
							xsec(iz,ia,e,27,57,e)=xsec(iz,ia,e,27,57,e)+qj						!Cu57-->Ni57-->Co57 K-capture	
						ELSE IF(jz==29.and.ja==58)THEN
							xsec(iz,ia,e,28,58,e)=xsec(iz,ia,e,28,58,e)+qj						!Cu58-->Ni58 stable
						ELSE IF(jz==29.and.ja==59)THEN
							xsec(iz,ia,e,28,59,e)=xsec(iz,ia,e,28,59,e)+qj						!Cu59-->Ni59 Radioactive
						ELSE IF(jz==29.and.ja==60)THEN
							xsec(iz,ia,e,28,60,e)=xsec(iz,ia,e,28,60,e)+qj						!Cu60-->Ni60 stable
						ELSE IF(jz==29.and.ja==61)THEN
							xsec(iz,ia,e,28,61,e)=xsec(iz,ia,e,28,61,e)+qj						!Cu61-->Ni61 stable
						ELSE IF(jz==29.and.ja==62)THEN
							xsec(iz,ia,e,28,62,e)=xsec(iz,ia,e,28,62,e)+qj						!Cu62-->Ni62 stable
						ELSE IF(jz==29.and.ja==63)THEN
							xsec(iz,ia,e,29,63,e)=xsec(iz,ia,e,29,63,e)+qj						!Cu63 stable
						ELSE IF(jz==29.and.ja==64)THEN
							xsec(iz,ia,e,28,64,e)=xsec(iz,ia,e,28,64,e)+qj*0.61					!Cu64 61%-->Ni64 stable
							xsec(iz,ia,e,28,64,e)=xsec(iz,ia,e,28,64,e)+qj*0.61					!Cu64 39%-->Zn64-->Ni64 stable
						ELSE
							xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+qj
						END IF
					END DO
				END DO
				xsec(iz,ia,e,min_Z,max_A,e)=xsec(iz,ia,e,min_Z,max_A,e)+70*((ia**0.333+4**0.3333)**2)/(16.8)
			END DO
		END DO
    END SUBROUTINE xsections_Iron

	SUBROUTINE xsections_PAMELA(e,xsec)
    	IMPLICIT NONE
        INTEGER,INTENT(in)::e
		REAL(8),INTENT(in out)::xsec(min_Z:max_Z,min_A:max_A,min_cell_E:max_cell_E,min_Z:max_Z,min_A:max_A,min_cell_E:max_cell_E)
		INTEGER::pos_min,ele_min,e_sec
        INTEGER::NA1=1,NA2=1,key1
        REAL(8)::q,energy,energy_gap,PP_MESON,Esec,Pp1
        energy=10**(energy_grid*e)
        Pp1=SQRT(energy**2+2*energy)
        !write(*,*)'Proton energy=',energy,'Proton momentum=',Pp1
        iz=1
		ia=1
		jz=1
		ja=0
		key1=1
		q=log10(0.791)
		IF(ABS((q/energy_grid)-int(q/energy_grid))<0.5)THEN
			pos_min=int(q/energy_grid)
		ELSE
			IF(q>0)THEN
				pos_min=int(q/energy_grid)+1
			ELSE
				pos_min=int(q/energy_grid)-1
			END IF
		END IF
		IF(pos_min<min_cell_E)pos_min=min_cell_E
		DO e_sec=pos_min,e
			Esec=10**(energy_grid*e_sec)
			energy_gap=10**(energy_grid*(e_sec+0.5))-10**(energy_grid*(e_sec-0.5))
			IF(10**(energy_grid*(e_sec-0.5))<0.791)energy_gap=10**(energy_grid*(e_sec+0.5))-0.791
			xsec(iz,ia,e,jz,ja,e_sec)=energy_gap*PP_MESON(Esec, Pp1, NA1, NA2, key1)*1000
			!write(*,*)'positron energy=',Esec,'xsection=',xsec(iz,ia,e,jz,ja,e_sec)
		end do
        jz=-1
        ja=0
        key1=-1
		q=log10(1.65)
		IF(ABS(((q/energy_grid)-int((q/energy_grid))/1))<0.5)THEN
			ele_min=int(q/energy_grid)
		ELSE
			IF(q>0)THEN
				ele_min=int(q/energy_grid)+1
			ELSE
				ele_min=int(q/energy_grid)-1
			END IF
		END IF
		IF(ele_min<min_cell_E)ele_min=min_cell_E
		DO e_sec=ele_min,e
			Esec=10**(energy_grid*e_sec)
			energy_gap=10**(energy_grid*(e_sec+0.5))-10**(energy_grid*(e_sec-0.5))
			IF(10**(energy_grid*(e_sec-0.5))<1.65)energy_gap=10**(energy_grid*(e_sec+0.5))-1.65
			xsec(iz,ia,e,jz,ja,e_sec)=energy_gap*PP_MESON(Esec, Pp1, NA1, NA2, key1)*1000
			!write(*,*)'electron energy=',Esec,'xsection=',xsec(iz,ia,e,jz,ja,e_sec)
		end do
    END SUBROUTINE xsections_PAMELA
END MODULE xsection