* fill histograms n/loop 1 foil_eff.f ve/cr foileff(6) ve/cr efoileff(6) zone 2 3 opt grid opt nstat opt ndate set mtyp 0 do i=1,6 h/operation/div 200[i] 100[i] 300[i] 1. 1. if ( [i] .le. 2 ) then ve/cr eff(48) ve/cr den(48) ve/cr err(48) h/get_vect/content 100[i] den h/get_vect/content 300[i] eff * Compute the errors do j=1,48 tmp=$sigma(sqrt(eff([j])*(1.-eff([j]))/den([j]))) ve/inp err([j]) [tmp] enddo h/put_vect/error 300[i] err elseif ( [i] .le. 4 ) then ve/cr eff(96) ve/cr den(96) ve/cr err(96) h/get_vect/content 100[i] den h/get_vect/content 300[i] eff * Compute the errors do j=1,96 tmp=$sigma(sqrt(eff([j])*(1.-eff([j]))/den([j]))) ve/inp err([j]) [tmp] enddo h/put_vect/error 300[i] err else ve/cr eff(144) ve/cr den(144) ve/cr err(144) h/get_vect/content 100[i] den h/get_vect/content 300[i] eff * Compute the errors do j=1,144 tmp=$sigma(sqrt(eff([j])*(1.-eff([j]))/den([j]))) ve/inp err([j]) [tmp] enddo h/put_vect/error 300[i] err endif ve/cr p(1) r 0.8 ve/cr ep(1) r 0.1 min 300[i] 0.6 max 300[i] 1.2 h/fit 300[i] p0 ! 1 p ! ! ! ep atitle 'Cell ID' 'Cell efficiency' ve/inp foileff([i]) p(1) ve/inp efoileff([i]) ep(1) enddo * foil efficiencies h/cr/1d 4000 ' ' 6 0.5 6.5 h/put_vect/content 4000 foileff h/put_vect/error 4000 efoileff zone 1 1 set mtyp 20 min 4000 0.6 max 4000 1.2 h/pl 4000 atitle 'Foil number' 'Foil efficiency'