Sun Aug  1 16:54:52 EDT 2004
 
notes on v1_4

from job submitted earlier today:
 logfile is ../log/standard.bunch.of.jobs.detector.21.dat.10.010804.1400.log 

i remade the fastmc.exe executable while the standard bunch of jobs
was running. doesn't seem to have caused any ill effects.
running jobs were
ke3g 14
kp3 15
kp2 15

Andries wants to use 3 MeV threshold for pv.

source/setupanal.f			- modified "lower PV threshold to 3 MeV"

source/bookanal.f			- modified "add kp2 hists"
source/fillanal.f			- modified "fill kp2 hists"

test
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.kp2.kcp3.aspect1.bryman.010804.2055.log 

make some unskimmed kp2:
% run.fastmc.script kp2 2 10000 9999 0 4 1 detector.21.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.9999.41.010804.2059.log 

make prelim version of list with currently available files:
%   grep rzn ../log/standard.bunch.of.jobs.detector.21.dat.10.010804.1400.log | grep -v kp2.21021.41.rzn.ntskim | awk '{print $3}' | sed -e s/local// | sort -r > b.
%   cp aspect1.bryman.list a.
%   cat a. b. | sort -r | less
%   cat a. b. | sort -r > aspect1.bryman.list

another test:
% grep kp2 kpnn.kp2.kcp3.aspect1.bryman.list | head -1 > kp2.aspect1.bryman.list
% analysis.script kp2.aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kp2.aspect1.bryman.010804.2122.log 

% analysis.script aspect1.bryman.list ../geometry/detector.21.dat&
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.010804.2142.log 

***********************************
Mon Aug  2 10:38:50 EDT 2004

study of kp2, kpnn weighted hists shows that there is 
<2% of kpnn acceptance for E*<180 MeV
and 
<0.1% of kpnn acceptance for E*>290 MeV (~3sigma above kpnn endpoint)

plots of |Ymiss(PR)| vs |Pmiss| suggest cut
|Ymiss(PR)|>5cm OR |Pmiss|<800 MeV/c
to suppress kp2-even bkgd with large weights due to high Eg (~1000MeV) in catcher
and low Eg (~10MeV) in decay volume.

I will add these two cuts to Andries's contour cut.

source/select_signal.f				- modified "add E*, Ymiss, Pmiss cuts to AvdS cuts"

latest standard bunch of jobs completed.
update aspect1.bryman.list 

test
% analysis.script kp2.aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kp2.aspect1.bryman.020804.1120.log

>>>>>>>>>>>>>>>>>>> Need to remove PV boost from e+ ineffy when
>>>>>>>>>>>>>>>>>>> treating e+ annihilation that produces ke3g 'signal'

with new cuts, kp2 bkgd =  61.12 +- 5.787 events (using single kp2 file)

source/gettrkweight.f				- modified "disable PVboost for annih e+ from ke3g"
source/getcandwt.f				- modified "disable PVboost for annih e+ from ke3g"

test (1kpnn, 5kp2, 1ke3g files)
% analysis.script sample.aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.sample.aspect1.bryman.020804.1301.log

Results:

Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.7635E-03  1.000       29.11      0.8239      MZ
kpnn       0.1000E+06  0.3264E-02  1.000       124.4      1.642       AvdS
kpnn       0.1000E+06  0.2566E-02  1.000       97.83      1.504       AK basic
kpnn       0.1000E+06  0.1666E-02  1.000       63.53      1.211       AK loose
kpnn       0.1000E+06  0.1480E-02  1.000       56.43      1.142       AK lominal
kpnn       0.1000E+06  0.9944E-03  1.000       37.91      0.9351      AK tight
kpnn       0.1000E+06  0.6668E-03  1.000       25.42      0.7659      AK tighter
kpnn       0.1000E+06  0.5827E-03  1.000       22.22      0.7167      AK tightest
*kp2       0.1000E+07  0.1419E-11  0.5741E-01  1.671      0.2435      MZ
*kp2       0.1000E+07  0.7472E-10  0.7074      88.01      13.53       AvdS
*kp2       0.1000E+07  0.7893E-10  0.9503      92.97      15.83       AK basic
*kp2       0.1000E+07  0.2855E-10  0.5294      33.63      10.45       AK loose
*kp2       0.1000E+07  0.1812E-10  0.3781      21.34      9.543       AK lominal
*kp2       0.1000E+07  0.3855E-11  0.1198      4.541      0.7991      AK tight
*kp2       0.1000E+07  0.1040E-11  0.4820E-01  1.225      0.2756      AK tighter
*kp2       0.1000E+07  0.8845E-12  0.4690E-01  1.042      0.2736      AK tightest
*ke3g      0.3000E+06  0.3424E-13  0.5411E-02  0.1575     0.1885E-01  MZ
*ke3g      0.3000E+06  0.1727E-12  0.6385E-02  0.7944     0.5626E-01  AvdS
*ke3g      0.3000E+06  0.2093E-12  0.9840E-02  0.9627     0.5986E-01  AK basic
*ke3g      0.3000E+06  0.9943E-13  0.7200E-02  0.4574     0.4605E-01  AK loose
*ke3g      0.3000E+06  0.6913E-13  0.5635E-02  0.3180     0.2836E-01  AK lominal
*ke3g      0.3000E+06  0.4701E-13  0.5705E-02  0.2163     0.2256E-01  AK tight
*ke3g      0.3000E+06  0.3299E-13  0.5970E-02  0.1518     0.1830E-01  AK tighter
*ke3g      0.3000E+06  0.2869E-13  0.5940E-02  0.1320     0.1723E-01  AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  15.92      2.173   1.829  0.2442  MZ
bkgd  1.401      0.2142  88.81  13.53   AvdS
bkgd  1.041      0.1762  93.94  15.83   AK basic
bkgd  1.864      0.5726  34.09  10.45   AK loose
bkgd  2.606      1.149   21.66  9.543   AK lominal
bkgd  7.969      1.353   4.757  0.7994  AK tight
bkgd  18.46      3.743   1.377  0.2762  AK tighter
bkgd  18.92      4.461   1.174  0.2741  AK tightest

Note that S/B for AvdS is not that much different frm AK basic.
S = 124.4+-1.6 

source/anal.f				- modified "reduce hiwtdump for kp2"

analysis.script kp2.aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kp2.aspect1.bryman.020804.1544.log

add a few more hists

% grep kp2 aspect1.bryman.list | head -3 | tail -1 > kp2.aspect1.bryman.list
% analysis.script kp2.aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kp2.aspect1.bryman.020804.1614.log

big job:
% analysis.script aspect1.bryman.list ../geometry/detector.21.dat &
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.020804.1629.log

********************************
Tue Aug  3 08:31:03 EDT 2004

damn it, aspect1.bryman.list has multiple entries for same file!
remake and re-run
% analysis.script aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.030804.1007.log

there were 15 high weight kp2 (>2e-5)
from /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.020804.1629.log
14 with 1g in US hole. 197.le.Emiss.le.325 MeV, 10odd, 4even
 1 with 1g in catcher, Emiss=792MeV. just below cut |Pmiss|>800 MeV/c.

work on fit without Y beam constraint.
in scripts/
% cp control.dat control.dat.remove.ybeam.constraint

10k kpnn events
% simple.run.fastmc.script control.dat.remove.ybeam.constraint detector.21.dat &
[3] 25596
bnlku24_djaffe[424]%
 NOTE EXECUTABLE                   exe/fastmc.exe          NOTE EXECUTABLE
/e787u/djaffe/KOPIO/fastmc/scripts/../geometry/detector.21.dat control.dat.remove.ybeam.constraint exe/fastmc.exe
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1127.log

2d job with beam constraint:
% simple.run.fastmc.script control.dat.remove.ybeam.constraint detector.21.dat &
[3] 25619
bnlku24_djaffe[427]%
 NOTE EXECUTABLE                   exe/fastmc.exe          NOTE EXECUTABLE
/e787u/djaffe/KOPIO/fastmc/scripts/../geometry/detector.21.dat control.dat.remove.ybeam.constraint exe/fastmc.exe
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1132.log
/u1/djaffe/kopio/fastmc/ntuples/kpnn.with.ybeam.constraint.rzn

nnpi0 events at y=50,z=1215 with beam constraint
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1244.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.with.ybeam.constraint.rzn

nnpi0 events at  y=50,z=1215 without beam constraint
/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1245.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.without.ybeam.constraint.rzn

need bigger samples, 100K nnpi0:
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1300.log
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1305.log

need bigger samples, use skimming, generate 1e6 events
INIT: Skimming enabled. Skim cuts follow
 INIT skim: Gen Photon at 10rl into PR/CAL |X|< 300.00 |Y|< 300.00 at hole at CAL front |X|>   0.00 |Y|>   0.00
 INIT skim: Recon KL.    0.00 < E(K) <3000.00 and  950.00 < Z(K) <1450.00
 INIT skim: Recon pi0.    0.00 < E*pi < 300.00 and   90.00 < Mgg < 180.00 E*pi - |E*g1-E*g2|>   0.00

/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1452.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.with.ybeam.constraint.a.rzn.ntskim
 FASTMC: Skim accepted     116 of 1000000 generated events. Effy=  0.012 +-  0.001 PERCENT

/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.030804.1658.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.without.ybeam.constraint.a.rzn.ntskim
 FASTMC: Skim accepted     108 of 1000000 generated events. Effy=  0.011 +-  0.001 PERCENT

******************************************
Wed Aug  4 10:44:45 EDT 2004

 INIT: Take Ybeam size for constraint in pi0 fit from Ybeam angle
 INIT: NEUTRONS ENABLED. Option=  2 P(n) from measured spectrum. Interaction point=  140.000    0.000 1215.000
 INIT: generate  1000000 events of type nn -> pi0X.
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.040804.1044.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.x140.z1215.with.ybeam.constraint.a.rzn.ntskim
 FASTMC: Skim accepted      41 of 1000000 generated events. Effy=  0.004 +-  0.001 PERCENT

make more
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.040804.1124.log
 INIT: generate 10000000 events of type nn -> pi0X.
 INIT: Take Ybeam size for constraint in pi0 fit from Ybeam angle
 INIT:  /u1/djaffe/kopio/fastmc/ntuples/nnpi0.x140.z1215.with.ybeam.constraint.b.rzn.ntskim  on logical unit= 20
 INIT: NEUTRONS ENABLED. Option=  2 P(n) from measured spectrum. Interaction point=  140.000    0.000 1215.000
 FASTMC: Skim accepted     470 of10000000 generated events. Effy=  0.005 +-  0.000 PERCENT
15 instances of ' FACT.INC: about to div by 0'

for CPV timing, need higher stats.
 
scripts/submit.standard.bunch.of.jobs.script			- modified "increase # of ke3g jobs"

%  submit.standard.bunch.of.jobs.script detector.21.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.21.dat.10.040804.1625.log

moved remaining ntuples in aspect1.bryman.list from /home to /u1 to make room 
for standard.bunch:
% df /u1 /home ; mover ;df /u1 /home
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb2             35550516  26711648   8838868  76% /u1
/dev/sda4             30637428  26509768   2571364  92% /home
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb2             35550516  31009596   4540920  88% /u1
/dev/sda4             30637428  22158692   6922440  77% /home

estimated rate from neutron hits at x=140cm is negligible, need more stats at y=50cm:
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.21.dat.040804.1723.log
 INIT: generate 10000000 events of type nn -> pi0X.
 INIT: Take Ybeam size for constraint in pi0 fit from Ybeam angle
 INIT: NEUTRONS ENABLED. Option=  2 P(n) from measured spectrum. Interaction point=    0.000   50.000 1215.000

/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.with.ybeam.constraint.b.rzn.ntskim
 FASTMC: Skim accepted    1087 of10000000 generated events. Effy=  0.011 +-  0.000 PERCENT

*******************************
Thu Aug  5 09:04:21 EDT 2004

here is part of Andries's response to my message from yesterday:

Date: Wed Aug  4 20:25:58 2004
From: andries <andries@physik.unizh.ch>
To: David E Jaffe <djaffe@bnlku5.phy.bnl.gov>
Subject: Re: FastMC results with your ln(Emiss)/T*^2 contour

 hi David

 thanks for these results. I will look at this more carefully
 tomorrow morning. After extensive studies I arrived at a very
 similar cut (using Emissing and the Ycomponent of the missing
 momentum) you use. In addition I found it helps to cut on the
 energies of the two gammas that form the signal. When I remember
 correctly I require now that at least one of them has energy
 above 180 MeV and that none of them has more than 400 MeV. I
 then started to optimize the contour cut but didn't finish yet.
 We can't expect the contour remains unchanged by adding this
 background component. K->2pi will come down a lot with some
 (10-20%?) loss of signal.

[snip]

--------------------------

add a plot of Ehigh vs Elow for signal candidate gammas 

% analysis.script one.each.aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.0918.log

After conversation with Laur based on another of Andries's emails,
I checked the assumed size of the catcher:

 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    200.00000     50.00000   1595.00000   2715.00000 CatchrVol

This is way bigger than area we expect to be occupied by
the catcher and the guard counters (see p.2 in " Latest design for the Guard
Counter" at http://pubweb.bnl.gov/users/e926/www/meetings/DCV/jul23_04/ )

 As a better approximation, I will make the catcher 150 * 15 (X * Y halfwidths).
From a plot of Y at catcher for Kp2, approximately 35% of photons
that previously hit 200x50200x50 catcher will hit 150x15 catcher.

oops, turns out I was smarter than that. 'CATCHER DETECTOR' is actually 200x10 !

geometry/detector.22.dat			- new "change catcher detector from 200x10 to 150x15 (XxY cm)"
source/detector.f				- modified "report size of catcher detector"

>>>>>>>>>>>>>>>>>>>>>>> FIX THIS: GammaCaught in select_signal is always FALSE. It is used in fillallbut1

check effect of change in catcher size
% analysis.script one.each.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1139.log

 ***** ERROR in HBOOK2 : Not enough space in memory : ID=  ....
occurred after ke3g ntuple was opened.

delete some unused hists from bookanal/fillanal
hist 20,21,41,43,44

source/bookanal.f			- modified "remove unused hists"
source/fillanal.f			- modified "remove unused hists"
source/anal.f				- modified "add warning if Nevent>MaxEvent"

test job:
 analysis.script one.each.aspect1.bryman.list ../geometry/detector.22.dat &

DEBUG=2
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1319.log
DEBUG=0, MAXEVENT=20
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1334.log

now HBOOK2 errors gone, but
 ***** ERROR in HNBUFR : Not enough space in memory : ID=       1
occurs!

back-tracking i find that errors started after the ehi vs elo plot was added..
remove id=56 from bookanal and try again...
% analysis.script one.each.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1351.log

hmmm. error message disappears....

turn off all of the all-but-one (cut) hists since i don't use them and re-institute id=56
source/anal.f				- modified "turn off all allbut1 hists"

% analysis.script one.each.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1404.log
no error messages!

OK. now run jobs to check effect of changing size of catcher:
% analysis.script one.each.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1411.log

with 150x15 catcher ( /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1411.log ):

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1000E+06  0.3264E-02  1.000       124.4       1.642       AvdS
*kpgg      0.1000E+06  0.1078E-09  0.1850E-02  0.2302      0.6938E-01  AvdS
*kp3       0.1000E+06  0.9143E-15  0.1973E-02  0.2455      0.6198E-01  AvdS
*kp2       0.2000E+06  0.6421E-10  0.6079      75.63       21.17       AvdS
*ke4       0.1000E+06  0.1581E-12  0.8362E-04  0.1040E-01  0.5479E-03  AvdS
*ke3g      0.1000E+06  0.1821E-12  0.6734E-02  0.8377      0.1034      AvdS
*kcp3      0.1000E+06  0.1518E-13  0.1946E-01  2.422       0.5889      AvdS
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  1.567      0.4186  79.38  21.18   AvdS

% analysis.script one.each.aspect1.bryman.list ../geometry/detector.21.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1454.log

with 200x10 catcher (  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.each.aspect1.bryman.050804.1454.log )

Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1000E+06  0.3264E-02  1.000       124.4       1.642       AvdS
*kpgg      0.1000E+06  0.9727E-10  0.1669E-02  0.2077      0.6859E-01  AvdS
*kp3       0.1000E+06  0.9108E-15  0.1966E-02  0.2446      0.6200E-01  AvdS
*kp2       0.2000E+06  0.6572E-10  0.6222      77.42       21.28       AvdS
*ke4       0.1000E+06  0.1581E-12  0.8362E-04  0.1040E-01  0.5479E-03  AvdS
*ke3g      0.1000E+06  0.1821E-12  0.6734E-02  0.8377      0.1034      AvdS
*kcp3      0.1000E+06  0.1518E-13  0.1946E-01  2.422       0.5889      AvdS
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  1.533      0.4029  81.14  21.29   AvdS

Conclusion: 200x10 kp2 rate is ~2.4% higher than 150x15 catcher
                   kpgg         9.9% lower
                   kp3          0.4% lower
(note that the same events are used so stat uncertainties are highly correlated)
Not really much of a change.

%  simple.run.fastmc.script control.dat.remove.ybeam.constraint detector.22.dat &
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.050804.1503.log
 INIT: generate   100000 events of type nn -> pi0X.
 INIT: Take Ybeam size for constraint in pi0 fit from Ybeam angle
 INIT: /u1/djaffe/kopio/fastmc/ntuples/nnpi0.y0.z1215.with.ybeam.constraint.a.rzn.ntskim  on logical unit= 20
 INIT: NEUTRONS ENABLED. Option=  2 P(n) from measured spectrum. Interaction point=    0.000    0.000 1215.000
 FASTMC: Skim accepted      15 of  100000 generated events. Effy=  0.015 +-  0.004 PERCENT

now look at rejecting more kp2 with |E1*-E2*| vs Emiss cut:
% analysis.script one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.050804.1543.log

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.3278E-02  1.000       125.0      1.641       AvdS
*kp2       0.4000E+06  0.5541E-10  0.5223      65.27      3.709       AvdS

add cut requiring ((Emiss-250)/250)**2 + ((dEst-130)/25)**2 > 1 , dEst = |E*1-E*2|
see set.kp2.ediff.vs.emiss.cut.ps for graphical view.

remake one.kpnn.and.two.kp2.aspect1.bryman.list with different kpnn and kp2 ntuples:
% analysis.script one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.050804.1746.log

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.2962E-02  1.000       112.9      1.553       AvdS
*kp2       0.4000E+06  0.4646E-10  0.4847      54.73      10.63       AvdS

Signal decreased by .90(.02)
bkgd decreased by  .84(.17)

not a rousing success, but kp2 has a high weight event .38e-5 or 20% of
kp2 total weight = 1.86e-5, which is a kp2-odd with a gamma in US hole.
and the high weight event had Emiss =  304.5, dEst = | 55.29      213.2| = 157.9
 ((Emiss-250)/250)**2 + ((dEst-130)/25)**2 = .05 + 1.25
just at the cut boundary

remove ((Emiss-250)/250)**2 + ((dEst-130)/25)**2 cut for now.

add ntuples from latest standard bunch to aspect1.bryman, omitting  ke3g.91043.141 that
is still running.

% grep -E 'kpnn|ke3g|ke4|kcp3' aspect1.bryman.list > kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
% grep -E 'kpnn|kp2' aspect1.bryman.list > kpnn.kp2.aspect1.bryman.list
% wc -l kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
     83 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
% wc -l kpnn.kp2.aspect1.bryman.list
     66 kpnn.kp2.aspect1.bryman.list

% analysis.script kpnn.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.050804.1859.log

remake kpnn.kp2... cuz don't want two analysis jobs to try to gzip/gunzip same kpnn file

% grep -E 'kpnn' aspect1.bryman.list | sort -n > kpnn.kp2.aspect1.list
% grep -E 'kp2' aspect1.bryman.list | sort -n >> kpnn.kp2.aspect1.list
% wc -l kpnn.kp2.aspect1.list
     66 kpnn.kp2.aspect1.list

% analysis.script kpnn.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.kp2.aspect1.bryman.050804.1902.log

>>>>>>>>>>>>>>>>>>>>>>>>>> why is Ehi vs Emiss for nnpi0 different from previous mc ?

still need a lot more ke4, ke3g, kcp3 bkgd.
mod script to only submit ke4,ke3g, kcp3
% submit.standard.bunch.of.jobs.script
 submit.standard.bunch.of.jobs.script detector.21.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.21.dat.10.050804.2054.log

scripts/submit.standard.bunch.of.jobs.script			- modified "add chargeonly option"

******************************************
Fri Aug  6 09:28:05 EDT 2004

from kpnn.kp2 job:

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.3309E-02  1.000       126.1      0.4768      AvdS
*kp2       0.1080E+08  0.6162E-10  0.5754      72.58      2.284       AvdS
Key   N(Kpnn)/B  d(S/B)      Nev     dNeV
bkgd  1.738      0.5509E-01  72.58   2.284       AvdS

add plot of Ehi vs dEstar for Emiss<350 MeV

% analysis.script  one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.060804.0927.log

fix typo, resub
analysis.script one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.060804.0953.log

remake aspect1.bryman.list with all files from ../log/standard.bunch.of.jobs.detector.21.dat.10.040804.1625.log
and files upto ke3g.91059 from ./log/standard.bunch.of.jobs.detector.21.dat.10.050804.2054.log
and all files currently in aspect1.bryman.list

now:
12  kpnn in aspect1.bryman.list 
54  kp2 
17  ke3g
40  kcp3
40  ke4 

Investigate differences between old and new nnpi0 jobs

OLD nnpi0      ../log/fastmc.control.dat.detector.6.dat.261102.0835.log:
Start time is Tue Nov 26 08:35:34 EST 2002
control and detector files are
-rw-rw-r--    1 djaffe   djaffe       4971 Nov 21 15:07 /e787u/djaffe/KOPIO/fastmc/scripts/../geometry/detector.6.dat
-rw-rw-r--    1 djaffe   djaffe       4004 Nov 26 08:35 control.dat

 INIT:            Begin job at 083535.3 20021126

 DETECTOR:BEAM PIPE Xsize=  35.00     is too small wrt aperature*beam divergence= 47.50     Z= 950.0     Theta=0.5000E-01 MAKING IT BIGGER!
 DETECTOR: Adjust DOWNSTREAM HOLE X to size= 90.00     = Z= 1350.     *Theta=0.5000E-01 +Clearance= 22.50
 DETECTOR: Adjust DOWNSTREAM HOLE Y to size= 10.00     = Z= 1350.     *Theta=0.2500E-02 +Clearance= 6.625
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
     47.97500      4.00000      0.00000    950.00000 Beam pipe
    200.00000    200.00000    950.00000   1350.00000 Decay vol
    200.00000    200.00000   1350.00000   1450.00000 Pre-Rad
    250.00000    250.00000   1450.00000   1530.00000 Calorim
     90.00000     10.00000   1350.00000   1530.00000 DS hole
    200.00000     50.00000   1530.00000   2650.00000 CatchrVol
    180.00000    180.00000    970.00000   1330.00000 Vacuum tank
[snip]
 INIT: generate  1000000 events of type nn -> pi0X.
 INIT: Beam envelope (radians), ThetaX=0.1000     ThetaY=0.5000E-02
 INIT: Take Ybeam size for constraint in pi0 fit from Ybeam angle
 INIT: Write ntuple id= 1 , Jaffe-style  ntuple to file ../ntuples/nnpi0.n.rzn.ntskim  on logical unit= 20
 INIT: SMEARING enabled. Incorporate resolution effects
 INIT: Energy resolution. sigma(E) =2.7000%/sqrt(E in GEV)
 INIT: Time resolution = 0.2000 ns
 INIT: Position resolution. sigma(x) =0.4500/sqrt(E in GEV) sigma(y) =0.4500/sqrt(E in GEV)
 INIT: Angular resolution (angles in radians, E in GEV):
 INIT: Narrow component. fraction =0.96000  sigma(xz) =0.00820/E^0.7  sigma(yz) =0.00820/E^0.7
 INIT: Wide component. fraction=0.0400  sigma(wide) = 3.6000*sigma(narrow) XZ-YZ correl coeff=0.0000
 INIT: e+ ANNIHILATION in vacuum tank wall DISABLED
 INIT: Use Z(Rear of PR)=  1450.00 as photon conversion point
 INIT: Threshold Energy for good photons in PR/CAL=   10.00
 INIT: Perform pi0 constrained fits
 INIT: NEUTRONS ENABLED. Option=  2 P(n) from measured spectrum. Interaction point=    0.000    6.750 1349.000
 INIT: trigger cuts are   -1 .le. NPRCAL .le.1000 and   -1 .le. Nveto .le.1000
 INIT: Skimming enabled. Skim cuts follow
 INIT skim: Gen Photon at 10rl into PR/CAL |X|< 300.00 |Y|< 300.00 at hole at CAL front |X|>   0.00 |Y|>   0.00
 INIT skim: Recon KL.    0.00 < E(K) <1486.00 and    0.00 < Z(K) <2000.00
 INIT skim: Recon pi0.    0.00 < E*pi < 250.00 and  100.00 < Mgg < 170.00 E*pi - |E*g1-E*g2|>   0.00
 INIT skim: Select both Kp2 ODD & EVEN events, if these are true Kp2 events
[snip]
 MAKENN: Using neutron spectrum.Ethres=1219.21 Pthres= 776.98
 NSPECTRUM:Emax= 2500.     Ethres= 1219.     weight(Ethres)=0.3577E-04 weight(Emax)=0.5189E-06
 FITPI0: YbeamSize= 5.750     sigma(Ybeam)= 1.660
[snip]
 FASTMC: Skim accepted  186222 of 1000000 generated events. Effy= 18.622 +-  0.039 PERCENT
-----------------------------------

now create similar new file
 simple.run.fastmc.script control.dat.remove.ybeam.constraint detector.22.dat &
 /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.060804.0947.log

Start time is Fri Aug 6 09:47:37 EDT 2004
control and detector files are
-rw-rw-r--    1 djaffe   djaffe       5581 Aug  5 11:13 /e787u/djaffe/KOPIO/fastmc/scripts/../geometry/detector.22.dat
-rw-rw-r--    1 djaffe   djaffe       4381 Aug  6 09:47 control.dat.remove.ybeam.constraint

 INIT:            Begin job at 094737.8 20040806

 CONTROL: 1st 80 characters of unrecognized input line:

 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
     65.00000      5.00000    -10.00000   1015.00000 Beam pipe
    200.00000    200.00000   1015.00000   1415.00000 Decay vol
    200.00000    200.00000   1415.00000   1515.00000 Pre-Rad
    250.00000    250.00000   1515.00000   1595.00000 Calorim
    110.25000     11.55000   1415.00000   1595.00000 DS hole
    200.00000     50.00000   1595.00000   2715.00000 CatchrVol
    180.00000    180.00000   1035.00000   1395.00000 Vacuum tank
[snip]
 INIT: generate    10000 events of type nn -> pi0X.
 INIT: Beam envelope (milliradians), ThetaX=  100.0 ThetaY=    5.0
 INIT: KL beam angle wrt primary beam is (degrees)=  42.50
 INIT: Beam collimation ENABLED
 INIT: Extended target ENABLED
 INIT: Take Ybeam size for constraint in pi0 fit from Ybeam angle
 INIT: Write ntuple id= 1 , Jaffe-style  ntuple to file /u1/djaffe/kopio/fastmc/ntuples/nnpi0.y6.75.z1414.rzn.ntskim  on logical unit= 20
 INIT: SMEARING enabled. Incorporate resolution effects
 INIT: Energy resolution. sigma(E) =2.7000%/sqrt(E in GEV)
 INIT: Time resolution = 0.2000 ns
 INIT: Position resolution. sigma(x) =0.4500/sqrt(E in GEV) sigma(y) =0.4500/sqrt(E in GEV)
 INIT: e+ ANNIHILATION in vacuum tank wall DISABLED
 INIT: Use Bryman`s analytic form for angular resolution with Zconv=  1415.00
 INIT: Threshold Energy for good photons in PR/CAL=   10.00
 INIT: Perform these pi0 constrained fits: 2g
 INIT: NEUTRONS ENABLED. Option=  2 P(n) from measured spectrum. Interaction point=    0.000    6.750 1414.000
 INIT: trigger cuts are   -1 .le. NPRCAL .le.1000 and   -1 .le. Nveto .le.1000
 INIT: Skimming enabled. Skim cuts follow
 INIT skim: Gen Photon at 10rl into PR/CAL |X|< 300.00 |Y|< 300.00 at hole at CAL front |X|>   0.00 |Y|>   0.00
 INIT skim: Recon KL.    0.00 < E(K) <3000.00 and    0.00 < Z(K) <2000.00
 INIT skim: Recon pi0.    0.00 < E*pi < 250.00 and  100.00 < Mgg < 170.00 E*pi - |E*g1-E*g2|>   0.00
 INIT skim: Select both Kp2 ODD & EVEN events, if these are true Kp2 events
[snip]
 MAKENN: Using neutron spectrum.Ethres=1219.21 Pthres= 776.98
 NSPECTRUM:Emax= 2500.     Ethres= 1219.     weight(Ethres)=0.3577E-04 weight(Emax)=0.5189E-06
 GEN_VERTEX: P(p beam GeV)=25.5000 dT(ns)= 0.2000 Xrms(cm)= 0.0170 Yrms(cm)= 0.0170 Target dim.(cm) x,y,z=  0.8  0.2 10.6 Target int. length(cm)= 8.8438 Angle(deg) of KOPIO tgt wrt p beam=42.5000
  GET_PR_RESOLUTION:  3.4% X0/layer
 Energy  Parameter Angular region
                        1       2       3       4       5
   150.0 sigma1        31.3    32.0    31.2    33.4    41.8
         sigma2        60.8    58.5    81.0    89.1
         fraction1   0.7425  0.6134  0.4351  0.6428  1.0000
         ratio       5.6000  2.9000  2.0000  4.8000 -1.0000
   250.0 sigma1        20.8    20.9    24.2    24.5    25.0
         sigma2        57.7    59.7    71.2    69.2    54.9
         fraction1   0.6521  0.5709  0.6473  0.6390  0.6456
         ratio       5.2000  3.8000  5.4000  5.0000  4.0000
   350.0 sigma1        17.4    18.5    18.7    18.9    20.2
         sigma2        67.0    71.5    66.6    67.0    47.0
         fraction1   0.7475  0.7400  0.7165  0.6875  0.6641
         ratio      11.4000 11.0000  9.0000  7.8000  4.6000
          INTERPOLATION WILL BE USED
 FITPI0: YbeamSize= 6.075     sigma(Ybeam)= 1.754     , for 0g fit only: XbeamSize= 121.5     sigma(Xbeam)= 35.07
[snip]
 FASTMC: Skim accepted      51 of   10000 generated events. Effy=  0.510 +-  0.071 PERCENT
-------------------------------------------------

remake above file with 10x events
 /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.060804.0956.log

there is a mistake in makenn for the extended target!
fix it, no burnt bridges:
% cp makenn.f makenn.f.old

Ehi vs dEstar for Emiss<350 looks promising. increase kp2 stats:
% grep kpnn aspect1.bryman.list | head -1 > one.kpnn.and.ten.kp2.aspect1.bryman.list
% grep kp2 aspect1.bryman.list | head -10 >> one.kpnn.and.ten.kp2.aspect1.bryman.list
% analysis.script one.kpnn.and.ten.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.ten.kp2.aspect1.bryman.060804.1024.log

source/makenn.f				- modified "fix bug assoc with extended tgt"
source/Makefile				- modified ">>>>>>>>>>>>>>>>TEMPORARILY CHANGE NAME OF EXECUTABLE<<<<<<<<<<<<<<<"

scripts/simple.run.fastmc.script	- modified ">>>>>>>>>>>>>>>>TEMPORARILY CHANGE NAME OF EXECUTABLE<<<<<<<<<<<<<<<"

source/rhistory.f			- modified "mods to evt gen jobs"
source/userselect.f			- modified "add debug output"

results from hist 21 of ../log/anal.one.kpnn.and.ten.kp2.aspect1.bryman.060804.1024.log 
suggest cut 90<dEstar<150 and Emiss<350. try it

rates WITHOUT  90<dEstar<150 and Emiss<350. cut   
Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.3252E-02  1.000       124.0      1.638       AvdS
*kp2       0.2000E+07  0.6118E-10  0.5814      72.07      5.555       AvdS
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  1.720      0.1345  72.07   5.555       AvdS

source/select_signal.f			- modified "add dEstar,Emiss cut to AvdS cuts"

% grep kpnn aspect1.bryman.list | head -2|tail -1 > another.one.kpnn.and.ten.kp2.aspect1.bryman.list
% grep kp2 aspect1.bryman.list | head -20 | tail -10 >> another.one.kpnn.and.ten.kp2.aspect1.bryman.list

% analysis.script another.one.kpnn.and.ten.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.another.one.kpnn.and.ten.kp2.aspect1.bryman.060804.1253.log

results WITH  90<dEstar<150 and Emiss<350. cut   
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.3160E-02  1.000       120.5      1.604       AvdS
*kp2       0.2000E+07  0.5025E-10  0.4915      59.20      2.531       AvdS
Key   N(Kpnn)/B  d(S/B)      Nev     dNeV
bkgd  2.035      0.9112E-01  59.20   2.531       AvdS

signal acceptance dropped by 0.97+-.02
kp2                          0.82+-.07

From MC study,
http://www-he.scphys.kyoto-u.ac.jp/member/moriih/KOPIO/studies/geffy/index.html

/DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.dat	- new "catcher ineffy from H.Morii"
/DataBase/catcher.ineffy.thres1.4pe.thres2.3pe.dat	- new "catcher ineffy from H.Morii"
/DataBase/catcher.ineffy.thres1.6pe.thres2.2pe.dat	- new "catcher ineffy from H.Morii"
/DataBase/catcher.ineffy.thres1.6pe.thres2.3pe.dat	- new "catcher ineffy from H.Morii"

I parametrized the results (kopio#cateff) as effy = A*(1-exp(-Eg(GeV)/B))
 B = 0.0644266, A = 0.998458 thres1.4pe.thres2.2pe MODEL 1
 B = 0.0746755, A = 0.998333 thres1.4pe.thres2.3pe MODEL 2
 B = 0.0776552, A = 0.99825  thres1.6pe.thres2.2pe MODEL 3
 B = 0.0873556, A = 0.997958 thres1.6pe.thres2.3pe MODEL 4

Hideki produced results for 4 or 6 pe threshold in first catcher module
couple with 2 or 3 pe threshold in next module.

source/flags.inc			- modified "add CatcherModel"
source/catchedep.f			- new "new E-dependent catcher ineffys"
source/setupanal.f			- modified "add CatcherModel for E-dependent catcher ineffys"
source/initanal.f			- modified "add CatcherModel for E-dependent catcher ineffys"
source/gettrkweight.f			- modified "add CatcherModel for E-dependent catcher ineffys"
source/Makefile.anal			- modified "add catchedep"

back to neutrons, turn off skim,debug:

/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.060804.1601.log
only 16% of events have nrecon>0 meaning that the others had beta <0 or >1 this is quite
different from earlier simulation which had ~19% accepted AFTER skim!

for catcher model 1,  kp2 bkgd =  54.24+- 3.693, 0.92+-.07 of result with fixed ineffy=.01
fromfile /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.060804.1600.log

catcher model 4, kp2 bkgd =    80.72+- 8.150, 1.36 +- .15 of result with fixed ineffy=0.01
                                            , 1.49 +- .18 times catcher model 1
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.060804.1613.log

update aspect1.bryman.list excluding  ke3g.91063 that is still running.

big job with catcher model 1:
% analysis.script aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.060804.1707.log

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1200E+07  0.3094E-02  1.000       117.9       0.4578      AvdS
*kpgg      0.3000E+06  0.1490E-09  0.2697E-02  0.3181      0.9577E-01  AvdS
*kp3       0.1200E+07  0.1140E-14  0.2595E-02  0.3061      0.2937E-01  AvdS
*kp2       0.1080E+08  0.5374E-10  0.5367      63.30       1.513       AvdS
*ke4       0.4000E+07  0.1209E-10  0.6748E-02  0.7959      0.2552      AvdS
*ke3g      0.2100E+07  0.1380E-12  0.5383E-02  0.6349      0.1687E-01  AvdS
*kcp3      0.4000E+07  0.1088E-13  0.1471E-01  1.735       0.6070E-01  AvdS
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  1.758      0.4089E-01  67.09  1.539   AvdS

catcher 4:
% grep kp2 aspect1.bryman.list > kp2.aspect1.bryman.list
% analysis.script kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kp2.aspect1.bryman.070804.0937.log 

need to modify gettrkweight for charge veto to take into account
decay-in-flight via positionatcv, timing window and  maximum available
kinetic energy

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
*kp2       0.1080E+08  0.7772E-10  0.000      91.56      2.171       AvdS
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  0.000      0.000   91.56   2.171       AvdS

source/analvar.inc			- modified "add CVHitTime, VE(itk) -> VE(itk,irec)"
source/gethittime.f			- new "fill CVHitTime"

Should not treat non-annihilating e+ with mu+ ineffy. remove message in setupanal,
fix code in gettrkweight, usveto. 
Use particle type and momentum of particle that actually hit CV to compute
CPV ineffy. 
A

source/setupanal.f			- modified "remove `Use mu+ chgveto effyfor non-annihilating e+` messsage, add CPVetoGate"
source/usveto.f				- modified "non-anni e+ no longer has mu+ ineffy"
source/gettrkweight.f			- modified "non-anni e+ no longer has mu+ ineffy, add argument CPVineffy"
source/flags.inc			- modified "add CPVetoGate"
source/getcandwt.f			- modified "adjust veto ineffy to take into account CPVetoGate"

s/r particleid is not used. it was used for some defunct studies. don't call it anymore
and remove it from makefile
source/Makefile.anal			- modified "add gethittime, remove particleid"
source/anal.f				- modified "remove calls to s/r particleid"
source/rhistory.f			- modified "VE(itk) -> VE(itk,irec)"
source/select_signal.f			- modified "VE(itk) -> VE(itk,irec)"

update aspect1.bryman.list with all ke3g from latest standard bunch

set CPVgate =(-4.,+8.)
% analysis.script one.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.080804.0203.log 

must've screwed up something when using the track that actually struck cv cuz
ke3g now gives huge # of events even when cpvgate=-4e20,8e20. 
  analysis.script test.list ../geometry/detector.22.dat
logfile  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.080804.0306.log

Sun Aug  8 03:10:39 EDT 2004
*******************************************
Mon Aug  9 08:57:32 EDT 2004

>>>>>>>>>>>>> add TEMPORARY debug to positionatcv, gettrkweight
remove  TEMPORARY debug in gettrkweight

did I forget to remove all objects and recompile on sunday morning?

with temp debug in gettrkweight, positionatcv, getcandwt:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1411.log
 GETCANDWT: --------------- entry. event=    3483
 GetCandWt: Neutral track so no CV impact
 GetCandWt: itk=  1  K0L CP= 1.00     WT=0.116     LossVV= 1.00     CPVineffy= 1.00     IgnorePV=F VE(irec.le.20)=  1.00
 PositionAtCV: ITK=  2 Ancestors=   2
 PositionAtCV: Inside(X1, CV1)=F InsideZ1=T ZUShole= 1015.     X1(3)= 1349.     ZPRfront= 1415.     PositionAtCV: Inside(X2, CV1)=F InsideZ2=T ZUShole= 1015.     X2(3)= 1415.     ZPRfront= 1415.     X2(3)-ZUShole= 400.0     ZPRfront-X2(3)= 0.000
 PositionAtCV:JTK=  2 LastVol(JTK)=  3 LastPL(JTK)=  6
 PositionAtCV: track   2 passed from inside to outside of CV1
 PostionAtCV:Jplane= 1 Distance= 61.63     X3=  8.707      50.00      1385.
 PositionAtCV:track   2 hit CV1.
 GetCandWt: At CV impact.Track=  2 Position=  8.707      50.00      1385.     Time= 64.26
 TrueXYatZ:itk=  2 dz= 65.59     delZ= 65.59     x=-2.075     y= 91.36     Z= 1415.     truexyatz= 1.000
 CV12=0.698E-04 T= 1.00     Tdef= 80.0     INEFF1=0.449E-03 E=0.500E-01 Edef=0.200     INEFF2=0.257E-03
  GETTRKWEIGHT:itk,ipart(itk),fate(itk),TrackCV(itk),JPART=   2   6   2   2  -2 p,Vineffy,CPVineffy=  134.7     0.6977E-04 0.6977E-04
[snip]
SELECT_SIGNAL:Ntrack=  7 Nrecon=  1 irec=  1 icut=  7 AKcut=  1 EVTwt=0.9668E-09 CPwt=0.7999     VEwt=0.6977E-04 DKwt=0.1732E-04 PrecK=  537.2 ZrecK= 1346.0 event=   3483
 SELECT_SIGNAL:     Mgg        E1*        E2*       Epi*         E1         E2      Mmiss      Emiss       DOCA      T1-T2
 SELECT_SIGNAL:  113.1      140.2      47.26      187.5      201.6      65.27      281.5      465.4     0.4088E-04  0.000
 SELECT_SIGNAL:Track#      1          2          3          4          5          6          7
 LastVol, LastPlane   2 6        3 6        2 6        5 3        4 6        3 4        4 6
 TrueXYatZ:itk=  2 dz= 65.59     delZ= 65.59     x=-2.075     y= 91.36     Z= 1415.     truexyatz= 1.000
 TrueXYatZ:itk=  2 dz= 165.6     delZ= 65.59     x=-37.89     y= 228.8     Z= 1515.     truexyatz= 1.000
 TrueXYatZ:itk=  4 dz= 65.59     delZ= 230.5     x= 10.65     y=-2.397     Z= 1415.     truexyatz= 1.000
 TrueXYatZ:itk=  4 dz= 165.6     delZ= 230.5     x=-5.768     y=-7.949     Z= 1515.     truexyatz= 1.000
 TrueXYatZ:itk=  5 dz= 65.59     delZ= 65.59     x= 79.21     y=-30.25     Z= 1415.     truexyatz= 1.000
 TrueXYatZ:itk=  5 dz= 165.6     delZ= 65.59     x= 167.3     y=-78.27     Z= 1515.     truexyatz= 1.000
 TrueXYatZ:itk=  6 dz= 20.00     delZ= 30.77     x=-136.5     y=-52.30     Z= 1415.     truexyatz= 1.000
 TrueXYatZ:itk=  6 dz= 120.0     delZ= 30.77     x=-726.5     y=-159.8     Z= 1515.     truexyatz= 1.000
 TrueXYatZ:itk=  7 dz= 20.00     delZ= 20.00     x=-35.02     y=-44.80     Z= 1415.     truexyatz= 1.000
 TrueXYatZ:itk=  7 dz= 120.0     delZ= 20.00     x=-117.9     y=-114.8     Z= 1515.     truexyatz= 1.000
 SELECT_SIGNAL:PathLn -1.000     -1.000     -1.000      101.5      141.7     -1.000      147.5
 SELECT_SIGNAL:PV(E)  0.2500E-04 0.7052E-04 0.1749E-02 0.3790E-04 0.7483E-04 0.6248     0.1885E-02
 SELECT_SIGNAL:KAMIPV 0.5037E-05 0.3701E-04 0.2409E-03 0.1974E-04 0.3860E-04 0.2500     0.2512E-03
 SELECT_SIGNAL:PVE787 0.2500E-04 0.1038E-03 0.4651E-02 0.4251E-04 0.1139E-03 0.7905     0.5013E-02
 SELECT_SIGNAL:Edeath   733.22     194.00      55.65     294.93     186.08       2.04      51.50
 SELECT_SIGNAL:Ebirth   733.22     194.00      55.65     294.93     188.64       2.04      54.12
 SELECT_SIGNAL:Pdeath   538.45     134.74      55.65     294.93     186.08       2.04      51.50
 SELECT_SIGNAL: KE      235.55      54.43      55.14     294.93     186.08       2.04      51.50
 SELECT_SIGNAL:Xdeath    21.42      -2.07     -18.45     -16.42      79.53    -200.00     -35.09
 SELECT_SIGNAL:Ydeath     1.24      91.36     -30.81     -11.55     -31.32     -63.87     -45.10
 SELECT_SIGNAL:Zdeath  1349.41    1415.00    1395.00    1579.87    1415.00    1425.77    1415.00
   Fate, Parent Type  1 0  K0L   2 1   pi-  3 1    e+  2 1   nu   2 1 gamm   2 3 gamm   2 3 gamm
 SELECT_SIGNAL:Weight 0.1157      1.000     0.2455E-01  1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  WT = 0.1157      1.000     0.1497E-03  1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  CP =  1.000      1.000      1.000      1.000     0.8896      0.000     0.8992
 SELECT_SIGNAL:  VE =  1.000     0.6977E-04  1.000      1.000     0.8169E-04  1.000     0.8117E-03
 SELECT_SIGNAL:Thit =  0.000     0.8247      0.000      0.000      0.000      0.000      0.000

with temp debug in gettrkweight,  getcandwt:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1420.log
SELECT_SIGNAL:Ntrack=  7 Nrecon=  1 irec=  1 icut=  7 AKcut=  1 EVTwt=0.1386E-04 CPwt=0.7999     VEwt= 1.000     DKwt=0.1732E-04 PrecK=  537.2 ZrecK= 1346.0 event=   3483
 SELECT_SIGNAL:     Mgg        E1*        E2*       Epi*         E1         E2      Mmiss      Emiss       DOCA      T1-T2
 SELECT_SIGNAL:  113.1      140.2      47.26      187.5      201.6      65.27      281.5      465.4     0.4088E-04  0.000
 SELECT_SIGNAL:Track#      1          2          3          4          5          6          7
 LastVol, LastPlane   2 6        3 6        2 6        5 3        4 6        3 4        4 6
 SELECT_SIGNAL:PathLn -1.000     -1.000     -1.000      101.5      141.7     -1.000      147.5
 SELECT_SIGNAL:PV(E)  0.2500E-04 0.7052E-04 0.1749E-02 0.3790E-04 0.7483E-04 0.6248     0.1885E-02
 SELECT_SIGNAL:KAMIPV 0.5037E-05 0.3701E-04 0.2409E-03 0.1974E-04 0.3860E-04 0.2500     0.2512E-03
 SELECT_SIGNAL:PVE787 0.2500E-04 0.1038E-03 0.4651E-02 0.4251E-04 0.1139E-03 0.7905     0.5013E-02
 SELECT_SIGNAL:Edeath   733.22     194.00      55.65     294.93     186.08       2.04      51.50
 SELECT_SIGNAL:Ebirth   733.22     194.00      55.65     294.93     188.64       2.04      54.12
 SELECT_SIGNAL:Pdeath   538.45     134.74      55.65     294.93     186.08       2.04      51.50
 SELECT_SIGNAL: KE      235.55      54.43      55.14     294.93     186.08       2.04      51.50
 SELECT_SIGNAL:Xdeath    21.42      -2.07     -18.45     -16.42      79.53    -200.00     -35.09
 SELECT_SIGNAL:Ydeath     1.24      91.36     -30.81     -11.55     -31.32     -63.87     -45.10
 SELECT_SIGNAL:Zdeath  1349.41    1415.00    1395.00    1579.87    1415.00    1425.77    1415.00
   Fate, Parent Type  1 0  K0L   2 1   pi-  3 1    e+  2 1   nu   2 1 gamm   2 3 gamm   2 3 gamm
 SELECT_SIGNAL:Weight 0.1157      1.000     0.2455E-01  1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  WT = 0.1157      1.000     0.1497E-03  1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  CP =  1.000      1.000      1.000      1.000     0.8896      0.000     0.8992
 SELECT_SIGNAL:  VE =  1.000      1.000      1.000      1.000     0.8169E-04  1.000     0.8117E-03
 SELECT_SIGNAL:Thit =  0.000      0.000      0.000      0.000      0.000      0.000      0.000
 USVETO INIT: N(X_0 US veto)=   4.672 Minimum traversal for chgveto(cm)=   0.500
 USVETO INIT: Using AvdS PHOTON VETO
 SELECT_SIGNAL:USveto  1.000      1.000      1.000      1.000      1.000      1.000      1.000
 SELECT_SIGNAL:EffRec 0.1386E-04
 SELECT_SIGNAL:RecItk   5   7

hmmm. change code so that no additional calculations are done if debug is enabled in positionatcv
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1438.log
still busted:
 GETCANDWT: --------------- entry. event=    3483
 GetCandWt: Neutral track so no CV impact
 GetCandWt: Neutral track so no CV impact
  GETTRKWEIGHT:itk,ipart(itk),fate(itk),TrackCV(itk),JPART=   2   6   2  -1   0 p,Vineffy,CPVineffy=  0.000      1.000      1.000
 GETCANDWT: itk,ipart(itk),trackcv(itk)=   2   6  -1 VetoIneffy,CPVineffy=  1.000      1.000
 GetCandWt: Neutral track so no CV impact
 GETCANDWT: itk,ipart(itk),trackcv(itk)=   3   3  -1 VetoIneffy,CPVineffy=  1.000      1.000
 GetCandWt: Neutral track so no CV impact
 GetCandWt: Neutral track so no CV impact
 GetCandWt: Neutral track so no CV impact
 GetCandWt: Neutral track so no CV impact
 SELECT_SIGNAL:Ntrack=  7 Nrecon=  1 irec=  1 icut=  7 AKcut=  1 EVTwt=0.1386E-04 CPwt=0.7999     VEwt= 1.000     DKwt=0.1732E-04 PrecK=  537.2 ZrecK= 1346.0 event=   3483
 SELECT_SIGNAL:     Mgg        E1*        E2*       Epi*         E1         E2      Mmiss      Emiss       DOCA      T1-T2
 SELECT_SIGNAL:  113.1      140.2      47.26      187.5      201.6      65.27      281.5      465.4     0.4088E-04  0.000
 SELECT_SIGNAL:Track#      1          2          3          4          5          6          7
 LastVol, LastPlane   2 6        3 6        2 6        5 3        4 6        3 4        4 6
 SELECT_SIGNAL:PathLn -1.000     -1.000     -1.000      101.5      141.7     -1.000      147.5
 SELECT_SIGNAL:PV(E)  0.2500E-04 0.7052E-04 0.1749E-02 0.3790E-04 0.7483E-04 0.6248     0.1885E-02
 SELECT_SIGNAL:KAMIPV 0.5037E-05 0.3701E-04 0.2409E-03 0.1974E-04 0.3860E-04 0.2500     0.2512E-03
 SELECT_SIGNAL:PVE787 0.2500E-04 0.1038E-03 0.4651E-02 0.4251E-04 0.1139E-03 0.7905     0.5013E-02
 SELECT_SIGNAL:Edeath   733.22     194.00      55.65     294.93     186.08       2.04      51.50
 SELECT_SIGNAL:Ebirth   733.22     194.00      55.65     294.93     188.64       2.04      54.12
 SELECT_SIGNAL:Pdeath   538.45     134.74      55.65     294.93     186.08       2.04      51.50
 SELECT_SIGNAL: KE      235.55      54.43      55.14     294.93     186.08       2.04      51.50
 SELECT_SIGNAL:Xdeath    21.42      -2.07     -18.45     -16.42      79.53    -200.00     -35.09
 SELECT_SIGNAL:Ydeath     1.24      91.36     -30.81     -11.55     -31.32     -63.87     -45.10
 SELECT_SIGNAL:Zdeath  1349.41    1415.00    1395.00    1579.87    1415.00    1425.77    1415.00
   Fate, Parent Type  1 0  K0L   2 1   pi-  3 1    e+  2 1   nu   2 1 gamm   2 3 gamm   2 3 gamm
 SELECT_SIGNAL:Weight 0.1157      1.000     0.2455E-01  1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  WT = 0.1157      1.000     0.1497E-03  1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  CP =  1.000      1.000      1.000      1.000     0.8896      0.000     0.8992
 SELECT_SIGNAL:  VE =  1.000      1.000      1.000      1.000     0.8169E-04  1.000     0.8117E-03
 SELECT_SIGNAL:Thit =  0.000      0.000      0.000      0.000      0.000      0.000      0.000
 USVETO INIT: N(X_0 US veto)=   4.672 Minimum traversal for chgveto(cm)=   0.500
 USVETO INIT: Using AvdS PHOTON VETO
 SELECT_SIGNAL:USveto  1.000      1.000      1.000      1.000      1.000      1.000      1.000
 SELECT_SIGNAL:EffRec 0.1386E-04
 SELECT_SIGNAL:RecItk   5   7

re-enable temp debug in positionatcv:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1442.log
 GETCANDWT: --------------- entry. event=    3483
 GetCandWt: Neutral track so no CV impact
 GetCandWt: itk=  1  K0L CP= 1.00     WT=0.116     LossVV= 1.00     CPVineffy= 1.00     IgnorePV=F VE(irec.le.20)=  1.00
 PositionAtCV: ITK=  2 Ancestors=   2
 PositionAtCV: Inside(X1, CV1)=F InsideZ1=T ZUShole= 1015.     X1(3)= 1349.     ZPRfront= 1415.     PositionAtCV: Inside(X2, CV1)=F InsideZ2=T ZUShole= 1015.     X2(3)= 1415.     ZPRfront= 1415.     X2(3)-ZUShole= 400.0     ZPRfront-X2(3)= 0.000
 PositionAtCV:JTK=  2 LastVol(JTK)=  3 LastPL(JTK)=  6
 PositionAtCV: track invalid or did not hit any CV
 GetCandWt: Neutral track so no CV impact
 TrueXYatZ:itk=  2 dz= 65.59     delZ= 65.59     x=-2.075     y= 91.36     Z= 1415.     truexyatz= 1.000

this is a mystery cuz if Inside(X1, CV1)=F, then track shouldn't hit CV, but in earlier version it did!
add more temp debug to positionatcv:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1515.log

add temp debug to fcn inside:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1520.log

modify fcn inside to use local logical in loop:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1529.log

more debug in fcn inside:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1531.log
NOW IT WORKS!! What the fuck! 
GETCANDWT: --------------- entry. event=    3483
 GetCandWt: Neutral track so no CV impact
 GetCandWt: itk=  1  K0L CP= 1.00     WT=0.116     LossVV= 1.00     CPVineffy= 1.00     IgnorePV=F VE(irec.le.20)=  1.00
 PositionAtCV: ITK=  2 Ancestors=   2
  INSIDE:Q=T i= 1 j= 2 d=0.1435E+05
  INSIDE:Q=T i= 2 j= 3 d=0.1186E+05
  INSIDE:Q=T i= 3 j= 4 d=0.1365E+05
  INSIDE:Q=T i= 4 j= 1 d=0.1614E+05
 INSIDE=T :Point=  21.42      1.244     Corners= -140.0     -50.00     /  140.0     -50.00     /  140.0      50.00     / -140.0      50.00     /
  INSIDE:Q=T i= 1 j= 2 d=0.3958E+05
  INSIDE:Q=T i= 2 j= 3 d=0.1421E+05
  INSIDE:Q=F i= 3 j= 4 d=-.1158E+05
 INSIDE=F :Point= -2.075      91.36     Corners= -140.0     -50.00     /  140.0     -50.00     /  140.0      50.00     / -140.0      50.00     /
 PositionAtCV:X1=  21.42      1.244      1349.     X2= -2.075      91.36      1415.
 PositionAtCV: Inside(X1, CV1)=T InsideZ1=T ZUShole= 1015.     X1(3)= 1349.     ZPRfront= 1415.     PositionAtCV: Inside(X2, CV1)=F InsideZ2=T ZUShole= 1015.     X2(3)= 1415.     ZPRfront= 1415.

remove one line of debug in fcn inside:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1533.log

 GETCANDWT: --------------- entry. event=    3483
 GetCandWt: Neutral track so no CV impact
 GetCandWt: itk=  1  K0L CP= 1.00     WT=0.116     LossVV= 1.00     CPVineffy= 1.00     IgnorePV=F VE(irec.le.20)=  1.00
 PositionAtCV: ITK=  2 Ancestors=   2
 INSIDE=F :Point=  21.42      1.244     Corners= -140.0     -50.00     /  140.0     -50.00     /  140.0      50.00     / -140.0      50.00     /
 INSIDE=F :Point= -2.075      91.36     Corners= -140.0     -50.00     /  140.0     -50.00     /  140.0      50.00     / -140.0      50.00     /
 PositionAtCV:X1=  21.42      1.244      1349.     X2= -2.075      91.36      1415.
 PositionAtCV: Inside(X1, CV1)=F InsideZ1=T ZUShole= 1015.     X1(3)= 1349.     ZPRfront= 1415.     PositionAtCV: Inside(X2, CV1)=F InsideZ2=T ZUShole= 1015.     X2(3)= 1415.     ZPRfront= 1415.

if I replace

         Q = d.gt.0.

with 

         if (d.gt.0.) then
         else
            Q = .FALSE.
         endif

in fcn inside, then it seems to work ok. Bryan Field thinks that the
compiler got confused. It did. WHen i remove "-O", the original statement
works fine. I also tried compiling with  "-ffortran-bounds-check" and found
no occurances of array bounds overflow. So somehow the changes that I've made
in the past few days have caused the compiler to do something incorrect in
fcn inside. What?

source/make.std				- modified "remove -O from optimization"

source/inside.f				- modified "try to avoid confusing optimization"

disable all temporary debug in gettrkweight, positionatcv, getcandwt:

Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.090804.1658.log

now event rates are reasonable:
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
*ke3g      0.1000E+06  0.1560E-12  0.000      0.7177     0.6938E-01  AvdS

need to set timing windows now....
***********************************************8
Tue Aug 10 09:01:47 EDT 2004

CPVetoGate = (-4,8) ns:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.100804.0902.log
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
*ke3g      0.1000E+06  0.1577E-10  0.000      72.55      71.84       AvdS

must be dominated by a single event

source/anal.f				- modified "set HiWtDump=1e-6 for ke3g"
again:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.100804.0907.log

rate is dominated by single event, wt=1.2e-6 (mean of log10(all ke3g weights) is -11
and next largest weight is ~1e-9.
single event has dif with E(pi-)=159MeV.
T(K,mrec)

source/flags.inc			- modified "add IgnoreDIF"
source/gettrkweight.f			- modified "add IgnoreDIF"
source/usveto.f				- modified "add IgnoreDIF"
source/setupanal.f			- modified "add IgnoreDIF"
source/getcandwt.f			- modified "add IgnoreDIF"

Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.100804.1222.log
 SetupANAL: Ignore Decay-in-flight when evaluating CPV ineffy. THIS IS NON-STANDARD USAGE
 SetupANAL: Ignore charge particle veto gate timing when DIF is ignored.
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
*ke3g      0.1000E+06  0.1492E-12  0.000      0.6861     0.6810E-01  AvdS

slight difference in rates with DIF ignored (.72+-.07 incl. DIF)

big job with IGNOREDIF = TRUE, 
% analysis.script kpnn.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.100804.1229.log
List of ntuples            4126 Aug 10 12:29 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Ignore Decay-in-flight when evaluating CPV ineffy. THIS IS NON-STANDARD USAGE
  Ignore charge particle veto gate timing when DIF is ignored.
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.7595E-03  1.000       28.95      0.2362      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
kpnn       0.1200E+07  0.2549E-02  1.000       97.16      0.4306      AK basic
kpnn       0.1200E+07  0.1678E-02  1.000       63.98      0.3497      AK loose
kpnn       0.1200E+07  0.1480E-02  1.000       56.44      0.3285      AK lominal
kpnn       0.1200E+07  0.1015E-02  1.000       38.69      0.2717      AK tight
kpnn       0.1200E+07  0.6716E-03  1.000       25.60      0.2211      AK tighter
kpnn       0.1200E+07  0.5820E-03  1.000       22.19      0.2059      AK tightest
*ke3g      0.2200E+07  0.3964E-13  0.6297E-02  0.1823     0.7804E-02  MZ
*ke3g      0.2200E+07  0.1385E-12  0.5492E-02  0.6372     0.1639E-01  AvdS
*ke3g      0.2200E+07  0.1970E-12  0.9325E-02  0.9060     0.1936E-01  AK basic
*ke3g      0.2200E+07  0.8480E-13  0.6097E-02  0.3901     0.1284E-01  AK loose
*ke3g      0.2200E+07  0.7319E-13  0.5965E-02  0.3367     0.1144E-01  AK lominal
*ke3g      0.2200E+07  0.5351E-13  0.6363E-02  0.2462     0.9951E-02  AK tight
*ke3g      0.2200E+07  0.3471E-13  0.6237E-02  0.1597     0.7609E-02  AK tighter
*ke3g      0.2200E+07  0.3082E-13  0.6389E-02  0.1418     0.7197E-02  AK tightest
*ke4       0.4000E+07  0.7666E-11  0.1743E-01  0.5046     0.1969      MZ
*ke4       0.4000E+07  0.1287E-10  0.7301E-02  0.8471     0.2552      AvdS
*ke4       0.4000E+07  0.2622E-10  0.1776E-01  1.726      0.3695      AK basic
*ke4       0.4000E+07  0.1988E-10  0.2045E-01  1.308      0.3304      AK loose
*ke4       0.4000E+07  0.1484E-10  0.1731E-01  0.9771     0.2713      AK lominal
*ke4       0.4000E+07  0.1211E-10  0.2061E-01  0.7972     0.2432      AK tight
*ke4       0.4000E+07  0.7814E-11  0.2009E-01  0.5144     0.1974      AK tighter
*ke4       0.4000E+07  0.7566E-11  0.2245E-01  0.4980     0.1969      AK tightest
*kcp3      0.4000E+07  0.4745E-14  0.2613E-01  0.7567     0.4942E-01  MZ
*kcp3      0.4000E+07  0.1088E-13  0.1496E-01  1.736      0.6070E-01  AvdS
*kcp3      0.4000E+07  0.1499E-12  0.2461      23.91      0.2942      AK basic
*kcp3      0.4000E+07  0.1591E-13  0.3965E-01  2.537      0.9384E-01  AK loose
*kcp3      0.4000E+07  0.1590E-13  0.4492E-01  2.535      0.9384E-01  AK lominal
*kcp3      0.4000E+07  0.9062E-14  0.3735E-01  1.445      0.6930E-01  AK tight
*kcp3      0.4000E+07  0.4277E-14  0.2664E-01  0.6821     0.4795E-01  AK tighter
*kcp3      0.4000E+07  0.2805E-14  0.2016E-01  0.4473     0.3742E-01  AK tightest
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  20.06      2.828       1.444  0.2032  MZ
bkgd  36.03      2.945       3.220  0.2629  AvdS
bkgd  3.661      0.6719E-01  26.54  0.4728  AK basic
bkgd  15.11      1.229       4.235  0.3437  AK loose
bkgd  14.66      1.098       3.849  0.2873  AK lominal
bkgd  15.55      1.585       2.489  0.2531  AK tight
bkgd  18.88      2.835       1.356  0.2033  AK tighter
bkgd  20.41      3.771       1.087  0.2006  AK tightest

IgnoreDIF=false, vetogate=(-4.,8.)ns, cpv at (140,50)cm in decay region, using betamax
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.100804.1422.log
List of ntuples            4126 Aug 10 12:29 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 8.00    )
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1200E+07  0.7595E-03  1.000       28.95       0.2362      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0       0.4523      AvdS
kpnn       0.1200E+07  0.2549E-02  1.000       97.16       0.4306      AK basic
kpnn       0.1200E+07  0.1678E-02  1.000       63.98       0.3497      AK loose
kpnn       0.1200E+07  0.1480E-02  1.000       56.44       0.3285      AK lominal
kpnn       0.1200E+07  0.1015E-02  1.000       38.69       0.2717      AK tight
kpnn       0.1200E+07  0.6716E-03  1.000       25.60       0.2211      AK tighter
kpnn       0.1200E+07  0.5820E-03  1.000       22.19       0.2059      AK tightest
*ke3g      0.2200E+07  0.1550E-10  2.462       71.29       18.29       MZ
*ke3g      0.2200E+07  0.2308E-10  0.9151      106.2       23.43       AvdS
*ke3g      0.2200E+07  0.5463E-10  2.586       251.3       40.31       AK basic
*ke3g      0.2200E+07  0.2507E-10  1.803       115.3       24.06       AK loose
*ke3g      0.2200E+07  0.2442E-10  1.990       112.3       23.96       AK lominal
*ke3g      0.2200E+07  0.2001E-10  2.379       92.04       22.01       AK tight
*ke3g      0.2200E+07  0.1595E-10  2.866       73.38       19.56       AK tighter
*ke3g      0.2200E+07  0.1379E-10  2.858       63.42       17.63       AK tightest
*ke4       0.4000E+07  0.7650E-10  0.1739      5.036       3.907       MZ
*ke4       0.4000E+07  0.1804E-07  10.23       1187.       1180.       AvdS
*ke4       0.4000E+07  0.1041E-09  0.7051E-01  6.851       3.920       AK basic
*ke4       0.4000E+07  0.9206E-10  0.9472E-01  6.060       3.916       AK loose
*ke4       0.4000E+07  0.8686E-10  0.1013      5.717       3.912       AK lominal
*ke4       0.4000E+07  0.8178E-10  0.1391      5.383       3.910       AK tight
*ke4       0.4000E+07  0.7531E-10  0.1936      4.957       3.907       AK tighter
*ke4       0.4000E+07  0.7330E-10  0.2174      4.825       3.906       AK tightest
*kcp3      0.4000E+07  0.3077E-11  16.95       490.7       253.5       MZ
*kcp3      0.4000E+07  0.4038E-11  5.551       644.0       320.6       AvdS
*kcp3      0.4000E+07  0.3863E-07  0.6340E+05  0.6160E+07  0.4344E+07  AK basic
*kcp3      0.4000E+07  0.1926E-07  0.4800E+05  0.3071E+07  0.3069E+07  AK loose
*kcp3      0.4000E+07  0.1926E-07  0.5441E+05  0.3071E+07  0.3069E+07  AK lominal
*kcp3      0.4000E+07  0.1925E-07  0.7935E+05  0.3070E+07  0.3069E+07  AK tight
*kcp3      0.4000E+07  0.1925E-07  0.1199E+06  0.3070E+07  0.3069E+07  AK tighter
*kcp3      0.4000E+07  0.2200E-11  15.81       350.8       220.9       AK tightest

all charged particle rates are high and apparently dominated by a few high weight events.
ke4 rate dominated by event (EVTwt=0.7173E-01) with e+ into US hole (ineffy=1) and pi- dif with dtdx=9.3ns

also have 
 USveto WARNING: trk  2 should not have hit plane=  6 
Vstart=  173.     -111.     0.102E+04 
  Vend=  307.     -189.      935.     
 Vpipe=  307.     -189.      935.
this came from select_signal.f . should not call usveto from select_signal, remove it
source/select_signal.f				- modified "remove usveto usage"

IgnoreDIF=false, vetogate=(-4.,12.)ns, cpv at (140,50)cm in decay region, using betamax
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.100804.1640.log

List of ntuples            4126 Aug 10 12:29 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 12.0    )
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.7595E-03  1.000       28.95      0.2362      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
kpnn       0.1200E+07  0.2549E-02  1.000       97.16      0.4306      AK basic
kpnn       0.1200E+07  0.1678E-02  1.000       63.98      0.3497      AK loose
kpnn       0.1200E+07  0.1480E-02  1.000       56.44      0.3285      AK lominal
kpnn       0.1200E+07  0.1015E-02  1.000       38.69      0.2717      AK tight
kpnn       0.1200E+07  0.6716E-03  1.000       25.60      0.2211      AK tighter
kpnn       0.1200E+07  0.5820E-03  1.000       22.19      0.2059      AK tightest
*ke3g      0.2200E+07  0.6811E-11  1.082       31.33      13.66       MZ
*ke3g      0.2200E+07  0.1164E-10  0.4615      53.55      16.97       AvdS
*ke3g      0.2200E+07  0.2417E-10  1.144       111.2      28.65       AK basic
*ke3g      0.2200E+07  0.1164E-10  0.8372      53.56      16.51       AK loose
*ke3g      0.2200E+07  0.1140E-10  0.9292      52.44      16.47       AK lominal
*ke3g      0.2200E+07  0.8906E-11  1.059       40.97      14.45       AK tight
*ke3g      0.2200E+07  0.6791E-11  1.220       31.24      13.68       AK tighter
*ke3g      0.2200E+07  0.6432E-11  1.334       29.59      13.58       AK tightest
*ke4       0.4000E+07  0.1269E-10  0.2885E-01  0.8353     0.2276      MZ
*ke4       0.4000E+07  0.3793E-10  0.2152E-01  2.496      1.186       AvdS
*ke4       0.4000E+07  0.3476E-10  0.2355E-01  2.288      0.3888      AK basic
*ke4       0.4000E+07  0.2585E-10  0.2660E-01  1.702      0.3497      AK loose
*ke4       0.4000E+07  0.2078E-10  0.2423E-01  1.368      0.2946      AK lominal
*ke4       0.4000E+07  0.1704E-10  0.2899E-01  1.121      0.2685      AK tight
*ke4       0.4000E+07  0.1207E-10  0.3103E-01  0.7944     0.2268      AK tighter
*ke4       0.4000E+07  0.1032E-10  0.3062E-01  0.6793     0.2050      AK tightest
*kcp3      0.4000E+07  0.4074E-12  2.244       64.97      45.28       MZ
*kcp3      0.4000E+07  0.2168E-12  0.2980      34.57      32.22       AvdS
*kcp3      0.4000E+07  0.2336E-10  38.35       3726.      770.4       AK basic
*kcp3      0.4000E+07  0.3542E-11  8.829       564.9      288.0       AK loose
*kcp3      0.4000E+07  0.3542E-11  10.01       564.9      288.0       AK lominal
*kcp3      0.4000E+07  0.1629E-11  6.715       259.8      198.9       AK tight
*kcp3      0.4000E+07  0.4067E-12  2.533       64.86      45.28       AK tighter
*kcp3      0.4000E+07  0.4049E-12  2.910       64.58      45.28       AK tightest

ke3g and kcp3 dominated by a few high weight events, ke4 undercontrol.
kcp3 evt EVTwt=0.8082E-06, KE(pi+) = 4.3MeV, dtdx=17.3ns,
     pi- DIF with KE(mu-)=7.0MeV, dtdx=5.8ns
ke3g evts EVTwt=0.3426E-05, pi- DIF, KE(mu-)=7.85, dtdx=13.3
	EVTwt=0.1531E-05, pi- DIF, KE(mu-)=4.4, dtdx=12.9
	EVTwt=0.2754E-05, pi- DIF, KE(mu-)=116.1, dtdx=-7.3
		KL death 28,-3,1129
		pi-death 44,-39,1168 KE=183
		mu-death 88,-200,1363
	EVTwt=0.1695E-05, pi- DIF, KE(mu-)=6.9, dtdx=14.8
	EVTwt=0.1318E-05, pi- DIF, KE(mu-)=4.0, dtdx=18.1
	EVTwt=0.2315E-05, pi- DIF, KE(mu-)=4.8, dtdx=13.44
	EVTwt=0.2713E-05, KE(pi-)=1.7, dtdx=14.0
	EVTwt=0.4926E-05, pi- DIF, KE(mu-)=3.2, dtdx=25.4
	

i wonder if neutron generation suffered from same optimization problem..?
%  simple.run.fastmc.script control.dat.remove.ybeam.constraint detector.22.dat &
 NOTE EXECUTABLE                   exe/fastmc.exe.TEST          NOTE EXECUTABLE
/e787u/djaffe/KOPIO/fastmc/scripts/../geometry/detector.22.dat control.dat.remove.ybeam.constraint exe/fastmc.exe.TEST
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.100804.1459.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y6.75.z1414.rzn

seems that optimization problem also affected nnpi0 generation. how???
things are OK now, generate large kpnn (100K), unskimmed sample to determine
resolutions:

/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.100804.1532.log
/u1/djaffe/kopio/fastmc/ntuples/kpnn.with.ybeam.constraint.a.rzn

IgnoreDIF=false, vetogate=(-4.,16.)ns, cpv at (140,50)cm in decay region, using betamax
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.100804.2126.log 
List of ntuples            4126 Aug 10 12:29 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 16.0    )
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.7595E-03  1.000       28.95      0.2362      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
kpnn       0.1200E+07  0.2549E-02  1.000       97.16      0.4306      AK basic
kpnn       0.1200E+07  0.1678E-02  1.000       63.98      0.3497      AK loose
kpnn       0.1200E+07  0.1480E-02  1.000       56.44      0.3285      AK lominal
kpnn       0.1200E+07  0.1015E-02  1.000       38.69      0.2717      AK tight
kpnn       0.1200E+07  0.6716E-03  1.000       25.60      0.2211      AK tighter
kpnn       0.1200E+07  0.5820E-03  1.000       22.19      0.2059      AK tightest
*ke3g      0.2200E+07  0.3899E-11  0.6195      17.94      10.98       MZ
*ke3g      0.2200E+07  0.5967E-11  0.2366      27.45      12.55       AvdS
*ke3g      0.2200E+07  0.1110E-10  0.5257      51.07      16.65       AK basic
*ke3g      0.2200E+07  0.6443E-11  0.4633      29.64      12.10       AK loose
*ke3g      0.2200E+07  0.6198E-11  0.5052      28.51      12.05       AK lominal
*ke3g      0.2200E+07  0.5272E-11  0.6268      24.25      11.61       AK tight
*ke3g      0.2200E+07  0.3880E-11  0.6971      17.85      11.00       AK tighter
*ke3g      0.2200E+07  0.3521E-11  0.7299      16.20      10.88       AK tightest
*ke4       0.4000E+07  0.1166E-10  0.2650E-01  0.7672     0.2273      MZ
*ke4       0.4000E+07  0.3594E-10  0.2039E-01  2.365      1.186       AvdS
*ke4       0.4000E+07  0.3203E-10  0.2170E-01  2.109      0.3880      AK basic
*ke4       0.4000E+07  0.2428E-10  0.2498E-01  1.598      0.3494      AK loose
*ke4       0.4000E+07  0.1923E-10  0.2242E-01  1.265      0.2942      AK lominal
*ke4       0.4000E+07  0.1597E-10  0.2717E-01  1.051      0.2682      AK tight
*ke4       0.4000E+07  0.1113E-10  0.2862E-01  0.7328     0.2265      AK tighter
*ke4       0.4000E+07  0.9388E-11  0.2785E-01  0.6180     0.2047      AK tightest
*kcp3      0.4000E+07  0.2079E-12  1.145       33.15      32.22       MZ
*kcp3      0.4000E+07  0.2168E-12  0.2980      34.57      32.22       AvdS
*kcp3      0.4000E+07  0.8087E-11  13.27       1290.      406.5       AK basic
*kcp3      0.4000E+07  0.2230E-12  0.5559      35.57      32.22       AK loose
*kcp3      0.4000E+07  0.2230E-12  0.6302      35.56      32.22       AK lominal
*kcp3      0.4000E+07  0.2151E-12  0.8866      34.30      32.22       AK tight
*kcp3      0.4000E+07  0.2072E-12  1.291       33.04      32.22       AK tighter
*kcp3      0.4000E+07  0.2054E-12  1.477       32.76      32.22       AK tightest

---- 11aug04

a CPVetoGate that depends on Mnu^2 would retain the highest acceptance while
rejecting the nasty slow tracks. see veto.gate.vs.mnu2.ke3g.ke4.kcp3.ps .

want to see distributions when betamax=1.

source/flags.inc			- modified "add UseBetaMax"
source/gethittime.f			- modified "add UseBetaMax"
source/fillanal.f			- modified "use CVHitTime from common"
source/bookanal.f			- modified "set titles accding to UseBetaMax"
source/setupanal.f			- modified "add UseBetaMax"

test
% analysis.script one.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.110804.1432.log

List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 16.0    )
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
*ke3g      0.1000E+06  0.5496E-13  0.000      0.2528     0.4193E-01  MZ
*ke3g      0.1000E+06  0.1560E-12  0.000      0.7177     0.6938E-01  AvdS
*ke3g      0.1000E+06  0.8024E-11  0.000      36.91      35.92       AK basic
*ke3g      0.1000E+06  0.7917E-11  0.000      36.42      35.92       AK loose
*ke3g      0.1000E+06  0.7900E-11  0.000      36.34      35.92       AK lominal
*ke3g      0.1000E+06  0.7870E-11  0.000      36.20      35.92       AK tight
*ke3g      0.1000E+06  0.7854E-11  0.000      36.13      35.92       AK tighter
*ke3g      0.1000E+06  0.3986E-13  0.000      0.1833     0.3533E-01  AK tightest
*ke4       0.1000E+06  0.5959E-11  0.000      0.3923     0.2676      MZ
*ke4       0.1000E+06  0.7109E-11  0.000      0.4679     0.2720      AvdS
*ke4       0.1000E+06  0.2200E-10  0.000      1.448      0.8093      AK basic
*ke4       0.1000E+06  0.8097E-11  0.000      0.5330     0.2820      AK loose
*ke4       0.1000E+06  0.8093E-11  0.000      0.5327     0.2820      AK lominal
*ke4       0.1000E+06  0.7188E-11  0.000      0.4731     0.2778      AK tight
*ke4       0.1000E+06  0.5985E-11  0.000      0.3940     0.2676      AK tighter
*ke4       0.1000E+06  0.5912E-11  0.000      0.3892     0.2676      AK tightest
*kcp3      0.1000E+06  0.4617E-14  0.000      0.7363     0.2681      MZ
*kcp3      0.1000E+06  0.1410E-13  0.000      2.249      0.5104      AvdS
*kcp3      0.1000E+06  0.2322E-12  0.000      37.03      12.31       AK basic
*kcp3      0.1000E+06  0.2127E-13  0.000      3.392      0.6844      AK loose
*kcp3      0.1000E+06  0.2127E-13  0.000      3.392      0.6844      AK lominal
*kcp3      0.1000E+06  0.1084E-13  0.000      1.728      0.4618      AK tight
*kcp3      0.1000E+06  0.5931E-14  0.000      0.9459     0.3808      AK tighter
*kcp3      0.1000E+06  0.4026E-14  0.000      0.6421     0.3338      AK tightest
rates seem reasonable!

set CPVetoGate=-4e20,+16e20
% analysis.script one.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.110804.1445.log
Finish time is Wed Aug 11 14:47:30 EDT 2004
List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)   dNeV(mode)  Who
*ke3g      0.1000E+06  0.5496E-13  0.000      0.2528      0.4193E-01  MZ
*ke3g      0.1000E+06  0.1560E-12  0.000      0.7177      0.6938E-01  AvdS
*ke3g      0.1000E+06  0.2165E-12  0.000      0.9959      0.8640E-01  AK basic
*ke3g      0.1000E+06  0.1089E-12  0.000      0.5008      0.6121E-01  AK loose
*ke3g      0.1000E+06  0.9190E-13  0.000      0.4227      0.5524E-01  AK lominal
*ke3g      0.1000E+06  0.6233E-13  0.000      0.2867      0.4508E-01  AK tight
*ke3g      0.1000E+06  0.4636E-13  0.000      0.2132      0.3992E-01  AK tighter
*ke3g      0.1000E+06  0.3986E-13  0.000      0.1833      0.3533E-01  AK tightest
*ke4       0.1000E+06  0.4293E-12  0.000      0.2826E-01  0.1031E-01  MZ
*ke4       0.1000E+06  0.8501E-12  0.000      0.5596E-01  0.1415E-01  AvdS
*ke4       0.1000E+06  0.1304E-10  0.000      0.8581      0.7544      AK basic
*ke4       0.1000E+06  0.7073E-12  0.000      0.4656E-01  0.1291E-01  AK loose
*ke4       0.1000E+06  0.7032E-12  0.000      0.4629E-01  0.1291E-01  AK lominal
*ke4       0.1000E+06  0.5271E-12  0.000      0.3470E-01  0.1112E-01  AK tight
*ke4       0.1000E+06  0.4553E-12  0.000      0.2997E-01  0.1050E-01  AK tighter
*ke4       0.1000E+06  0.3823E-12  0.000      0.2516E-01  0.9988E-02  AK tightest
*kcp3      0.1000E+06  0.4617E-14  0.000      0.7363      0.2681      MZ
*kcp3      0.1000E+06  0.1410E-13  0.000      2.249       0.5104      AvdS
*kcp3      0.1000E+06  0.1559E-12  0.000      24.86       1.885       AK basic
*kcp3      0.1000E+06  0.2127E-13  0.000      3.392       0.6844      AK loose
*kcp3      0.1000E+06  0.2127E-13  0.000      3.392       0.6844      AK lominal
*kcp3      0.1000E+06  0.1084E-13  0.000      1.728       0.4618      AK tight
*kcp3      0.1000E+06  0.5931E-14  0.000      0.9459      0.3808      AK tighter
*kcp3      0.1000E+06  0.4026E-14  0.000      0.6421      0.3338      AK tightest

OK.
big job
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.110804.1450.log
List of ntuples            4126 Aug 10 12:29 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.7595E-03  1.000       28.95      0.2362      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
kpnn       0.1200E+07  0.2549E-02  1.000       97.16      0.4306      AK basic
kpnn       0.1200E+07  0.1678E-02  1.000       63.98      0.3497      AK loose
kpnn       0.1200E+07  0.1480E-02  1.000       56.44      0.3285      AK lominal
kpnn       0.1200E+07  0.1015E-02  1.000       38.69      0.2717      AK tight
kpnn       0.1200E+07  0.6716E-03  1.000       25.60      0.2211      AK tighter
kpnn       0.1200E+07  0.5820E-03  1.000       22.19      0.2059      AK tightest
*ke3g      0.2200E+07  0.4247E-13  0.6747E-02  0.1953     0.8020E-02  MZ
*ke3g      0.2200E+07  0.1479E-12  0.5865E-02  0.6805     0.1690E-01  AvdS
*ke3g      0.2200E+07  0.2127E-12  0.1007E-01  0.9787     0.2003E-01  AK basic
*ke3g      0.2200E+07  0.9163E-13  0.6588E-02  0.4215     0.1324E-01  AK loose
*ke3g      0.2200E+07  0.7950E-13  0.6480E-02  0.3657     0.1185E-01  AK lominal
*ke3g      0.2200E+07  0.5809E-13  0.6907E-02  0.2672     0.1029E-01  AK tight
*ke3g      0.2200E+07  0.3712E-13  0.6670E-02  0.1708     0.7810E-02  AK tighter
*ke3g      0.2200E+07  0.3297E-13  0.6835E-02  0.1517     0.7392E-02  AK tightest
*ke4       0.4000E+07  0.1056E-10  0.2400E-01  0.6951     0.2267      MZ
*ke4       0.4000E+07  0.1654E-10  0.9381E-02  1.088      0.2846      AvdS
*ke4       0.4000E+07  0.2996E-10  0.2030E-01  1.972      0.3875      AK basic
*ke4       0.4000E+07  0.2280E-10  0.2346E-01  1.501      0.3490      AK loose
*ke4       0.4000E+07  0.1776E-10  0.2071E-01  1.169      0.2937      AK lominal
*ke4       0.4000E+07  0.1501E-10  0.2554E-01  0.9881     0.2679      AK tight
*ke4       0.4000E+07  0.1039E-10  0.2672E-01  0.6841     0.2262      AK tighter
*ke4       0.4000E+07  0.8687E-11  0.2577E-01  0.5718     0.2044      AK tightest
*kcp3      0.4000E+07  0.5831E-14  0.3211E-01  0.9298     0.5485E-01  MZ
*kcp3      0.4000E+07  0.1281E-13  0.1761E-01  2.043      0.6578E-01  AvdS
*kcp3      0.4000E+07  0.1767E-12  0.2901      28.19      0.3216      AK basic
*kcp3      0.4000E+07  0.1896E-13  0.4726E-01  3.023      0.1032      AK loose
*kcp3      0.4000E+07  0.1895E-13  0.5354E-01  3.022      0.1032      AK lominal
*kcp3      0.4000E+07  0.1104E-13  0.4549E-01  1.760      0.7675E-01  AK tight
*kcp3      0.4000E+07  0.5154E-14  0.3211E-01  0.8220     0.5242E-01  AK tighter
*kcp3      0.4000E+07  0.3398E-14  0.2443E-01  0.5420     0.4079E-01  AK tightest

make modifications to use Mnu2-dependent CP veto gate. introduce new global variables
and calculate them, etc.

source/analvar.f				- modified "add Mnu2(Nrecon)"
source/getcandwt.f				- modified "calculate Mnu2(Nrecon), add UseMnu2depCPVgate"
source/fillanal.f				- modified "use Mnu2 from common"
source/setupanal.f				- modified "add UseMnu2depCPVgate"
source/getcpvetogate.f				- new "calculate Mnu2-dependent CPVeto gate width"
source/Makefile.anal				- modified "add getcpvetogate"
source/select_signal.f				- modified "report Mnu2,CVgate in hi wt evt dump"

need to recompile and test all this stuff when current job 110804.1450 is done

test
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.110804.2101.log 
OK

now test with UseMnu2depCPVgate=TRUE
 /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.110804.2105.log
List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000    
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00    
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00     
 at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
*ke3g      0.1000E+06  0.5496E-13  0.000      0.2528     0.4193E-01  MZ
*ke3g      0.1000E+06  0.1560E-12  0.000      0.7177     0.6938E-01  AvdS
*ke3g      0.1000E+06  0.2165E-12  0.000      0.9959     0.8640E-01  AK basic
*ke3g      0.1000E+06  0.1089E-12  0.000      0.5008     0.6121E-01  AK loose
*ke3g      0.1000E+06  0.9190E-13  0.000      0.4227     0.5524E-01  AK lominal
*ke3g      0.1000E+06  0.6233E-13  0.000      0.2867     0.4508E-01  AK tight
*ke3g      0.1000E+06  0.4636E-13  0.000      0.2132     0.3992E-01  AK tighter
*ke3g      0.1000E+06  0.3986E-13  0.000      0.1833     0.3533E-01  AK tightest
*ke4       0.1000E+06  0.3972E-11  0.000      0.2614     0.2334      MZ
*ke4       0.1000E+06  0.4392E-11  0.000      0.2891     0.2336      AvdS
*ke4       0.1000E+06  0.1775E-10  0.000      1.168      0.7934      AK basic
*ke4       0.1000E+06  0.4250E-11  0.000      0.2797     0.2335      AK loose
*ke4       0.1000E+06  0.4245E-11  0.000      0.2795     0.2335      AK lominal
*ke4       0.1000E+06  0.4069E-11  0.000      0.2679     0.2334      AK tight
*ke4       0.1000E+06  0.3998E-11  0.000      0.2631     0.2334      AK tighter
*ke4       0.1000E+06  0.3925E-11  0.000      0.2583     0.2334      AK tightest
*kcp3      0.1000E+06  0.4617E-14  0.000      0.7363     0.2681      MZ
*kcp3      0.1000E+06  0.1410E-13  0.000      2.249      0.5104      AvdS
*kcp3      0.1000E+06  0.1559E-12  0.000      24.86      1.885       AK basic
*kcp3      0.1000E+06  0.2127E-13  0.000      3.392      0.6844      AK loose
*kcp3      0.1000E+06  0.2127E-13  0.000      3.392      0.6844      AK lominal
*kcp3      0.1000E+06  0.1084E-13  0.000      1.728      0.4618      AK tight
*kcp3      0.1000E+06  0.5931E-14  0.000      0.9459     0.3808      AK tighter
*kcp3      0.1000E+06  0.4026E-14  0.000      0.6421     0.3338      AK tightest

seems OK. note that this is with betamax=1 for all tracks.
run long job
% analysis.script kpnn.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.110804.2108.log 
List of ntuples            4126 Aug 10 12:29 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.7595E-03  1.000       28.95      0.2362      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
kpnn       0.1200E+07  0.2549E-02  1.000       97.16      0.4306      AK basic
kpnn       0.1200E+07  0.1678E-02  1.000       63.98      0.3497      AK loose
kpnn       0.1200E+07  0.1480E-02  1.000       56.44      0.3285      AK lominal
kpnn       0.1200E+07  0.1015E-02  1.000       38.69      0.2717      AK tight
kpnn       0.1200E+07  0.6716E-03  1.000       25.60      0.2211      AK tighter
kpnn       0.1200E+07  0.5820E-03  1.000       22.19      0.2059      AK tightest
*ke3g      0.2200E+07  0.2862E-11  0.4547      13.17      10.47       MZ
*ke3g      0.2200E+07  0.7413E-11  0.2939      34.10      14.25       AvdS
*ke3g      0.2200E+07  0.5625E-11  0.2663      25.87      11.92       AK basic
*ke3g      0.2200E+07  0.3396E-11  0.2442      15.62      10.59       AK loose
*ke3g      0.2200E+07  0.3152E-11  0.2569      14.50      10.54       AK lominal
*ke3g      0.2200E+07  0.2878E-11  0.3421      13.24      10.47       AK tight
*ke3g      0.2200E+07  0.2538E-11  0.4561      11.68      10.37       AK tighter
*ke3g      0.2200E+07  0.2534E-11  0.5254      11.66      10.37       AK tightest
*ke4       0.4000E+07  0.1116E-10  0.2538E-01  0.7349     0.2270      MZ
*ke4       0.4000E+07  0.1759E-10  0.9979E-02  1.158      0.2851      AvdS
*ke4       0.4000E+07  0.3111E-10  0.2108E-01  2.048      0.3878      AK basic
*ke4       0.4000E+07  0.2356E-10  0.2424E-01  1.551      0.3492      AK loose
*ke4       0.4000E+07  0.1851E-10  0.2159E-01  1.218      0.2939      AK lominal
*ke4       0.4000E+07  0.1554E-10  0.2643E-01  1.023      0.2681      AK tight
*ke4       0.4000E+07  0.1083E-10  0.2784E-01  0.7128     0.2264      AK tighter
*ke4       0.4000E+07  0.9118E-11  0.2705E-01  0.6002     0.2046      AK tightest
*kcp3      0.4000E+07  0.5831E-14  0.3211E-01  0.9298     0.5485E-01  MZ
*kcp3      0.4000E+07  0.1475E-13  0.2027E-01  2.352      0.3162      AvdS
*kcp3      0.4000E+07  0.2648E-11  4.346       422.2      244.9       AK basic
*kcp3      0.4000E+07  0.2097E-13  0.5227E-01  3.344      0.3371      AK loose
*kcp3      0.4000E+07  0.2096E-13  0.5923E-01  3.343      0.3371      AK lominal
*kcp3      0.4000E+07  0.1305E-13  0.5379E-01  2.081      0.3300      AK tight
*kcp3      0.4000E+07  0.5154E-14  0.3211E-01  0.8220     0.5242E-01  AK tighter
*kcp3      0.4000E+07  0.3398E-14  0.2443E-01  0.5420     0.4079E-01  AK tightest

some high weight ke3g events are dominating rate. 
Note that I am looking at events passing AvdS cut.
characteristics of some of these events detailed earlier:
EVTwt=0.2754E-05 with pi- DIF and dtdx=-7.0 (was -7.3 with beta=betamax), CVgate=-4,14.5ns, Zrec=1274, Ztrue=1129
EVTwt=0.2968E-05, dtdx=-2.26, CVgate=-2.,8., Mnu2=-129e3, Z(Krec)=1274, Z(Ktrue)=1197
 ===> NEED TO REDUCE TAILS IN ZKrec-ZKtrue to reduce negative tail in dtdx <====
EVTwt=0.1670E-05, dtdx=-3.9, CVgate=-2.,8., Zrec=1322, Ztrue=1184
EVTwt=0.1188E-05, dtdx=-3.8, CVgate=-2.,8, Zrec=1291, Ztrue=1162
EVTwt=0.4926E-05, pi- DIF, KE(pi)=1.3, KE(mu)=3.2, dtdx=26.21, Mnu2=1e3, CVgate=-4,20

5 events, 4 have dtdx<lower limit of CVgate due to Zrec>Ztrue
          1 has dtdx > upper limit of CVgate. Remove with cut on Mnu2?

*******************************************************
Thu Aug 12 08:20:38 EDT 2004

long job with betamax from max kinetic energy,
still use variable CP  veto gate:

Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.120804.0822.log
List of ntuples            4126 Aug 10 12:29 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Calculate beta assuming pion mass for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05

 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.7595E-03  1.000       28.95      0.2362      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
kpnn       0.1200E+07  0.2549E-02  1.000       97.16      0.4306      AK basic
kpnn       0.1200E+07  0.1678E-02  1.000       63.98      0.3497      AK loose
kpnn       0.1200E+07  0.1480E-02  1.000       56.44      0.3285      AK lominal
kpnn       0.1200E+07  0.1015E-02  1.000       38.69      0.2717      AK tight
kpnn       0.1200E+07  0.6716E-03  1.000       25.60      0.2211      AK tighter
kpnn       0.1200E+07  0.5820E-03  1.000       22.19      0.2059      AK tightest
*ke3g      0.2200E+07  0.2862E-11  0.4547      13.17      10.47       MZ
*ke3g      0.2200E+07  0.7413E-11  0.2939      34.10      14.25       AvdS
*ke3g      0.2200E+07  0.5372E-11  0.2543      24.71      11.86       AK basic
*ke3g      0.2200E+07  0.3144E-11  0.2260      14.46      10.53       AK loose
*ke3g      0.2200E+07  0.2899E-11  0.2363      13.34      10.47       AK lominal
*ke3g      0.2200E+07  0.2878E-11  0.3421      13.24      10.47       AK tight
*ke3g      0.2200E+07  0.2538E-11  0.4561      11.68      10.37       AK tighter
*ke3g      0.2200E+07  0.2534E-11  0.5254      11.66      10.37       AK tightest
*ke4       0.4000E+07  0.1102E-10  0.2505E-01  0.7253     0.2269      MZ
*ke4       0.4000E+07  0.1735E-10  0.9846E-02  1.142      0.2850      AvdS
*ke4       0.4000E+07  0.3088E-10  0.2092E-01  2.033      0.3877      AK basic
*ke4       0.4000E+07  0.2342E-10  0.2409E-01  1.541      0.3491      AK loose
*ke4       0.4000E+07  0.1836E-10  0.2142E-01  1.209      0.2939      AK lominal
*ke4       0.4000E+07  0.1543E-10  0.2625E-01  1.016      0.2681      AK tight
*ke4       0.4000E+07  0.1079E-10  0.2775E-01  0.7105     0.2264      AK tighter
*ke4       0.4000E+07  0.9083E-11  0.2695E-01  0.5979     0.2046      AK tightest
*kcp3      0.4000E+07  0.5831E-14  0.3211E-01  0.9298     0.5485E-01  MZ
*kcp3      0.4000E+07  0.1475E-13  0.2027E-01  2.352      0.3162      AvdS
*kcp3      0.4000E+07  0.2648E-11  4.346       422.2      244.9       AK basic
*kcp3      0.4000E+07  0.2097E-13  0.5227E-01  3.344      0.3371      AK loose
*kcp3      0.4000E+07  0.2096E-13  0.5923E-01  3.343      0.3371      AK lominal
*kcp3      0.4000E+07  0.1305E-13  0.5379E-01  2.081      0.3300      AK tight
*kcp3      0.4000E+07  0.5154E-14  0.3211E-01  0.8220     0.5242E-01  AK tighter
*kcp3      0.4000E+07  0.3398E-14  0.2443E-01  0.5420     0.4079E-01  AK tightest

Compare AvdS results for beta=1 & beta=betamax

  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
*ke3g      0.2200E+07  0.7413E-11  0.2939      34.10      14.25       AvdS
*ke4       0.4000E+07  0.1759E-10  0.9979E-02  1.158      0.2851      AvdS
*kcp3      0.4000E+07  0.1475E-13  0.2027E-01  2.352      0.3162      AvdS

  Calculate beta assuming pion mass for chgd tracks for evaluating CPV ineffy
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      AvdS
*ke3g      0.2200E+07  0.7413E-11  0.2939      34.10      14.25       AvdS
*ke4       0.4000E+07  0.1735E-10  0.9846E-02  1.142      0.2850      AvdS
*kcp3      0.4000E+07  0.1475E-13  0.2027E-01  2.352      0.3162      AvdS

NO DIFFERENCE. So don't use beta=betamax.

back to neutron studies. looks like 100cmx50cm CV (halfwidths) is well away
from KL beam envelope.
100K events with skim on 
% simple.run.fastmc.script control.dat.remove.ybeam.constraint detector.22.dat &
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.120804.1112.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.rzn.ntskim
 FASTMC: Skim accepted      10 of  100000 generated events. Effy=  0.010 +-  0.003 PERCENT

same initial seeds, 10K events with skim off
/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.120804.1114.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.rzn
after requiring both photons to hit PR, only 3/1802 events have a valid candidate (0<=beta(K)<=1)
requiring either photon to hit PR, ~70/6384 events have a valid candidate
(here 'hit PR' means zdeath(photon)>1414cm)

change seeds, 10M events with skim ON:
/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.120804.1125.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.y50.z1215.a.rzn.ntskim
 FASTMC: Skim accepted     857 of10000000 generated events. Effy=  0.009 +-  0.000 PERCENT

test job, x=100, y=0, z=1215, 100k events with skim on
/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.120804.1127.log

/u1/djaffe/kopio/fastmc/ntuples/nnpi0.x100.z1215.a.rzn.ntskim
 FASTMC: Skim accepted       2 of  100000 generated events. Effy=  0.002 +-  0.001 PERCENT

big job, x=100, y=0, z=1215, 10M events with skim on, new seeds
/e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.control.dat.remove.ybeam.constraint.detector.22.dat.120804.1146.log
/u1/djaffe/kopio/fastmc/ntuples/nnpi0.x100.z1215.a.rzn.ntskim
 FASTMC: Skim accepted     503 of10000000 generated events. Effy=  0.005 +-  0.000 PERCENT

investigation of ke3g. why is zrec-ztrue large? is e+e- annihilation done correctly in MC?
is source 1 low angle photon and conversion photon with significant angle wrt e+?

make more ke3g, kcp3, ke4
% submit.standard.bunch.of.jobs.script
 submit.standard.bunch.of.jobs.script detector.21.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.21.dat.10.130804.1715.log

*******************************************************
Mon Aug 16 09:39:27 EDT 2004

end of ../log/standard.bunch.of.jobs.detector.21.dat.10.130804.1715.log :

 ---------------------------
open: Input/output error
apparent state: unit 16 named /e787u/djaffe/KOPIO/fastmc/scripts/../DataBase/skim.statistics.and.log
lately writing sequential formatted external IO
Abort
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke3g.91070.141.140804.0615.log: Input/output error.
    run.fastmc.script ke3g 9 100000 91071 1 4 1 detector.21.dat default.decay.dat 1.1 1
~/./run.fastmc.script: Input/output error.
    run.fastmc.script ke3g 9 100000 91072 1 4 1 detector.21.dat default.decay.dat 1.1 1
~/./run.fastmc.script: Input/output error.
    run.fastmc.script ke3g 9 100000 91073 1 4 1 detector.21.dat default.decay.dat 1.1 1
~/./run.fastmc.script: Input/output error.

end of /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke3g.91070.141.140804.0615.log :
 USEREND: Wrote   270 histograms and ntuple id  1 to unit# 20 from dir= NT1 to file= ../localntuples/ke3g.91070.141.rzn.ntskim
 USEREND WARNING: REZIP failed to gzip ../localntuples/ke3g.91070.141.rzn.ntskim  error code=    -2
 FASTMC: Trigger accepted  100000 of  100000 generated events. Effy=100.000 +-  0.000 PERCENT
 FASTMC: Skim accepted    5255 of  100000 generated events. Effy=  5.255 +-  0.071 PERCENT

end of % tail /e787u/djaffe/KOPIO/fastmc/scripts/../DataBase/skim.statistics.and.log
       41201      100000      100000 ../localntuples/ke4.121070.41.rzn.ntskim
       40830      100000      100000 ../localntuples/ke4.121071.41.rzn.ntskim
       41188      100000      100000 ../localntuples/ke4.121072.41.rzn.ntskim
       41154      100000      100000 ../localntuples/ke4.121073.41.rzn.ntskim
        5335      100000      100000 ../localntuples/ke3g.91064.141.rzn.ntskim
        5281      100000      100000 ../localntuples/ke3g.91065.141.rzn.ntskim
        5233      100000      100000 ../localntuples/ke3g.91066.141.rzn.ntskim
        5212      100000      100000 ../localntuples/ke3g.91067.141.rzn.ntskim
        5358      100000      100000 ../localntuples/ke3g.91068.141.rzn.ntskim
        5275      100000      100000 ../localntuples/ke3g.91069.141.rzn.ntskim

Actions: 1) edit skim.statistics.and.log to add ke3g.91070.141.rzn.ntskim  DONE
         2) gzip ../localntuples/ke3g.91070.141.rzn.ntskim 	DONE
         3) check for stuff that overfills home (/e787u ) disk   DONE. found some old executables in source/
	 4) add successfully completed jobs to aspect1.bryman.list
% grep ntskim ../log/standard.bunch.of.jobs.detector.21.dat.10.130804.1715.log | awk '{print $3}' | sed -e s/local// > a.
% cp aspect1.bryman.list b.
% cp aspect1.bryman.list aspect1.bryman.list.OLD
% cat a. b. | sort -nr | wc -l
    210
% cat a. b. | sort -nr | uniq | wc -l
    210
% cat a. b. | sort -nr > aspect1.bryman.list

Andries sent some new cuts after his examination of the Kp2-catcher bkgd:
modify select_signal:
     16aug04 Remove my original cuts and either
            use all cuts proposed by Andries (AvdS=TRUE) or
            use Andries's original contour cut and my additional cuts (AvdS=FALSE).

source/select_signal.f			- modified "new AvdS cuts, new Jcuts"

test:
% analysis.script one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.160804.1224.log
% Trim.Down.ANAL /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.160804.1224.log | grep -E 'Who|AvdS|Key'
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.1871E-02  1.000       71.34      1.246       AvdS
*kp2       0.4000E+06  0.2942E-10  0.4859      34.66      3.551       AvdS
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  2.058      0.2139  34.66   3.551       AvdS

compare to results of 6aug04 (117.9(.5) kpnn, 63.3(1.5) kp2, kpnn/kp2 = 1.86(.05)

Laur points out the mis-reconstructed ke3g bkgd may be worse
for 1gPR/1gCAL conversions. Generate & skim 100k events to check.
I modified control.template for this job only.
% run.fastmc.script ke3g 9 100000 91999 1 4 1 detector.21.dat default.decay.dat 1.1 1  &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke3g.91999.141.160804.1513.log

add some hists with Andries's variables, 
% analysis.script one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.160804.1613.log

source/setupanal.f			- modified "add RemovePKcut"
source/flags.inc			- modified "add RemovePKcut"
source/select_signal.f			- modified "add RemovePKcut for MZ cuts"
source/akira.offline.f			- modified "add RemovePKcut for AK cuts"

huge job to test:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.160804.1703.log

***************************************
Tue Aug 17 08:55:55 EDT 2004

huge job crashed with gzip error cuz I had
gunzipped /u1/djaffe/KOPIO/fastmc/ntuples/ke3g.91014.141.rzn.ntskim but not the link!

geometric acceptance for kpnn and kp2 from /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.160804.1613.log

kpnn skimmed and candidate accepted = .248e5
kpnn selected by skim = .448e5
kpnn events generated = 1.0e5
1 kpnn candidate/event possible
geometric acceptance = .248e5/1.0e5/1 = .248

kp2 candidates skimmed and accepted = 4.79e5
kp2 candidates selected by skim = 15.4e6
kp2 events generated = 4.0e5
6 kp2 candidates/event possible
geometric acceptance = 4.79e5/4.0e5/6 = 0.200

short test job:
% analysis.script one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &

Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.170804.0957.log

% Trim.Down.ANAL /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.170804.0957.log
[snip]
List of ntuples            106 Aug 5 17:46 one.kpnn.and.two.kp2.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove P(K) cuts from MZ and AK cuts <************************************************ NOTE *************
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.7945E-03  1.000       30.29      0.8295      MZ
kpnn       0.1000E+06  0.1871E-02  1.000       71.34      1.246       AvdS
kpnn       0.1000E+06  0.2864E-02  1.000       109.2      1.552       AK basic
kpnn       0.1000E+06  0.1854E-02  1.000       70.67      1.248       AK loose
kpnn       0.1000E+06  0.1646E-02  1.000       62.74      1.177       AK lominal
kpnn       0.1000E+06  0.1099E-02  1.000       41.90      0.9609      AK tight
kpnn       0.1000E+06  0.7312E-03  1.000       27.88      0.7853      AK tighter
kpnn       0.1000E+06  0.6373E-03  1.000       24.30      0.7342      AK tightest
*kp2       0.4000E+06  0.1286E-11  0.5001E-01  1.515      0.1426      MZ
*kp2       0.4000E+06  0.2942E-10  0.4859      34.66      3.551       AvdS
*kp2       0.4000E+06  0.1076E-09  1.161       126.7      25.13       AK basic
*kp2       0.4000E+06  0.2534E-10  0.4224      29.85      5.117       AK loose
*kp2       0.4000E+06  0.1484E-10  0.2786      17.48      4.318       AK lominal
*kp2       0.4000E+06  0.5310E-11  0.1493      6.255      1.424       AK tight
*kp2       0.4000E+06  0.8414E-12  0.3556E-01  0.9912     0.1027      AK tighter
*kp2       0.4000E+06  0.6264E-12  0.3037E-01  0.7379     0.7057E-01  AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  20.00      1.960   1.515   0.1426      MZ
bkgd  2.058      0.2139  34.66   3.551       AvdS
bkgd  0.8614     0.1713  126.7   25.13       AK basic
bkgd  2.367      0.4079  29.85   5.117       AK loose
bkgd  3.589      0.8889  17.48   4.318       AK lominal
bkgd  6.700      1.533   6.255   1.424       AK tight
bkgd  28.12      3.019   0.9912  0.1027      AK tighter
bkgd  32.92      3.302   0.7379  0.7057E-01  AK tightest
[snip]

compare with P(K) cut enabled:
% Trim.Down.ANAL /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.160804.1613.log
[snip]
List of ntuples            106 Aug 5 17:46 one.kpnn.and.two.kp2.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.7496E-03  1.000       28.58      0.8126      MZ
kpnn       0.1000E+06  0.1871E-02  1.000       71.34      1.246       AvdS
kpnn       0.1000E+06  0.2526E-02  1.000       96.30      1.486       AK basic
kpnn       0.1000E+06  0.1639E-02  1.000       62.47      1.196       AK loose
kpnn       0.1000E+06  0.1456E-02  1.000       55.50      1.128       AK lominal
kpnn       0.1000E+06  0.9761E-03  1.000       37.21      0.9219      AK tight
kpnn       0.1000E+06  0.6552E-03  1.000       24.98      0.7558      AK tighter
kpnn       0.1000E+06  0.5732E-03  1.000       21.85      0.7075      AK tightest
*kp2       0.4000E+06  0.1128E-11  0.4651E-01  1.329      0.1279      MZ
*kp2       0.4000E+06  0.2942E-10  0.4859      34.66      3.551       AvdS
*kp2       0.4000E+06  0.9780E-10  1.196       115.2      24.69       AK basic
*kp2       0.4000E+06  0.2014E-10  0.3798      23.72      3.107       AK loose
*kp2       0.4000E+06  0.1053E-10  0.2235      12.41      1.522       AK lominal
*kp2       0.4000E+06  0.4859E-11  0.1538      5.724      1.421       AK tight
*kp2       0.4000E+06  0.7056E-12  0.3328E-01  0.8312     0.9045E-01  AK tighter
*kp2       0.4000E+06  0.4974E-12  0.2682E-01  0.5860     0.5135E-01  AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  21.50      2.158   1.329   0.1279      MZ
bkgd  2.058      0.2139  34.66   3.551       AvdS
bkgd  0.8359     0.1796  115.2   24.69       AK basic
bkgd  2.633      0.3485  23.72   3.107       AK loose
bkgd  4.473      0.5562  12.41   1.522       AK lominal
bkgd  6.501      1.622   5.724   1.421       AK tight
bkgd  30.05      3.394   0.8312  0.9045E-01  AK tighter
bkgd  37.29      3.484   0.5860  0.5135E-01  AK tightest
[snip]

ratio of signal acceptance (no P(K) cut)/(P(K) cut):
1.06 MZ
1.13 AK basic
1.13 AK lominal
1.11 AK tightest

ratio for kp2 bkgd:
1.14 MZ
1.10 AK basic
1.41 AK lominal
1.26 AK tightest

==> S/B gets slightly worse without PK cut for MZ,AK cuts

Need to produce some events without skimming to compare with Andries
% run.fastmc.script kpnn 1 100000 10999 0 4 1 detector.21.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.10999.41.170804.1036.log

% run.fastmc.script kp2 2 100000 20999 0 4 1 detector.21.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.20999.41.170804.1036.log

analyze 'em
% analysis.script unskimmed.kpnn.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.unskimmed.kpnn.kp2.aspect1.bryman.170804.1325.log

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 4
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.1863E-02  1.000       71.02      1.240       AvdS
*kp2       0.1000E+06  0.2550E-10  0.4230      30.04      3.135       AvdS
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  2.364      0.2501  30.04   3.135   AvdS

wrong catcher model!

Try again, with most efficient catcher model:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.unskimmed.kpnn.kp2.aspect1.bryman.170804.1336.log

  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.1863E-02  1.000       71.02      1.240       AvdS
*kp2       0.1000E+06  0.2177E-10  0.3611      25.64      2.098       AvdS
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  2.770      0.2317  25.64   2.098   AvdS

S/B consistent with 3 at 1sigma

fiducial cuts only:
kpnn acceptance 0.253E+05 cand/1e5 kpnn decays = 25.3% per decay
kp2             1.23e5cand/1e5 kp2 decays      =123% per decay = 6*20.5%

br(kpnn)=    3e-11
br(kp2) =0.927e-3

fiducial cuts * veto ineffy * conv prob * kl decay prob:
kpnn =  0.135E+04 cand/1e5 kpnn decays
kp2  =  0.193E-02 cand/1e5 kp2 decays

average veto ineffy after cuts:
kpnn = 1.00
kp2 =  0.139E-07

average conversion prob after cuts:
kpnn = 0.625
kp2  = 0.633

average kl decay prob after cuts:
kpnn = 0.830E-01 
kp2  = 0.774E-01

ignoring different conv. prob and kl decay prob:
B/S  = 0.927e-3/3e-11 *  0.193E-02/ 0.135E+04 = .309e8 * 1.43e-6 = .442e2 = 44.2
Andries sez he gets ~6700 for this!!!!!

check with bigger sample
% analysis.script one.kpnn.and.two.kp2.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.kpnn.and.two.kp2.aspect1.bryman.170804.1345.log
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.1871E-02  1.000       71.34      1.246       AvdS
*kp2       0.4000E+06  0.2310E-10  0.3815      27.21      2.483       AvdS
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  2.621      0.2435  27.21   2.483       AvdS

results agree, combining results: S/B = 2.70+-0.17, 1.76sigma from 3

found that default.decay.dat has slightly wrong BR:

* DEFAULT decay modes and branching fractions
*
*Key  BR fraction   From RPP2004
kpnn   3.e-11
kp2    9.27e-4       9.32e-4
kcp2   2.056e-3      2.090e-3
kgg    5.86e-4       5.90e-4
kp3    21.13e-2     21.05e-2
kcp3   12.55e-2     12.59e-2
ke3    38.78e-2     38.81e-2
km3    27.18e-2     27.19e-2
ke3g   3.62e-3      3.53e-3
km3g   5.7e-4       5.7e-4
kpgg   1.68e-6      1.41e-6
ke4    5.18e-5      5.18e-5  
km4    1.4e-5       ------
*

changes are due to new |eta+-|, |eta00|, |eta00/eta+-|, epsilon'/epsilon
and KL -> pi0,g,g measurements.

scripts/default.decay.dat.old			- new "copy of default.decay.dat before PDG2004"
scripts/default.decay.dat			- modified "updated with PDG2004"

This results in 

 INITDECAYIT: kp2  Old Br=0.9270E-03 New Br from file=0.9320E-03  <=== CHANGED FROM NOMINAL
 INITDECAYIT: kcp2 Old Br=0.2056E-02 New Br from file=0.2090E-02  <=== CHANGED FROM NOMINAL
 INITDECAYIT: kgg  Old Br=0.5860E-03 New Br from file=0.5900E-03  <=== CHANGED FROM NOMINAL
 INITDECAYIT: kp3  Old Br=0.2113     New Br from file=0.2105      <=== CHANGED FROM NOMINAL
 INITDECAYIT: kcp3 Old Br=0.1255     New Br from file=0.1259      <=== CHANGED FROM NOMINAL
 INITDECAYIT: ke3g Old Br=0.3620E-02 New Br from file=0.3530E-02  <=== CHANGED FROM NOMINAL
 INITDECAYIT: kpgg Old Br=0.1680E-05 New Br from file=0.1410E-05  <=== CHANGED FROM NOMINAL
 INITDECAYIT: K0L decay mode information
   # iwt  Key    K0L decay modes                            Maxweight BR fractio BR/BR(pnn)
   1   2 kpnn  pi0   nu   nu                                1.000     0.3000E-10  1.000
   2   1 kp2   pi0  pi0                                     1.000     0.9320E-03 0.3107E+08  <=== CHANGED FROM NOMINAL
   3   1 kcp2   pi   pi                                     1.000     0.2090E-02 0.6967E+08  <=== CHANGED FROM NOMINAL
   4   1 kgg  gamm gamm                                     1.000     0.5900E-03 0.1967E+08  <=== CHANGED FROM NOMINAL
   5   3 kp3   pi0  pi0  pi0                                1.000     0.2105     0.7017E+10  <=== CHANGED FROM NOMINAL
   6   3 kcp3   pi   pi  pi0                                1.000     0.1259     0.4197E+10  <=== CHANGED FROM NOMINAL
   7   2 ke3    pi    e   nu                                1.000     0.3881     0.1294E+11
   8   2 km3    pi   mu   nu                                1.000     0.2719     0.9063E+10
   9   4 ke3g   pi    e   nu gamm                           1.000     0.3530E-02 0.1177E+09  <=== CHANGED FROM NOMINAL
  10   4 km3g   pi   mu   nu gamm                           1.000     0.5700E-03 0.1900E+08
  11   5 kpgg  pi0 gamm gamm                                1.000     0.1410E-05 0.4700E+05  <=== CHANGED FROM NOMINAL
  12   6 ke4   pi0   pi    e   nu                           1.000     0.5180E-04 0.1727E+07
  13   6 km4   pi0   pi   mu   nu                           1.000     0.1400E-04 0.4667E+06
  14   1 kbet    K    e   nu                                1.000     0.1000E-07  333.3
          Summed Br(K0L)= 1.004

study effect of DS veto window on ke3g, kcp3, ke4 rates.
set CP veto gate width infinite for this study.
these results use Andries's latest set of cuts.

no DS window:
% analysis.script one.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1544.log
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1544.log
Histogram file             ../ntuples/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1544.rzn
Start time is Tue Aug 17 15:44:26 EDT 2004
Finish time is Tue Aug 17 15:46:26 EDT 2004
List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)   dNeV(mode)  Who
*ke3g      0.1000E+06  0.5502E-13  0.000      0.2468      0.4088E-01  MZ
*ke3g      0.1000E+06  0.9996E-13  0.000      0.4484      0.5467E-01  AvdS
*ke3g      0.1000E+06  0.2268E-12  0.000      1.017       0.8563E-01  AK basic
*ke3g      0.1000E+06  0.1119E-12  0.000      0.5020      0.5991E-01  AK loose
*ke3g      0.1000E+06  0.9494E-13  0.000      0.4259      0.5411E-01  AK lominal
*ke3g      0.1000E+06  0.6479E-13  0.000      0.2906      0.4423E-01  AK tight
*ke3g      0.1000E+06  0.4770E-13  0.000      0.2139      0.3905E-01  AK tighter
*ke3g      0.1000E+06  0.4052E-13  0.000      0.1818      0.3451E-01  AK tightest
*ke4       0.1000E+06  0.4385E-12  0.000      0.2886E-01  0.1033E-01  MZ
*ke4       0.1000E+06  0.3311E-12  0.000      0.2179E-01  0.7984E-02  AvdS
*ke4       0.1000E+06  0.1306E-10  0.000      0.8594      0.7544      AK basic
*ke4       0.1000E+06  0.7185E-12  0.000      0.4730E-01  0.1292E-01  AK loose
*ke4       0.1000E+06  0.7142E-12  0.000      0.4701E-01  0.1292E-01  AK lominal
*ke4       0.1000E+06  0.5374E-12  0.000      0.3538E-01  0.1113E-01  AK tight
*ke4       0.1000E+06  0.4643E-12  0.000      0.3056E-01  0.1051E-01  AK tighter
*ke4       0.1000E+06  0.3913E-12  0.000      0.2576E-01  0.1000E-01  AK tightest
*kcp3      0.1000E+06  0.4657E-14  0.000      0.7451      0.2691      MZ
*kcp3      0.1000E+06  0.4458E-13  0.000      7.132       0.9353      AvdS
*kcp3      0.1000E+06  0.1622E-12  0.000      25.95       1.956       AK basic
*kcp3      0.1000E+06  0.2139E-13  0.000      3.423       0.6867      AK loose
*kcp3      0.1000E+06  0.2139E-13  0.000      3.423       0.6867      AK lominal
*kcp3      0.1000E+06  0.1096E-13  0.000      1.753       0.4635      AK tight
*kcp3      0.1000E+06  0.5973E-14  0.000      0.9555      0.3821      AK tighter
*kcp3      0.1000E+06  0.4067E-14  0.000      0.6507      0.3350      AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  0.000      0.000   1.021   0.2723  MZ
bkgd  0.000      0.000   7.602   0.9369  AvdS
bkgd  0.000      0.000   27.83   2.098   AK basic
bkgd  0.000      0.000   3.972   0.6894  AK loose
bkgd  0.000      0.000   3.896   0.6890  AK lominal
bkgd  0.000      0.000   2.079   0.4657  AK tight
bkgd  0.000      0.000   1.200   0.3842  AK tighter
bkgd  0.000      0.000   0.8582  0.3369  AK tightest

with 13.5 mg/cm^2 DS window:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1551.log
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1551.log
Histogram file             ../ntuples/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1551.rzn
Start time is Tue Aug 17 15:51:00 EDT 2004
Finish time is Tue Aug 17 15:52:58 EDT 2004
List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     and DS window thickness= 13.5     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)   dNeV(mode)  Who
*ke3g      0.1000E+06  0.6079E-13  0.000      0.2727      0.4530E-01  MZ
*ke3g      0.1000E+06  0.1084E-12  0.000      0.4864      0.5906E-01  AvdS
*ke3g      0.1000E+06  0.2379E-12  0.000      1.067       0.8934E-01  AK basic
*ke3g      0.1000E+06  0.1200E-12  0.000      0.5385      0.6389E-01  AK loose
*ke3g      0.1000E+06  0.1031E-12  0.000      0.4623      0.5849E-01  AK lominal
*ke3g      0.1000E+06  0.7103E-13  0.000      0.3186      0.4845E-01  AK tight
*ke3g      0.1000E+06  0.5391E-13  0.000      0.2418      0.4377E-01  AK tighter
*ke3g      0.1000E+06  0.4673E-13  0.000      0.2096      0.3978E-01  AK tightest
*ke4       0.1000E+06  0.4839E-12  0.000      0.3185E-01  0.1086E-01  MZ
*ke4       0.1000E+06  0.4123E-12  0.000      0.2714E-01  0.1046E-01  AvdS
*ke4       0.1000E+06  0.1334E-10  0.000      0.8781      0.7545      AK basic
*ke4       0.1000E+06  0.8427E-12  0.000      0.5547E-01  0.1498E-01  AK loose
*ke4       0.1000E+06  0.8378E-12  0.000      0.5514E-01  0.1498E-01  AK lominal
*ke4       0.1000E+06  0.6476E-12  0.000      0.4263E-01  0.1341E-01  AK tight
*ke4       0.1000E+06  0.5091E-12  0.000      0.3351E-01  0.1103E-01  AK tighter
*ke4       0.1000E+06  0.4356E-12  0.000      0.2868E-01  0.1055E-01  AK tightest
*kcp3      0.1000E+06  0.1302E-13  0.000      2.083       0.8340      MZ
*kcp3      0.1000E+06  0.1399E-12  0.000      22.39       3.860       AvdS
*kcp3      0.1000E+06  0.4250E-12  0.000      67.99       6.212       AK basic
*kcp3      0.1000E+06  0.5703E-13  0.000      9.124       1.993       AK loose
*kcp3      0.1000E+06  0.5703E-13  0.000      9.124       1.993       AK lominal
*kcp3      0.1000E+06  0.3520E-13  0.000      5.632       1.669       AK tight
*kcp3      0.1000E+06  0.1545E-13  0.000      2.471       0.9172      AK tighter
*kcp3      0.1000E+06  0.8711E-14  0.000      1.394       0.6948      AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  0.000      0.000   2.387  0.8353  MZ
bkgd  0.000      0.000   22.90  3.860   AvdS
bkgd  0.000      0.000   69.94  6.258   AK basic
bkgd  0.000      0.000   9.718  1.994   AK loose
bkgd  0.000      0.000   9.641  1.994   AK lominal
bkgd  0.000      0.000   5.993  1.670   AK tight
bkgd  0.000      0.000   2.747  0.9183  AK tighter
bkgd  0.000      0.000   1.632  0.6960  AK tightest

roughly a factor of 3 increase in bkgd, all due to kcp3.

27.0 mg/cm^2 window:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1556.log
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1556.log
Histogram file             ../ntuples/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1556.rzn
Start time is Tue Aug 17 15:56:15 EDT 2004
Finish time is Tue Aug 17 15:58:09 EDT 2004
List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Use Andries van der Schaaf`s in JCUTS
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     and DS window thickness= 27.0     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)   dNeV(mode)  Who
*ke3g      0.1000E+06  0.6656E-13  0.000      0.2986      0.5197E-01  MZ
*ke3g      0.1000E+06  0.1169E-12  0.000      0.5244      0.6587E-01  AvdS
*ke3g      0.1000E+06  0.2491E-12  0.000      1.117       0.9532E-01  AK basic
*ke3g      0.1000E+06  0.1282E-12  0.000      0.5749      0.7016E-01  AK loose
*ke3g      0.1000E+06  0.1112E-12  0.000      0.4987      0.6528E-01  AK lominal
*ke3g      0.1000E+06  0.7726E-13  0.000      0.3466      0.5491E-01  AK tight
*ke3g      0.1000E+06  0.6012E-13  0.000      0.2697      0.5083E-01  AK tighter
*ke3g      0.1000E+06  0.5294E-13  0.000      0.2375      0.4743E-01  AK tightest
*ke4       0.1000E+06  0.5293E-12  0.000      0.3484E-01  0.1171E-01  MZ
*ke4       0.1000E+06  0.4935E-12  0.000      0.3249E-01  0.1368E-01  AvdS
*ke4       0.1000E+06  0.1362E-10  0.000      0.8968      0.7547      AK basic
*ke4       0.1000E+06  0.9670E-12  0.000      0.6365E-01  0.1795E-01  AK loose
*ke4       0.1000E+06  0.9613E-12  0.000      0.6328E-01  0.1795E-01  AK lominal
*ke4       0.1000E+06  0.7578E-12  0.000      0.4988E-01  0.1659E-01  AK tight
*ke4       0.1000E+06  0.5539E-12  0.000      0.3646E-01  0.1187E-01  AK tighter
*ke4       0.1000E+06  0.4800E-12  0.000      0.3160E-01  0.1142E-01  AK tightest
*kcp3      0.1000E+06  0.2587E-13  0.000      4.139       1.921       MZ
*kcp3      0.1000E+06  0.2838E-12  0.000      45.40       9.259       AvdS
*kcp3      0.1000E+06  0.7889E-12  0.000      126.2       13.56       AK basic
*kcp3      0.1000E+06  0.1071E-12  0.000      17.14       4.354       AK loose
*kcp3      0.1000E+06  0.1071E-12  0.000      17.14       4.354       AK lominal
*kcp3      0.1000E+06  0.7215E-13  0.000      11.54       3.921       AK tight
*kcp3      0.1000E+06  0.2980E-13  0.000      4.767       1.977       AK tighter
*kcp3      0.1000E+06  0.1528E-13  0.000      2.445       1.374       AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  0.000      0.000   4.472  1.922  MZ
bkgd  0.000      0.000   45.96  9.260  AvdS
bkgd  0.000      0.000   128.2  13.58  AK basic
bkgd  0.000      0.000   17.78  4.355  AK loose
bkgd  0.000      0.000   17.70  4.355  AK lominal
bkgd  0.000      0.000   11.94  3.922  AK tight
bkgd  0.000      0.000   5.073  1.978  AK tighter
bkgd  0.000      0.000   2.714  1.375  AK tightest

kcp3 bkgd with AvdS cuts
 7.132      0.9353  no DS window
22.39       3.860   DS window thickness= 13.5     mg/cm^2
45.40       9.259   DS window thickness= 27.0     mg/cm^2

13.5/none = 3.14
27.0/none = 6.37
27.0/13.5 = 2.03

approx 1.71 bkgd events per mg/cm^2 of window thickness
linear fit gives kcp3 event rate = 5.84 + 1.417*thickness(mg/cm^2) 

% grep -E 'kpnn|ke3g|ke4|kcp3' aspect1.bryman.list > kpnn.ke3g.ke4.kcp3.aspect1.bryman.list

short job using 'old' AvdS cuts:
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1645.log
Histogram file             ../ntuples/anal.one.ke3g.ke4.kcp3.aspect1.bryman.170804.1645.rzn
Start time is Tue Aug 17 16:45:48 EDT 2004
Finish time is Tue Aug 17 16:47:42 EDT 2004
List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)   dNeV(mode)  Who
*ke3g      0.1000E+06  0.5502E-13  0.000      0.2468      0.4088E-01  MZ
*ke3g      0.1000E+06  0.1560E-12  0.000      0.6998      0.6765E-01  DJ
*ke3g      0.1000E+06  0.2268E-12  0.000      1.017       0.8563E-01  AK basic
*ke3g      0.1000E+06  0.1119E-12  0.000      0.5020      0.5991E-01  AK loose
*ke3g      0.1000E+06  0.9494E-13  0.000      0.4259      0.5411E-01  AK lominal
*ke3g      0.1000E+06  0.6479E-13  0.000      0.2906      0.4423E-01  AK tight
*ke3g      0.1000E+06  0.4770E-13  0.000      0.2139      0.3905E-01  AK tighter
*ke3g      0.1000E+06  0.4052E-13  0.000      0.1818      0.3451E-01  AK tightest
*ke4       0.1000E+06  0.4385E-12  0.000      0.2886E-01  0.1033E-01  MZ
*ke4       0.1000E+06  0.8501E-12  0.000      0.5596E-01  0.1415E-01  DJ
*ke4       0.1000E+06  0.1306E-10  0.000      0.8594      0.7544      AK basic
*ke4       0.1000E+06  0.7185E-12  0.000      0.4730E-01  0.1292E-01  AK loose
*ke4       0.1000E+06  0.7142E-12  0.000      0.4701E-01  0.1292E-01  AK lominal
*ke4       0.1000E+06  0.5374E-12  0.000      0.3538E-01  0.1113E-01  AK tight
*ke4       0.1000E+06  0.4643E-12  0.000      0.3056E-01  0.1051E-01  AK tighter
*ke4       0.1000E+06  0.3913E-12  0.000      0.2576E-01  0.1000E-01  AK tightest
*kcp3      0.1000E+06  0.4657E-14  0.000      0.7451      0.2691      MZ
*kcp3      0.1000E+06  0.1410E-13  0.000      2.256       0.5121      DJ
*kcp3      0.1000E+06  0.1622E-12  0.000      25.95       1.956       AK basic
*kcp3      0.1000E+06  0.2139E-13  0.000      3.423       0.6867      AK loose
*kcp3      0.1000E+06  0.2139E-13  0.000      3.423       0.6867      AK lominal
*kcp3      0.1000E+06  0.1096E-13  0.000      1.753       0.4635      AK tight
*kcp3      0.1000E+06  0.5973E-14  0.000      0.9555      0.3821      AK tighter
*kcp3      0.1000E+06  0.4067E-14  0.000      0.6507      0.3350      AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  0.000      0.000   1.021   0.2723  MZ
bkgd  0.000      0.000   3.012   0.5167  DJ
bkgd  0.000      0.000   27.83   2.098   AK basic
bkgd  0.000      0.000   3.972   0.6894  AK loose
bkgd  0.000      0.000   3.896   0.6890  AK lominal
bkgd  0.000      0.000   2.079   0.4657  AK tight
bkgd  0.000      0.000   1.200   0.3842  AK tighter
bkgd  0.000      0.000   0.8582  0.3369  AK tightest

long job, no CPV gate, no P(K) cut on MZ,AK cuts:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.170804.1700.log
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.170804.1700.log 
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.170804.1700.rzn 
Start time is Tue Aug 17 17:00:03 EDT 2004
Finish time is Tue Aug 17 18:48:42 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.8062E-03  1.000       30.73      0.2410      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0      0.4523      DJ
kpnn       0.1200E+07  0.2898E-02  1.000       110.5      0.4499      AK basic
kpnn       0.1200E+07  0.1904E-02  1.000       72.58      0.3651      AK loose
kpnn       0.1200E+07  0.1680E-02  1.000       64.05      0.3430      AK lominal
kpnn       0.1200E+07  0.1146E-02  1.000       43.68      0.2832      AK tight
kpnn       0.1200E+07  0.7552E-03  1.000       28.79      0.2300      AK tighter
kpnn       0.1200E+07  0.6531E-03  1.000       24.90      0.2141      AK tightest
*ke4       0.5000E+07  0.1265E-10  0.2709E-01  0.8324     0.2263      MZ
*ke4       0.5000E+07  0.1662E-10  0.9429E-02  1.094      0.2549      DJ
*ke4       0.5000E+07  0.3211E-10  0.1913E-01  2.114      0.3582      AK basic
*ke4       0.5000E+07  0.2302E-10  0.2088E-01  1.515      0.3109      AK loose
*ke4       0.5000E+07  0.1897E-10  0.1949E-01  1.249      0.2718      AK lominal
*ke4       0.5000E+07  0.1531E-10  0.2308E-01  1.008      0.2438      AK tight
*ke4       0.5000E+07  0.1034E-10  0.2365E-01  0.6809     0.2023      AK tighter
*ke4       0.5000E+07  0.8973E-11  0.2372E-01  0.5907     0.1868      AK tightest
*ke3g      0.2900E+07  0.4394E-13  0.6414E-02  0.1971     0.6889E-02  MZ
*ke3g      0.2900E+07  0.1496E-12  0.5782E-02  0.6709     0.1462E-01  DJ
*ke3g      0.2900E+07  0.2240E-12  0.9093E-02  1.005      0.1745E-01  AK basic
*ke3g      0.2900E+07  0.9582E-13  0.5922E-02  0.4298     0.1126E-01  AK loose
*ke3g      0.2900E+07  0.8389E-13  0.5875E-02  0.3763     0.1024E-01  AK lominal
*ke3g      0.2900E+07  0.6208E-13  0.6376E-02  0.2785     0.8928E-02  AK tight
*ke3g      0.2900E+07  0.3983E-13  0.6207E-02  0.1787     0.6834E-02  AK tighter
*ke3g      0.2900E+07  0.3542E-13  0.6382E-02  0.1589     0.6492E-02  AK tightest
*kcp3      0.5000E+07  0.5894E-14  0.3068E-01  0.9429     0.5000E-01  MZ
*kcp3      0.5000E+07  0.1294E-13  0.1784E-01  2.070      0.5892E-01  DJ
*kcp3      0.5000E+07  0.1818E-12  0.2633      29.09      0.2926      AK basic
*kcp3      0.5000E+07  0.1928E-13  0.4249E-01  3.084      0.9300E-01  AK loose
*kcp3      0.5000E+07  0.1925E-13  0.4809E-01  3.080      0.9296E-01  AK lominal
*kcp3      0.5000E+07  0.1126E-13  0.4126E-01  1.802      0.6954E-01  AK tight
*kcp3      0.5000E+07  0.5157E-14  0.2866E-01  0.8251     0.4679E-01  AK tighter
*kcp3      0.5000E+07  0.3498E-14  0.2248E-01  0.5597     0.3742E-01  AK tightest
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  15.58      1.835       1.972  0.2318  MZ
bkgd  30.26      2.071       3.835  0.2620  DJ
bkgd  3.431      0.5124E-01  32.21  0.4628  AK basic
bkgd  14.43      0.9346      5.029  0.3247  AK loose
bkgd  13.61      0.8350      4.705  0.2875  AK lominal
bkgd  14.14      1.165       3.088  0.2537  AK tight
bkgd  17.09      2.112       1.685  0.2077  AK tighter
bkgd  19.02      2.774       1.309  0.1907  AK tightest

CPVetoGate = -4,+16ns, no P(K) cuts:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.170804.2119.log

*******************************************
Wed Aug 18 09:28:00 EDT 2004
 Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.170804.2119.log
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.170804.2119.rzn
Start time is Tue Aug 17 21:19:48 EDT 2004
Finish time is Tue Aug 17 23:09:54 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 16.0    )
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1200E+07  0.8062E-03  1.000       30.73       0.2410      MZ
kpnn       0.1200E+07  0.3043E-02  1.000       116.0       0.4523      DJ
kpnn       0.1200E+07  0.2898E-02  1.000       110.5       0.4499      AK basic
kpnn       0.1200E+07  0.1904E-02  1.000       72.58       0.3651      AK loose
kpnn       0.1200E+07  0.1680E-02  1.000       64.05       0.3430      AK lominal
kpnn       0.1200E+07  0.1146E-02  1.000       43.68       0.2832      AK tight
kpnn       0.1200E+07  0.7552E-03  1.000       28.79       0.2300      AK tighter
kpnn       0.1200E+07  0.6531E-03  1.000       24.90       0.2141      AK tightest
*ke4       0.5000E+07  0.1435E-10  0.3073E-01  0.9445      0.2269      MZ
*ke4       0.5000E+07  0.3300E-10  0.1872E-01  2.172       0.9556      DJ
*ke4       0.5000E+07  0.6076E-10  0.3620E-01  4.000       1.702       AK basic
*ke4       0.5000E+07  0.5053E-10  0.4582E-01  3.326       1.692       AK loose
*ke4       0.5000E+07  0.4645E-10  0.4774E-01  3.058       1.686       AK lominal
*ke4       0.5000E+07  0.4214E-10  0.6352E-01  2.774       1.681       AK tight
*ke4       0.5000E+07  0.1147E-10  0.2622E-01  0.7548      0.2027      AK tighter
*ke4       0.5000E+07  0.1006E-10  0.2660E-01  0.6623      0.1872      AK tightest
*ke3g      0.2900E+07  0.3044E-11  0.4443      13.66       8.125       MZ
*ke3g      0.2900E+07  0.5879E-11  0.2273      26.37       10.83       DJ
*ke3g      0.2900E+07  0.1004E-10  0.4077      45.05       12.96       AK basic
*ke3g      0.2900E+07  0.4909E-11  0.3034      22.02       8.912       AK loose
*ke3g      0.2900E+07  0.4721E-11  0.3306      21.18       8.877       AK lominal
*ke3g      0.2900E+07  0.4012E-11  0.4121      18.00       8.552       AK tight
*ke3g      0.2900E+07  0.2921E-11  0.4552      13.10       8.094       AK tighter
*ke3g      0.2900E+07  0.2727E-11  0.4914      12.23       8.049       AK tightest
*kcp3      0.5000E+07  0.1477E-07  0.7689E+05  0.2363E+07  0.2363E+07  MZ
*kcp3      0.5000E+07  0.1477E-07  0.2037E+05  0.2363E+07  0.2363E+07  DJ
*kcp3      0.5000E+07  0.1478E-07  0.2141E+05  0.2365E+07  0.2363E+07  AK basic
*kcp3      0.5000E+07  0.1477E-07  0.3256E+05  0.2363E+07  0.2363E+07  AK loose
*kcp3      0.5000E+07  0.1477E-07  0.3690E+05  0.2363E+07  0.2363E+07  AK lominal
*kcp3      0.5000E+07  0.1477E-07  0.5411E+05  0.2363E+07  0.2363E+07  AK tight
*kcp3      0.5000E+07  0.1477E-07  0.8208E+05  0.2363E+07  0.2363E+07  AK tighter
*kcp3      0.5000E+07  0.1477E-07  0.9491E+05  0.2363E+07  0.2363E+07  AK tightest
Key   N(Kpnn)/B   d(S/B)      Nev         dNeV
bkgd  0.1301E-04  0.1301E-04  0.2363E+07  0.2363E+07  MZ
bkgd  0.4910E-04  0.4910E-04  0.2363E+07  0.2363E+07  DJ
bkgd  0.4671E-04  0.4667E-04  0.2365E+07  0.2363E+07  AK basic
bkgd  0.3071E-04  0.3070E-04  0.2363E+07  0.2363E+07  AK loose
bkgd  0.2710E-04  0.2710E-04  0.2363E+07  0.2363E+07  AK lominal
bkgd  0.1848E-04  0.1848E-04  0.2363E+07  0.2363E+07  AK tight
bkgd  0.1218E-04  0.1218E-04  0.2363E+07  0.2363E+07  AK tighter
bkgd  0.1054E-04  0.1054E-04  0.2363E+07  0.2363E+07  AK tightest

properties of high weight events:
ke4  EVTwt=0.6994E-04  event=   1074   PrecK=  381.2 Ptrue=381
 pi-(KE=1.4) dif, KE=7.0 mu- has Thit=18.3, e+ (KE=9.6) hits US wall
 would be removed by low momentum P(K)>400 MeV/c cut

ke3g  EVTwt=0.3598E-05  PrecK=  373.9 ZrecK= 1245.7 event=   3428
	pi(KE=5MeV) dif, mu-(9.2MeV) Thit=20.3
	would be removed by PK cut

ke3g  EVTwt=0.2754E-05 PrecK=  633.3 ZrecK= 1273.6 event=   4053
	               Ptrue=  598   Ztrue  1129
      183 MeV pi- DIF, 116 mu-, Thit=-7.0ns
      mis-reconstructed ZK,PK

ke3g  EVTwt=0.1318E-05  PrecK=  802.5 ZrecK= 1124.9 event=   5258
			Ptrue   814          1131
      1.6 MeV pi- DIF, 4.0 MeV mu-, Thit = 18.75

ke3g  EVTwt=0.4926E-05 PrecK=  499.5 ZrecK= 1357.9 event=   2674
			Ptrue  499   Ztrue  1357
      1.3 MeV pi- DIF, 3.2 MeV mu-, Thit = 26.21

kcp3  EVTwt=0.7385E-01   PrecK=  233.0 ZrecK= 1226.0 event=  38860
      0.4 MeV pi+ DIF, 3.6 MeV mu+, Thit = 39.01 ns
      2.6 MeV pi- DIF, 1.3 MeV mu-, Thit = 47.80
      Event from hell. Would be removed by PK cut.

kcp3  EVTwt=0.8082E-06  PrecK=  450.4 ZrecK= 1224.3 event=  15758
      4.3 MeV pi+, Thit = 18.5ns
      19.1 MeV pi- DIF, 7.0 MeV mu-, Thit = 6.9

add PK > 400 MeV/c cut for all cut sets
add Thit vs PK plots

source/setupanal.f			- modified "add RemoveUpperPKcut"
source/flags.inc			- modified "add RemoveUpperPKcut"
source/select_signal.f			- modified "add RemoveUpperPKcut for MZ cuts"
source/akira.offline.f			- modified "add RemoveUpperPKcut for AK cuts"
source/bookanal.f			- modified "add PK vs Thit plot"
source/fillanal.f			- modified "add PK vs Thit plot"

set CPvetogate to -4e20,+16e20.
test:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.180804.1141.log
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.one.ke3g.ke4.kcp3.aspect1.bryman.180804.1141.log
Histogram file             ../ntuples/anal.one.ke3g.ke4.kcp3.aspect1.bryman.180804.1141.rzn
Start time is Wed Aug 18 11:41:21 EDT 2004
Finish time is Wed Aug 18 11:43:21 EDT 2004
List of ntuples            109 Aug 8 02:03 one.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)   dNeV(mode)  Who
*ke3g      0.1000E+06  0.5502E-13  0.000      0.2468      0.4088E-01  MZ
*ke3g      0.1000E+06  0.1560E-12  0.000      0.6998      0.6765E-01  DJ
*ke3g      0.1000E+06  0.2236E-12  0.000      1.003       0.8465E-01  AK basic
*ke3g      0.1000E+06  0.1116E-12  0.000      0.5008      0.5989E-01  AK loose
*ke3g      0.1000E+06  0.9467E-13  0.000      0.4247      0.5410E-01  AK lominal
*ke3g      0.1000E+06  0.6451E-13  0.000      0.2894      0.4421E-01  AK tight
*ke3g      0.1000E+06  0.4742E-13  0.000      0.2127      0.3903E-01  AK tighter
*ke3g      0.1000E+06  0.4052E-13  0.000      0.1818      0.3451E-01  AK tightest
*ke4       0.1000E+06  0.4382E-12  0.000      0.2885E-01  0.1033E-01  MZ
*ke4       0.1000E+06  0.8496E-12  0.000      0.5592E-01  0.1415E-01  DJ
*ke4       0.1000E+06  0.1306E-10  0.000      0.8593      0.7544      AK basic
*ke4       0.1000E+06  0.7183E-12  0.000      0.4728E-01  0.1292E-01  AK loose
*ke4       0.1000E+06  0.7141E-12  0.000      0.4700E-01  0.1292E-01  AK lominal
*ke4       0.1000E+06  0.5372E-12  0.000      0.3536E-01  0.1113E-01  AK tight
*ke4       0.1000E+06  0.4643E-12  0.000      0.3056E-01  0.1051E-01  AK tighter
*ke4       0.1000E+06  0.3912E-12  0.000      0.2575E-01  0.1000E-01  AK tightest
*kcp3      0.1000E+06  0.4657E-14  0.000      0.7451      0.2691      MZ
*kcp3      0.1000E+06  0.1410E-13  0.000      2.256       0.5121      DJ
*kcp3      0.1000E+06  0.1579E-12  0.000      25.26       1.893       AK basic
*kcp3      0.1000E+06  0.2139E-13  0.000      3.423       0.6867      AK loose
*kcp3      0.1000E+06  0.2139E-13  0.000      3.423       0.6867      AK lominal
*kcp3      0.1000E+06  0.1096E-13  0.000      1.753       0.4635      AK tight
*kcp3      0.1000E+06  0.5973E-14  0.000      0.9555      0.3821      AK tighter
*kcp3      0.1000E+06  0.4067E-14  0.000      0.6507      0.3350      AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev     dNeV
bkgd  0.000      0.000   1.021   0.2723  MZ
bkgd  0.000      0.000   3.011   0.5167  DJ
bkgd  0.000      0.000   27.12   2.040   AK basic
bkgd  0.000      0.000   3.971   0.6894  AK loose
bkgd  0.000      0.000   3.894   0.6890  AK lominal
bkgd  0.000      0.000   2.078   0.4657  AK tight
bkgd  0.000      0.000   1.199   0.3842  AK tighter
bkgd  0.000      0.000   0.8582  0.3369  AK tightest

ok, big job:
Log file name is  ../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1156.log 
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1156.rzn 
Start time is Wed Aug 18 11:56:22 EDT 2004
Finish time is Wed Aug 18 13:48:05 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65      0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5      0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2      0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40      0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89      0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56      0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73      0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85      0.2138      AK tightest
*ke4       0.5000E+07  0.1265E-10  0.2716E-01  0.8324     0.2263      MZ
*ke4       0.5000E+07  0.1652E-10  0.9419E-02  1.087      0.2548      DJ
*ke4       0.5000E+07  0.3211E-10  0.1918E-01  2.113      0.3582      AK basic
*ke4       0.5000E+07  0.2302E-10  0.2093E-01  1.515      0.3109      AK loose
*ke4       0.5000E+07  0.1897E-10  0.1954E-01  1.249      0.2718      AK lominal
*ke4       0.5000E+07  0.1531E-10  0.2314E-01  1.008      0.2438      AK tight
*ke4       0.5000E+07  0.1034E-10  0.2370E-01  0.6809     0.2023      AK tighter
*ke4       0.5000E+07  0.8973E-11  0.2377E-01  0.5907     0.1868      AK tightest
*ke3g      0.2900E+07  0.4347E-13  0.6362E-02  0.1950     0.6793E-02  MZ
*ke3g      0.2900E+07  0.1473E-12  0.5725E-02  0.6610     0.1432E-01  DJ
*ke3g      0.2900E+07  0.2224E-12  0.9052E-02  0.9975     0.1735E-01  AK basic
*ke3g      0.2900E+07  0.9542E-13  0.5912E-02  0.4280     0.1121E-01  AK loose
*ke3g      0.2900E+07  0.8349E-13  0.5862E-02  0.3745     0.1018E-01  AK lominal
*ke3g      0.2900E+07  0.6176E-13  0.6359E-02  0.2770     0.8874E-02  AK tight
*ke3g      0.2900E+07  0.3951E-13  0.6170E-02  0.1772     0.6762E-02  AK tighter
*ke3g      0.2900E+07  0.3511E-13  0.6339E-02  0.1575     0.6417E-02  AK tightest
*kcp3      0.5000E+07  0.5816E-14  0.3036E-01  0.9306     0.4924E-01  MZ
*kcp3      0.5000E+07  0.1294E-13  0.1792E-01  2.069      0.5892E-01  DJ
*kcp3      0.5000E+07  0.1799E-12  0.2611      28.77      0.2896      AK basic
*kcp3      0.5000E+07  0.1908E-13  0.4216E-01  3.053      0.9215E-01  AK loose
*kcp3      0.5000E+07  0.1906E-13  0.4772E-01  3.049      0.9211E-01  AK lominal
*kcp3      0.5000E+07  0.1112E-13  0.4082E-01  1.778      0.6863E-01  AK tight
*kcp3      0.5000E+07  0.5156E-14  0.2871E-01  0.8249     0.4679E-01  AK tighter
*kcp3      0.5000E+07  0.3497E-14  0.2251E-01  0.5594     0.3742E-01  AK tightest
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  15.65      1.856       1.958  0.2317  MZ
bkgd  30.24      2.078       3.818  0.2619  DJ
bkgd  3.456      0.5190E-01  31.89  0.4609  AK basic
bkgd  14.49      0.9440      4.996  0.3244  AK loose
bkgd  13.67      0.8439      4.672  0.2872  AK lominal
bkgd  14.22      1.180       3.063  0.2534  AK tight
bkgd  17.07      2.111       1.683  0.2077  AK tighter
bkgd  19.00      2.775       1.308  0.1907  AK tightest

very slight reduction in rates due to P(K) cut

set CPVetoGate = (-4,+16) WRONG!!! INFINITE GATE USED!!!!
% analysis.script kpnn.ke3g.ke4.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1357.log
Log file name is  ../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1156.log 
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1156.rzn 
Start time is Wed Aug 18 11:56:22 EDT 2004
Finish time is Wed Aug 18 13:48:05 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.160E+22)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65      0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5      0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2      0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40      0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89      0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56      0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73      0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85      0.2138      AK tightest
*ke4       0.5000E+07  0.1265E-10  0.2716E-01  0.8324     0.2263      MZ
*ke4       0.5000E+07  0.1652E-10  0.9419E-02  1.087      0.2548      DJ
*ke4       0.5000E+07  0.3211E-10  0.1918E-01  2.113      0.3582      AK basic
*ke4       0.5000E+07  0.2302E-10  0.2093E-01  1.515      0.3109      AK loose
*ke4       0.5000E+07  0.1897E-10  0.1954E-01  1.249      0.2718      AK lominal
*ke4       0.5000E+07  0.1531E-10  0.2314E-01  1.008      0.2438      AK tight
*ke4       0.5000E+07  0.1034E-10  0.2370E-01  0.6809     0.2023      AK tighter
*ke4       0.5000E+07  0.8973E-11  0.2377E-01  0.5907     0.1868      AK tightest
*ke3g      0.2900E+07  0.4347E-13  0.6362E-02  0.1950     0.6793E-02  MZ
*ke3g      0.2900E+07  0.1473E-12  0.5725E-02  0.6610     0.1432E-01  DJ
*ke3g      0.2900E+07  0.2224E-12  0.9052E-02  0.9975     0.1735E-01  AK basic
*ke3g      0.2900E+07  0.9542E-13  0.5912E-02  0.4280     0.1121E-01  AK loose
*ke3g      0.2900E+07  0.8349E-13  0.5862E-02  0.3745     0.1018E-01  AK lominal
*ke3g      0.2900E+07  0.6176E-13  0.6359E-02  0.2770     0.8874E-02  AK tight
*ke3g      0.2900E+07  0.3951E-13  0.6170E-02  0.1772     0.6762E-02  AK tighter
*ke3g      0.2900E+07  0.3511E-13  0.6339E-02  0.1575     0.6417E-02  AK tightest
*kcp3      0.5000E+07  0.5816E-14  0.3036E-01  0.9306     0.4924E-01  MZ
*kcp3      0.5000E+07  0.1294E-13  0.1792E-01  2.069      0.5892E-01  DJ
*kcp3      0.5000E+07  0.1799E-12  0.2611      28.77      0.2896      AK basic
*kcp3      0.5000E+07  0.1908E-13  0.4216E-01  3.053      0.9215E-01  AK loose
*kcp3      0.5000E+07  0.1906E-13  0.4772E-01  3.049      0.9211E-01  AK lominal
*kcp3      0.5000E+07  0.1112E-13  0.4082E-01  1.778      0.6863E-01  AK tight
*kcp3      0.5000E+07  0.5156E-14  0.2871E-01  0.8249     0.4679E-01  AK tighter
*kcp3      0.5000E+07  0.3497E-14  0.2251E-01  0.5594     0.3742E-01  AK tightest
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  15.65      1.856       1.958  0.2317  MZ
bkgd  30.24      2.078       3.818  0.2619  DJ
bkgd  3.456      0.5190E-01  31.89  0.4609  AK basic
bkgd  14.49      0.9440      4.996  0.3244  AK loose
bkgd  13.67      0.8439      4.672  0.2872  AK lominal
bkgd  14.22      1.180       3.063  0.2534  AK tight
bkgd  17.07      2.111       1.683  0.2077  AK tighter
bkgd  19.00      2.775       1.308  0.1907  AK tightest

hmm, rates are the same as the infinite gate?? YES. CUZ INFINITE GATE WAS USED

CPVetoGate=-4,+8ns
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1750.log 

*********************************************
Thu Aug 19 09:59:46 EDT 2004

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1750.log
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.180804.1750.rzn
Start time is Wed Aug 18 17:50:42 EDT 2004
Finish time is Wed Aug 18 19:41:10 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 8.00    )
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65       0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5       0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2       0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40       0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89       0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56       0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73       0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85       0.2138      AK tightest
*ke4       0.5000E+07  0.1275E-09  0.2738      8.390       3.728       MZ
*ke4       0.5000E+07  0.1447E-07  8.250       952.4       944.4       DJ
*ke4       0.5000E+07  0.1944E-09  0.1161      12.80       4.156       AK basic
*ke4       0.5000E+07  0.1677E-09  0.1525      11.04       4.088       AK loose
*ke4       0.5000E+07  0.1629E-09  0.1678      10.72       4.085       AK lominal
*ke4       0.5000E+07  0.1481E-09  0.2238      9.750       4.057       AK tight
*ke4       0.5000E+07  0.1155E-09  0.2647      7.604       3.697       AK tighter
*ke4       0.5000E+07  0.1137E-09  0.3012      7.483       3.697       AK tightest
*ke3g      0.2900E+07  0.1505E-10  2.203       67.51       15.05       MZ
*ke3g      0.2900E+07  0.2322E-10  0.9020      104.1       19.80       DJ
*ke3g      0.2900E+07  0.5325E-10  2.167       238.9       32.32       AK basic
*ke3g      0.2900E+07  0.2364E-10  1.465       106.0       19.21       AK loose
*ke3g      0.2900E+07  0.2211E-10  1.552       99.16       18.94       AK lominal
*ke3g      0.2900E+07  0.1783E-10  1.836       79.98       17.42       AK tight
*ke3g      0.2900E+07  0.1364E-10  2.129       61.17       15.03       AK tighter
*ke3g      0.2900E+07  0.1123E-10  2.028       50.40       13.41       AK tightest
*kcp3      0.5000E+07  0.8980E-11  46.88       1437.       448.3       MZ
*kcp3      0.5000E+07  0.6412E-11  8.886       1026.       390.9       DJ
*kcp3      0.5000E+07  0.4689E-07  0.6808E+05  0.7502E+07  0.4318E+07  AK basic
*kcp3      0.5000E+07  0.1542E-07  0.3406E+05  0.2466E+07  0.2463E+07  AK loose
*kcp3      0.5000E+07  0.1542E-07  0.3861E+05  0.2466E+07  0.2463E+07  AK lominal
*kcp3      0.5000E+07  0.1541E-07  0.5658E+05  0.2465E+07  0.2463E+07  AK tight
*kcp3      0.5000E+07  0.1540E-07  0.8578E+05  0.2464E+07  0.2463E+07  AK tighter
*kcp3      0.5000E+07  0.6507E-11  41.90       1041.       364.8       AK tightest
Key   N(Kpnn)/B   d(S/B)      Nev         dNeV
bkgd  0.2026E-01  0.6010E-02  1513.       448.5       MZ
bkgd  0.5544E-01  0.2722E-01  2082.       1022.       DJ
bkgd  0.1469E-04  0.8455E-05  0.7503E+07  0.4318E+07  AK basic
bkgd  0.2935E-04  0.2931E-04  0.2466E+07  0.2463E+07  AK loose
bkgd  0.2590E-04  0.2586E-04  0.2466E+07  0.2463E+07  AK lominal
bkgd  0.1767E-04  0.1766E-04  0.2465E+07  0.2463E+07  AK tight
bkgd  0.1166E-04  0.1165E-04  0.2464E+07  0.2463E+07  AK tighter
bkgd  0.2261E-01  0.7514E-02  1099.       365.1       AK tightest

examine hi weight events for -4,8ns gate:

ke4  EVTwt=0.9152E-04  PrecK=  435.4 ZrecK= 1272.6
	4MeV pi-, Thit=8.4ns

ke4 EVTwt=0.1060E-03  PrecK=  727.3 ZrecK= 1222.9 
	37MeV pi- DIF, 50MeV mu-, Thit = 8.04ns
	long flight path (Zdeath(pi-)=1599cm)

ke4  EVTwt=0.2370E-03   PrecK=  515.7 ZrecK= 1228.2
	5.6MeVpi- DIF, 10.1MeV mu-, Thit = 11.0ns

ke4 EVTwt=0.3547E-04  PrecK=  867.2 ZrecK= 1242.6
	35MeV pi- DIF, 17MeV mu-, Thit = 8.55ns

ke4  EVTwt=0.7173E-01   PrecK=  608.3 ZrecK= 1180.3
	19.3MeV pi- DIF, 12.5 MeV mu-, Thit = 11.6ns

ke3g  EVTwt=0.2806E-05 PrecK=  848.7 ZrecK= 1219.5 event=    175
                       Ptrue   806   Ztrue  1114
	21.6MeV pi-, Thit=9.9ns

ke3g   EVTwt=0.4230E-05 PrecK= 1122.0 ZrecK= 1101.6 
			       1146          1085
	28MeV pi-, Thit = 9.1ns 

ke3g EVTwt=0.1334E-05 PrecK=  569.2 ZrecK= 1300.7 
			      564	   1302
	2.7MeV pi-, 6.9MeV mu-, Thit=14.5ns

ke3g  EVTwt=0.1994E-05  PrecK=  623.0 ZrecK= 1178.5
				618	     1124
	3.4MeV pi-, 5.5MeV mu-, Thit = 10.5ns

 EVTwt=0.1562E-05  PrecK=  735.1 ZrecK= 1200.0	event 1281
			   730          1187
	10.9MeV pi-, Thit = 12.3ns

 EVTwt=0.3426E-05 PrecK=  640.1 ZrecK= 1166.6
			  634	       1162
	18.3MeV pi- DIF, 7.9MeV mu-, Thit=14.45ns

other similar ke3g events...either low KE pi- or mis-recon ZK

kcp3  EVTwt=0.5059E-05 PK=  606.3 ZrecK= 1138.1
			    610          1163
	39Mev pi+ DIF, 52MeV mu+, 9.32ns

kcp3 bkgd low KE pi+- and/or DIF

use Mnu2-dependent gate:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1000.log
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1000.log 
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1000.rzn 
Start time is Thu Aug 19 10:00:59 EDT 2004
Finish time is Thu Aug 19 11:58:18 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000    
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00    
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at M
nu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
  AK fiducial variables: zcut1=  1090.0000
  AK fiducial variables: zcut2=  1365.0000
  AK fiducial variables: zcal =  1557.6666
  AK fiducial variables: zhole=  1515.0000
  AK fiducial variables: zprerad=  1415.0000
  AK fiducial variables: zprerad2=  1515.0000
  AK fiducial variables: yang =     0.0025
  AK fiducial variables: radlen=    50.0000
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65      0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5      0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2      0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40      0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89      0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56      0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73      0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85      0.2138      AK tightest
*ke4       0.5000E+07  0.1346E-10  0.2892E-01  0.8862     0.2266      MZ
*ke4       0.5000E+07  0.1730E-10  0.9866E-02  1.139      0.2550      DJ
*ke4       0.5000E+07  0.5866E-10  0.3504E-01  3.862      1.702       AK basic
*ke4       0.5000E+07  0.4922E-10  0.4475E-01  3.240      1.692       AK loose
*ke4       0.5000E+07  0.4516E-10  0.4653E-01  2.973      1.685       AK lominal
*ke4       0.5000E+07  0.4129E-10  0.6239E-01  2.718      1.681       AK tight
*ke4       0.5000E+07  0.1086E-10  0.2487E-01  0.7146     0.2025      AK tighter
*ke4       0.5000E+07  0.9478E-11  0.2511E-01  0.6239     0.1870      AK tightest
*ke3g      0.2900E+07  0.2182E-11  0.3194      9.790      7.748       MZ
*ke3g      0.2900E+07  0.5658E-11  0.2199      25.38      10.54       DJ
*ke3g      0.2900E+07  0.5419E-11  0.2206      24.31      9.498       AK basic
*ke3g      0.2900E+07  0.2602E-11  0.1612      11.67      7.835       AK loose
*ke3g      0.2900E+07  0.2414E-11  0.1695      10.83      7.795       AK lominal
*ke3g      0.2900E+07  0.2201E-11  0.2266      9.872      7.748       AK tight
*ke3g      0.2900E+07  0.1937E-11  0.3025      8.689      7.672       AK tighter
*ke3g      0.2900E+07  0.1933E-11  0.3489      8.669      7.672       AK tightest
*kcp3      0.5000E+07  0.7433E-14  0.3880E-01  1.189      0.2633      MZ
*kcp3      0.5000E+07  0.1449E-13  0.2007E-01  2.318      0.2551      DJ
*kcp3      0.5000E+07  0.2401E-11  3.486       384.1      200.2       AK basic
*kcp3      0.5000E+07  0.2231E-13  0.4929E-01  3.569      0.3765      AK loose
*kcp3      0.5000E+07  0.2228E-13  0.5580E-01  3.565      0.3765      AK lominal
*kcp3      0.5000E+07  0.1434E-13  0.5267E-01  2.295      0.3715      AK tight
*kcp3      0.5000E+07  0.6773E-14  0.3772E-01  1.084      0.2629      AK tighter
*kcp3      0.5000E+07  0.5114E-14  0.3293E-01  0.8181     0.2614      AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  2.583      1.689   11.87  7.755  MZ
bkgd  4.003      1.464   28.84  10.54  DJ
bkgd  0.2673     0.1300  412.3  200.5  AK basic
bkgd  3.917      1.701   18.48  8.025  AK loose
bkgd  3.679      1.691   17.37  7.984  AK lominal
bkgd  2.927      1.561   14.88  7.937  AK tight
bkgd  2.739      2.006   10.49  7.679  AK tighter
bkgd  2.457      1.866   10.11  7.678  AK tightest

bkgd dominated by ke3g. look at hi weight events:

ke3g  EVTwt=0.2754E-05 PrecK=  633.3 ZrecK= 1273.6 event=   4053
	               Ptrue=  598   Ztrue  1129
      183 MeV pi- DIF, 116 mu-, Thit=-7.0ns
      mis-reconstructed ZK,PK

ke3g EVTwt=0.2968E-05 PrecK=  722.7 ZrecK= 1274.2 event=   1294
                              696          1197
       162 MeV pi- DIF, 57 MeV mu-, Thit = -2.26ns
       Mnu2= -.1288E+06 CVGate(low) -2.000     CVgate(high)=  8.000 
	mis-reconstructed ZK, just outside gate

ke3g EVTwt=0.1670E-05 PrecK= 1331.7 ZrecK= 1322.1 event=   1720
		 	     1359          1184
	367 MeV pi-, Thit = -3.92ns
	Mnu2= -.2683E+06 CVGate(low) -2.000     CVgate(high)=  8.000  
	mis-reconstructed ZK

ke3g EVTwt=0.1188E-05 PrecK= 1274.0 ZrecK= 1290.9 event=   1443
	 	             1261          1162
	420 MeV pi-, Thit  = -3.84ns
	Mnu2= -.1883E+06 CVGate(low) -2.000     CVgate(high)=  8.000 
	mis-reconstructed ZK

ke3g  EVTwt=0.4926E-05 PrecK=  499.5 ZrecK= 1357.9 event=   2674
			       499          1357
	1.3 MeV pi- DIF, 3.2 MeV mu-, Thit = 26.2ns
	Mnu2=  1029.     CVGate(low) -4.000     CVgate(high)=  20.00
	very slow track. Mnu2<0 cut would eliminate

4/5 have mis-recon ZK. 3/4 are just outside gate.
1/5 has very slow pi-/mu-. Mnu2<0 cut would eliminate.

now move CV to 200,200 cm
use Mnu2-dependent gate
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1300.log 

hi weight events

this ke4 looks like it is due to a bug. why no hit time for pi-?????

 ANAL: Open ../ntuples/ke4.121069.41.rzn.ntskim  with     41270 ntuple entries

SELECT_SIGNAL:Ntrack=  7 Nrecon=  1 irec=  1 icut=  4 AKcut= -2 EVTwt=0.6436E-01 CPwt=0.6460     VEwt= 1.000     DKwt=0.9962E-01 Pre
cK=  791.9 ZrecK= 1121.6 event=  32831
 SELECT_SIGNAL:     Mgg        E1*        E2*       Epi*         E1         E2      Mmiss      Emiss       DOCA      T1-T2
 SELECT_SIGNAL:  116.8      110.7      109.2      219.9      299.4      321.4      216.8      314.5     0.5453E-04  0.000    
 SELECT_SIGNAL:Mnu2= -.2130E+05 CVGate(low) -4.000     CVgate(high)=  19.74    
 SELECT_SIGNAL:Track#      1          2          3          4          5          6          7
 LastVol, LastPlane   2 6        2 6        2 3        2 3        2 1        4 6        4 6
 SELECT_SIGNAL:PathLn -1.000     -1.000     -1.000     -1.000     -1.000      106.4      103.1    
 SELECT_SIGNAL:PV(E)  0.2500E-04 0.2500E-04 0.5473E-04 0.1108E-02 0.4235E-02 0.3954E-04 0.3325E-04
 SELECT_SIGNAL:KAMIPV 0.3516E-05 0.6600E-05 0.3132E-04 0.1909E-03 0.4342E-03 0.2086E-04 0.1683E-04
 SELECT_SIGNAL:PVE787 0.2500E-04 0.2500E-04 0.6974E-04 0.2947E-02 0.1323E-01 0.4486E-04 0.3597E-04
 SELECT_SIGNAL:Edeath   931.69     612.29     216.85      64.99      37.57     297.30     319.23
 SELECT_SIGNAL:Ebirth   931.69     612.29     216.85      64.99      37.57     284.29     328.00
 SELECT_SIGNAL:Pdeath   787.64     597.23     165.96      64.99      37.57     297.30     319.23
 SELECT_SIGNAL: KE      434.02     477.31      77.28      64.48      37.57     297.30     319.23
 SELECT_SIGNAL:Xdeath   -27.84     -27.84     -58.74     -68.10     134.37    -108.92      23.69
 SELECT_SIGNAL:Ydeath    -0.20      -0.20    -200.00    -200.00     200.00      65.62      48.95
 SELECT_SIGNAL:Zdeath  1127.15    1127.15    1388.17    1375.80    1292.80    1415.00    1415.00
   Fate, Parent Type  1 0  K0L   1 1  pi0   2 1   pi-  2 1    e+  2 1   nu   2 2 gamm   2 2 gamm 
 SELECT_SIGNAL:Weight 0.9962E-01  1.000      1.000      1.000      1.000      1.000      1.000    
 SELECT_SIGNAL:  WT = 0.9962E-01  1.000      1.000      1.000      1.000      1.000      1.000    
 SELECT_SIGNAL:  CP =  1.000      1.000      1.000      1.000      1.000     0.8088     0.7987    
 SELECT_SIGNAL:  VE =  1.000      1.000      1.000      1.000      1.000     0.3879E-04 0.2994E-04
 SELECT_SIGNAL:Thit =  0.000      0.000      0.000      0.000      0.000      0.000      0.000    
 SELECT_SIGNAL:EffRec 0.6436E-01
 SELECT_SIGNAL:RecItk   6   7

../ntuples/ke4.121057.41.rzn.ntskim
SELECT_SIGNAL:Ntrack=  7 Nrecon=  1 irec=  1 icut=  4 AKcut= -2 EVTwt=0.8041E-01 CPwt=0.6718     VEwt= 1.000     DKwt=0.1197     Pre
cK=  466.7 ZrecK= 1180.3 event=  14405
 SELECT_SIGNAL:     Mgg        E1*        E2*       Epi*         E1         E2      Mmiss      Emiss       DOCA      T1-T2
 SELECT_SIGNAL:  138.2      99.48      113.1      212.6      221.3      193.0      233.0      268.0     0.7618E-05  0.000    
 SELECT_SIGNAL:Mnu2= -1016.     CVGate(low) -4.000     CVgate(high)=  20.00    
 SELECT_SIGNAL:Track#      1          2          3          4          5          6          7
 LastVol, LastPlane   2 6        2 6        2 2        2 4        2 4        4 6        4 6
 SELECT_SIGNAL:PathLn -1.000     -1.000     -1.000     -1.000     -1.000      101.5      120.4    
 SELECT_SIGNAL:PV(E)  0.2500E-04 0.2500E-04 0.5852E-04 0.3038E-02 0.1882E-01 0.6055E-04 0.6423E-04
 SELECT_SIGNAL:KAMIPV 0.5607E-05 0.1204E-04 0.3267E-04 0.3384E-03 0.4000E-02 0.3340E-04 0.3473E-04
 SELECT_SIGNAL:PVE787 0.2500E-04 0.2500E-04 0.7745E-04 0.8078E-02 0.1372     0.8170E-04 0.8963E-04
 SELECT_SIGNAL:Edeath   682.59     410.15     210.81      44.36      17.25     223.77     195.77
 SELECT_SIGNAL:Ebirth   682.59     410.15     210.81      44.36      17.25     207.74     202.41
 SELECT_SIGNAL:Pdeath   467.17     387.31     158.00      44.36      17.25     223.77     195.77
 SELECT_SIGNAL: KE      184.91     275.18      71.24      43.85      17.25     223.77     195.77
 SELECT_SIGNAL:Xdeath    -8.81      -8.81     200.00    -200.00    -200.00      22.28    -143.25
 SELECT_SIGNAL:Ydeath    -0.37      -0.37     118.43     182.55    -186.89     -25.98     -82.39
 SELECT_SIGNAL:Zdeath  1181.11    1181.11    1376.48    1198.86    1035.56    1415.00    1415.00
   Fate, Parent Type  1 0  K0L   1 1  pi0   2 1   pi+  2 1    e-  2 1   nu   2 2 gamm   2 2 gamm 
 SELECT_SIGNAL:Weight 0.1197      1.000      1.000      1.000      1.000      1.000      1.000    
 SELECT_SIGNAL:  WT = 0.1197      1.000      1.000      1.000      1.000      1.000      1.000    
 SELECT_SIGNAL:  CP =  1.000      1.000      1.000      1.000      1.000     0.7939     0.8462    
 SELECT_SIGNAL:  VE =  1.000      1.000      1.000      1.000      1.000     0.6855E-04 0.7187E-04
 SELECT_SIGNAL:Thit =  0.000      0.000      0.000      0.000      0.000      0.000      0.000    
 SELECT_SIGNAL:EffRec 0.8041E-01
 SELECT_SIGNAL:RecItk   6   7

found another ke4 like this one.
looks like when Xdeath or Ydeath=200 there is a problem
found many ke3g with same problem. must be a mistake in my tests in positionatcv

try use X,Y = 199.9, 199.9
bnlku24_djaffe[27]% echo "../ntuples/ke4.121069.41.rzn.ntskim" > test.list
bnlku24_djaffe[28]% cat test.list 
../ntuples/ke4.121069.41.rzn.ntskim
bnlku24_djaffe[29]% analysis.script test.list ../geometry/detector.22.dat &

Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.190804.1531.log 
seems to have fixed the pb.

try another long job:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1533.log 
Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1533.log 
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1533.rzn 
Start time is Thu Aug 19 15:33:46 EDT 2004
Finish time is Thu Aug 19 17:26:21 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000    
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00    
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65      0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5      0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2      0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40      0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89      0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56      0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73      0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85      0.2138      AK tightest
*ke4       0.5000E+07  0.3196E-10  0.6863E-01  2.104      1.224       MZ
*ke4       0.5000E+07  0.3605E-10  0.2056E-01  2.373      1.229       DJ
*ke4       0.5000E+07  0.7849E-10  0.4688E-01  5.166      2.084       AK basic
*ke4       0.5000E+07  0.6837E-10  0.6216E-01  4.500      2.076       AK loose
*ke4       0.5000E+07  0.6424E-10  0.6619E-01  4.229      2.070       AK lominal
*ke4       0.5000E+07  0.5975E-10  0.9029E-01  3.933      2.067       AK tight
*ke4       0.5000E+07  0.2904E-10  0.6655E-01  1.912      1.219       AK tighter
*ke4       0.5000E+07  0.2876E-10  0.7619E-01  1.893      1.219       AK tightest
*ke3g      0.2900E+07  0.1106E-10  1.619       49.63      14.98       MZ
*ke3g      0.2900E+07  0.1299E-10  0.5047      58.27      14.07       DJ
*ke3g      0.2900E+07  0.3484E-10  1.418       156.3      25.17       AK basic
*ke3g      0.2900E+07  0.1669E-10  1.034       74.89      17.48       AK loose
*ke3g      0.2900E+07  0.1637E-10  1.149       73.41      17.45       AK lominal
*ke3g      0.2900E+07  0.1299E-10  1.337       58.25      15.75       AK tight
*ke3g      0.2900E+07  0.1192E-10  1.861       53.47      15.45       AK tighter
*ke3g      0.2900E+07  0.1133E-10  2.046       50.84      15.22       AK tightest
*kcp3      0.5000E+07  0.6901E-12  3.602       110.4      109.2       MZ
*kcp3      0.5000E+07  0.1436E-13  0.1990E-01  2.297      0.2550      DJ
*kcp3      0.5000E+07  0.7099E-11  10.31       1136.      371.5       AK basic
*kcp3      0.5000E+07  0.1660E-11  3.667       265.5      187.8       AK loose
*kcp3      0.5000E+07  0.1660E-11  4.156       265.5      187.8       AK lominal
*kcp3      0.5000E+07  0.6969E-12  2.559       111.5      109.2       AK tight
*kcp3      0.5000E+07  0.6894E-12  3.840       110.3      109.2       AK tighter
*kcp3      0.5000E+07  0.6878E-12  4.429       110.0      109.2       AK tightest
Key   N(Kpnn)/B   d(S/B)      Nev    dNeV
bkgd  0.1890      0.1286      162.1  110.3  MZ
bkgd  1.834       0.4116      62.94  14.12  DJ
bkgd  0.8495E-01  0.2439E-01  1297.  372.3  AK basic
bkgd  0.2099      0.1148      344.9  188.7  AK loose
bkgd  0.1862      0.1024      343.2  188.7  AK lominal
bkgd  0.2508      0.1594      173.7  110.4  AK tight
bkgd  0.1734      0.1155      165.7  110.3  AK tighter
bkgd  0.1527      0.1035      162.8  110.3  AK tightest

ke4 high weight events

 EVTwt=0.9152E-04 PrecK=  435.4 ZrecK= 1272.6 event=  35069
 3.7MeV pi- Thit

--- used fixed width gate (-4,8) ns
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1955.log 

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1955.log 
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.190804.1955.rzn 
Start time is Thu Aug 19 19:55:43 EDT 2004
Finish time is Thu Aug 19 21:48:45 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 8.00    )
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65       0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5       0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2       0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40       0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89       0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56       0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73       0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85       0.2138      AK tightest
*ke4       0.5000E+07  0.2258E-09  0.4850      14.86       4.931       MZ
*ke4       0.5000E+07  0.2832E-07  16.15       1864.       1307.       DJ
*ke4       0.5000E+07  0.2757E-07  16.47       1815.       1266.       AK basic
*ke4       0.5000E+07  0.1377E-07  12.52       906.2       886.2       AK loose
*ke4       0.5000E+07  0.1374E-07  14.15       904.3       886.2       AK lominal
*ke4       0.5000E+07  0.1367E-07  20.65       899.5       886.2       AK tight
*ke4       0.5000E+07  0.1538E-09  0.3524      10.12       3.972       AK tighter
*ke4       0.5000E+07  0.1348E-09  0.3572      8.875       3.798       AK tightest
*ke3g      0.2900E+07  0.5726E-10  8.380       256.8       29.70       MZ
*ke3g      0.2900E+07  0.8506E-10  3.305       381.6       38.37       DJ
*ke3g      0.2900E+07  0.1849E-09  7.526       829.4       57.46       AK basic
*ke3g      0.2900E+07  0.9007E-10  5.580       404.0       40.75       AK loose
*ke3g      0.2900E+07  0.8407E-10  5.903       377.1       38.86       AK lominal
*ke3g      0.2900E+07  0.6455E-10  6.646       289.5       34.37       AK tight
*ke3g      0.2900E+07  0.4792E-10  7.482       214.9       28.65       AK tighter
*ke3g      0.2900E+07  0.4293E-10  7.750       192.6       27.45       AK tightest
*kcp3      0.5000E+07  0.7733E-07  0.4037E+06  0.1237E+08  0.5539E+07  MZ
*kcp3      0.5000E+07  0.1599E-07  0.2216E+05  0.2558E+07  0.2557E+07  DJ
*kcp3      0.5000E+07  0.2603E-06  0.3779E+06  0.4164E+08  0.1010E+08  AK basic
*kcp3      0.5000E+07  0.1074E-06  0.2372E+06  0.1718E+08  0.6498E+07  AK loose
*kcp3      0.5000E+07  0.1074E-06  0.2688E+06  0.1718E+08  0.6498E+07  AK lominal
*kcp3      0.5000E+07  0.1073E-06  0.3942E+06  0.1717E+08  0.6498E+07  AK tight
*kcp3      0.5000E+07  0.1073E-06  0.5978E+06  0.1717E+08  0.6498E+07  AK tighter
*kcp3      0.5000E+07  0.6145E-07  0.3957E+06  0.9831E+07  0.4922E+07  AK tightest
Key   N(Kpnn)/B   d(S/B)      Nev         dNeV
bkgd  0.2477E-05  0.1109E-05  0.1237E+08  0.5539E+07  MZ
bkgd  0.4509E-04  0.4504E-04  0.2560E+07  0.2557E+07  DJ
bkgd  0.2646E-05  0.6419E-06  0.4164E+08  0.1010E+08  AK basic
bkgd  0.4215E-05  0.1595E-05  0.1718E+08  0.6498E+07  AK loose
bkgd  0.3719E-05  0.1407E-05  0.1718E+08  0.6498E+07  AK lominal
bkgd  0.2537E-05  0.9598E-06  0.1717E+08  0.6498E+07  AK tight
bkgd  0.1673E-05  0.6331E-06  0.1717E+08  0.6498E+07  AK tighter
bkgd  0.2527E-05  0.1265E-05  0.9832E+07  0.4922E+07  AK tightest

find that moving CV farther away ameliorates the delta<-4ns problem for
ke3g at the expense of a longer tail at delta>0 from hist 27 (delta vs Mnu2) and hist 31 (delta)

delta = Ttrk - TK - d/c

Fri Aug 20 16:22:40 EDT 2004

same but with Mnu2-dependent gate:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.200804.1622.log

************************************
Mon Aug 23 09:17:15 EDT 2004

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.200804.1622.log 
Histogram file             ../ntuples/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.200804.1622.rzn 
Start time is Fri Aug 20 16:22:02 EDT 2004
Finish time is Fri Aug 20 18:17:38 EDT 2004
List of ntuples            5105 Aug 17 16:44 kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000    
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00    
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65      0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5      0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2      0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40      0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89      0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56      0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73      0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85      0.2138      AK tightest
*ke4       0.5000E+07  0.3196E-10  0.6863E-01  2.104      1.224       MZ
*ke4       0.5000E+07  0.3605E-10  0.2056E-01  2.373      1.229       DJ
*ke4       0.5000E+07  0.7849E-10  0.4688E-01  5.166      2.084       AK basic
*ke4       0.5000E+07  0.6837E-10  0.6216E-01  4.500      2.076       AK loose
*ke4       0.5000E+07  0.6424E-10  0.6619E-01  4.229      2.070       AK lominal
*ke4       0.5000E+07  0.5975E-10  0.9029E-01  3.933      2.067       AK tight
*ke4       0.5000E+07  0.2904E-10  0.6655E-01  1.912      1.219       AK tighter
*ke4       0.5000E+07  0.2876E-10  0.7619E-01  1.893      1.219       AK tightest
*ke3g      0.2900E+07  0.1106E-10  1.619       49.63      14.98       MZ
*ke3g      0.2900E+07  0.1299E-10  0.5047      58.27      14.07       DJ
*ke3g      0.2900E+07  0.3484E-10  1.418       156.3      25.17       AK basic
*ke3g      0.2900E+07  0.1669E-10  1.034       74.89      17.48       AK loose
*ke3g      0.2900E+07  0.1637E-10  1.149       73.41      17.45       AK lominal
*ke3g      0.2900E+07  0.1299E-10  1.337       58.25      15.75       AK tight
*ke3g      0.2900E+07  0.1192E-10  1.861       53.47      15.45       AK tighter
*ke3g      0.2900E+07  0.1133E-10  2.046       50.84      15.22       AK tightest
*kcp3      0.5000E+07  0.6901E-12  3.602       110.4      109.2       MZ
*kcp3      0.5000E+07  0.1436E-13  0.1990E-01  2.297      0.2550      DJ
*kcp3      0.5000E+07  0.7099E-11  10.31       1136.      371.5       AK basic
*kcp3      0.5000E+07  0.1660E-11  3.667       265.5      187.8       AK loose
*kcp3      0.5000E+07  0.1660E-11  4.156       265.5      187.8       AK lominal
*kcp3      0.5000E+07  0.6969E-12  2.559       111.5      109.2       AK tight
*kcp3      0.5000E+07  0.6894E-12  3.840       110.3      109.2       AK tighter
*kcp3      0.5000E+07  0.6878E-12  4.429       110.0      109.2       AK tightest
Key   N(Kpnn)/B   d(S/B)      Nev    dNeV
bkgd  0.1890      0.1286      162.1  110.3  MZ
bkgd  1.834       0.4116      62.94  14.12  DJ
bkgd  0.8495E-01  0.2439E-01  1297.  372.3  AK basic
bkgd  0.2099      0.1148      344.9  188.7  AK loose
bkgd  0.1862      0.1024      343.2  188.7  AK lominal
bkgd  0.2508      0.1594      173.7  110.4  AK tight
bkgd  0.1734      0.1155      165.7  110.3  AK tighter
bkgd  0.1527      0.1035      162.8  110.3  AK tightest

For cuts other than DJ, rate dominated by kcp3, ke3g
DJ cuts: ke3g rate dominates

ke4 high weight events DJ cuts
 EVTwt=0.9152E-04 PrecK=  435.4 ZrecK= 1272.6 event=  35069
		  Ptrue   436          1267
 KE=3.7MeV pi-, delta=25.8

ke3g
 EVTwt=0.1695E-05 PrecK=  629.2 ZrecK= 1213.6 event=   4303
		  Ptrue   616          1194
 6.6MeV pi-, delta=22.6ns

 EVTwt=0.1994E-05  PrecK=  623.0 ZrecK= 1178.5 event=   2893
                           618          1124
 3.4MeV pi- DIF, 5.5MeV mu-, delta=33ns

EVTwt=0.2310E-05 PrecK=  686.6 ZrecK= 1190.1 event=    179
			 667          1163
 5.5MeV pi- DIF, 4.7MeV mu-, delta=22.6ns

 EVTwt=0.1803E-05 CPwt=0.6419     VEwt= 1.000     DKwt=0.2810E-05 PrecK=  726.2 ZrecK= 1145.4 event=    142
4.6MeV pi- DIF, 10.5MeV mu-, delta=21.3ns

 EVTwt=0.1715E-05 CPwt=0.6405     VEwt= 1.000     DKwt=0.2677E-05 PrecK=  711.4 ZrecK= 1203.4 event=    353
3.6MeV pi- DIF 5.0MeV mu- delta=22.3ns

classify further similar events (x=previous events):
slow pi- **xx 
slow mu- ********xxxx

EVTwt=0.1188E-05  PrecK= 1274.0 ZrecK= 1290.9 event=   1443
		         1260          1162
Mnu2= -.1883E+06 CVGate(low) -2.000     CVgate(high)=  8.000
420MeV pi-, delta=-2.2ns

ke3g summary:
 4 slow pi-
12 slow mu- 
 1 misrecon pi-

summary of rates for AK tightest:
ke4  EVTwt=0.9152E-04 CPwt=0.6619     VEwt=0.1146E-02 DKwt=0.1206     PrecK=  435.4 ZrecK= 1272.6 event=  35069
same as DJ

ke3g:
slow pi-   2
slow mu-  11
mis-recon  0

kcp3:
 EVTwt=0.3414E-05 CPwt=0.6637     VEwt=0.4278E-04 DKwt=0.1202     PrecK=  445.6 ZrecK= 1122.1 event=  18459
Mnu2= 0.1043E+05 CVGate(low) -4.000     CVgate(high)=  20.00
15MeV pi+ DIF, 6.5MeV mu+, delta=22ns
 9.5MeV pi-, delta=17.1ns

add histogram of delta vs Emiss, re-run:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.0953.log

infinite gate, 5 files/mode to check thickness of DS wall:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1423.log

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1423.log 
Histogram file             ../ntuples/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1423.rzn 
Start time is Mon Aug 23 14:23:34 EDT 2004
Finish time is Mon Aug 23 14:39:12 EDT 2004
List of ntuples            725 Aug 23 14:20 five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.800E+21)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.5000E+06  0.7960E-03  1.000       30.35      0.3706      MZ
kpnn       0.5000E+06  0.3026E-02  1.000       115.4      0.6984      DJ
kpnn       0.5000E+06  0.2890E-02  1.000       110.2      0.6958      AK basic
kpnn       0.5000E+06  0.1904E-02  1.000       72.57      0.5657      AK loose
kpnn       0.5000E+06  0.1683E-02  1.000       64.16      0.5322      AK lominal
kpnn       0.5000E+06  0.1144E-02  1.000       43.62      0.4386      AK tight
kpnn       0.5000E+06  0.7479E-03  1.000       28.51      0.3546      AK tighter
kpnn       0.5000E+06  0.6482E-03  1.000       24.71      0.3305      AK tightest
*ke3g      0.5000E+06  0.4135E-13  0.6113E-02  0.1855     0.1547E-01  MZ
*ke3g      0.5000E+06  0.1434E-12  0.5577E-02  0.6434     0.3330E-01  DJ
*ke3g      0.5000E+06  0.2252E-12  0.9167E-02  1.010      0.4374E-01  AK basic
*ke3g      0.5000E+06  0.9660E-13  0.5971E-02  0.4333     0.2600E-01  AK loose
*ke3g      0.5000E+06  0.8584E-13  0.6001E-02  0.3850     0.2458E-01  AK lominal
*ke3g      0.5000E+06  0.6648E-13  0.6836E-02  0.2982     0.2178E-01  AK tight
*ke3g      0.5000E+06  0.4169E-13  0.6559E-02  0.1870     0.1695E-01  AK tighter
*ke3g      0.5000E+06  0.3698E-13  0.6713E-02  0.1659     0.1618E-01  AK tightest
*ke4       0.5000E+06  0.3147E-10  0.6826E-01  2.071      1.182       MZ
*ke4       0.5000E+06  0.2092E-10  0.1194E-01  1.377      0.9338      DJ
*ke4       0.5000E+06  0.5507E-10  0.3290E-01  3.625      1.449       AK basic
*ke4       0.5000E+06  0.3554E-10  0.3223E-01  2.339      1.197       AK loose
*ke4       0.5000E+06  0.3548E-10  0.3639E-01  2.335      1.197       AK lominal
*ke4       0.5000E+06  0.2227E-10  0.3360E-01  1.466      0.9578      AK tight
*ke4       0.5000E+06  0.9770E-11  0.2255E-01  0.6431     0.6196      AK tighter
*ke4       0.5000E+06  0.9754E-11  0.2598E-01  0.6420     0.6196      AK tightest
*kcp3      0.5000E+06  0.4624E-14  0.2438E-01  0.7398     0.1440      MZ
*kcp3      0.5000E+06  0.1340E-13  0.1859E-01  2.145      0.1871      DJ
*kcp3      0.5000E+06  0.1752E-12  0.2544      28.03      0.8934      AK basic
*kcp3      0.5000E+06  0.1695E-13  0.3736E-01  2.712      0.2649      AK loose
*kcp3      0.5000E+06  0.1678E-13  0.4185E-01  2.685      0.2638      AK lominal
*kcp3      0.5000E+06  0.1034E-13  0.3791E-01  1.654      0.2078      AK tight
*kcp3      0.5000E+06  0.3716E-14  0.2085E-01  0.5945     0.1226      AK tighter
*kcp3      0.5000E+06  0.2818E-14  0.1824E-01  0.4508     0.1113      AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  10.13      4.028   2.997  1.191   MZ
bkgd  27.70      6.339   4.165  0.9529  DJ
bkgd  3.373      0.1771  32.67  1.703   AK basic
bkgd  13.23      2.960   5.484  1.226   AK loose
bkgd  11.87      2.694   5.405  1.226   AK lominal
bkgd  12.76      3.663   3.418  0.9803  AK tight
bkgd  20.01      8.880   1.425  0.6318  AK tighter
bkgd  19.63      9.824   1.259  0.6297  AK tightest
[snip]

infinite gate, DS wall thickness = 10 mg/cm^2
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1443.log

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1443.log 
Histogram file             ../ntuples/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1443.rzn 
Start time is Mon Aug 23 14:43:31 EDT 2004
Finish time is Mon Aug 23 14:59:06 EDT 2004
List of ntuples            725 Aug 23 14:20 five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     and DS window thickness= 10.0     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.800E+21)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]

 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.5000E+06  0.7960E-03  1.000       30.35      0.3706      MZ
kpnn       0.5000E+06  0.3026E-02  1.000       115.4      0.6984      DJ
kpnn       0.5000E+06  0.2890E-02  1.000       110.2      0.6958      AK basic
kpnn       0.5000E+06  0.1904E-02  1.000       72.57      0.5657      AK loose
kpnn       0.5000E+06  0.1683E-02  1.000       64.16      0.5322      AK lominal
kpnn       0.5000E+06  0.1144E-02  1.000       43.62      0.4386      AK tight
kpnn       0.5000E+06  0.7479E-03  1.000       28.51      0.3546      AK tighter
kpnn       0.5000E+06  0.6482E-03  1.000       24.71      0.3305      AK tightest
*ke3g      0.5000E+06  0.4329E-13  0.6400E-02  0.1942     0.1638E-01  MZ
*ke3g      0.5000E+06  0.1539E-12  0.5984E-02  0.6904     0.3680E-01  DJ
*ke3g      0.5000E+06  0.2382E-12  0.9699E-02  1.069      0.4666E-01  AK basic
*ke3g      0.5000E+06  0.1024E-12  0.6331E-02  0.4595     0.2843E-01  AK loose
*ke3g      0.5000E+06  0.9128E-13  0.6382E-02  0.4095     0.2710E-01  AK lominal
*ke3g      0.5000E+06  0.7065E-13  0.7264E-02  0.3169     0.2419E-01  AK tight
*ke3g      0.5000E+06  0.4398E-13  0.6919E-02  0.1973     0.1909E-01  AK tighter
*ke3g      0.5000E+06  0.3860E-13  0.7007E-02  0.1731     0.1790E-01  AK tightest
*ke4       0.5000E+06  0.3154E-10  0.6841E-01  2.076      1.182       MZ
*ke4       0.5000E+06  0.2103E-10  0.1200E-01  1.384      0.9338      DJ
*ke4       0.5000E+06  0.5656E-10  0.3379E-01  3.723      1.453       AK basic
*ke4       0.5000E+06  0.3564E-10  0.3232E-01  2.346      1.197       AK loose
*ke4       0.5000E+06  0.3556E-10  0.3648E-01  2.341      1.197       AK lominal
*ke4       0.5000E+06  0.2234E-10  0.3371E-01  1.470      0.9578      AK tight
*ke4       0.5000E+06  0.9804E-11  0.2263E-01  0.6453     0.6196      AK tighter
*ke4       0.5000E+06  0.9787E-11  0.2607E-01  0.6443     0.6196      AK tightest
*kcp3      0.5000E+06  0.9913E-14  0.5226E-01  1.586      0.3552      MZ
*kcp3      0.5000E+06  0.3819E-13  0.5296E-01  6.109      0.6240      DJ
*kcp3      0.5000E+06  0.3577E-12  0.5194      57.23      2.237       AK basic
*kcp3      0.5000E+06  0.3956E-13  0.8721E-01  6.329      0.8117      AK loose
*kcp3      0.5000E+06  0.3927E-13  0.9793E-01  6.283      0.8105      AK lominal
*kcp3      0.5000E+06  0.2326E-13  0.8529E-01  3.721      0.5638      AK tight
*kcp3      0.5000E+06  0.7150E-14  0.4012E-01  1.144      0.2516      AK tighter
*kcp3      0.5000E+06  0.4789E-14  0.3100E-01  0.7661     0.2125      AK tightest
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  7.869      2.522       3.856  1.235   MZ
bkgd  14.10      1.937       8.184  1.124   DJ
bkgd  1.777      0.7725E-01  62.02  2.668   AK basic
bkgd  7.945      1.260       9.134  1.446   AK loose
bkgd  7.103      1.138       9.034  1.446   AK lominal
bkgd  7.920      1.601       5.508  1.112   AK tight
bkgd  14.35      4.837       1.986  0.6690  AK tighter
bkgd  15.60      6.460       1.584  0.6552  AK tightest
[snip]

20 mg/cm^2 thick, infinite gates
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1501.log

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1501.log 
Histogram file             ../ntuples/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1501.rzn 
Start time is Mon Aug 23 15:01:07 EDT 2004
Finish time is Mon Aug 23 15:16:46 EDT 2004
List of ntuples            725 Aug 23 14:20 five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     and DS window thickness= 20.0     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.800E+21)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.5000E+06  0.7960E-03  1.000       30.35      0.3706      MZ
kpnn       0.5000E+06  0.3026E-02  1.000       115.4      0.6984      DJ
kpnn       0.5000E+06  0.2890E-02  1.000       110.2      0.6958      AK basic
kpnn       0.5000E+06  0.1904E-02  1.000       72.57      0.5657      AK loose
kpnn       0.5000E+06  0.1683E-02  1.000       64.16      0.5322      AK lominal
kpnn       0.5000E+06  0.1144E-02  1.000       43.62      0.4386      AK tight
kpnn       0.5000E+06  0.7479E-03  1.000       28.51      0.3546      AK tighter
kpnn       0.5000E+06  0.6482E-03  1.000       24.71      0.3305      AK tightest
*ke3g      0.5000E+06  0.4524E-13  0.6687E-02  0.2029     0.1773E-01  MZ
*ke3g      0.5000E+06  0.1644E-12  0.6391E-02  0.7373     0.4172E-01  DJ
*ke3g      0.5000E+06  0.2513E-12  0.1023E-01  1.127      0.5092E-01  AK basic
*ke3g      0.5000E+06  0.1083E-12  0.6692E-02  0.4857     0.3190E-01  AK loose
*ke3g      0.5000E+06  0.9672E-13  0.6762E-02  0.4339     0.3065E-01  AK lominal
*ke3g      0.5000E+06  0.7481E-13  0.7693E-02  0.3356     0.2757E-01  AK tight
*ke3g      0.5000E+06  0.4626E-13  0.7278E-02  0.2075     0.2205E-01  AK tighter
*ke3g      0.5000E+06  0.4022E-13  0.7301E-02  0.1804     0.2032E-01  AK tightest
*ke4       0.5000E+06  0.3161E-10  0.6857E-01  2.081      1.182       MZ
*ke4       0.5000E+06  0.2113E-10  0.1206E-01  1.391      0.9338      DJ
*ke4       0.5000E+06  0.5806E-10  0.3469E-01  3.822      1.462       AK basic
*ke4       0.5000E+06  0.3574E-10  0.3241E-01  2.352      1.197       AK loose
*ke4       0.5000E+06  0.3565E-10  0.3657E-01  2.346      1.197       AK lominal
*ke4       0.5000E+06  0.2240E-10  0.3381E-01  1.475      0.9578      AK tight
*ke4       0.5000E+06  0.9838E-11  0.2271E-01  0.6476     0.6196      AK tighter
*ke4       0.5000E+06  0.9821E-11  0.2616E-01  0.6465     0.6196      AK tightest
*kcp3      0.5000E+06  0.1711E-13  0.9022E-01  2.738      0.7110      MZ
*kcp3      0.5000E+06  0.7455E-13  0.1034      11.93      1.437       DJ
*kcp3      0.5000E+06  0.5969E-12  0.8667      95.49      4.587       AK basic
*kcp3      0.5000E+06  0.7191E-13  0.1585      11.50      1.830       AK loose
*kcp3      0.5000E+06  0.7150E-13  0.1783      11.44      1.829       AK lominal
*kcp3      0.5000E+06  0.4137E-13  0.1517      6.619      1.222       AK tight
*kcp3      0.5000E+06  0.1203E-13  0.6748E-01  1.924      0.5258      AK tighter
*kcp3      0.5000E+06  0.7947E-14  0.5146E-01  1.271      0.4693      AK tightest
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  6.043      1.662       5.022  1.380   MZ
bkgd  8.208      1.002       14.05  1.714   DJ
bkgd  1.097      0.5304E-01  100.4  4.815   AK basic
bkgd  5.060      0.7725      14.34  2.187   AK loose
bkgd  4.512      0.6946      14.22  2.186   AK lominal
bkgd  5.175      0.9550      8.429  1.553   AK tight
bkgd  10.26      3.004       2.779  0.8129  AK tighter
bkgd  11.78      4.366       2.098  0.7775  AK tightest
[snip]

30 mg/cm^2, infinite cpvetogate
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1523.log

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1523.log 
Histogram file             ../ntuples/anal.five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.230804.1523.rzn 
Start time is Mon Aug 23 15:23:39 EDT 2004
Finish time is Mon Aug 23 15:39:31 EDT 2004
List of ntuples            725 Aug 23 14:20 five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     and DS window thickness= 30.0     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-.400E+21 ,0.800E+21)
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.5000E+06  0.7960E-03  1.000       30.35      0.3706      MZ
kpnn       0.5000E+06  0.3026E-02  1.000       115.4      0.6984      DJ
kpnn       0.5000E+06  0.2890E-02  1.000       110.2      0.6958      AK basic
kpnn       0.5000E+06  0.1904E-02  1.000       72.57      0.5657      AK loose
kpnn       0.5000E+06  0.1683E-02  1.000       64.16      0.5322      AK lominal
kpnn       0.5000E+06  0.1144E-02  1.000       43.62      0.4386      AK tight
kpnn       0.5000E+06  0.7479E-03  1.000       28.51      0.3546      AK tighter
kpnn       0.5000E+06  0.6482E-03  1.000       24.71      0.3305      AK tightest
*ke3g      0.5000E+06  0.4718E-13  0.6974E-02  0.2116     0.1942E-01  MZ
*ke3g      0.5000E+06  0.1748E-12  0.6799E-02  0.7843     0.4761E-01  DJ
*ke3g      0.5000E+06  0.2644E-12  0.1076E-01  1.186      0.5622E-01  AK basic
*ke3g      0.5000E+06  0.1141E-12  0.7052E-02  0.5118     0.3609E-01  AK loose
*ke3g      0.5000E+06  0.1022E-12  0.7143E-02  0.4583     0.3491E-01  AK lominal
*ke3g      0.5000E+06  0.7898E-13  0.8121E-02  0.3543     0.3159E-01  AK tight
*ke3g      0.5000E+06  0.4854E-13  0.7637E-02  0.2178     0.2554E-01  AK tighter
*ke3g      0.5000E+06  0.4183E-13  0.7594E-02  0.1877     0.2321E-01  AK tightest
*ke4       0.5000E+06  0.3168E-10  0.6873E-01  2.086      1.182       MZ
*ke4       0.5000E+06  0.2124E-10  0.1212E-01  1.398      0.9338      DJ
*ke4       0.5000E+06  0.5956E-10  0.3558E-01  3.921      1.476       AK basic
*ke4       0.5000E+06  0.3584E-10  0.3250E-01  2.359      1.197       AK loose
*ke4       0.5000E+06  0.3573E-10  0.3666E-01  2.352      1.197       AK lominal
*ke4       0.5000E+06  0.2247E-10  0.3391E-01  1.479      0.9578      AK tight
*ke4       0.5000E+06  0.9872E-11  0.2279E-01  0.6498     0.6196      AK tighter
*ke4       0.5000E+06  0.9855E-11  0.2625E-01  0.6487     0.6196      AK tightest
*kcp3      0.5000E+06  0.2622E-13  0.1383      4.195      1.200       MZ
*kcp3      0.5000E+06  0.1225E-12  0.1699      19.59      2.602       DJ
*kcp3      0.5000E+06  0.8927E-12  1.296       142.8      7.874       AK basic
*kcp3      0.5000E+06  0.1140E-12  0.2513      18.24      3.286       AK loose
*kcp3      0.5000E+06  0.1135E-12  0.2829      18.15      3.285       AK lominal
*kcp3      0.5000E+06  0.6468E-13  0.2372      10.35      2.160       AK tight
*kcp3      0.5000E+06  0.1834E-13  0.1029      2.935      0.9276      AK tighter
*kcp3      0.5000E+06  0.1229E-13  0.7960E-01  1.967      0.8563      AK tightest
Key   N(Kpnn)/B  d(S/B)      Nev    dNeV
bkgd  4.674      1.214       6.493  1.684  MZ
bkgd  5.297      0.6734      21.78  2.765  DJ
bkgd  0.7448     0.4061E-01  147.9  8.012  AK basic
bkgd  3.438      0.5702      21.11  3.497  AK loose
bkgd  3.061      0.5110      20.96  3.496  AK lominal
bkgd  3.581      0.6955      12.18  2.363  AK tight
bkgd  7.498      2.202       3.802  1.116  AK tighter
bkgd  8.815      3.326       2.803  1.057  AK tightest
          Conversion probability    average weight
 Cut : Mode      kpnn      ke3g      ke4       kcp3
 MZ            0.607     0.594     0.605     0.622    
 DJ          0.622     0.619     0.619     0.631    
 AK basic      0.614     0.616     0.613     0.619    
 AK loose      0.614     0.610     0.611     0.615    
 AK lominal    0.614     0.612     0.610     0.614    
 AK tight      0.614     0.611     0.610     0.615    
 AK tighter    0.613     0.609     0.610     0.603    
 AK tightest   0.614     0.610     0.610     0.616    
          Veto inefficiency         average weight
 Cut : Mode      kpnn      ke3g      ke4       kcp3
 MZ             1.00     0.442E-04 0.325E-07 0.281E-08
 DJ           1.00     0.353E-04 0.812E-08 0.629E-09
 AK basic       1.00     0.403E-04 0.166E-07 0.266E-08
 AK loose       1.00     0.420E-04 0.177E-07 0.254E-08
 AK lominal     1.00     0.413E-04 0.188E-07 0.257E-08
 AK tight       1.00     0.425E-04 0.158E-07 0.217E-08
 AK tighter     1.00     0.403E-04 0.101E-07 0.159E-08
 AK tightest    1.00     0.396E-04 0.112E-07 0.120E-08
          Decay*Prod. weight        average weight
 Cut : Mode      kpnn      ke3g      ke4       kcp3
 MZ            0.901E-01 0.257E-05 0.903E-01 0.890E-01
 DJ          0.817E-01 0.260E-05 0.826E-01 0.687E-01
 AK basic      0.862E-01 0.262E-05 0.860E-01 0.839E-01
 AK loose      0.866E-01 0.262E-05 0.867E-01 0.793E-01
 AK lominal    0.867E-01 0.269E-05 0.867E-01 0.794E-01
 AK tight      0.867E-01 0.274E-05 0.868E-01 0.790E-01
 AK tighter    0.869E-01 0.267E-05 0.869E-01 0.778E-01
 AK tightest   0.870E-01 0.270E-05 0.868E-01 0.777E-01
          KL/n Prod. weight         average weight
 Cut : Mode      kpnn      ke3g      ke4       kcp3
 MZ            0.901E-01 0.910E-01 0.903E-01 0.890E-01
 DJ          0.817E-01 0.820E-01 0.826E-01 0.687E-01
 AK basic      0.862E-01 0.859E-01 0.860E-01 0.839E-01
 AK loose      0.866E-01 0.872E-01 0.867E-01 0.793E-01
 AK lominal    0.867E-01 0.874E-01 0.867E-01 0.794E-01
 AK tight      0.867E-01 0.874E-01 0.868E-01 0.790E-01
 AK tighter    0.869E-01 0.870E-01 0.869E-01 0.778E-01
 AK tightest   0.870E-01 0.872E-01 0.868E-01 0.777E-01

************************
Tue Aug 24 10:08:32 EDT 2004

last nite i advertantly deleted all files in source from a*.f to i*.f (j*.f thru z*.f were
unaffect cuz i control-c'ed). they were restored by rich horowitz to 
/tmp/e787u/djaffe/KOPIO/fastmc/source/ and I copied via
 cp /tmp/e787u/djaffe/KOPIO/fastmc/source/a*.f
  :
  :
 cp /tmp/e787u/djaffe/KOPIO/fastmc/source/h*.f

it appears that file acceptable.f did NOT get restored
all other files seem to be there. i remade fastmc.exe and checked for
existence of all files past acceptable.f in Makefile.anal

acceptable.f now restored. what got lost? nothing apparently. whew.

Paolo Rumiero reports a bug in smear.f for backward going photons.

source/smear.f				- modified "fix bug for backwards going photons"

test job
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51999.41.240804.1508.log
OK

source/Makefile				- modified "output is ../exe/fastmc.exe"

---------------------- some stats from Paolo
Date: Tue, 24 Aug 2004 15:50:51 -0500 (CDT)
From: Paolo Rumerio <rumerio@fnal.gov>
To: David E Jaffe <djaffe@bnlku5.phy.bnl.gov>
Subject: Re: new smear.f

David,
with the old smear.f for 10,000 generated Kpnn I had
8,411 events with  | Mgg-Mpi0 | < 30 MeV
with the new smear.f  that number goes to
8,413

Paolo
---------------------

need a bunch more ke3g to study bkgd

first clean up by removing all aspect4 files:
before
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb2             35550516  32593048   2957468  92% /u1
/dev/sda4             30637428  27448424   1632708  95% /home
after
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb2             35550516  28554768   6995748  81% /u1
/dev/sda4             30637428  25104432   3976700  87% /home

only charged modes in standard bunch of jobs:
% submit.standard.bunch.of.jobs.script
 submit.standard.bunch.of.jobs.script detector.21.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.21.dat.10.240804.1626.log

**********************************
Wed Aug 25 20:56:39 EDT 2004

standard bunch of jobs done, add them to aspect1.bryman.list
and make more

%  submit.standard.bunch.of.jobs.script detector.22.dat key 10 
 logfile is ../log/standard.bunch.of.jobs.detector.22.dat.10.250804.2101.log 

*************************
Fri Aug 27 17:04:46 EDT 2004

add results of standard bunch of jobs to aspect1.bryman.list and make more
_djaffe[25]% submit.standard.bunch.of.jobs.script
 submit.standard.bunch.of.jobs.script detector.22.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.22.dat.10.270804.1704.log

scripts/submit.standard.bunch.of.jobs.script		- modified "change njob to 30 for ke3g"

also run analysis job
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.270804.1706.log

********************************************
Mon Aug 30 09:29:46 EDT 2004

Dima discovers bug in get_pr_resolution and smear: returned angular resolution is the
resolution used to smear the tracks, either sigma of the narrow or wide gaussian, it should be the 
sigma of the narrow gaussian. he will fix <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.270804.1706.log 
Histogram file             ../ntuples/anal.aspect1.bryman.270804.1706.rzn 
Start time is Fri Aug 27 17:06:31 EDT 2004
Finish time is Sat Aug 28 12:01:32 EDT 2004
List of ntuples            9490 Aug 27 12:07 aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Charged particle veto gate in ns = (-4.00     , 16.0    )
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  199.90 Y=  199.90 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    199.89999    199.89999   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)   dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65       0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5       0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2       0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40       0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89       0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56       0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73       0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85       0.2138      AK tightest
*kpgg      0.3000E+06  0.3643E-10  0.2130E-02  0.6528E-01  0.2645E-01  MZ
*kpgg      0.3000E+06  0.1369E-09  0.2124E-02  0.2453      0.7810E-01  DJ
*kpgg      0.3000E+06  0.1404E-09  0.2283E-02  0.2516      0.5111E-01  AK basic
*kpgg      0.3000E+06  0.5620E-10  0.1391E-02  0.1007      0.2688E-01  AK loose
*kpgg      0.3000E+06  0.5252E-10  0.1473E-02  0.9410E-01  0.2688E-01  AK lominal
*kpgg      0.3000E+06  0.3910E-10  0.1608E-02  0.7005E-01  0.2646E-01  AK tight
*kpgg      0.3000E+06  0.3300E-10  0.2058E-02  0.5913E-01  0.2645E-01  AK tighter
*kpgg      0.3000E+06  0.3158E-10  0.2277E-02  0.5658E-01  0.2644E-01  AK tightest
*kp3       0.1200E+07  0.6153E-15  0.5370E-02  0.1646      0.1760E-01  MZ
*kp3       0.1200E+07  0.1076E-14  0.2494E-02  0.2880      0.2831E-01  DJ
*kp3       0.1200E+07  0.1995E-14  0.4842E-02  0.5336      0.7219E-01  AK basic
*kp3       0.1200E+07  0.8812E-15  0.3256E-02  0.2357      0.2200E-01  AK loose
*kp3       0.1200E+07  0.8806E-15  0.3687E-02  0.2355      0.2199E-01  AK lominal
*kp3       0.1200E+07  0.6946E-15  0.4265E-02  0.1858      0.2077E-01  AK tight
*kp3       0.1200E+07  0.5202E-15  0.4844E-02  0.1391      0.1818E-01  AK tighter
*kp3       0.1200E+07  0.4809E-15  0.5177E-02  0.1286      0.1791E-01  AK tightest
*kp2       0.1080E+08  0.1377E-11  0.5320E-01  1.630       0.4430E-01  MZ
*kp2       0.1080E+08  0.5326E-10  0.5463      63.07       1.565       DJ
*kp2       0.1080E+08  0.6510E-10  0.6997      77.10       2.915       AK basic
*kp2       0.1080E+08  0.2745E-10  0.4491      32.52       1.905       AK loose
*kp2       0.1080E+08  0.1614E-10  0.2992      19.12       1.742       AK lominal
*kp2       0.1080E+08  0.5426E-11  0.1475      6.427       0.7626      AK tight
*kp2       0.1080E+08  0.1077E-11  0.4439E-01  1.275       0.7949E-01  AK tighter
*kp2       0.1080E+08  0.7648E-12  0.3645E-01  0.9057      0.4255E-01  AK tightest
*ke4       0.6700E+07  0.4322E-10  0.9283E-01  2.845       1.200       MZ
*ke4       0.6700E+07  0.7158E-10  0.4081E-01  4.712       2.047       DJ
*ke4       0.6700E+07  0.8408E-10  0.5022E-01  5.535       1.742       AK basic
*ke4       0.6700E+07  0.6078E-10  0.5526E-01  4.001       1.556       AK loose
*ke4       0.6700E+07  0.5756E-10  0.5931E-01  3.789       1.552       AK lominal
*ke4       0.6700E+07  0.5262E-10  0.7951E-01  3.464       1.549       AK tight
*ke4       0.6700E+07  0.2739E-10  0.6277E-01  1.803       0.9179      AK tighter
*ke4       0.6700E+07  0.2616E-10  0.6930E-01  1.722       0.9161      AK tightest
*ke3g      0.4900E+07  0.1685E-10  2.467       75.60       13.47       MZ
*ke3g      0.4900E+07  0.2174E-10  0.8449      97.54       15.14       DJ
*ke3g      0.4900E+07  0.4922E-10  2.004       220.8       21.85       AK basic
*ke3g      0.4900E+07  0.2454E-10  1.520       110.1       15.63       AK loose
*ke3g      0.4900E+07  0.2415E-10  1.695       108.3       15.59       AK lominal
*ke3g      0.4900E+07  0.1843E-10  1.898       82.67       13.38       AK tight
*ke3g      0.4900E+07  0.1492E-10  2.330       66.95       12.21       AK tighter
*ke3g      0.4900E+07  0.1318E-10  2.380       59.13       11.48       AK tightest
*kcp3      0.6700E+07  0.1191E-07  0.6217E+05  0.1906E+07  0.1905E+07  MZ
*kcp3      0.6700E+07  0.1346E-12  0.1865      21.54       19.30       DJ
*kcp3      0.6700E+07  0.1193E-07  0.1732E+05  0.1909E+07  0.1905E+07  AK basic
*kcp3      0.6700E+07  0.1191E-07  0.2632E+05  0.1906E+07  0.1905E+07  AK loose
*kcp3      0.6700E+07  0.1191E-07  0.2983E+05  0.1906E+07  0.1905E+07  AK lominal
*kcp3      0.6700E+07  0.1191E-07  0.4374E+05  0.1906E+07  0.1905E+07  AK tight
*kcp3      0.6700E+07  0.1191E-07  0.6633E+05  0.1905E+07  0.1905E+07  AK tighter
*kcp3      0.6700E+07  0.1191E-07  0.7669E+05  0.1905E+07  0.1905E+07  AK tightest
Key   N(Kpnn)/B   d(S/B)      Nev         dNeV
bkgd  0.1608E-04  0.1608E-04  0.1906E+07  0.1905E+07  MZ
bkgd  0.6161      0.8112E-01  187.4       24.66       DJ
bkgd  0.5772E-04  0.5760E-04  0.1909E+07  0.1905E+07  AK basic
bkgd  0.3798E-04  0.3797E-04  0.1906E+07  0.1905E+07  AK loose
bkgd  0.3352E-04  0.3350E-04  0.1906E+07  0.1905E+07  AK lominal
bkgd  0.2286E-04  0.2286E-04  0.1906E+07  0.1905E+07  AK tight
bkgd  0.1508E-04  0.1508E-04  0.1906E+07  0.1905E+07  AK tighter
bkgd  0.1304E-04  0.1304E-04  0.1906E+07  0.1905E+07  AK tightest

investigate the background sources, look at high weight events:

kpgg

 EVTwt=0.1020E-04   PrecK=  421.4 ZrecK= 1248.7 event=   6769
		    Ptrue   420          1246
101 MeV gamma from KL into US hole, other 131MeV gamma hits PR

kp2:

 EVTwt=0.3792E-05  PrecK=  595.2 ZrecK= 1262.2 event=  73757
			      572          1187
KL -> pi01,pi02; pi01 -> g1,e+,e-; pi02 -> g3,g4
candidate g1,g4
Thit e+ = -4.05ns OUTSIDE GATE due to mis-recon ZK. both e+e- hit US wall
Thit e- = a-4.46ns OUTSIDE GATE
g3 hits PR

 EVTwt=0.3277E-05 PrecK=  995.7 ZrecK= 1240.1 event= 100356
                         1001          1221
Kp2-even E* =229.7, E1*=91.45, E2*=138.3
82MeV g1 into US hole
93MeV g2 into BV

EVTwt=0.4786E-05 PrecK= 2009.4 ZrecK= 1176.9 event=  26078
                        1806          1172
kp2-even E*=226.6 Emiss=410
46MeV g3 into BV
164 MeV g4 into catcher

EVTwt=0.8046E-05 PrecK=  566.5 ZrecK= 1093.5 event= 107095
			 547          1054
Kp2-even E*=228.7 Emiss=277
g3 43MeV into US hole
g4 173MeV into BV

 EVTwt=0.4267E-05  PrecK=  768.4 ZrecK= 1146.6 event=  83487
			 761.02		 1126.26
Kp2-even E*=228.2 Emiss=263
153MeV g3 into BV
39MeV g4 into US hole

ke4:
 EVTwt=0.1687E-03   PrecK=  534.7 ZrecK= 1153.8 event=  22982
3.3MeV pi- DIF, 6.3MeV mu+, thit=21ns
3.2MeV e+ into BV

 EVTwt=0.7796E-04  PrecK=  668.0 ZrecK= 1223.6 event=  23203
			 669.72		 1222.84
10.4MeV pi- DIF, 7.5MeV mu- Thit=18.8ns
7.1MeV e+ into BV

 EVTwt=0.9152E-04 PrecK=  435.4 ZrecK= 1272.6 event=  35069
			  435.92	 1266.91	Emiss=251 E*=210
3.7MeVpi-, Thit=25.8ns
6.8MeV e+ into UV

ke3g:
 EVTwt=0.1998E-05 PrecK=  637.5 ZrecK= 1204.6 event=    133
			 640.49		 1224.36
3.2MeV pi- DIF, 6.4MeV mu-, Thit=37.2ns
consider overlapping photons for ke3g??

 EVTwt=0.1159E-05 PrecK=  895.9 ZrecK= 1206.2 event=   2242
			 908.59		 1187.12
16MeV pi- DIF, 6.4MeV mu-, Thit=19.5ns

 EVTwt=0.4329E-05 PrecK=  466.8 ZrecK= 1154.1 event=   4021
			 468.09		 1154.79
3.2MeV pi- DIF, 4.9MeV mu-, Thit=28.9ns

 EVTwt=0.5726E-05 PrecK=  448.7 ZrecK= 1307.7 event=   3600
			 445.51		 1298.96
9.7MeV pi-, Thit=18.1ns

 EVTwt=0.3344E-05 PrecK=  631.9 ZrecK= 1135.5 event=   2210
			 625.02		 1113.78
14.1MeV pi- DIF, 2.5MeV mu-, thit=19ns

 EVTwt=0.1253E-05 PrecK= 1015.1 ZrecK= 1108.7 event=   5074
			  981.66	 1081.21
17.4MeV pi- DIF, 18.2MeV mu- DIF, 52MeV e- Thit = 17.4ns
this looks like a bug, here is the full event:

../ntuples/ke3g.91083.141.rzn.ntskim
 SELECT_SIGNAL:Ntrack= 12 Nrecon=  1 irec=  1 icut=  4 AKcut= -2 EVTwt=0.1253E-05 CPwt=0.6325     VEwt= 1.000     DKwt=0.1981E-05 PrecK= 1015.1 ZrecK= 1108.7 event=   5074
 SELECT_SIGNAL:     Mgg        E1*        E2*       Epi*         E1         E2      Mmiss      Emiss       DOCA      T1-T2
 SELECT_SIGNAL:  133.8      102.6      101.1      203.8      388.6      352.6      251.2      389.3     0.7705E-04 0.3815E-05
 SELECT_SIGNAL:Track#      1          2          3          4          5          6          7          8          9         10         11         12
 LastVol, LastPlane   2 6        2 2        2 6        4 6        4 6        4 6        4 6        6 1        2 2        6 2        6 3        6 1
 SELECT_SIGNAL:PathLn -1.000     -1.000     -1.000      105.0      101.5      122.8      102.5     -1.000     -1.000      111.5     -1.000     -1.000
 SELECT_SIGNAL:PV(E)  0.2500E-04 0.1063E-03 0.2815E-04 0.7978E-04 0.2594E-04 0.6341     0.2832E-04 0.1535E-03 0.5260E-02 0.2006E-02 0.5930E-02 0.3700E-02
 SELECT_SIGNAL:KAMIPV 0.3000E-05 0.5083E-04 0.1405E-04 0.4044E-04 0.1295E-04 0.2500     0.1413E-04 0.7254E-04 0.5242E-03 0.2603E-03 0.5883E-03 0.3904E-03
 SELECT_SIGNAL:PVE787 0.2500E-04 0.1974E-03 0.2909E-04 0.1259E-03 0.2620E-04 0.7963     0.2930E-04 0.3512E-03 0.2204E-01 0.5335E-02 0.2922E-01 0.9839E-02
 SELECT_SIGNAL:Edeath  1100.61     157.00     370.02     182.86     388.02       1.98     351.93     123.87      33.14      52.85      30.69      40.33
 SELECT_SIGNAL:Ebirth  1100.61     157.00     370.02     182.86     390.72       1.98     368.56     123.87      33.14      52.85      30.69      40.33
 SELECT_SIGNAL:Pdeath   981.66      71.91     370.02     182.86     388.02       1.98     351.93      64.65      33.14      52.85      30.69      40.33
 SELECT_SIGNAL: KE      602.94      17.43     369.51     182.86     388.02       1.98     351.93      18.21      33.14      52.34      30.69      40.33
 SELECT_SIGNAL:Xdeath    16.97      49.15     -31.42     180.46      -0.14     102.98     -33.98     153.25     200.00     200.00     161.00     144.69
 SELECT_SIGNAL:Ydeath    -2.42     -13.82     -52.23      11.71      52.10    -100.20     -56.85      35.81     -98.79      41.83     -50.00      50.00
 SELECT_SIGNAL:Zdeath  1081.21    1135.76    1395.00    1595.00    1415.00    1595.00    1415.00    2060.60    1118.97    2156.39    2057.64    2068.75
   Fate, Parent Type  1 0  K0L   1 1   pi-  3 1    e+  2 1   nu   2 1 gamm   2 3 gamm   2 3 gamm   1 2   mu-  2 2   nu   2 8    e-  2 8   nu   2 8   nu
 SELECT_SIGNAL:Weight 0.8797E-01  1.000     0.5209E-02  1.000      1.000      1.000      1.000      1.000      1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  WT = 0.8797E-01  1.000     0.2252E-04  1.000      1.000      1.000      1.000      1.000      1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  CP =  1.000      1.000      1.000      1.000     0.7937     0.8521     0.7969      1.000      1.000      1.000      1.000      1.000
 SELECT_SIGNAL:  VE =  1.000      1.000      1.000      1.000     0.2181E-04  1.000     0.2424E-04  1.000      1.000      1.000      1.000      1.000
 SELECT_SIGNAL:Thit =  0.000      0.000      0.000      0.000      0.000      0.000      0.000      0.000      0.000      17.42      0.000      0.000
 SELECT_SIGNAL:EffRec 0.1253E-05
 SELECT_SIGNAL:RecItk   5   7

note mu-,e- are way DS of z=1615cm, should be pi- that is considered as CPV hit.

 EVTwt=0.1357E-05 PK=  815.4 ZrecK= 1282.0 event=   4684
			 815.23	 1270.64
6.1MeV pi- Thit=23ns

 EVTwt=0.4175E-05 PrecK=  419.8 ZrecK= 1323.7 event=   2557
			  423.66	 1339.57
  3.36MeV pi-, thit=47ns

 EVTwt=0.1531E-05 PrecK=  808.1 ZrecK= 1201.1 event=   3489
			 810.98		 1177.11
11MeV pi- DIF, 2.2MeV mu-, Thit=26ns

 EVTwt=0.1329E-05 PrecK=  790.1 ZrecK= 1126.0 event=   1270
			 789.68		 1135.61
8MeV pi- DIF, 12MeV mu-, Thit=22ns

 EVTwt=0.1800E-05 PrecK=  578.1 ZrecK= 1130.5 event=   4038
			  581.39	 1145.24
1.6MeV pi- DIF, 7.3MeV mu-, Thit=22.7ns

 EVTwt=0.4161E-05 PrecK=  444.6 ZrecK= 1187.3 event=    735
			 450.49		 1192.99
2.6MeV pi- DIF, 5.3MeV mu-, 33ns

 EVTwt=0.1432E-05 PrecK=  935.6 ZrecK= 1342.8 event=   2700
			 880.74		 1107.63
270MeV pi-, Thit=-4.8ns

 categorize remaining(previous) ke3g:
late pi- 9 + (3) = 12
late mu- 22 + (8)= 30
late e-  0 + (1) =  1
misrecon ZK (1)  =  1

kc3p:
 EVTwt=0.8082E-06 CPwt=0.6741     VEwt=0.1000E-04 DKwt=0.1199     PrecK=  450.4 ZrecK= 1224.3 event=  15758
Emiss =  262.0
4.2MeV pi- Thit=18.5ns
19MeV pi+ DIF, 7MeV mu+ Thit=6.9ns

debug event 5074 of ../ntuples/ke3g.91083.141.rzn.ntskim

source/getcandwt.f				- modified "modify debug output"

no bug found by 5074, routine simply assigns hit time to last particle in
decay chain, event if parent (or grandparent) actually produced the hit.

summarize hi wt event results for /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.270804.1706.log 

kpgg: 1evt: g into US hole

kp2: 1 kp2-odd dalitz decay and mis-recon ZK
     4 kp2-even : 1 with g into catcher
                  3 with g into US hole

ke4: 3 events: 1 slow pi-
               2 pi- DIF

ke3g: 44 events
      12 slow pi-
      31 pi- DIF
       1 misrecon ZK

kcp3: 1 slow pi-

Mnu2 cut at <0 (MeV/c^2)^2 looks like it would be very effective against
kcp3, ke3g. less effective against ke4

pve787.kumac				- modified "add more plot options"

Mnu2-dependent gate, move CPV to 100 x 50 cm (halfwidths)
% analysis.script kpnn.ke4.ke3g.kcp3.aspect1.bryman.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke4.ke3g.kcp3.aspect1.bryman.300804.1638.log

oops, cant' have 100 x 50 cm in decay region cuz:
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    100.00000     50.00000   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe

try again:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke4.ke3g.kcp3.aspect1.bryman.300804.1643.log

************************************************
Tue Aug 31 09:19:56 EDT 2004

Log file name is  /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke4.ke3g.kcp3.aspect1.bryman.300804.1643.log 
Histogram file             ../ntuples/anal.kpnn.ke4.ke3g.kcp3.aspect1.bryman.300804.1643.rzn 
Start time is Mon Aug 30 16:43:06 EDT 2004
Finish time is Mon Aug 30 19:36:17 EDT 2004
List of ntuples            8899 Aug 30 16:38 kpnn.ke4.ke3g.kcp3.aspect1.bryman.list 
  Updated Akira OFFLINE fcn being used
  Using CV model 3 with PV boost
  Using CV model 3 with CV wrapper thickness= 1.00     mg/cm^2, Energy threshold=0.500E-01 MeV
  Using CV model 3 with OPTIMISTIC INEFFYS
  Use Mnu2-dependent CPVetoGate width = (tlo,thi) ns defined as follows
  If Mnu2 < -.8000E+05 , then tlo= -2.000     , thi=  8.000    
  If Mnu2 > -.2000E+05 , then tlo= -4.000     , thi=  20.00    
  If  -.8000E+05  < Mnu2 <  -.2000E+05 , then tlo= -4.000     , thi is calculated by linear interp. btwn t=  8.000      at Mnu2= -.8000E+05  and t=  20.00      at Mnu2= -.2000E+05
  Use beta=1 for chgd tracks for evaluating CPV ineffy
  Process ONLY 2g fits
  Using AvdS photon veto with threshold= 3.000 MeV and exponent= 1.800
  Use energy-dependent ineffy catcher model 1
  Use charge veto approximation for annihilating e+
  Allow vetoes thru US beam pipe in US wall. Thickness(US veto)=  80.00 X0(US veto)=  17.12 RL(US veto) in cm=   4.67
  Require cos(Glo,Ghi) < 0.940 to veto on lower energy gamma from e+ annihilation
  Supplement Zeller cuts with Konaka wrap-around cuts
  Supplement Zeller cuts with Konaka slow Kpi3 cuts
  Remove upper P(K) cuts from MZ and AK cuts
  Vacuum vessel radius= 115.00 Z(US endplate)=1025.00 Z(DS endplate)=1414.00
   1090.00 < Z(recon K0L) < 1365.00
  X_0(PR)=  50.0 N(rad.lens in PR)=   2.0
[snip]
 PositionAtCV: Limits of new CV in decay region: X=  111.00 Y=   50.00 . Z(D4)= 1615.00 used as approximation of CV in D4 magnet
 X halfwidth  Y halfwidth  Z at US end  Z at DS end  Volume name
    111.00000     50.00000   1015.00000   1415.00000 New CV in decay region
    110.25000     11.55000   1415.00000   1615.00000 CV in DS pipe to D4 magnet
     65.00000      5.00000    935.00000   1015.00000 CV in US pipe
 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000    
Mode        Generated   Effy(wt)    N/N(Kpnn)   Nev(mode)  dNeV(mode)  Who
kpnn       0.1200E+07  0.8040E-03  1.000       30.65      0.2406      MZ
kpnn       0.1200E+07  0.3028E-02  1.000       115.5      0.4506      DJ
kpnn       0.1200E+07  0.2891E-02  1.000       110.2      0.4491      AK basic
kpnn       0.1200E+07  0.1899E-02  1.000       72.40      0.3644      AK loose
kpnn       0.1200E+07  0.1676E-02  1.000       63.89      0.3424      AK lominal
kpnn       0.1200E+07  0.1143E-02  1.000       43.56      0.2827      AK tight
kpnn       0.1200E+07  0.7536E-03  1.000       28.73      0.2297      AK tighter
kpnn       0.1200E+07  0.6518E-03  1.000       24.85      0.2138      AK tightest
*ke4       0.7700E+07  0.1584E-10  0.3403E-01  1.043      0.2038      MZ
*ke4       0.7700E+07  0.1752E-10  0.9989E-02  1.153      0.2078      DJ
*ke4       0.7700E+07  0.5065E-10  0.3025E-01  3.334      1.120       AK basic
*ke4       0.7700E+07  0.4116E-10  0.3742E-01  2.709      1.110       AK loose
*ke4       0.7700E+07  0.3845E-10  0.3961E-01  2.531      1.105       AK lominal
*ke4       0.7700E+07  0.3468E-10  0.5240E-01  2.283      1.101       AK tight
*ke4       0.7700E+07  0.1230E-10  0.2818E-01  0.8095     0.1779      AK tighter
*ke4       0.7700E+07  0.1063E-10  0.2815E-01  0.6994     0.1637      AK tightest
*ke3g      0.7800E+07  0.1702E-11  0.2490      7.633      3.490       MZ
*ke3g      0.7800E+07  0.6074E-11  0.2360      27.25      5.907       DJ
*ke3g      0.7800E+07  0.5671E-11  0.2308      25.44      5.211       AK basic
*ke3g      0.7800E+07  0.2795E-11  0.1732      12.54      3.944       AK loose
*ke3g      0.7800E+07  0.2373E-11  0.1666      10.65      3.758       AK lominal
*ke3g      0.7800E+07  0.2092E-11  0.2154      9.384      3.692       AK tight
*ke3g      0.7800E+07  0.1794E-11  0.2801      8.048      3.587       AK tighter
*ke3g      0.7800E+07  0.1583E-11  0.2857      7.099      3.466       AK tightest
*kcp3      0.7700E+07  0.6876E-14  0.3589E-01  1.100      0.1727      MZ
*kcp3      0.7700E+07  0.1403E-13  0.1944E-01  2.245      0.1681      DJ
*kcp3      0.7700E+07  0.2146E-11  3.115       343.3      143.0       AK basic
*kcp3      0.7700E+07  0.2276E-13  0.5030E-01  3.642      0.3001      AK loose
*kcp3      0.7700E+07  0.2273E-13  0.5693E-01  3.637      0.3001      AK lominal
*kcp3      0.7700E+07  0.1467E-13  0.5389E-01  2.348      0.2959      AK tight
*kcp3      0.7700E+07  0.6343E-14  0.3532E-01  1.015      0.1724      AK tighter
*kcp3      0.7700E+07  0.4540E-14  0.2923E-01  0.7263     0.1708      AK tightest
Key   N(Kpnn)/B  d(S/B)  Nev    dNeV
bkgd  3.135      1.123   9.776  3.500  MZ
bkgd  3.767      0.7270  30.65  5.913  DJ
bkgd  0.2962     0.1139  372.1  143.1  AK basic
bkgd  3.833      0.8338  18.89  4.108  AK loose
bkgd  3.800      0.8879  16.81  3.928  AK lominal
bkgd  3.109      0.8574  14.01  3.864  AK tight
bkgd  2.910      1.060   9.872  3.596  AK tighter
bkgd  2.915      1.188   8.525  3.474  AK tightest
[snip]
 GETNGEN ERROR: database does not contain ../ntuples/ke3g.91120.141.rzn.ntskim                                                                                    
GETNGEN error did not bias analysis since ntuple-making wasn't completed
and ntuple could not be read. so only a loss of stats

analysis of hi wt events

ke4 : none
kcp3: none

ke3g :
slow pi- 1
slow mu- 4
misrecon KL 13 (12 pi- & 1 mu-)
total weight 2.9495e-5
slow weights 0.1345E-05 +0.1433E-05 +0.1998E-05 +0.2149E-05 +0.4926E-05 = 1.1851e-5 (40.2% of wegights)
misrecon weights = 1.7644 (59.8% of weights)

*****************************************
Thu Sep  2 15:32:46 EDT 2004

Dima sent new code for expanding ntuple to include uncertainties
on fitted quantities as well as some quantities from the first fit.

create
/e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima
and park stuff there.

here is list of modified and new routines from Dima:
source/fitpi0.f					- modified "Dima's mods for new ntuple variables and some fixes"
source/recon.f					- modified "Dima's mods for new ntuple variables and some fixes"
source/userinit.f				- modified "Dima's mods for new ntuple variables and some fixes"
source/reconinfo.inc				- modified "Dima's mods for new ntuple variables and some fixes"
source/get_pr_resolution.f			- modified "Dima's mods for new ntuple variables and some fixes"
source/smear.f					- modified "Dima's mods for new ntuple variables and some fixes"
source/trackinfo.inc				- modified "Dima's mods for new ntuple variables and some fixes"
source/Makefile					- modified "add  kinfun kinerpropg kineraid from Dima"

source/kinerpropg.f				- new "Dima's additions for new ntuple variables"
source/kinfun.f					- new "Dima's additions for new ntuple variables"	
source/kineraid.f				- new "Dima's additions for new ntuple variables"
source/fitpi0.inc				- new "Dima's additions for new ntuple variables"

no burnt bridges, in source/
% cp fitpi0.f fitpi0.f.before.Dima
% cp recon.f recon.f.before.Dima
% cp userinit.f userinit.f.before.Dima
% cp reconinfo.inc reconinfo.inc.before.Dima
% cp get_pr_resolution.f get_pr_resolution.f.before.Dima
% cp smear.f smear.f.before.Dima
% cp trackinfo.inc trackinfo.inc.before.Dima
% cp Makefile Makefile.before.Dima

note that I've made mods to smear.f also <<<<<<

some questions for Dima:
fitpi0.f - stop statements: array bounds check
get_pr_resolution.f - ok
recon.f - why only fit errors calculated for 2gPR fits? can be done for all fits, later, if needed
smear.f - ok
userinit.f - how about Recon2 for new block? NO, Need Nrecon in new block.
reconinfo.f - ok
trackinfo.f - ok

'play' -> 'thrown'

% cp  /e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima/*.inc .
% cp /e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima/*.f .

added my modifs to smear.f

Paolo found another bug related to backwards-going photons.
The bug is in s/r XPAR.

source/xpar.f					- modified "add arg to fix bug for backward-going photon"
source/recon.f					- modified "add SignOfPz to fix bug for backward-going photon"

test job:
% run.fastmc.script kpnn 1 10000 11999 0 4 1 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.020904.1837.log

got nan pbs

******************************************************
Fri Sep  3 08:54:17 EDT 2004

added some temp debug to fitpi0 to find nan

source/fitpi0.f				- modified "TEMPORARY Look for NAN"
source/transfer2_1.f			- modified "TEMPORARY Look for NAN"

found nan in reccov1

**********************************************
Tue Sep  7 13:20:39 EDT 2004

after long discussion with Dima, Paolo, decide that only way to
solve ambiguity in transformation is to use polar coordinates so

OLD: E,t,x,y,z,Txz,Tyz
NEW: E,t,x,y,z,theta,phi
    or is it better to use cos(theta) instead of theta?

backup all code before making modifications:
% cp -Rv source /u1/djaffe/KOPIO/fastmc/beforeThetaPhi/.

list all files that use Txz,Tyz
% grep -i -E 'txz|tyz' source/*.f source/*.inc source/*.cmn | awk -F: '{print $1}' | sort | uniq
source/cfun_1g.f DONE
source/cfun.f	DONE
source/detector.f NO MOD NEEDED
source/fitpi0.f	NO MOD NEEDED
source/fitpi0.inc	NO MOD NEEDED
source/get_pr_resolution.f   NO MOD NEEDED
source/init.f   NO MOD NEEDED
source/recon.f DONE
source/rhistory.f  NO MOD NEEDED
source/smear.f DONE
source/smear.inc  NO MOD NEEDED
source/trackinfo.inc  NO MOD NEEDED
source/try.f  NO MOD NEEDED
source/userinit.f  NO MOD NEEDED
source/xpar.f DONE

save ntuple from last job for comparison after changes.
% mv ../localntuples/kpnn.11999.41.rzn.gz ../localntuples/kpnn.11999.41.before.theta.phi.rzn.gz
logfile: /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.030904.0943.log

after some more discussion, we realize that current parametrization can still be
used if Z(K) is taken into account.

source/cfun.f				- modified "resolve sign ambiguity in Txz,Tyz using z(hit),z(k)"
source/recon.f				- modified "resolve sign ambiguity in Txz,Tyz using z(hit),z(k)"

test, use same random seeds as before:
% run.fastmc.script kpnn 1 10000 11999 0 4 1 detector.dat default.decay.dat 1.1 0&
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.070904.1639.log
oops, wrong sign used in cfun, try again
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.070904.1649.log

OK, no NANs now, but is everything calculated correctly?
check tomorrow...

************************************
8sept04

added 3 new files from Hideki:
DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.1-10mev.dat			- new "catcher ineffy files"
DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.10-100mev.dat			- new "catcher ineffy files"
DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.100-1000mev.dat			- new "catcher ineffy files"

study of latest ntuple shows some events where px(rec) = -px(true), etc for all components.
  idnevt=       189
  Xtrue=   18.2   -3.2 1415.0   18.8   -3.6 1415.0 Ptrue=   38.3  -95.4  800.2  -50.6   10.5  180.9
  Xreco=   18.3   -3.0 1415.0   18.6   -3.2 1415.0 Preco=  -37.9   95.0 -797.6   47.9   -9.2 -178.9
  Ktrue=   19.5   -3.3 1413.0   16.1   -2.6 1087.7
  Kreco=   18.3   -3.1 1416.1   14.5   -2.5 1122.7

here is same event from original fit kpnn.11999.41.before.theta.phi
  idnevt=       189
  Xtrue=   18.2   -3.2 1415.0   18.8   -3.6 1415.0 Ptrue=   38.3  -95.4  800.2  -50.6   10.5  180.9
  Xreco=   18.3   -3.0 1415.0   18.6   -3.2 1415.0 Preco=   37.9  -95.0  797.6  -47.9    9.2  178.9
  Ktrue=   19.5   -3.3 1413.0   16.1   -2.6 1087.7
  Kreco=   18.3   -3.1 1416.1   14.4   -2.5 1112.8

I note that other events in latest ntuple with this problem all have Z(K) near 1415cm
and ZKrec>1415

Paolo suggests using information about where the hit occurred. this will solve
the problem.

source/hitinfo.inc			- new "info on where photon 'converted'"

test
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1523.log

add more debug
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1545.log

 RECON:gamma1. itk=  5 P=  38.3     -95.4      800.      807.     X=  18.2     -3.16     0.142E+04 T= 51.5
 RECON:gamma2. itk=  6 P= -50.6      10.5      181.      188.     X=  18.8     -3.61     0.142E+04 T= 51.9
[snip]
 XPAR in1 : E=  806.8 T=   51.7 x=   18.3 y=   -3.0 z= 1415.0 Txz=    0.0 Tyz=   -0.1
 XPARout1 : Px=  -38.3 Py=   95.4 Pz= -800.2 E=  806.8 x=   18.3 y=   -3.0 z= 1415.0 T=   51.7
 XPAR in2 : E=  188.2 T=   51.7 x=   18.6 y=   -3.2 z= 1415.0 Txz=   -0.3 Tyz=    0.1
 XPARout2 : Px=  -50.6 Py=   10.6 Pz=  180.9 E=  188.2 x=   18.6 y=   -3.2 z= 1415.0 T=   51.7
 XPAR in1 : E=  804.1 T=   51.7 x=   18.3 y=   -3.0 z= 1415.0 Txz=    0.0 Tyz=   -0.1
 XPARout1 : Px=  -37.9 Py=   95.0 Pz= -797.6 E=  804.1 x=   18.3 y=   -3.0 z= 1415.0 T=   51.7
 XPAR in2 : E=  185.5 T=   51.7 x=   18.6 y=   -3.2 z= 1415.0 Txz=   -0.3 Tyz=    0.1
 XPARout2 : Px=  -47.9 Py=    9.2 Pz=  178.9 E=  185.5 x=   18.6 y=   -3.2 z= 1415.0 T=   51.7

increase debug level:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1550.log

more debug in cfun:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1557.log

at final step in minimization:
 CFUN:in PAR=  804.      51.7      18.3     -3.00     0.142E+04 0.475E-01 -.119      185.      51.7      18.6     -3.19     0.141E+04 -.268     0.516E-01 -3.13      18.3     0.142E+04  51.7
 CFUN:P1=  37.9     -95.0      798.     P2= -47.9      9.23      179.
 CFUN:out IERR= 0 constraint# 7 CFUN=-.4302E-04

in Recon:
 XPAR in1 : E=  804.1 T=   51.7 x=   18.3 y=   -3.0 z= 1415.0 Txz=    0.0 Tyz=   -0.1
 XPARout1 : Px=  -37.9 Py=   95.0 Pz= -797.6 E=  804.1 x=   18.3 y=   -3.0 z= 1415.0 T=   51.7
 XPAR in2 : E=  185.5 T=   51.7 x=   18.6 y=   -3.2 z= 1415.0 Txz=   -0.3 Tyz=    0.1
 XPARout2 : Px=  -47.9 Py=    9.2 Pz=  178.9 E=  185.5 x=   18.6 y=   -3.2 z= 1415.0 T=   51.7

sign of Px differs between minimization and recon for 1st photon

source/xpar.f				- modified "add debug"

again:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1633.log

more debug in recon:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1635.log

typo in recon!!! fixed
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1637.log

new puzzle:

original event  kpnn.11999.41.before.theta.phi.rzn
  idnevt=      3049
  Xtrue=  200.4  100.6 1365.0   86.0   47.6 1415.0 Ptrue=  136.6   96.5  295.0   40.4   48.3  338.9
  Xreco=  200.3  100.6 1365.0   86.1   47.6 1415.0 Preco=  146.8  100.3  302.6   32.9   47.4  352.4
  Ktrue=   57.0   -1.1 1061.6   52.6   -1.0  933.1
  Kreco=   53.1    0.0 1061.4   46.2    0.0  923.2

now kpnn.11999.41.rzn
  idnevt=      3049
  Xtrue=  200.4  100.6 1365.0   86.0   47.6 1415.0 Ptrue=  136.6   96.5  295.0   40.4   48.3  338.9
  Xreco=  200.3  100.7 1365.0   86.1   47.6 1415.0 Preco=   36.5   24.3   76.4    5.2    6.6   50.2
  Ktrue=   57.0   -1.1 1061.6   52.6   -1.0  933.1
  Kreco=   48.3   -0.6 1046.5   42.3   -0.5  916.5

source/recon.f				- modified "TEMPORARY DEBUG OUTPUT"

check
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1650.log
before fit
 RECON:gamma1. itk=  5 P=  137.      96.5      295.      339.     X=  200.      101.     0.136E+04 T= 51.9     HitPR=F
 RECON:gamma2. itk=  6 P=  40.4      48.3      339.      345.     X=  86.0      47.6     0.142E+04 T= 52.3     HitPR=T

at start of 2d fit
 CFUN:in PAR=  339.      51.9      200.      101.     0.136E+04 0.463     0.327
               345.      52.3      86.0      47.6     0.142E+04 0.119     0.143
               0.00      47.3     0.104E+04  39.7
 CFUN:P1= -137.     -96.5     -295.     P2=  40.4      48.3      339.
 CFUN:out IERR= 0 constraint# 7 CFUN=-539.0

sign error in cfun
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.1656.log
for kpnn.11999.41.rzn
  idnevt=      3049
  Xtrue=  200.4  100.6 1365.0   86.0   47.6 1415.0 Ptrue=  136.6   96.5  295.0   40.4   48.3  338.9
  Xreco=  200.3  100.6 1365.0   86.1   47.6 1415.0 Preco=  146.8  100.3  302.6   32.9   47.4  352.4
  Ktrue=   57.0   -1.1 1061.6   52.6   -1.0  933.1
  Kreco=   53.1    0.0 1061.4   46.2    0.0  923.2

new mystery:
kpnn.11999.41.rzn
  idnevt=      8192
  Xtrue=  -94.5  201.3 1346.0  -49.2 -200.3 1330.5 Ptrue=   -0.4  -34.1    0.5    5.3 -119.1   15.5
  Xreco=  -40.8  167.5 1346.0  -60.7 -124.7 1330.5 Preco=    0.8  124.3   -1.9 -122.7  198.1 -139.6
  Ktrue=  -60.7   -1.2 1306.6  -31.9   -0.6  654.7
  Kreco=  -42.7 -153.7 1350.9  -22.2  -79.7  700.5

kpnn.11999.41.before.theta.phi.rzn
  idnevt=      8192
  Xtrue=  -94.5  201.3 1346.0  -49.2 -200.3 1330.5 Ptrue=   -0.4  -34.1    0.5    5.3 -119.1   15.5
  Xreco=  -40.8  167.5 1346.0  -60.7 -124.7 1330.5 Preco=   -0.8 -124.3    1.9  122.7 -198.1  139.6
  Ktrue=  -60.7   -1.2 1306.6  -31.9   -0.6  654.7
  Kreco=  -42.7 -153.7 1350.9  -14.2  -51.0  447.8

actually both fits are crap
study the fit
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.2041.log 

 XPAR in1 : E=   34.1 T=   66.1 x=  -58.5 y=  160.9 z= 1346.0 Txz=   -0.4 Tyz=  -65.3 SignOfPz=-1.0
 XPARout1 : Px=    0.2 Py=   34.1 Pz=   -0.5 E=   34.1 x=  -58.5 y=  160.9 z= 1346.0 T=   66.1
 XPAR in2 : E=  120.2 T=   57.0 x=  -56.9 y= -116.3 z= 1330.5 Txz=   -0.2 Tyz=   -2.6 SignOfPz=-1.0
 XPARout2 : Px=    7.8 Py=  111.9 Pz=  -43.3 E=  120.2 x=  -56.9 y= -116.3 z= 1330.5 T=   57.0
 XPAR in1 : E=  124.4 T=   66.2 x=  -40.8 y=  167.5 z= 1346.0 Txz=   -0.4 Tyz=  -65.2 SignOfPz=-1.0
 XPARout1 : Px=    0.8 Py=  124.3 Pz=   -1.9 E=  124.4 x=  -40.8 y=  167.5 z= 1346.0 T=   66.2
 XPAR in2 : E=  271.7 T=   56.9 x=  -60.7 y= -124.7 z= 1330.5 Txz=    0.9 Tyz=   -1.4 SignOfPz=-1.0
 XPARout2 : Px= -122.7 Py=  198.1 Pz= -139.6 E=  271.7 x=  -60.7 y= -124.7 z= 1330.5 T=   56.9

Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.080904.2050.log 
 
solution appears to be adequate.
need to fix other constraints, etc.
**********************************************
Thu Sep  9 08:46:41 EDT 2004

source/cfun_1g.f			- modified "resolve Txz,Tyz ambiguity"
source/cfun_0g.f			- modified "resolve Txz,Tyz ambiguity"

fix stored resolutions for Bryman model:
 returned quantities sxz,syz, etc. are the uncertainties on projections of the angle used 
 to smear. Convert them to the uncertainties on the tangent of the angle.

source/smear.f				- modified "convert sigma(angle) to sigma(tan(angle)) for Bryman model"

why is smear.inc in beam_collimator?
source/beam_collimator.f		- modified "remove smear.inc"

recompile and link
preserve ntuple 
% mv ../localntuples/kpnn.11999.41.rzn ../localntuples/kpnn.11999.41.before.sec2rzn
% mv  /e787u/djaffe/kopio/fastmc/ntuples/kpnn.11999.41.before.sec2rzn /e787u/djaffe/kopio/fastmc/ntuples/kpnn.11999.41.before.sec2.rzn

run.fastmc.script kpnn 1 10000 11999 0 4 1 detector.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1014.log

bunch of reports that reccov is nan
screwed calculation of sec^2, try again
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1206.log
          *** Track history. Event#   9847 TRANSFER2_1:reccov is nan                       *******
  # ID Name Mom     Px      Py      Pz       E    Ptot  Xbirth  Ybirth  Zbirth  Xdeath  Ydeath  Zdeath  Tbirth   Tdeath    Weight Smeared Fate
  1  8  K0L   0   -13.3     0.2   805.9   947.2   806.0     0.8     0.0     0.8   -22.4     0.5  1406.5     0.0    55.2 0.984E-01   0      1 DKD Decay vol
                  -13.3     0.2   805.9   947.2 at death
                    0.0     0.0     0.0   497.7 in  K0L CMS
  2  5  pi0   1    68.7   -34.4    62.4   167.4    98.9   -22.4     0.5  1406.5   -22.4     0.5  1406.5    55.2    55.2  1.00       0      1 DKD Decay vol
                   68.7   -34.4    62.4   167.4 at death
                   72.2   -34.4  -153.2   219.3 in  K0L CMS
  3  2   nu   1  -132.5    90.3   496.8   522.0   522.0   -22.4     0.5  1406.5   -38.7    11.6  1467.5    55.2    57.3  1.00       0      2 Hit top    DS hole
                 -132.5    90.3   496.8   522.0 at death
                 -126.0    90.2   102.2   185.6 in  K0L CMS
  4  2   nu   1    50.6   -55.7   246.6   257.8   257.8   -22.4     0.5  1406.5   -11.5   -11.6  1459.6    55.2    57.0  1.00       0      2 Hit bottom DS hole
                   50.6   -55.7   246.6   257.8 at death
                   53.8   -55.7    51.1    92.8 in  K0L CMS
  5  1 gamm   2   105.4    -7.3    61.2   122.1   122.1   -22.4     0.5  1406.5    -9.7     0.0  1415.0    55.2    55.8  1.00       2      2 Hit bottom DS hole
                  105.4    -7.3    61.2   122.1 at death
                  108.0   -10.9   -81.6   135.8 in  K0L CMS
  6  1 gamm   2    43.1     3.4    -0.3    43.2    43.2   -22.4     0.5  1406.5  -202.8  -112.3  1403.5    55.2    62.2  1.00       2      2 Hit right  Decay vol
                   43.1     3.4    -0.3    43.2 at death
                  -35.8   -23.5   -71.6    83.5 in  K0L CMS
 ***** ERROR in HFNT bad float in column:        50 line:         1 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         2 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         3 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         4 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         5 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         6 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         7 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         8 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:         9 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        50 line:        10 : Quiet NaN : ID=       1

Dima said he fixed the original source of this problem with some new code.
park it in 
/e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima7sept04

here is his email -----------------

Date: Tue, 07 Sep 2004 18:20:44 -0400
From: Dmitriy Vavilov <vavilov@bnl.gov>
To: David E Jaffe <djaffe@bnlku5.phy.bnl.gov>
Subject: New code (for putting errors in the ntuple) - II

David,

A new tar ball is
~vavilov/kopio/fastmc/upd07Sep04_err.tar.gz.
Basically 4 routine were improved:

recon.f - propagated errors are fed to ntuple only after checking
that conditions necessary for their calculation are met. New ntuple
variable Logical RecPropOK(nrecon) tells one when it happens (otherwise
they are filled with zeros).

reconinfo.inc - new variable RecPropOK(nrecon) is added

kinfun.f - tests for validity of calculation and diagnostic printing out
are added.

kineraid.f - descriptions are added

Dima.
------------------------------------------------------

no burnt bridges:
% cp recon.f recon.f.before.Dima.9sept04
% cp reconinfo.inc reconinfo.inc.before.Dima.9sept04
% cp kinfun.f kinfun.f.before.Dima.9sept04
% cp kineraid.f kineraid.f.before.Dima.9sept04

replace these 3 with Dima's new routines:
% cp  /e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima7sept04/kineraid.f .
% cp /e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima7sept04/kinfun.f .
% cp /e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima7sept04/reconinfo.inc  .

it will be easier to put my mods into Dima's code
% cp /e787u/djaffe/KOPIO/Managefastmc/Contributions/v1_4/Dima7sept04/recon.f  .

done, remove all objects, recompile,link,test
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1315.log
no complaints about nan

source/transfer2_1.f			- modified "add check for nan"

here is event with recpropok = false when recierr=0
  idnevt=      9847  kpnn.11999.41.rzn
  Xtrue=   -9.7    0.0 1415.0 -202.8 -112.3 1403.5 Ptrue=  105.4   -7.3   61.2   43.1    3.4   -0.3
  Xreco=   -9.8    0.5 1415.0 -202.6 -112.3 1403.5 Preco=  102.4   -0.8   60.0  -36.3  -10.4  -11.8
  Ktrue=  -22.4    0.5 1406.5  -13.3    0.2  805.9
  Kreco=  185.2   -1.0 1529.2  142.4   -0.8 1176.1

positions of photons OK, momentum of 2d gamma is way off (Px<0 instead of Px>0)
recon P,Z of K are >> truth.
most important is that momentum of 1st photon is such that it
cannot impact Xreco since it is pointed DS (Pz>0)

  idnevt=      9847  kpnn.11999.41.before.sec2.rzn
  Xtrue=   -9.7    0.0 1415.0 -202.8 -112.3 1403.5 Ptrue=  105.4   -7.3   61.2   43.1    3.4   -0.3
  Xreco=   -6.8  -16.8 1415.0 -211.1  -34.7 1403.5 Preco=  101.6   15.6   61.9  -40.9   -3.3    0.3
  Ktrue=  -22.4    0.5 1406.5  -13.3    0.2  805.9
  Kreco=  -27.6  -20.0 1402.3  -15.3  -11.1  778.4

  idnevt=      9847 kpnn.11999.41.before.theta.phi.rzn
  Xtrue=   -9.7    0.0 1415.0 -202.8 -112.3 1403.5 Ptrue=  105.4   -7.3   61.2   43.1    3.4   -0.3
  Xreco=   -6.8  -16.8 1415.0 -211.1  -34.7 1403.5 Preco=  101.6   15.6   61.9   40.9    3.3   -0.3
  Ktrue=  -22.4    0.5 1406.5  -13.3    0.2  805.9
  Kreco=  -27.6  -20.0 1402.3  -11.4   -8.3  579.4

original fit got photon momenta approximately correct, but positions were way off.
strange thing is that recon Z of K is approx same as true, but momentum
is quite different. must mean that time of K is quite from truth.

add temp debug to recon.f

Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1402.log

                           XK        YK         ZK         TK
 RECON: Initial K0Lpar=  12.08     -48.24      1414.      63.02
 RECON: Initial K0Lres=  5.000      5.000      5.000      2.000

note that initial guess at Y(K) << beam envelope

after 1st fit                      X(K)        Z(K)       T(K)
 FITPI0 1:ChiNoM= 4.448       XI=  192.1      1533.      47.94
 FITPI0 1:                   DXI=  138.6      77.80      5.160     ITER=11 IERR= 0
 F

 RECON:  Final  K0Lpar=  185.2     -.9856      1529.      48.19
 RECON:  Final  K0Lres=  122.4      1.689      68.62      4.591

so forcing photons to come from YK=0 causes crazy result.

more debug to check
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1411.log

fix bug in debug output in recon from dima
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1417.log

in this event beta calculated 2 ways does not agree because average time of intersection of photons
is not the same as the fitted time. why?

 RECON:  BetaX=0.1108     BetaY=-.5898E-03 BetaZ=0.9153     gamma= 2.582     Tave= 55.73
 RECON:S(K)=  1540.4     T(K)=  48.194     s-c*t=  95.603

add more debug
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1443.log

studied this kind of event a bit more, it is characterized by Z(K).ge.max(Zhit1,Zhit2) even when 1 hit
is in PR, so they should be rejected anyway.

decided to replace 'meet' parameters for x,y,z,t of K with results of second fit,
also added another variable to ntuple: RecTK

test
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1555.log

source/initdecayit.f				- modified "update BR(KL) using RPP 2004"

check
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1600.log

remove temp debug stuff in recon
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11999.41.090904.1603.log

test with kp2 events
% run.fastmc.script kp2 2 10000 21999 0 4 1 detector.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21999.41.090904.1604.log
nan in one event, dima will look into it.

****************************************
Fri Sep 10 09:03:43 EDT 2004

Dima can't find nan in his code.

scripts/simple.run.fastmc.script			- modified "executable is fastmc.exe"

% cp /e787u/djaffe/KOPIO/fastmc/scripts/../condir/control.kp2.21999.41 findnan.control
from log file
           *********** EVENT#      2000 Seed1=     21999 Seed2=        41 Nskip1=    172452 Nskip2=         0 **********
          *** Track history. Event#   2196 TRANSFER2_1:cov mtx is nan                      *******
  # ID Name Mom     Px      Py      Pz       E    Ptot  Xbirth  Ybirth  Zbirth  Xdeath  Ydeath  Zdeath  Tbirth   Tdeath    Weight Smeared Fate
  1  8  K0L   0   -20.4    -1.1   704.7   862.9   705.0    -2.4     0.0    -2.6   -36.2    -1.8  1168.0    -0.1    47.7 0.105       0      1 DKD Decay vol
                  -20.4    -1.1   704.7   862.9 at death
                    0.0     0.0     0.0   497.7 in  K0L CMS
  2  5  pi0   1   -30.9  -151.0   602.9   636.8   622.3   -36.2    -1.8  1168.0   -36.2    -1.8  1168.0    47.7    47.7  1.00       0      1 DKD Decay vol
                  -30.9  -151.0   602.9   636.8 at death
                  -17.6  -150.3   144.3   248.8 in  K0L CMS
  3  5  pi0   1    10.5   149.9   101.8   226.2   181.5   -36.2    -1.8  1168.0   -36.2    -1.8  1168.0    47.7    47.7  1.00       0      1 DKD Decay vol
                   10.5   149.9   101.8   226.2 at death
                   17.6   150.3  -144.3   248.8 in  K0L CMS
  4  1 gamm   3    53.0   134.9    98.0   174.9   174.9   -36.2    -1.8  1168.0    94.8   199.1  1382.7    47.7    58.2  1.00       2      2 Hit top    Decay vol
                   53.0   134.9    98.0   174.9 at death
                   64.8    95.9   -40.6   122.6 in  K0L CMS
  5  1 gamm   3    69.1    19.5    -2.5    71.8    71.8   -36.2    -1.8  1168.0  -196.9   174.4  1168.0    47.7    55.6  1.00       2      2 Hit right  Decay vol
                   69.1    19.5    -2.5    71.8 at death
                  -47.2    54.4  -103.6   126.2 in  K0L CMS
  6  1 gamm   2   -42.3    11.1   187.5   192.5   192.5   -36.2    -1.8  1168.0   -83.4    15.2  1415.0    47.7    56.5  1.00       2      2 Hit DS end Calorim
                  -42.3    11.1   187.5   192.5 at death
                  -30.6    12.0    52.5    61.9 in  K0L CMS
  7  1 gamm   2    -2.3  -152.1   408.9   436.3   436.3   -36.2    -1.8  1168.0   -33.7   -97.4  1415.0    47.7    56.2  1.00       2      2 Hit DS end Calorim
                   -2.3  -152.1   408.9   436.3 at death
                   13.0  -162.3    91.8   186.9 in  K0L CMS
 ***** ERROR in HFNT bad float in column:        51 line:         1 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:         2 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:         4 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:         8 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:         9 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:        10 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:        21 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:        22 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:        24 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:        28 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:        29 : Quiet NaN : ID=       1
 ***** ERROR in HFNT bad float in column:        51 line:        30 : Quiet NaN : ID=       1

% simple.run.fastmc.script findnan.control &
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.findnan.control.detector.dat.100904.0917.log

get nskip of nan event
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.findnan.control.detector.dat.100904.0919.log

Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.findnan.control.detector.dat.100904.1015.log
STOP kinfun, Err-e1s,e2s statement executed

source/kinfun.f			- modified "change stop to warning"

Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.findnan.control.detector.dat.100904.1022.log

can't get nan with nskip of event, but can get it with nskip
of 6 events previous. makes me think of stale variable somewhere...

source/writemtx.f			- modified "warn if correl mtx uncalculable"

found the problem, diagonal element 13 of cov mtx from 2d fit is negative.
this element corresponds to Txz of 2d photon
here are the input values of the two photons:
 RECON:photon1=  174.9      58.19      94.78      199.1      1383.     0.5408      1.376
 RECON:sigma1 =  10.54     0.2000      1.153      1.153     0.1000E-04 0.5188E-01 0.7207E-01

 RECON:photon2=  71.81      55.61     -196.9      174.4      1168.     -27.88     -7.865
 RECON:sigma2 =  7.340     0.2000      1.655      1.655     0.1000E-04 0.2950E+08 0.3448E+08

found cases where candidate pi0 mass squared in cfun was <0, this gave cfun=nan (and ierr=1)
from fit.

source/cfun.f					- modified "protect against mass^2<0"
source/cfun_1g.f					- modified "protect against mass^2<0"
cfun_0g is already protected 

still do not understand why fitter returns negative value in diagonal of cov mtx.
i note that sigma(Txz), sigma(Tyz) for this candidate are >> than other candidates
from the 6 events included in the debugging

Dima and I decide that fits with -ve diagonal elements in cov mtx should have ierr.ne.0

source/kinfit.f					- modified "ierr=5 if diagonal(cov mtx)<0"
source/fitpi0.f					- modified "treat ierr=5 from kinfit"

big test job:
% run.fastmc.script kp2 2 10000 21998 0 4 1 detector.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21998.41.100904.1518.log

source/reconinfo.f				- modified "change range of recierr from [-1,4] to [-1,7]"

another test
% run.fastmc.script kp2 2 10000 21997 0 4 1 detector.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21997.41.100904.1523.log

optionally gzip output ntuple file (now it is done automatically)
source/control.f				- modified "add GZIP_OUTPUT_FILE"
source/event.inc				- modified "add GZIP_OUTPUT_FILE"
source/init.f					- modified "add GZIP_OUTPUT_FILE"
source/initanal.f				- modified "initialize EXTENDED_TARGET, BEAM_COLLIMATION for analysis job"
source/userend.f				- modified "add GZIP_OUTPUT_FILE"
Templates/control.template			- modified "add GZIP_OUTPUT_FILE"

test
% run.fastmc.script kp2 2 1000 21996 0 4 1 detector.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21996.41.100904.1548.log
Ntuple/hist file           ../localntuples/kp2.21996.41.rzn
 ---------------------------
STOP INIT ERROR: No filename given for ntuple id     statement executed

bad line in template file. fix it, try again
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21996.41.100904.1550.log

test with 0,1,2 g fits all enabled:
% run.fastmc.script kp2 2 1000 21995 0 4 1 detector.dat default.decay.dat 1.1 0 &

all looks ok

re-run longer job with 2gPR fits only
% run.fastmc.script kp2 2 10000 21998 0 4 1 detector.dat default.decay.dat 1.1 0 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21998.41.100904.1604.log

lets make sure these data can still be analyzed
% echo ../localntuples/kp2.21998.41.rzn | sed -e s/local// > test.list
% analysis.script test.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.100904.1618.log

OK
run standard bunch of jobs with offset =121
%  submit.standard.bunch.of.jobs.script detector.22.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.22.dat.10.100904.1621.log

must re-check all 'to do's in this file...
Fri Sep 10 17:14:26 EDT 2004

************************************
Sun Sep 12 19:55:07 EDT 2004

/home disk got filled
kp2 jobs are too long, ntuple is too large?
fix tomorrow

**************************************************************
Mon Sep 13 08:57:05 EDT 2004

log files with ERROR:

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log:
E*2<0 in one event, nan in cov mtx in another

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51123.41.110904.0051.log:
/home disk full

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21124.41.110904.0144.log
E*2<0
/home disk full

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke3g.91123.141.110904.0233.log
/home disk full

% rm -f ../localntuples/kp3.51123.41.rzn.ntskim ../localntuples/kp2.21124.41.rzn.ntskim ../localntuples/ke3g.91123.141.rzn.ntskim
% cp aspect1.bryman.list aspect1.bryman.list.before.cov.matrices

make new aspect1.bryman.list from successfully completed jobs

% analysis.script aspect1.bryman.list ../geometry/detector.22.dat &
List of ntuples            1150 Sep 13 09:00 aspect1.bryman.list with 32 ntuples files
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.130904.0901.log
analysis job crashed. ran out of space
gzip: ../ntuples/kp3.51122.41.rzn.ntskim.gz: No space left on device

gunzip: ../ntuples/kp3.51121.41.rzn.ntskim: No space left on device
STOP ANAL: UNZIP ERROR statement executed

move bunch of files

% df /home /u1 ; mover ; df /home /u1
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda4             30637428  28574724    506408  99% /home
/dev/sdb2             35550516  29593452   5957064  84% /u1
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda4             30637428  23132116   5949016  80% /home
/dev/sdb2             35550516  34884008    666508  99% /u1

that was close!
try again
analysis.script aspect1.bryman.list ../geometry/detector.22.dat &
List of ntuples            1150 Sep 13 09:00 aspect1.bryman.list with 32 ntuples files
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.aspect1.bryman.130904.0948.log

here are all the warnings
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21121.41.100904.1622.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2=-0.33641E+07 is <0. E*1+E*2=  2405.7     E*1-E*2= -3025.1     E*1= -309.73     E*2=  2715.4
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2=-0.19803E+06 is <0. E*1+E*2=  112.34     E*1-E*2=  458.97     E*1=  285.65     E*2= -173.32
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 1, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 2, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 4, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 8, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 9, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1(10, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 1, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 2, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 4, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 8, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1( 9, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51121.41.100904.1622.log: TRANSFER2_1 WARNING: RECCOV1(10, 2) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke4.121122.41.100904.1659.log: TRANSFER2_1 WARNING: RECCOV1( 7, 1) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke4.121122.41.100904.1659.log: TRANSFER2_1 WARNING: RECCOV1( 8, 1) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke4.121122.41.100904.1659.log: TRANSFER2_1 WARNING: RECCOV1( 9, 1) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke4.121122.41.100904.1659.log: TRANSFER2_1 WARNING: RECCOV1(10, 1) is NAN
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kcp3.61123.41.100904.1719.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -3898.7     is <0. E*1+E*2=  146.41     E*1-E*2=  159.17     E*1=  152.79     E*2= -6.3791
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke4.121126.41.100904.1940.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -25592.     is <0. E*1+E*2=  187.90     E*1-E*2=  246.77     E*1=  217.34     E*2= -29.438
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51122.41.100904.2203.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -4420.4     is <0. E*1+E*2=  14.097     E*1-E*2=  67.964     E*1=  41.031     E*2= -26.933
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51122.41.100904.2203.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -16935.     is <0. E*1+E*2=  62.897     E*1-E*2=  144.54     E*1=  103.72     E*2= -40.819
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51122.41.100904.2203.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -21951.     is <0. E*1+E*2=  114.49     E*1-E*2= -187.24     E*1= -36.375     E*2=  150.86
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51122.41.100904.2203.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2=-0.14184E+06 is <0. E*1+E*2=  148.46     E*1-E*2= -404.82     E*1= -128.18     E*2=  276.64
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp3.51122.41.100904.2203.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2=-0.22743E+06 is <0. E*1+E*2=  59.841     E*1-E*2=  480.63     E*1=  270.24     E*2= -210.39
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21123.41.100904.2334.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2=-0.25377E+06 is <0. E*1+E*2=  48.034     E*1-E*2=  506.04     E*1=  277.04     E*2= -229.00
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21123.41.100904.2334.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -12022.     is <0. E*1+E*2= -148.06     E*1-E*2=  184.24     E*1=  18.089     E*2= -166.15
/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21124.41.110904.0144.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -6932.7     is <0. E*1+E*2=  141.90     E*1-E*2=  164.52     E*1=  153.21     E*2= -11.313

in ke4 job:
control file /e787u/djaffe/KOPIO/fastmc/scripts/../condir/control.ke4.121122.41
due to photons in barrel

           *********** EVENT#     63000 Seed1=     27135 Seed2=        41 Nskip1= 101136835 Nskip2=         0 **********
          +++++++++  26000 events skimmed so far +++++++
 TRANSFER2_1 WARNING: RECCOV1( 7, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1( 8, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1( 9, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1(10, 1) is NAN
          *** Track history. Event#  63285 TRANSFER2_1:cov mtx is nan                      *******
  # ID Name Mom     Px      Py      Pz       E    Ptot  Xbirth  Ybirth  Zbirth  Xdeath  Ydeath  Zdeath  Tbirth   Tdeath    Weight Smeared Fate
  1  8  K0L   0   -19.2     0.0   660.0   826.9   660.3     2.6     0.0     2.8   -31.1     0.0  1158.8     0.1    48.4 0.108       0      1 DKD Decay vol
                  -19.2     0.0   660.0   826.9 at death
                    0.0     0.0     0.0   497.7 in  K0L CMS
  2  5  pi0   1   -23.0  -143.0   143.1   244.3   203.6   -31.1     0.0  1158.8   -31.1     0.0  1158.8    48.4    48.4  1.00       0      1 DKD Decay vol
                  -23.0  -143.0   143.1   244.3 at death
                  -16.3  -143.0   -85.9   215.2 in  K0L CMS
  3  6   pi+  1    53.4    84.8   261.4   312.8   280.0   -31.1     0.0  1158.8    21.3    83.1  1415.0    48.4    58.7  1.00       0      2 Hit DS end Pre-Rad
                   53.4    84.8   261.4   312.8 at death
                   60.5    84.8    18.2   175.1 in  K0L CMS
  4  3    e-  1   -39.2    45.3   130.2   143.3   143.3   -31.1     0.0  1158.8  -162.4   151.7  1595.0    48.4    64.4  1.00       0      2 Hit DS end Calorim
                  -39.2    45.3   130.2   143.3 at death
                  -36.2    45.3    26.9    63.9 in  K0L CMS
  5  2   nu   1   -10.5    12.9   125.4   126.5   126.5   -31.1     0.0  1158.8   -67.6    44.9  1595.0    48.4    63.1  1.00       0      2 Hit DS end Calorim
                  -10.5    12.9   125.4   126.5 at death
                   -8.0    12.9    40.7    43.4 in  K0L CMS
  6  1 gamm   2   -35.8  -168.5   133.5   217.9   217.9   -31.1     0.0  1158.8   -64.2  -200.5  1331.5    48.4    57.2  1.00       2      2 Hit bottom Decay vol
                  -35.8  -168.5   133.5   217.9 at death
                  -22.8  -165.8   -54.7   176.0 in  K0L CMS
  7  1 gamm   2    17.3   -13.5    -4.3    22.4    22.4   -31.1     0.0  1158.8    15.7   196.3  1158.8    48.4    55.2  1.00       2      2 Hit top    Decay vol
                   17.3   -13.5    -4.3    22.4 at death
                    6.5    22.8   -31.2    39.2 in  K0L CMS

investigate
% cp /e787u/djaffe/KOPIO/fastmc/scripts/../condir/control.ke4.121122.41 findnan.control
simple.run.fastmc.script findnan.control
Logfile name is /e787u/djaffe/KOPIO/fastmc/scripts/../log/fastmc.findnan.control.detector.dat.130904.0910.log

>>>>>>>>>>>>>>>>>>>>> add protection to get_pr_resolution to avoid -ve sigmas

here is problem with nan:
 RECON:fcov in packed form:
   89.75
  133.20  194.43
  -53.16  -84.07  192.58
    0.26    3.33    4.55   -2.67
 RECON:RecCov1 in packed form: Nrecon=  1
    9.47
    1.01   13.94
   -0.40   -0.43   13.88
     nan     nan     nan     nan
 RECON:RecCov1 in packed form, 1: Nrecon=  1
    9.47
    1.01   13.94
   -0.40   -0.43   13.88
     nan     nan     nan     nan
 kinfun(x,i) check ==================
 i kinfun(x,i) "true value"  description
 1  40.8790162  133.519852 Mgg
 2  221.939096  226.282196 E*pi
 3  149.224208  144.881104 E*1 - E*2
 4  599.296083  599.296143 Emiss
 5  677.279108  677.279175 P(K)
 6  164.28359  173.819138 H=(E*pi)^2 - (E*1-E*2)^2
 10 -32.2259793 -32.2259827 Px*1
 
several mismatches in kinfun check: Mgg, E*pi, dE*, H

**************************************************************
Tue Sep 14 08:44:35 EDT 2004

Dima figured out the problem above. kinfun did not correctly
resolve the ambiguity in the direction of the photon. I fixed it

scripts/submit.standard.bunch.of.jobs.scripts			- modified "40 kp2 jobs of 100k evts"

clean up disks, remove all 2001, 2002, 2003 ntuples

make detector.22.dat the default:
geometry/detector.dat						- modified "copy of detector.22.dat"

% submit.standard.bunch.of.jobs.script
 submit.standard.bunch.of.jobs.script detector.22.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.22.dat.10.140904.0950.log

*************************************
Wed Sep 15 08:36:14 EDT 2004

warnings and errors found in latest standard bunch:

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpgg.111131.41.140904.0950.log: ***** ERROR in HFNT bad float in column:        51 line:        11 : Quiet NaN : ID=       1

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kp2.21145.41.150904.0134.log: ***** ERROR in HFNT bad float in column:        51 line:        17 : Quiet NaN : ID=       1

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke4.121134.41.140904.1132.log: TRANSFER2_1 WARNING: RECCOV1( 1, 1) is NAN

/e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kcp3.61134.41.140904.1105.log: KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -8508.7     is <0. E*1+E*2=  67.403     E*1-E*2=  114.24     E*1=  90.824     E*2= -23.421

in file /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/ke4.121134.41.140904.1132.log

          *********** EVENT#     70000 Seed1=     27147 Seed2=        41 Nskip1= 112641310 Nskip2=         0 **********
  KINERPROPG -VE DIAG COV: ir=ic= 1k,a(k,ir)= 1  0.71660935 2  0. 3  0. 4  0. 5
  0. 6  11.1190815 7 -62.9003026 8  2.21496208 9  0. 10  0. 11  0. 12  0. 13
 -1.92522691 14  1.35784148 15  0.0331283445 16  0.0161591629 17  0.421245261 18
 -10.9108427
  KINERPROPG -VE DIAG COV: ir=ic= 2k,a(k,ir)= 1  0.716610771 2  0. 3  0. 4  0. 5
  0. 6  11.1190829 7 -62.9003011 8 -2.21496492 9  0. 10  0. 11  0. 12  0. 13
  1.92522691 14 -1.35784219 15  0.168088832 16 -0.0499895236 17 -0.269345435 18
  6.92053632
  KINERPROPG -VE DIAG COV: ir=ic= 4k,a(k,ir)= 1  0.950991819 2  0. 3  0. 4  0. 5
  0. 6  14.7557628 7 -83.4728908 8  1.66906773 9  0. 10  0. 11  0. 12  0. 13
 -1.45073926 14  1.02319149 15  0.0826645419 16  0.00247410981 17  0.360986974
 18 -9.36604465
 TRANSFER2_1 WARNING: RECCOV1( 1, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1( 3, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1( 4, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1( 5, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1( 9, 1) is NAN
 TRANSFER2_1 WARNING: RECCOV1(10, 1) is NAN
          *** Track history. Event#  70802 TRANSFER2_1:cov mtx is nan                      *******
  # ID Name Mom     Px      Py      Pz       E    Ptot  Xbirth  Ybirth  Zbirth  Xdeath  Ydeath  Zdeath  Tbirth   Tdeath    Weight Smeared Fate
  1  8  K0L   0   -24.7    -1.7   828.7   967.0   829.1    -2.9     0.0    -3.1   -35.6    -2.2  1095.7    -0.1    42.6 0.968E-01   0      1 DKD Decay vol
                  -24.7    -1.7   828.7   967.0 at death
                    0.0     0.0     0.0   497.7 in  K0L CMS
  2  5  pi0   1   -52.3    -5.9    74.0   162.7    90.8   -35.6    -2.2  1095.7   -35.6    -2.2  1095.7    42.6    42.6  1.00       0      1 DKD Decay vol
                  -52.3    -5.9    74.0   162.7 at death
                  -46.4    -5.5  -125.7   190.3 in  K0L CMS
  3  6   pi-  1   -23.3    10.7   417.7   441.2   418.5   -35.6    -2.2  1095.7   -51.4     5.0  1378.6    42.6    52.6  1.00       0      1 DKD Decay vol
                  -23.3    10.7   417.7   441.2 at death
                  -13.2    11.4    77.3   160.5 in  K0L CMS
  4  3    e+  1    -0.9    -7.0   -10.0    12.3    12.3   -35.6    -2.2  1095.7   -42.5   -58.5  1015.0    42.6    45.9  1.00       0      2 Hit US end Decay vol
                   -0.9    -7.0   -10.0    12.3 at death
                    0.0    -6.9   -39.9    40.5 in  K0L CMS
  5  2   nu   1    51.8     0.5   347.1   350.9   350.9   -35.6    -2.2  1095.7   200.0     0.1  2674.9    42.6    95.9  1.00       0      2 Hit left   CatchrVol
                   51.8     0.5   347.1   350.9 at death
                   59.5     1.0    88.3   106.5 in  K0L CMS
  6  4   mu-  3   -27.4   -18.4   297.6   317.5   299.4   -51.4     5.0  1378.6  -133.5   -50.0  2269.5    52.6    84.3  1.00       0      2 Hit bottom CatchrVol
                  -27.4   -18.4   297.6   317.5 at death
                  -20.0   -17.9    50.0   120.0 in  K0L CMS
  7  2   nu   3     4.1    29.0   120.2   123.7   123.7   -51.4     5.0  1378.6   -44.0    57.3  1595.0    52.6    60.0  1.00       0      2 Hit DS end Calorim
                    4.1    29.0   120.2   123.7 at death
                    6.9    29.2    27.2    40.5 in  K0L CMS
  8  1 gamm   2     6.5   -66.3    81.9   105.6   105.6   -35.6    -2.2  1095.7   -53.6  -202.4  1354.8    42.6    53.5  1.00       2      2 Hit bottom Decay vol
                    6.5   -66.3    81.9   105.6 at death
                   -2.2   -56.3   -11.3    57.5 in  K0L CMS
  9  1 gamm   2    61.0   -24.1    -2.0    65.6    65.6   -35.6    -2.2  1095.7  -201.2   173.8  1095.7    42.6    51.1  1.00       2      2 Hit right  Decay vol
                   61.0   -24.1    -2.0    65.6 at death
                  -44.2    50.9  -114.4   132.8 in  K0L CMS

% cp /e787u/djaffe/KOPIO/fastmc/scripts/../condir/control.ke4.121134.41 findnan.control

oops ke4.121134.41.rzn.ntskim is now junked!

in this event, 2d photon is very close to 90deg so uncertainties on Txz,Tyz are ~1e8.
the covariance matrix from both the first and 2d fit has unphysical values in off-diagonal
elements. it shows up obviously in off-diagonal elements of the correlation matrix that
are >1 !

solutions: 
1) limit uncertainty on Txz, Tyz to ~10 times their magnitude?
2) assign ierr=6 when off-diagonal element (i,j) of error matrix are > sqrt(cov(i,i)*cov(j,j))?

Dima and I agree that 2) is probably more robust.

study E*2 < 0 problem:
% cp /e787u/djaffe/KOPIO/fastmc/scripts/../condir/control.kcp3.61134.41 findnan.control

          *********** EVENT#       379 Seed1=     29805 Seed2=        41 Nskip1=     37338 Nskip2=         0 **********
 KINFUN WARNING:(E*1+E*2)^2-(E*1-E*2)^2= -8508.7     is <0. E*1+E*2=  67.403     E*1-E*2=  114.24     E*1=  90.824     E*2= -23.421
 K

problem is that energy of E2 in lab is negative

Kill submit.many.fastmc jobs still running for  kp2 and ke3g

source/recon.f							- modified "discard fits with negative fitted photon energy"
source/kinfit.f							- modified "ierr=6 if |correlation mtx element| > 1"
source/fitpi0.f							- modified "handle ierr=6"

check if signal acceptance is unchanged after all these mods:

this job will replace first job from standard bunch
% run.fastmc.script kpnn 1 100000 11131 0 4 1 detector.22.dat default.decay.dat 1.1 1 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11131.41.150904.1626.log
% echo ../ntuples/kpnn.11131.41.rzn.ntskim > test.list
% analysis.script test.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.150904.1635.log

 Times(s): Spill= 2.400     Interspill= 2.300     Running time=0.4320E+08 Running time(hrs)=0.1200E+05
 Using Br(K0L -> pi0,nu,nubar) = 0.3000E-10 Total N(K0L) after spoiler=0.1271E+16 Total neutron interactions=-1.000
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.6535E-03  1.000      24.91      0.7519      MZ
kpnn       0.1000E+06  0.2917E-02  1.000      111.2      1.531       DJ
kpnn       0.1000E+06  0.2507E-02  1.000      95.58      1.445       AK basic
kpnn       0.1000E+06  0.1630E-02  1.000      62.15      1.168       AK loose
kpnn       0.1000E+06  0.1435E-02  1.000      54.71      1.097       AK lominal
kpnn       0.1000E+06  0.9915E-03  1.000      37.80      0.9142      AK tight
kpnn       0.1000E+06  0.6608E-03  1.000      25.19      0.7463      AK tighter
kpnn       0.1000E+06  0.5638E-03  1.000      21.49      0.6893      AK tightest

hmmm. that is 2.7sigma from previous. maybe more stats will help?
2 more jobs
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11132.41.150904.1719.log
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11133.41.150904.1719.log

add to test.list :
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.150904.2050.log 

Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
kpnn       0.3000E+06  0.6541E-03  1.000      24.94      0.4328      MZ
kpnn       0.3000E+06  0.2948E-02  1.000      112.4      0.8881      DJ
kpnn       0.3000E+06  0.2540E-02  1.000      96.82      0.8400      AK basic
kpnn       0.3000E+06  0.1666E-02  1.000      63.53      0.6819      AK loose
kpnn       0.3000E+06  0.1470E-02  1.000      56.02      0.6411      AK lominal
kpnn       0.3000E+06  0.1003E-02  1.000      38.24      0.5299      AK tight
kpnn       0.3000E+06  0.6560E-03  1.000      25.01      0.4293      AK tighter
kpnn       0.3000E+06  0.5580E-03  1.000      21.27      0.3961      AK tightest

(115.5-112.4)/sqrt(.45^2+.888^2) = 3.1/.9955=3.1sigma
significant effect?
perhaps correlation matrix requirement should be post fit?

*********************************
Thu Sep 16 09:06:37 EDT 2004

source/checkmtx.f			- new "check validity of  doubprec cov mtx"
source/Makefile				- modified "add checkmtx"

backup of ntuple
% cp  ../ntuples/kpnn.11131.41.rzn.ntskim.gz ../ntuples/kpnn.11131.41.rzn.ntskim.copy.gz

replace ntuple
% run.fastmc.script kpnn 1 100000 11131 0 4 1 detector.22.dat default.decay.dat 1.1 1 &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../locallog/kpnn.11131.41.160904.0925.log

output ntuples are different!
% ls -lrt  ../ntuples/kpnn.11131.41.rzn.ntskim.gz ../ntuples/kpnn.11131.41.rzn.ntskim.copy.gz
-rw-r--r--    1 djaffe   djaffe   26863343 Sep 16 09:25 ../ntuples/kpnn.11131.41.rzn.ntskim.copy.gz
-rw-r--r--    1 djaffe   djaffe   26863917 Sep 16 09:32 ../ntuples/kpnn.11131.41.rzn.ntskim.gz

% echo ../ntuples/kpnn.11131.41.rzn.ntskim > test.list
% analysis.script test.list ../geometry/detector.22.dat &
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.160904.0946.log
Mode        Generated   Effy(wt)    N/N(Kpnn)  Nev(mode)  dNeV(mode)  Who
kpnn       0.1000E+06  0.6535E-03  1.000      24.91      0.7519      MZ
kpnn       0.1000E+06  0.2917E-02  1.000      111.2      1.531       DJ
kpnn       0.1000E+06  0.2507E-02  1.000      95.58      1.445       AK basic
kpnn       0.1000E+06  0.1630E-02  1.000      62.15      1.168       AK loose
kpnn       0.1000E+06  0.1435E-02  1.000      54.71      1.097       AK lominal
kpnn       0.1000E+06  0.9915E-03  1.000      37.80      0.9142      AK tight
kpnn       0.1000E+06  0.6608E-03  1.000      25.19      0.7463      AK tighter
kpnn       0.1000E+06  0.5638E-03  1.000      21.49      0.6893      AK tightest

results are identical to /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.150904.1635.log

review all changes between
 /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.kpnn.ke4.ke3g.kcp3.aspect1.bryman.300804.1643.log 
and
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.150904.1635.log

loss apparently due to correction to resolution on sxz,syz

test by running standard bunch of jobs. don't change offset, just replace previously produced files.

% submit.standard.bunch.of.jobs.script
 submit.standard.bunch.of.jobs.script detector.22.dat key 10
 logfile is ../log/standard.bunch.of.jobs.detector.22.dat.10.160904.1031.log

check for problems in standard bunch of jobs:
% grep log ../log/standard.bunch.of.jobs.detector.22.dat.10.160904.1031.log | grep scrip | awk '{print "grep -HE XDiscard|WARN|ERRX",$3}' | sed -e y/"X"/"'"/ > find.warning

only "Discarded ludicrous fit." messages found

George's 16sept04 proposal to Task force for PV ineffy:
So, proposed recipe for now:
  Egamma>20 MeV  AvdS curve with 10 MeV cutoff
  Egamma<20 MeV  "standard PV ineffy"
 The two parametrizations give the same veto ineffy at 22.78 MeV 
 instead of 20 MeV so use this point so that there is a smooth 
 transition.

source/flags.inc			- modified "add UseTaskForcePV1"
source/setupanal.f			- modified "add UseTaskForcePV1"
source/pvn.f				- modified "add UseTaskForcePV1"
source/gettrkweight.f			- modified "add UseTaskForcePV1"
source/initanal.f			- modified "add UseTaskForcePV1"
source/usveto.f				- modified "add UseTaskForcePV1"

test
% analysis.script test.list ../geometry/detector.22.dat &
/e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.160904.1345.log
seg fault!

forgot to delete all objects. try again, recompile,link:
Log file                   /e787u/djaffe/KOPIO/fastmc/scripts/../log/anal.test.160904.1349.log

OK

prepare to update CVS

######################### sizes
-rwxrwxr-x    1 djaffe   djaffe    1529285 Sep 16 09:23 ../exe/fastmc.exe
-rwxrwxr-x    1 djaffe   djaffe    1389550 Sep 16 14:28 ../exe/anal.exe

##################### new files from % grep "\- new" ../../Managefastmc/v1_4.notes | sort
DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.100-1000mev.dat                   - new "catcher ineffy files"
DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.10-100mev.dat                     - new "catcher ineffy files"
DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.1-10mev.dat                       - new "catcher ineffy files"
DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.dat      - new "catcher ineffy from H.Morii"
DataBase/catcher.ineffy.thres1.4pe.thres2.3pe.dat      - new "catcher ineffy from H.Morii"
DataBase/catcher.ineffy.thres1.6pe.thres2.2pe.dat      - new "catcher ineffy from H.Morii"
DataBase/catcher.ineffy.thres1.6pe.thres2.3pe.dat      - new "catcher ineffy from H.Morii"
geometry/detector.22.dat                        - new "change catcher detector from 200x10 to 150x15 (XxY cm)"

scripts/default.decay.dat.old                   - new "copy of default.decay.dat before PDG2004"
source/catchedep.f                      - new "new E-dependent catcher ineffys"
source/checkmtx.f                       - new "check validity of  doubprec cov mtx"
source/fitpi0.inc                               - new "Dima's additions for new ntuple variables"
source/getcpvetogate.f                          - new "calculate Mnu2-dependent CPVeto gate width"
source/gethittime.f                     - new "fill CVHitTime"
source/hitinfo.inc                      - new "info on where photon 'converted'"
source/kineraid.f                               - new "Dima's additions for new ntuple variables"
source/kinerpropg.f                             - new "Dima's additions for new ntuple variables"
source/kinfun.f                                 - new "Dima's additions for new ntuple variables"

################# modified files from % grep "\- modified" ../../Managefastmc/v1_4.notes | sort > x.x
geometry/detector.dat						- modified "copy of detector.22.dat"
pve787.kumac				- modified "add more plot options"
scripts/default.decay.dat			- modified "updated with PDG2004"
scripts/simple.run.fastmc.script			- modified "executable is fastmc.exe"
scripts/simple.run.fastmc.script	- modified ">>>>>>>>>>>>>>>>TEMPORARILY CHANGE NAME OF EXECUTABLE<<<<<<<<<<<<<<<"
scripts/submit.standard.bunch.of.jobs.script			- modified "add chargeonly option"
scripts/submit.standard.bunch.of.jobs.script		- modified "change njob to 30 for ke3g"
scripts/submit.standard.bunch.of.jobs.script			- modified "increase # of ke3g jobs"
scripts/submit.standard.bunch.of.jobs.scripts			- modified "40 kp2 jobs of 100k evts"
source/akira.offline.f			- modified "add RemovePKcut for AK cuts"
source/akira.offline.f			- modified "add RemoveUpperPKcut for AK cuts"
source/anal.f				- modified "add warning if Nevent>MaxEvent"
source/anal.f				- modified "reduce hiwtdump for kp2"
source/anal.f				- modified "remove calls to s/r particleid"
source/anal.f				- modified "set HiWtDump=1e-6 for ke3g"
source/anal.f				- modified "turn off all allbut1 hists"
source/analvar.f				- modified "add Mnu2(Nrecon)"
source/analvar.inc			- modified "add CVHitTime, VE(itk) -> VE(itk,irec)"
source/beam_collimator.f		- modified "remove smear.inc"
source/bookanal.f			- modified "add kp2 hists"
source/bookanal.f			- modified "add PK vs Thit plot"
source/bookanal.f			- modified "remove unused hists"
source/bookanal.f			- modified "set titles accding to UseBetaMax"
source/cfun_0g.f			- modified "resolve Txz,Tyz ambiguity"
source/cfun_1g.f					- modified "protect against mass^2<0"
source/cfun_1g.f			- modified "resolve Txz,Tyz ambiguity"
source/cfun.f					- modified "protect against mass^2<0"
source/cfun.f				- modified "resolve sign ambiguity in Txz,Tyz using z(hit),z(k)"
source/control.f				- modified "add GZIP_OUTPUT_FILE"
source/detector.f				- modified "report size of catcher detector"
source/event.inc				- modified "add GZIP_OUTPUT_FILE"
source/fillanal.f			- modified "add PK vs Thit plot"
source/fillanal.f			- modified "fill kp2 hists"
source/fillanal.f			- modified "remove unused hists"
source/fillanal.f			- modified "use CVHitTime from common"
source/fillanal.f				- modified "use Mnu2 from common"
source/fitpi0.f					- modified "Dima's mods for new ntuple variables and some fixes"
source/fitpi0.f							- modified "handle ierr=6"
source/fitpi0.f				- modified "TEMPORARY Look for NAN"
source/fitpi0.f					- modified "treat ierr=5 from kinfit"
source/flags.inc			- modified "add CatcherModel"
source/flags.inc			- modified "add CPVetoGate"
source/flags.inc			- modified "add IgnoreDIF"
source/flags.inc			- modified "add RemovePKcut"
source/flags.inc			- modified "add RemoveUpperPKcut"
source/flags.inc			- modified "add UseBetaMax"
source/flags.inc			- modified "add UseTaskForcePV1"
source/getcandwt.f			- modified "add IgnoreDIF"
source/getcandwt.f			- modified "adjust veto ineffy to take into account CPVetoGate"
source/getcandwt.f				- modified "calculate Mnu2(Nrecon), add UseMnu2depCPVgate"
source/getcandwt.f				- modified "disable PVboost for annih e+ from ke3g"
source/getcandwt.f				- modified "modify debug output"
source/gethittime.f			- modified "add UseBetaMax"
source/get_pr_resolution.f			- modified "Dima's mods for new ntuple variables and some fixes"
source/gettrkweight.f			- modified "add CatcherModel for E-dependent catcher ineffys"
source/gettrkweight.f			- modified "add IgnoreDIF"
source/gettrkweight.f			- modified "add UseTaskForcePV1"
source/gettrkweight.f				- modified "disable PVboost for annih e+ from ke3g"
source/gettrkweight.f			- modified "non-anni e+ no longer has mu+ ineffy, add argument CPVineffy"
source/initanal.f			- modified "add CatcherModel for E-dependent catcher ineffys"
source/initanal.f			- modified "add UseTaskForcePV1"
source/initanal.f				- modified "initialize EXTENDED_TARGET, BEAM_COLLIMATION for analysis job"
source/initdecayit.f				- modified "update BR(KL) using RPP 2004"
source/init.f					- modified "add GZIP_OUTPUT_FILE"
source/inside.f				- modified "try to avoid confusing optimization"
source/kinfit.f					- modified "ierr=5 if diagonal(cov mtx)<0"
source/kinfit.f							- modified "ierr=6 if |correlation mtx element| > 1"
source/kinfun.f			- modified "change stop to warning"
source/Makefile.anal			- modified "add catchedep"
source/Makefile.anal				- modified "add getcpvetogate"
source/Makefile.anal			- modified "add gethittime, remove particleid"
source/Makefile				- modified "add checkmtx"
source/Makefile					- modified "add  kinfun kinerpropg kineraid from Dima"
source/Makefile				- modified "output is ../exe/fastmc.exe"
source/Makefile				- modified ">>>>>>>>>>>>>>>>TEMPORARILY CHANGE NAME OF EXECUTABLE<<<<<<<<<<<<<<<"
source/makenn.f				- modified "fix bug assoc with extended tgt"
source/make.std				- modified "remove -O from optimization"
source/pvn.f				- modified "add UseTaskForcePV1"
source/recon.f					- modified "add SignOfPz to fix bug for backward-going photon"
source/recon.f					- modified "Dima's mods for new ntuple variables and some fixes"
source/recon.f							- modified "discard fits with negative fitted photon energy"
source/recon.f				- modified "resolve sign ambiguity in Txz,Tyz using z(hit),z(k)"
source/recon.f				- modified "TEMPORARY DEBUG OUTPUT"
source/reconinfo.f				- modified "change range of recierr from [-1,4] to [-1,7]"
source/reconinfo.inc				- modified "Dima's mods for new ntuple variables and some fixes"
source/rhistory.f			- modified "mods to evt gen jobs"
source/rhistory.f			- modified "VE(itk) -> VE(itk,irec)"
source/select_signal.f			- modified "add dEstar,Emiss cut to AvdS cuts"
source/select_signal.f				- modified "add E*, Ymiss, Pmiss cuts to AvdS cuts"
source/select_signal.f			- modified "add RemovePKcut for MZ cuts"
source/select_signal.f			- modified "add RemoveUpperPKcut for MZ cuts"
source/select_signal.f			- modified "new AvdS cuts, new Jcuts"
source/select_signal.f				- modified "remove usveto usage"
source/select_signal.f				- modified "report Mnu2,CVgate in hi wt evt dump"
source/select_signal.f			- modified "VE(itk) -> VE(itk,irec)"
source/setupanal.f			- modified "add CatcherModel for E-dependent catcher ineffys"
source/setupanal.f			- modified "add IgnoreDIF"
source/setupanal.f			- modified "add RemovePKcut"
source/setupanal.f			- modified "add RemoveUpperPKcut"
source/setupanal.f			- modified "add UseBetaMax"
source/setupanal.f				- modified "add UseMnu2depCPVgate"
source/setupanal.f			- modified "add UseTaskForcePV1"
source/setupanal.f			- modified "lower PV threshold to 3 MeV"
source/setupanal.f			- modified "remove `Use mu+ chgveto effyfor non-annihilating e+` messsage, add CPVetoGate"
source/smear.f				- modified "convert sigma(angle) to sigma(tan(angle)) for Bryman model"
source/smear.f					- modified "Dima's mods for new ntuple variables and some fixes"
source/smear.f				- modified "fix bug for backwards going photons"
source/trackinfo.inc				- modified "Dima's mods for new ntuple variables and some fixes"
source/transfer2_1.f			- modified "add check for nan"
source/transfer2_1.f			- modified "TEMPORARY Look for NAN"
source/userend.f				- modified "add GZIP_OUTPUT_FILE"
source/userinit.f				- modified "Dima's mods for new ntuple variables and some fixes"
source/userselect.f			- modified "add debug output"
source/usveto.f				- modified "add IgnoreDIF"
source/usveto.f				- modified "add UseTaskForcePV1"
source/usveto.f				- modified "non-anni e+ no longer has mu+ ineffy"
source/writemtx.f			- modified "warn if correl mtx uncalculable"
source/xpar.f					- modified "add arg to fix bug for backward-going photon"
source/xpar.f				- modified "add debug"
Templates/control.template			- modified "add GZIP_OUTPUT_FILE"

% cvs diff -D now > cvs.diff.now
cvs server: Diffing .
cvs server: Diffing DataBase
cvs server: Diffing Templates
cvs server: Diffing analysis
cvs server: Diffing geometry
cvs server: Diffing scripts
cvs server: scripts/control.template no longer exists, no comparison available
cvs server: Diffing source

############### NEW FILES FOR CVS
cvs add DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.100-1000mev.dat
cvs add DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.10-100mev.dat
cvs add DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.1-10mev.dat
cvs add DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.dat
cvs add DataBase/catcher.ineffy.thres1.4pe.thres2.3pe.dat
cvs add DataBase/catcher.ineffy.thres1.6pe.thres2.2pe.dat
cvs add DataBase/catcher.ineffy.thres1.6pe.thres2.3pe.dat

cvs add geometry/detector.22.dat
cvs add scripts/default.decay.dat.old

cvs add source/catchedep.f
cvs add source/checkmtx.f
cvs add source/fitpi0.inc
cvs add source/getcpvetogate.f
cvs add source/gethittime.f
cvs add source/hitinfo.inc
cvs add source/kineraid.f
cvs add source/kinerpropg.f
cvs add source/kinfun.f

cvs commit -m "catcher ineffy files"          DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.100-1000mev.dat
cvs commit -m "catcher ineffy files"          DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.10-100mev.dat
cvs commit -m "catcher ineffy files"          DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.1-10mev.dat
cvs commit -m "catcher ineffy from H.Morii"         DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.dat
cvs commit -m "catcher ineffy from H.Morii"         DataBase/catcher.ineffy.thres1.4pe.thres2.3pe.dat
cvs commit -m "catcher ineffy from H.Morii"         DataBase/catcher.ineffy.thres1.6pe.thres2.2pe.dat
cvs commit -m "catcher ineffy from H.Morii"         DataBase/catcher.ineffy.thres1.6pe.thres2.3pe.dat

cvs commit -m "change catcher detector from 200x10 to 150x15 (XxY cm)"    geometry/detector.22.dat
cvs commit -m "copy of default.decay.dat before PDG2004"        scripts/default.decay.dat.old
cvs commit -m "new E-dependent catcher ineffys"         source/catchedep.f
cvs commit -m "check validity of doubprec cov mtx"       source/checkmtx.f
cvs commit -m "Dima's additions for new ntuple variables"       source/fitpi0.inc
cvs commit -m "calculate Mnu2-dependent CPVeto gate width"        source/getcpvetogate.f

cvs commit -m "fill CVHitTime"           source/gethittime.f
cvs commit -m "info on where photon 'converted'"        source/hitinfo.inc
cvs commit -m "Dima's additions for new ntuple variables"       source/kineraid.f
cvs commit -m "Dima's additions for new ntuple variables"       source/kinerpropg.f
cvs commit -m "Dima's additions for new ntuple variables"       source/kinfun.f

##################### MODIFIED FILES FOR CVS
cvs commit -m "copy of detector.22.dat"                         geometry/detector.dat
cvs commit -m "add more plot options"                        pve787.kumac
cvs commit -m "updated with PDG2004"                         scripts/default.decay.dat
cvs commit -m "executable is fastmc.exe"                         scripts/simple.run.fastmc.script
cvs commit -m "add chargeonly option, change njob for ke3g, kp2"                    scripts/submit.standard.bunch.of.jobs.script
cvs commit -m "modify output" 					scripts/Trim.Down.ANAL

cvs commit -m "add RemoveUpperPKcut for AK cuts"                       source/akira.offline.f
cvs commit -m "add warning if Nevent>MaxEvent, reduce hiwtdump for kp2, remove calls to s/r particleid, set HiWtDump=1e-6 for ke3g, turn off all allbut1 hists"      source/anal.f

cvs commit -m "add Mnu2(Nrecon), add CVHitTime, VE(itk) -> VE(itk,irec)"                       source/analvar.inc

cvs commit -m "remove smear.inc"                          source/beam_collimator.f
cvs commit -m "add kp2 hists, PK vs Thit plot, remove unused hists, set titles accding to UseBetaMax"             source/bookanal.f
cvs commit -m "resolve Txz,Tyz ambiguity"                         source/cfun_0g.f
cvs commit -m "protect against mass^2<0, resolve Txz,Tyz ambiguity"                      source/cfun_1g.f
cvs commit -m "protect against mass^2<0, resolve sign ambiguity in Txz,Tyz using z(hit),z(k)"                  source/cfun.f
cvs commit -m "add GZIP_OUTPUT_FILE"                          source/control.f
cvs commit -m "report size of catcher detector"                       source/detector.f
cvs commit -m "add GZIP_OUTPUT_FILE"                          source/event.inc

cvs commit -m "add PK vs Thit plot, fill kp2 hists, remove unused hists, use CVHitTime from common, use Mnu2 from common"         source/fillanal.f
cvs commit -m "Dima's mods for new ntuple variables and some fixes, handle ierr=5 & 6"               source/fitpi0.f
cvs commit -m "add CatcherModel, CPVetoGate, IgnoreDIF, RemoveUpperPKcut, UseBetaMax, UseTaskForcePV1"                     source/flags.inc
cvs commit -m "add IgnoreDIF, adjust veto ineffy to take into account CPVetoGate, calculate Mnu2(Nrecon), add UseMnu2depCPVgate, disable PVboost for annih e+ from ke3g, modify debug output"    source/getcandwt.f

cvs commit -m "Dima's mods for new ntuple variables and some fixes"                   source/get_pr_resolution.f
cvs commit -m "add CatcherModel for E-dependent catcher ineffys, add IgnoreDIF, UseTaskForcePV1, disable PVboost for annih e+ from ke3g, non-anni e+ no longer has mu+ ineffy, add argument CPVineffy"  source/gettrkweight.f
cvs commit -m "add CatcherModel for E-dependent catcher ineffys, add UseTaskForcePV1, initialize EXTENDED_TARGET, BEAM_COLLIMATION for analysis job"              source/initanal.f
cvs commit -m "update BR(KL) using RPP 2004"                       source/initdecayit.f
cvs commit -m "add GZIP_OUTPUT_FILE"                          source/init.f
cvs commit -m "try to avoid confusing optimization"                       source/inside.f
cvs commit -m "add debug output"                         source/kinfit.f

cvs commit -m "add catchedep, getcpvetogate, gethittime, remove particleid"                      source/Makefile.anal
cvs commit -m "add checkmtx, kinfun, kinerpropg, kineraid"                       source/Makefile
cvs commit -m "fix bug assoc with extended tgt"                      source/makenn.f
cvs commit -m "remove -O from optimization"                        source/make.std

cvs commit -m "change size of CPV, add debug, improve code" 	source/positionatcv.f

cvs commit -m "add UseTaskForcePV1"                          source/pvn.f
cvs commit -m "Dima's mods for new ntuple variables and some fixes, discard fits with negative fitted photon energy, resolve sign ambiguity in Txz,Tyz using z(hit),z(k)"     source/recon.f
cvs commit -m "change range of recierr from [-1,4] to [-1,7], Dima's mods for new ntuple variables and some fixes"           source/reconinfo.inc
cvs commit -m "mods to evt gen jobs, VE(itk) -> VE(itk,irec)"                    source/rhistory.f
cvs commit -m "add E*, Ymiss, Pmiss cuts to AvdS cuts, add RemoveUpperPKcut for MZ cuts, other mods"             source/select_signal.f

cvs commit -m "add CatcherModel for E-dependent catcher ineffys, IgnoreDIF,RemoveUpperPKcut,UseBetaMax,UseMnu2depCPVgate,UseTaskForcePV1,CPVetoGate"                     source/setupanal.f
cvs commit -m "convert sigma(angle) to sigma(tan(angle)) for Bryman model,Dima's mods for new ntuple variables, fix bug for backwards going photons"          source/smear.f
cvs commit -m "Dima's mods for new ntuple variables and some fixes"                   source/trackinfo.inc
cvs commit -m "add check for nan"                        source/transfer2_1.f
cvs commit -m "add GZIP_OUTPUT_FILE"                          source/userend.f
cvs commit -m "Dima's mods for new ntuple variables and some fixes"                   source/userinit.f

cvs commit -m "add debug output"                         source/userevent.f

cvs commit -m "add debug output"                         source/userselect.f
cvs commit -m "add IgnoreDIF, UseTaskForcePV1, non-anni e+ no longer has mu+ ineffy"                  source/usveto.f
cvs commit -m "warn if correl mtx uncalculable"                       source/writemtx.f
cvs commit -m "add arg to fix bug for backward-going photon, add debug output"                 source/xpar.f
cvs commit -m "add GZIP_OUTPUT_FILE"                          Templates/control.template

######################## NEW TAG
cvs tag v2_0

results from
% cvs tag v2_0 >& cvs.tag.v2_0.log
--- cvs.tag.v2_0.log:
? Notes
? check.zellers.cuts
? compare.e949.avds.fluka.pv.ineffy.ps.gz
? cvs.diff.now
? cvs.tag.v2_0.log
? last.kumac
? last.kumacold
? paw.metafile
? pv.ineffy.with.e949.prelim.avds.10mev.threshold.ps.gz
? pv.ineffy.with.e949.prelim.avds.3mev.threshold.ps.gz
? pv.ineffy.with.e949.prelim.avds.5mev.threshold.ps.gz
? remover
? xxxx
? scripts/1.2
? scripts/OLD.aspect1.bryman.list
? scripts/a.
? scripts/another.one.kpnn.and.ten.kp2.aspect1.bryman.list
? scripts/aspect1.bryman.list
? scripts/aspect1.bryman.list.OLD
? scripts/aspect1.bryman.list.before.cov.matrices
? scripts/aspect1.bryman.new.cpv.300604.1716.log
? scripts/aspect1.bryman.new.pv.190604.1103.log
? scripts/aspect1.bryman.new.pv.220604.2124.log
? scripts/aspect1.bryman.new.pv.cv.010704.1703.log
? scripts/aspect1.bryman.new.pv.log
? scripts/aspect1.bryman.optimistic.pv.log
? scripts/aspect1.bryman.std.pv.180604.1113.log
? scripts/aspect1.bryman.std.pv.230604.0956.log
? scripts/aspect1.bryman.std.pv.250604.1722.log
? scripts/aspect1.bryman.std.pv.log
? scripts/aspect1.konaka.pr.list
? scripts/aspect1.zeller.1.kp3.file.list
? scripts/aspect1.zeller.3.kp2.file.list
? scripts/aspect1.zeller.kapinos2.coll.ext.tgt.zdk.ds.big.ds.hole.list
? scripts/aspect1.zeller.kapinos2.coll.ext.tgt.zdk.ds.list
? scripts/aspect1.zeller.kapinos2.coll.extended.tgt.list
? scripts/aspect1.zeller.kapinos2.ext.tgt.coll.dk.ds.list
? scripts/aspect1.zeller.kapinos2.ext.tgt.coll.dk.ds.summary
? scripts/aspect1.zeller.kcp3.kapinos2.ext.tgt.coll.dk.ds.list
? scripts/aspect1.zeller.ke3g.kcp3.kapinos2.ext.tgt.coll.dk.ds.list
? scripts/aspect1.zeller.ke4.ke3g.kcp3.kapinos2.ext.tgt.coll.dk.ds.list
? scripts/aspect1.zeller.kpnn.kapinos2.list
? scripts/aspect1.zeller.pnn.only.list
? scripts/aspect1.zeller.pr.kapinos1.summary
? scripts/aspect1.zeller.pr.list
? scripts/aspect1.zeller.unskimmed.kp2.list
? scripts/aspect2.konaka.pr.list
? scripts/aspect2.test.list
? scripts/aspect2.zeller.pr.list
? scripts/aspect2.zeller_kpnn_only.list
? scripts/aspect2.zellerfull.pr.list
? scripts/aspect3.konaka.pr.list
? scripts/aspect3.zeller.pr.list
? scripts/aspect4.konaka.pr.list
? scripts/aspect4.zeller.pr.list
? scripts/avg.veto.ineffy.kp2.m0.2
? scripts/avg.veto.ineffy.kp2.m0.5
? scripts/avg.veto.ineffy.kp2.m1
? scripts/avg.veto.ineffy.kp2.m10
? scripts/avg.veto.ineffy.kp2.m2
? scripts/avg.veto.ineffy.kp2.m20
? scripts/avg.veto.ineffy.kp2.m3
? scripts/avg.veto.ineffy.kp2.m30
? scripts/avg.veto.ineffy.kp2.m4
? scripts/avg.veto.ineffy.kp2.m40
? scripts/avg.veto.ineffy.kp2.m5
? scripts/avg.veto.ineffy.kp2.m6
? scripts/avg.veto.ineffy.kp2.p0
? scripts/avg.veto.ineffy.kp2.p0.2
? scripts/avg.veto.ineffy.kp2.p0.5
? scripts/avg.veto.ineffy.kp2.p1
? scripts/avg.veto.ineffy.kp2.p10
? scripts/avg.veto.ineffy.kp2.p2
? scripts/avg.veto.ineffy.kp2.p20
? scripts/avg.veto.ineffy.kp2.p3
? scripts/avg.veto.ineffy.kp2.p30
? scripts/avg.veto.ineffy.kp2.p4
? scripts/avg.veto.ineffy.kp2.p40
? scripts/avg.veto.ineffy.kp2.p5
? scripts/avg.veto.ineffy.kp2.p6
? scripts/avg.veto.ineffy.kp3.m0.2
? scripts/avg.veto.ineffy.kp3.m1
? scripts/avg.veto.ineffy.kp3.m10
? scripts/avg.veto.ineffy.kp3.m2
? scripts/avg.veto.ineffy.kp3.m20
? scripts/avg.veto.ineffy.kp3.m3
? scripts/avg.veto.ineffy.kp3.m30
? scripts/avg.veto.ineffy.kp3.m4
? scripts/avg.veto.ineffy.kp3.m40
? scripts/avg.veto.ineffy.kp3.m5
? scripts/avg.veto.ineffy.kp3.m6
? scripts/avg.veto.ineffy.kp3.p0
? scripts/avg.veto.ineffy.kp3.p0.2
? scripts/avg.veto.ineffy.kp3.p1
? scripts/avg.veto.ineffy.kp3.p10
? scripts/avg.veto.ineffy.kp3.p2
? scripts/avg.veto.ineffy.kp3.p20
? scripts/avg.veto.ineffy.kp3.p3
? scripts/avg.veto.ineffy.kp3.p30
? scripts/avg.veto.ineffy.kp3.p4
? scripts/avg.veto.ineffy.kp3.p40
? scripts/avg.veto.ineffy.kp3.p5
? scripts/avg.veto.ineffy.kp3.p6
? scripts/b.1
? scripts/c.
? scripts/control.dat.remove.ybeam.constraint
? scripts/cvs.diff.now
? scripts/e787.pv.aspect1.zeller.summary
? scripts/find.warning
? scripts/findnan.control
? scripts/five.kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
? scripts/gunzipper
? scripts/gzipper
? scripts/kcp3.aspect1.bryman.list
? scripts/kcp3.jobs.log
? scripts/ke3g.aspect1.bryman.list
? scripts/ke3g.bkgd.aspect1.konaka
? scripts/ke3g.bkgd.aspect1.konaka.nohole
? scripts/ke3g.bkgd.aspect1.zeller
? scripts/ke3g.bkgd.aspect1.zeller.before.dif.fix
? scripts/ke3g.bkgd.aspect1.zeller.nohole
? scripts/ke3g.bkgd.aspect2.konaka
? scripts/ke3g.bkgd.aspect2.konaka.nohole
? scripts/ke3g.bkgd.aspect2.zeller
? scripts/ke3g.bkgd.aspect2.zeller.before.dif.fix
? scripts/ke3g.bkgd.aspect2.zeller.nohole
? scripts/ke3g.bkgd.aspect3.konaka
? scripts/ke3g.bkgd.aspect3.konaka.nohole
? scripts/ke3g.bkgd.aspect3.zeller
? scripts/ke3g.bkgd.aspect3.zeller.before.dif.fix
? scripts/ke3g.bkgd.aspect3.zeller.nohole
? scripts/ke3g.bkgd.aspect4.konaka
? scripts/ke3g.bkgd.aspect4.konaka.nohole
? scripts/ke3g.bkgd.aspect4.zeller
? scripts/ke3g.bkgd.aspect4.zeller.before.dif.fix
? scripts/ke3g.bkgd.aspect4.zeller.nohole
? scripts/ke3g.bkgd.kp2.m0.2
? scripts/ke3g.bkgd.kp2.m0.5
? scripts/ke3g.bkgd.kp2.m1
? scripts/ke3g.bkgd.kp2.m10
? scripts/ke3g.bkgd.kp2.m2
? scripts/ke3g.bkgd.kp2.m20
? scripts/ke3g.bkgd.kp2.m3
? scripts/ke3g.bkgd.kp2.m30
? scripts/ke3g.bkgd.kp2.m4
? scripts/ke3g.bkgd.kp2.m40
? scripts/ke3g.bkgd.kp2.m5
? scripts/ke3g.bkgd.kp2.m6
? scripts/ke3g.bkgd.kp2.p0
? scripts/ke3g.bkgd.kp2.p0.2
? scripts/ke3g.bkgd.kp2.p0.5
? scripts/ke3g.bkgd.kp2.p1
? scripts/ke3g.bkgd.kp2.p10
? scripts/ke3g.bkgd.kp2.p2
? scripts/ke3g.bkgd.kp2.p20
? scripts/ke3g.bkgd.kp2.p3
? scripts/ke3g.bkgd.kp2.p30
? scripts/ke3g.bkgd.kp2.p4
? scripts/ke3g.bkgd.kp2.p40
? scripts/ke3g.bkgd.kp2.p5
? scripts/ke3g.bkgd.kp2.p6
? scripts/ke3g.bkgd.kp3.m0.2
? scripts/ke3g.bkgd.kp3.m1
? scripts/ke3g.bkgd.kp3.m10
? scripts/ke3g.bkgd.kp3.m2
? scripts/ke3g.bkgd.kp3.m20
? scripts/ke3g.bkgd.kp3.m3
? scripts/ke3g.bkgd.kp3.m30
? scripts/ke3g.bkgd.kp3.m4
? scripts/ke3g.bkgd.kp3.m40
? scripts/ke3g.bkgd.kp3.m5
? scripts/ke3g.bkgd.kp3.m6
? scripts/ke3g.bkgd.kp3.p0
? scripts/ke3g.bkgd.kp3.p0.2
? scripts/ke3g.bkgd.kp3.p1
? scripts/ke3g.bkgd.kp3.p10
? scripts/ke3g.bkgd.kp3.p2
? scripts/ke3g.bkgd.kp3.p20
? scripts/ke3g.bkgd.kp3.p3
? scripts/ke3g.bkgd.kp3.p30
? scripts/ke3g.bkgd.kp3.p4
? scripts/ke3g.bkgd.kp3.p40
? scripts/ke3g.bkgd.kp3.p5
? scripts/ke3g.bkgd.kp3.p6
? scripts/ke3g.bkgd.zeller.pr
? scripts/ke3g.jobs.log
? scripts/ke4.jobs.log
? scripts/ke4.only.aspect1.bryman.list
? scripts/kp2.aspect1.bryman.list
? scripts/kp2.bkgd.aspect1.konaka
? scripts/kp2.bkgd.aspect1.konaka.nohole
? scripts/kp2.bkgd.aspect1.zeller
? scripts/kp2.bkgd.aspect1.zeller.before.dif.fix
? scripts/kp2.bkgd.aspect1.zeller.nohole
? scripts/kp2.bkgd.aspect2.konaka
? scripts/kp2.bkgd.aspect2.konaka.nohole
? scripts/kp2.bkgd.aspect2.zeller
? scripts/kp2.bkgd.aspect2.zeller.before.dif.fix
? scripts/kp2.bkgd.aspect2.zeller.nohole
? scripts/kp2.bkgd.aspect3.konaka
? scripts/kp2.bkgd.aspect3.konaka.nohole
? scripts/kp2.bkgd.aspect3.zeller
? scripts/kp2.bkgd.aspect3.zeller.before.dif.fix
? scripts/kp2.bkgd.aspect3.zeller.nohole
? scripts/kp2.bkgd.aspect4.konaka
? scripts/kp2.bkgd.aspect4.konaka.nohole
? scripts/kp2.bkgd.aspect4.zeller
? scripts/kp2.bkgd.aspect4.zeller.before.dif.fix
? scripts/kp2.bkgd.aspect4.zeller.nohole
? scripts/kp2.bkgd.kp2.m0.2
? scripts/kp2.bkgd.kp2.m0.5
? scripts/kp2.bkgd.kp2.m1
? scripts/kp2.bkgd.kp2.m10
? scripts/kp2.bkgd.kp2.m2
? scripts/kp2.bkgd.kp2.m20
? scripts/kp2.bkgd.kp2.m3
? scripts/kp2.bkgd.kp2.m30
? scripts/kp2.bkgd.kp2.m4
? scripts/kp2.bkgd.kp2.m40
? scripts/kp2.bkgd.kp2.m5
? scripts/kp2.bkgd.kp2.m6
? scripts/kp2.bkgd.kp2.p0
? scripts/kp2.bkgd.kp2.p0.2
? scripts/kp2.bkgd.kp2.p0.5
? scripts/kp2.bkgd.kp2.p1
? scripts/kp2.bkgd.kp2.p10
? scripts/kp2.bkgd.kp2.p2
? scripts/kp2.bkgd.kp2.p20
? scripts/kp2.bkgd.kp2.p3
? scripts/kp2.bkgd.kp2.p30
? scripts/kp2.bkgd.kp2.p4
? scripts/kp2.bkgd.kp2.p40
? scripts/kp2.bkgd.kp2.p5
? scripts/kp2.bkgd.kp2.p6
? scripts/kp2.bkgd.kp3.m0.2
? scripts/kp2.bkgd.kp3.m1
? scripts/kp2.bkgd.kp3.m10
? scripts/kp2.bkgd.kp3.m2
? scripts/kp2.bkgd.kp3.m20
? scripts/kp2.bkgd.kp3.m3
? scripts/kp2.bkgd.kp3.m30
? scripts/kp2.bkgd.kp3.m4
? scripts/kp2.bkgd.kp3.m40
? scripts/kp2.bkgd.kp3.m5
? scripts/kp2.bkgd.kp3.m6
? scripts/kp2.bkgd.kp3.p0
? scripts/kp2.bkgd.kp3.p0.2
? scripts/kp2.bkgd.kp3.p1
? scripts/kp2.bkgd.kp3.p10
? scripts/kp2.bkgd.kp3.p2
? scripts/kp2.bkgd.kp3.p20
? scripts/kp2.bkgd.kp3.p3
? scripts/kp2.bkgd.kp3.p30
? scripts/kp2.bkgd.kp3.p4
? scripts/kp2.bkgd.kp3.p40
? scripts/kp2.bkgd.kp3.p5
? scripts/kp2.bkgd.kp3.p6
? scripts/kp2.bkgd.zeller.pr
? scripts/kp2.m0.1.list
? scripts/kp2.m0.2.list
? scripts/kp2.m0.3.list
? scripts/kp2.m0.5.list
? scripts/kp2.m1.list
? scripts/kp2.m10.list
? scripts/kp2.m2.list
? scripts/kp2.m20.list
? scripts/kp2.m3.list
? scripts/kp2.m30.list
? scripts/kp2.m4.list
? scripts/kp2.m40.list
? scripts/kp2.m5.list
? scripts/kp2.m6.list
? scripts/kp2.p0.1.list
? scripts/kp2.p0.2.list
? scripts/kp2.p0.3.list
? scripts/kp2.p0.5.list
? scripts/kp2.p0.list
? scripts/kp2.p1.list
? scripts/kp2.p10.list
? scripts/kp2.p2.list
? scripts/kp2.p20.list
? scripts/kp2.p3.list
? scripts/kp2.p30.list
? scripts/kp2.p4.list
? scripts/kp2.p40.list
? scripts/kp2.p5.list
? scripts/kp2.p6.list
? scripts/kp3.aspect1.zeller.kapinos2.ext.tgt.coll.dk.ds.list
? scripts/kp3.bkgd.aspect1.konaka
? scripts/kp3.bkgd.aspect1.konaka.nohole
? scripts/kp3.bkgd.aspect1.zeller
? scripts/kp3.bkgd.aspect1.zeller.before.dif.fix
? scripts/kp3.bkgd.aspect1.zeller.nohole
? scripts/kp3.bkgd.aspect2.konaka
? scripts/kp3.bkgd.aspect2.konaka.nohole
? scripts/kp3.bkgd.aspect2.zeller
? scripts/kp3.bkgd.aspect2.zeller.before.dif.fix
? scripts/kp3.bkgd.aspect2.zeller.nohole
? scripts/kp3.bkgd.aspect3.konaka
? scripts/kp3.bkgd.aspect3.konaka.nohole
? scripts/kp3.bkgd.aspect3.zeller
? scripts/kp3.bkgd.aspect3.zeller.before.dif.fix
? scripts/kp3.bkgd.aspect3.zeller.nohole
? scripts/kp3.bkgd.aspect4.konaka
? scripts/kp3.bkgd.aspect4.konaka.nohole
? scripts/kp3.bkgd.aspect4.zeller
? scripts/kp3.bkgd.aspect4.zeller.before.dif.fix
? scripts/kp3.bkgd.aspect4.zeller.nohole
? scripts/kp3.bkgd.kp2.m0.2
? scripts/kp3.bkgd.kp2.m0.5
? scripts/kp3.bkgd.kp2.m1
? scripts/kp3.bkgd.kp2.m10
? scripts/kp3.bkgd.kp2.m2
? scripts/kp3.bkgd.kp2.m20
? scripts/kp3.bkgd.kp2.m3
? scripts/kp3.bkgd.kp2.m30
? scripts/kp3.bkgd.kp2.m4
? scripts/kp3.bkgd.kp2.m40
? scripts/kp3.bkgd.kp2.m5
? scripts/kp3.bkgd.kp2.m6
? scripts/kp3.bkgd.kp2.p0
? scripts/kp3.bkgd.kp2.p0.2
? scripts/kp3.bkgd.kp2.p0.5
? scripts/kp3.bkgd.kp2.p1
? scripts/kp3.bkgd.kp2.p10
? scripts/kp3.bkgd.kp2.p2
? scripts/kp3.bkgd.kp2.p20
? scripts/kp3.bkgd.kp2.p3
? scripts/kp3.bkgd.kp2.p30
? scripts/kp3.bkgd.kp2.p4
? scripts/kp3.bkgd.kp2.p40
? scripts/kp3.bkgd.kp2.p5
? scripts/kp3.bkgd.kp2.p6
? scripts/kp3.bkgd.kp3.m0.2
? scripts/kp3.bkgd.kp3.m1
? scripts/kp3.bkgd.kp3.m10
? scripts/kp3.bkgd.kp3.m2
? scripts/kp3.bkgd.kp3.m20
? scripts/kp3.bkgd.kp3.m3
? scripts/kp3.bkgd.kp3.m30
? scripts/kp3.bkgd.kp3.m4
? scripts/kp3.bkgd.kp3.m40
? scripts/kp3.bkgd.kp3.m5
? scripts/kp3.bkgd.kp3.m6
? scripts/kp3.bkgd.kp3.p0
? scripts/kp3.bkgd.kp3.p0.2
? scripts/kp3.bkgd.kp3.p1
? scripts/kp3.bkgd.kp3.p10
? scripts/kp3.bkgd.kp3.p2
? scripts/kp3.bkgd.kp3.p20
? scripts/kp3.bkgd.kp3.p3
? scripts/kp3.bkgd.kp3.p30
? scripts/kp3.bkgd.kp3.p4
? scripts/kp3.bkgd.kp3.p40
? scripts/kp3.bkgd.kp3.p5
? scripts/kp3.bkgd.kp3.p6
? scripts/kp3.bkgd.zeller.pr
? scripts/kp3.m0.2.list
? scripts/kp3.m1.list
? scripts/kp3.m10.list
? scripts/kp3.m2.list
? scripts/kp3.m20.list
? scripts/kp3.m3.list
? scripts/kp3.m30.list
? scripts/kp3.m4.list
? scripts/kp3.m40.list
? scripts/kp3.m5.list
? scripts/kp3.m6.list
? scripts/kp3.only.aspect1.bryman.list
? scripts/kp3.only.aspect1.bryman.new.pv.log
? scripts/kp3.only.aspect1.bryman.optimistic.pv.log
? scripts/kp3.only.aspect1.bryman.std.pv.log
? scripts/kp3.p0.2.list
? scripts/kp3.p0.list
? scripts/kp3.p1.list
? scripts/kp3.p10.list
? scripts/kp3.p2.list
? scripts/kp3.p20.list
? scripts/kp3.p3.list
? scripts/kp3.p30.list
? scripts/kp3.p4.list
? scripts/kp3.p40.list
? scripts/kp3.p5.list
? scripts/kp3.p6.list
? scripts/kpnn.aspect1.bryman.list
? scripts/kpnn.ke3g.ke4.kcp3.aspect1.bryman.list
? scripts/kpnn.ke4.ke3g.kcp3.aspect1.bryman.list
? scripts/kpnn.kp2.aspect1.bryman.list
? scripts/kpnn.kp2.aspect1.list
? scripts/kpnn.kp2.kcp3.aspect1.bryman.list
? scripts/last.kumac
? scripts/last.kumacold
? scripts/lister
? scripts/neutron.beam.list
? scripts/neutron.dshalo.list
? scripts/neutron.ushalo.list
? scripts/neutron.zushalo.list
? scripts/one.each.aspect1.bryman.list
? scripts/one.ke3g.file.list
? scripts/one.ke3g.ke4.kcp3.aspect1.bryman.list
? scripts/one.kpnn.and.kcp3.aspect1.bryman.list
? scripts/one.kpnn.and.ke4.aspect1.bryman.list
? scripts/one.kpnn.and.kp2..aspect1.bryman.list
? scripts/one.kpnn.and.ten.kp2.aspect1.bryman.list
? scripts/one.kpnn.and.two.kp2.aspect1.bryman.list
? scripts/one.kpnn.ke4.ke3g.kcp3.aspect1.bryman.list
? scripts/paw.metafile
? scripts/remover
? scripts/sample.aspect1.bryman.list
? scripts/short.for.test.list
? scripts/short.test.optimizer.list
? scripts/sob.bkg.aspect1.konaka
? scripts/sob.bkg.aspect1.konaka.nohole
? scripts/sob.bkg.aspect1.zeller
? scripts/sob.bkg.aspect1.zeller.before.dif.fix
? scripts/sob.bkg.aspect1.zeller.nohole
? scripts/sob.bkg.aspect2.konaka
? scripts/sob.bkg.aspect2.konaka.nohole
? scripts/sob.bkg.aspect2.zeller
? scripts/sob.bkg.aspect2.zeller.before.dif.fix
? scripts/sob.bkg.aspect2.zeller.nohole
? scripts/sob.bkg.aspect3.konaka
? scripts/sob.bkg.aspect3.konaka.nohole
? scripts/sob.bkg.aspect3.zeller
? scripts/sob.bkg.aspect3.zeller.before.dif.fix
? scripts/sob.bkg.aspect3.zeller.nohole
? scripts/sob.bkg.aspect4.konaka
? scripts/sob.bkg.aspect4.konaka.nohole
? scripts/sob.bkg.aspect4.zeller
? scripts/sob.bkg.aspect4.zeller.before.dif.fix
? scripts/sob.bkg.aspect4.zeller.nohole
? scripts/sob.bkg.kp2.m0.2
? scripts/sob.bkg.kp2.m0.5
? scripts/sob.bkg.kp2.m1
? scripts/sob.bkg.kp2.m10
? scripts/sob.bkg.kp2.m2
? scripts/sob.bkg.kp2.m20
? scripts/sob.bkg.kp2.m3
? scripts/sob.bkg.kp2.m30
? scripts/sob.bkg.kp2.m4
? scripts/sob.bkg.kp2.m40
? scripts/sob.bkg.kp2.m5
? scripts/sob.bkg.kp2.m6
? scripts/sob.bkg.kp2.p0
? scripts/sob.bkg.kp2.p0.2
? scripts/sob.bkg.kp2.p0.5
? scripts/sob.bkg.kp2.p1
? scripts/sob.bkg.kp2.p10
? scripts/sob.bkg.kp2.p2
? scripts/sob.bkg.kp2.p20
? scripts/sob.bkg.kp2.p3
? scripts/sob.bkg.kp2.p30
? scripts/sob.bkg.kp2.p4
? scripts/sob.bkg.kp2.p40
? scripts/sob.bkg.kp2.p5
? scripts/sob.bkg.kp2.p6
? scripts/sob.bkg.kp3.m0.2
? scripts/sob.bkg.kp3.m1
? scripts/sob.bkg.kp3.m10
? scripts/sob.bkg.kp3.m2
? scripts/sob.bkg.kp3.m20
? scripts/sob.bkg.kp3.m3
? scripts/sob.bkg.kp3.m30
? scripts/sob.bkg.kp3.m4
? scripts/sob.bkg.kp3.m40
? scripts/sob.bkg.kp3.m5
? scripts/sob.bkg.kp3.m6
? scripts/sob.bkg.kp3.p0
? scripts/sob.bkg.kp3.p0.2
? scripts/sob.bkg.kp3.p1
? scripts/sob.bkg.kp3.p10
? scripts/sob.bkg.kp3.p2
? scripts/sob.bkg.kp3.p20
? scripts/sob.bkg.kp3.p3
? scripts/sob.bkg.kp3.p30
? scripts/sob.bkg.kp3.p4
? scripts/sob.bkg.kp3.p40
? scripts/sob.bkg.kp3.p5
? scripts/sob.bkg.kp3.p6
? scripts/sob.bkg.zeller.pr
? scripts/std.pv.aspect1.zeller.summary
? scripts/temp.for.zip
? scripts/temp.script
? scripts/test.list
? scripts/test.optimizer.list
? scripts/trimmed.aspect1.bryman.180604.1113
? scripts/trimmed.aspect1.zeller.13jun03
? scripts/trimmed.aspect1.zeller.kapinos2.ext.tgt.coll.dk.ds.23apr04
? scripts/unskimmed.kpnn.kp2.aspect1.bryman.list
? scripts/x.x
? scripts/zeller.pr.list
? source/Makefile.before.Dima
? source/Makefile.testnormco
? source/Makefile.try
? source/cvs.diff.now
? source/fitpi0.f.before.Dima
? source/get_pr_resolution.F
? source/get_pr_resolution.f.before.Dima
? source/gethittime.F
? source/kineraid.f.before.Dima.9sept04
? source/kinfun.f.before.Dima.9sept04
? source/last.kumacold
? source/oldzip.f
? source/packer.f
? source/paw.metafile
? source/recon.f.before.Dima
? source/recon.f.before.Dima.9sept04
? source/reconinfo.inc.before.Dima
? source/reconinfo.inc.before.Dima.9sept04
? source/smear.f.before.Dima
? source/temp.for.zip
? source/testnormco.f
? source/testnormco.hbook
? source/testsys.f
? source/testzip.f
? source/trackinfo.inc.before.Dima
? source/try.f
? source/userinit.f.before.Dima
cvs server: Tagging .
T README
T RUNME
T pve787.kumac
cvs server: Tagging DataBase
T DataBase/Al.photon.attenuation.length.txt
T DataBase/Be.photon.attenuation.length.txt
T DataBase/C.photon.attenuation.length.txt
T DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.1-10mev.dat
T DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.10-100mev.dat
T DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.100-1000mev.dat
T DataBase/catcher.ineffy.thres1.4pe.thres2.2pe.dat
T DataBase/catcher.ineffy.thres1.4pe.thres2.3pe.dat
T DataBase/catcher.ineffy.thres1.6pe.thres2.2pe.dat
T DataBase/catcher.ineffy.thres1.6pe.thres2.3pe.dat
T DataBase/optimizer.edges.dat
T DataBase/preradiator.resolution.txt
T DataBase/primary_beam.dat
T DataBase/skim.statistics.and.log
cvs server: Tagging Templates
T Templates/control.copy.job.template
T Templates/control.template
T Templates/multik.template
T Templates/multik.template.no.fit
T Templates/multik.template.no.smear.no.fit
cvs server: Tagging analysis
T analysis/acceptance_2g.kumac
T analysis/akira.offline.grafici.new.f
T analysis/akira_ntuple.f
T analysis/bookakira.f
T analysis/catcher.forpaw
T analysis/catcher_hit.forpaw
T analysis/chiprob.forpaw
T analysis/epiwrap.forpaw
T analysis/fillakira.f
T analysis/init.kumac
T analysis/ke3g_chveto.forpaw
T analysis/ke3g_chveto_mike.forpaw
T analysis/kinfit.cmn
T analysis/kl.inc
T analysis/konaka_kwt.f
T analysis/kpi3_cut.forpaw
T analysis/last.kumac
T analysis/last.kumacold
T analysis/load.akira.var.f
T analysis/lorpl.f
T analysis/lorpl.forpaw
T analysis/mike.forpaw
T analysis/mike_test.forpaw
T analysis/offline.f
T analysis/offline.forpaw
T analysis/offline.may1.forpaw
T analysis/offline_01aug.forpaw
T analysis/offline_1g.forpaw
T analysis/offline_1g_original.forpaw
T analysis/offline_2p.forpaw
T analysis/offline_original.forpaw
T analysis/offline_tmp.forpaw
T analysis/partprop.inc
T analysis/path.forpaw
T analysis/path_1g.forpaw
T analysis/paw.metafile
T analysis/print.forpaw
T analysis/pvnew.f
T analysis/pvnew.forpaw
T analysis/pvnew3.forpaw
T analysis/pvnew_e926.forpaw
T analysis/pvnew_kami.forpaw
T analysis/pvnew_kami_1MeV.forpaw
T analysis/pvnew_kami_1mev.forpaw
T analysis/pvpi0.forpaw
T analysis/trackinfo_2.inc
T analysis/wrap_cut.forpaw
cvs server: Tagging geometry
T geometry/collimator.v07_4.dat
T geometry/detector.0.dat
T geometry/detector.1.dat
T geometry/detector.10.dat
T geometry/detector.11.dat
T geometry/detector.12.dat
T geometry/detector.13.dat
T geometry/detector.14.dat
T geometry/detector.15.dat
T geometry/detector.16.dat
T geometry/detector.17.dat
T geometry/detector.18.dat
T geometry/detector.19.dat
T geometry/detector.2.dat
T geometry/detector.20.dat
T geometry/detector.21.dat
T geometry/detector.22.dat
T geometry/detector.3.dat
T geometry/detector.4.dat
T geometry/detector.6.dat
T geometry/detector.7.dat
T geometry/detector.8.dat
T geometry/detector.9.dat
T geometry/detector.dat
T geometry/detector.dat.Geometry.V
cvs server: Tagging scripts
T scripts/Create.avg.veto.ineffy.vectors.script
T scripts/Create.nnpi.bkg.vectors.script
T scripts/Create.sob.bkg.vectors.script
T scripts/Trim.Down.ANAL
T scripts/Trim.to.File
T scripts/analysis.script
T scripts/control.copy.job.template
T scripts/control.dat
T scripts/control.dat.for.interbunch.studies
T scripts/control.for.trigger.studies.dat
T scripts/control.wrap.multi
T scripts/default.decay.dat
T scripts/default.decay.dat.old
T scripts/list.for.analysis
T scripts/run.fastmc.script
T scripts/simple.run.fastmc.script
T scripts/submit.ALL.fastmc.script
T scripts/submit.all.beam.size.jobs
T scripts/submit.kp2.beam.size.jobs.script
T scripts/submit.many.fastmc.script
T scripts/submit.signal.beam.size.jobs
T scripts/submit.standard.bunch.of.jobs.script
T scripts/unzipper.script
T scripts/wrap.run.fastmc.script
cvs server: Tagging source
T source/Makefile
T source/Makefile.anal
T source/Makefile.opt
T source/acceptable.f
T source/acceptance.inc
T source/akira.catcher.f
T source/akira.epiwrap.f
T source/akira.geom.inc
T source/akira.kl.inc
T source/akira.kpi3_cut.f
T source/akira.offline.f
T source/akira.offline_1g.f
T source/akira.path.f
T source/akira.wrap_cut.f
T source/anal.f
T source/analvar.inc
T source/annihilate.f
T source/backward.f
T source/beam_collimator.f
T source/bethe.f
T source/blank.inc
T source/bookanal.f
T source/boostf.f
T source/brems.f
T source/catcha.f
T source/catchedep.f
T source/catchnlay.f
T source/catchp.f
T source/cern.ranmar.f
T source/cfun.f
T source/cfun_0g.f
T source/cfun_1g.f
T source/checkgenbod.f
T source/checkmtx.f
T source/checkodd.f
T source/chgveto.f
T source/cleo.boostf.f
T source/cleo.dalitz.decay.f
T source/cleo.rotat.f
T source/control.f
T source/cutewrap.f
T source/cuts.inc
T source/cv12.f
T source/cvn.f
T source/cvold.f
T source/dalitz.f
T source/decayit.f
T source/decayspec.inc
T source/dedx_scin.f
T source/defineplane.f
T source/detector.f
T source/detector.inc
T source/dfact.f
T source/dinv.f
T source/dumptopofstack.f
T source/ehistory.f
T source/event.inc
T source/evolve.f
T source/fact.inc
T source/fastmc.f
T source/fillallbut1.f
T source/fillanal.f
T source/firstmom.f
T source/fitpi0.f
T source/fitpi0.inc
T source/flags.inc
T source/ganni.f
T source/gannii.f
T source/gdrot.f
T source/geant.inc
T source/gekbin.f
T source/gen_vertex.v07_2.f
T source/genbod.f
T source/geninout.inc
T source/gentk0l.f
T source/get_pr_resolution.f
T source/getannigamlist.f
T source/getcandwt.f
T source/getcpvetogate.f
T source/getdedx.f
T source/gethittime.f
T source/getnextvol.f
T source/getngen.f
T source/getparatz.f
T source/getpath.f
T source/gettmax.f
T source/gettrkweight.f
T source/getxyatz.f
T source/gety0int.f
T source/getzvest.f
T source/gfang.f
T source/goodphoton.f
T source/gphysi.f
T source/gprob.f
T source/gspec.f
T source/hitinfo.inc
T source/init.f
T source/initanal.f
T source/initdecayit.f
T source/inside.f
T source/iopar.inc
T source/jump2dir.f
T source/kamipv.f
T source/kapinos.f
T source/kapinos2.f
T source/kinema.cmn
T source/kineraid.f
T source/kinerpropg.f
T source/kinfit.cmn
T source/kinfit.f
T source/kinfun.f
T source/kparam.inc
T source/kspec.f
T source/kwt.f
T source/ll.f
T source/load.akira.var.f
T source/load_optimizer.f
T source/lorpl.f
T source/make.std
T source/makebox.f
T source/makenn.f
T source/makeplane.f
T source/makeslopedbox.f
T source/marvins.genbod.f
T source/meet.f
T source/my.phsp.f
T source/myranmar.f
T source/n_n_pi0.f
T source/nearmiss.f
T source/neutronnorm.f
T source/new.anal.f
T source/normco.f
T source/nspectrum.f
T source/nt1.anal.inc
T source/ntspec.f
T source/odd.pair.inc
T source/optbin.f
T source/optimizer.f
T source/optimizer.inc
T source/optpacker.f
T source/optreportbin.f
T source/optsmooth.f
T source/optunpacker.f
T source/optwrite.f
T source/pair_prod.f
T source/parser.f
T source/particleid.f
T source/partprop.inc
T source/pdk.f
T source/photonatten.f
T source/phsp.f
T source/pigg.f
T source/positionatcv.f
T source/prerad.f
T source/primary_beam.inc
T source/pstart.f
T source/pv.f
T source/pve787.f
T source/pvn.f
T source/ranmar.f
T source/read_optedges.f
T source/readevent.f
T source/recon.f
T source/reconinfo.inc
T source/report.f
T source/rhistory.f
T source/rnpssn.f
T source/rotat.f
T source/rotzeller.f
T source/select_signal.f
T source/setupanal.f
T source/skimevent.f
T source/smear.f
T source/smear.inc
T source/stack.inc
T source/stats.f
T source/study.f
T source/tcopy.f
T source/tellbox.f
T source/test.genbod.f
T source/testopt.f
T source/trackatvacvesl.f
T source/trackinfo.inc
T source/transfer2_1.f
T source/transport.routines.f
T source/trigger.f
T source/triggerinfo.inc
T source/truexyatanyz.f
T source/truexyatz.f
T source/umc.wtau.f
T source/usegetenv.f
T source/userend.f
T source/userevent.f
T source/userinit.f
T source/userselect.f
T source/usveto.f
T source/vprint.f
T source/vtrue.f
T source/vvloss.f
T source/wl3.f
T source/wl3g.f
T source/wl4.f
T source/wpigg.f
T source/wrapepi.f
T source/writemtx.f
T source/wtau.charged.f
T source/wtau0.f
T source/wtinfo.f
T source/xpar.f
T source/ypjunk.f
T source/zip.f

% cd /u1/djaffe/KOPIO//fastmc/checkout
% ls
exe  fastmc  old_fastmc  TEST  v1_1_fastmc  v1_2_fastmc  v1_3_fastmc
% mv fastmc v1_4_fastmc
% cvs checkout -d fastmc mc/fastmc

% cd fastmc/
% source RUNME
% ls
analysis  condir  CVS  DataBase  geometry  locallog  localntuples  log  ntuples  pve787.kumac  README  RUNME  scripts  source  Templates
% mkdir exe
% cd source
% make
% make -f Makefile.anal
% ls -lrt ../exe/
total 2864
-rwxrwxr-x    1 djaffe   djaffe    1529285 Sep 16 15:46 fastmc.exe
-rwxrwxr-x    1 djaffe   djaffe    1389550 Sep 16 15:46 anal.exe
sizes identical: OK

SUMMARY OF MODIFICATIONS
=========================
> New, improved or modified analysis options:
  - Two version of cuts inspired by Andries van der Schaaf available
  - Several different PV ineffy models available.
  - New energy dependent catcher ineffys
  - Add option of positioning CP veto in decay volume
  - Add option to use timing to evaluate CP veto
  - Add option to ignore decay-in-flight for CP veto
  - Add fixed and Mnu2-dependent CP veto gate
  - Add optional DS window to estimate reduction of CP veto effy
  - Optionally remove upper P(K) cut

> New, improved or modified generation options:
  - Implement calculation of uncertainties on fitted quantities 
   and add to ntuple (from D.Vavilov)
  - Add some results of first fit to ntuple (from D.Vavilov)
  - Optionally gzip output ntuple
  - Fix bug associated with extended target for neutron production
  - Fix bug for fitting of backwards-going photons
  - Fix bug to use sigma(tan(angle)) instead of sigma(angle) in fits
  - Fix bug so that sigma(tan(angle)) of narrow gaussian 
   is always used for Bryman PR model

> Remove -O from compilation options

KNOWN PROBLEMS
==============
1. CPV for e+ should take into account wrapper thickness and energy threshold
2. PV ineffy does not take timing into account

Thu Sep 16 15:48:12 EDT 2004