Wed Mar 17 10:17:21 EST 2004 notes on v07_1 respond to Peter G's questions: ---------------- start email Date: Tue, 16 Mar 2004 16:03:11 -0800 From: Peter Gumplinger To: David E Jaffe Cc: Renee Poutissou Subject: Re: v07_1 of KOPIO GEANT MC now available Hi David, I am trying to understand how the various NTUPLES work together. I wished you had an example code (in FORTRAN) which would tell me how to connect the PREDIGI and DET_BITS and DETNAMES. Assume, I have (in PREDIGI) the ith hit for PRSC. DPRSC(i) is the detector number in sensitive detector set 'PRSC'. How do I go from DPRSC(i) to DNUM(k)? With other words, how does DPRSC(i) relate to 'k'? The former is the number in the set, while the latter is the detector number from a list summed over all sets? How would you use 'unpacker' to go from ELPRSC(i) to the copy numbers for DNAME1, DNAME2 etc.? Thanks, Peter ------------------ end email The following 3 files provide the answers: fix.kopiont1.inc.script - new "change char*32 to char*4 in kopiont1.inc" dmapper.kumac - new "PAW: map DNUM to SNAME" dmapper.f - new "PAW: map DNUM to SNAME" ******************* Wed Mar 24 12:43:02 EST 2004 Nicolo discovers that mc crashes if you ask for only 2 CV layers instead of 3 this is control card CVCP(1) in control.kopio.ffread lets see if i can make it crash: % run.kopio.geant.script 7102 100 i get same warnings that Nicolo had: ***** GSDET ERROR, VOLUME UY06 NOT DEFINED ***** GSDET ERROR, VOLUME UY07 NOT DEFINED ***** GSDET ERROR, VOLUME UY08 NOT DEFINED ***** GSDET ERROR, VOLUME DY06 NOT DEFINED ***** GSDET ERROR, VOLUME DY07 NOT DEFINED ***** GSDET ERROR, VOLUME DY08 NOT DEFINED ***** GSDET ERROR, VOLUME CV06 NOT DEFINED ***** GSDET ERROR, VOLUME CV07 NOT DEFINED ***** GSDET ERROR, VOLUME CV08 NOT DEFINED ***** GSDETH ERROR FOR SET CHVE OR DETECTOR UY06 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR UY07 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR UY08 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR DY06 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR DY07 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR DY08 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR CV06 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR CV07 ***** GSDETH ERROR FOR SET CHVE OR DETECTOR CV08 [deletia] BATCHLOG: run 7102 call 191 Event 8 Events gen. so far 8 Time for last 1 events 0.7600 CPU-SEC Time so far 80.49 CPU-SEC Seeds 478614800 51335654 STOP PACKER: invalid input hit statement executed KGFHITS: CHVE,DY02 ihit= 1 numbv(1-nvdim,ihit)= 0 1 KGFHITS: CHVE,DY02 ihit= 2 numbv(1-nvdim,ihit)= 0 1 PACKER: invalid input hit OK. I can reproduce it. Problem is that kopio_detectors assumes 3 CV layers and so GSDET is called for non-existent volumes. later KGFHITS and PACKER are called for those non-existent volumes. kopio_detectors.F - modified "makes sure CV exists before calling GSDET" test % run.kopio.geant.script 7103 100 still crashes: BATCHLOG: run 7103 call 676 Event 33 Events gen. so far 33 Time for last 1 events 8.910 CPU-SEC Time so far 160.5 CPU-SEC Seeds 1420639796 244580540 STOP PACKER: invalid input hit statement executed KGFHITS: CHVE,DY02 ihit= 1 numbv(1-nvdim,ihit)= 0 1 KGFHITS: CHVE,DY02 ihit= 2 numbv(1-nvdim,ihit)= 0 1 KGFHITS: CHVE,DY02 ihit= 3 numbv(1-nvdim,ihit)= 0 1 KGFHITS: CHVE,DY02 ihit= 4 numbv(1-nvdim,ihit)= 0 1 PACKER: invalid input hit turn on some debugging % run.kopio.geant.script 7104 1 1420639796 244580540 once again have to delve into hideous s/r kopio_charged_veto kopio_charged_veto.F - modified "comments added" kopio_decay_vacuum.F - modified "handle <3 CV layers correctly" try again % run.kopio.geant.script 7105 1 1420639796 244580540 did not crash. try longer test job % run.kopio.geant.script 7106 100 OK Now try to implement suggestions by Renee and Morgan. Renee would like DETNAMES and DET BITS blocks in a separate ntuple. Morgan suggested changing DETNAMES blocks as follows: http://rarek.triumf.ca/elog/ROOT/24 : If we are recording the full paths to sensitive volumes in a preliminary ntuple to be read in at the start of a run, we have the problem of determining which path element copy numbers are constants (and therefore not recorded in the event data), and which ones are variable (and are present in the event data). May I suggest that the path string be written as a physical node path rather than as a list of volumes with copy numbers somehow recorded separately. In other words, the copy numbers would be included in the path. Variable copy numbers would be written as a simple placeholders, which might as will be a C format code, since that's what it needs to become anyway. Example: /ENVL_1/PRER_1/PRQ4_%d/PRQ2_1/PRM2_%d/PXX2_%d/PWX2_1/WC02_%d This will make it very easy to create Root's physical nodes from the hit info, since I believe the sensitive volumes are recorded to the event ntuple in the same order that the %d placeholders occur in the path string. ....... Morgan --------------------- end elog entry initialization_ntuple.F - modified "DETNAMES, DET BITS mods" 084152559 7108 i tried to use find_volume_tree to build the entire volume tree with calls in s/r initialization_ntuple but that takes an incredibly long time and then I get a mess of warnings like MAKE_PREHITS WARNING: SCX1 BOX bad local posn? view= 2 xlocal= 62.831 xbound= 10.080 |xlocal|-xbound= 52.751 MAKE_PREHITS WARNING: SCX1 BOX bad local posn? view= 3 xlocal= 502.82 xbound= 0.40000 |xlocal|-xbound= 502.42 i had to kludge the 'volume number' numbv(i)=1 for all i for the call to find_volume_tree, but this should not matter..? oops, i screwed up the arguments to find_volume_tree. try again. still takes a long time, but no more warning messages. lets make sure initialization_ntuple.inc - modified "DETNAMES, DET BITS mods" more work is needed... Wed Mar 24 17:17:13 EST 2004 *******************8 Thu Mar 25 09:28:52 EST 2004 After some struggles with paw and character strings, i've got a new ntuple (id=5) that has the DET BITS and DETNAMES that gets filled once/output file: PAW > n/pri 5 ****************************************************************** * Ntuple ID = 5 Entries = 1 DET MAPPING ****************************************************************** * Var numb * Type * Packing * Range * Block * Name * ****************************************************************** * 1 * I*4 * * [0,127] * DET BITS * NSD * 2 * U*4 * 7 * [0,127] * DET BITS * SNUM(NSD) * 3 * U*4 * 7 * [0,127] * DET BITS * DNUM(NSD) * 4 * U*4 * 3 * [0,7] * DET BITS * NV_DIM(NSD) * 5 * U*4 * 4 * [0,15] * DET BITS * BITSV(7,NSD) * 1 * C*32 * * * DETNAMES * SNAME(127) * 2 * C*32 * * * DETNAMES * DNAME1(127) * 3 * C*32 * * * DETNAMES * DNAME2(127) * 4 * C*32 * * * DETNAMES * DNAME3(127) * 5 * C*32 * * * DETNAMES * DNAME4(127) ****************************************************************** * Block * Entries * Unpacked * Packed * Packing Factor * ****************************************************************** * DET BITS * 1 * 5084 * Var. * Variable * * DETNAMES * 1 * 20320 * 20320 * 1.000 * * Total * --- * 25404 * Var. * Variable * ****************************************************************** * Blocks = 2 Variables = 10 Max. Columns = 1906 * * I added SNUM to det bits. SNUM(i),DNUM(i) = set number, detector number corresponding to SNAME(i) and DNAMEj(i) where i=1,NSD. In order to map to predigi ntuple block, I have to create predigi entries only for detectors that are enabled. Now all detectors are listed in the predigi block even if they are not enabled. This will destroy the mapping to SNUM,DNUM. book_predigi_ntuple.F - modified "only book predigi ntuple for enabled det. sets" also have to make sure that filling of predigi stuff is correct! predigi.F - modified "only fill predigi ntuple for enabled det. sets" order_predigi_hits.F - modified "only treat enabled det. sets" fill_predigi_hits.F - modified "only treat enabled det. sets" ok, short job with lotsa debug looks ok. try long test job % run.kopio.geant.script 7125 1000 Thu Mar 25 17:02:00 EST 2004 **************************************** Fri Mar 26 09:25:04 EST 2004 no predigi bcat hits in run 7125 for comparison use plot#preanal to make diagnostic plots of E vs T for all detector sets from run 7026: preanal.7026.ps comparison with run 7125 shows only bcat differs. for run 7124 i had massive debug on, 3d event has [snip] =====>HITS IN DETECTOR ** AERO ** OF SET ** BCAT ** HIT TRACK BCMO AERO X Y Z NPE TIME PRNT EDEP 1 15 283 1 -5.73 7.03 0.324E+04 7.00 122. 15.0 842. SET BCAT DETECTOR AERO NWHI= 100 NWDI= 100 VOLUME BCMO NBITSD= 10 VOLUME AERO NBITSD= 1 HIT ELEMENT =X NBITSH= 0 ORIG = 0.1000E+04 FACT = 0.1000E+03 HIT ELEMENT =Y NBITSH= 0 ORIG = 0.1000E+04 FACT = 0.1000E+03 HIT ELEMENT =Z NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+03 HIT ELEMENT =NPE NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+01 HIT ELEMENT =TIME NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+03 HIT ELEMENT =PRNT NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+01 HIT ELEMENT =EDEP NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+03 PREDIGI: nbitsv= 10 1 PREDIGI: hit#= 1 numbv= 283 1 FIND_VOLUME_TREE:nv= 2 namesv= BCMO AERO FIND_VOLUME_TREE: Using old tree. iset= 10 idet= 1 PREDIGI: nlev= 3 names numbers= ENVL 1, BCMO 283, AERO 1, PREDIGI: volume tree ENVL 1,BCMO 283,AERO 1, MAKE_PREHITS: AERO Xglobal= -5.7 7.0 3242.2 Xlocal= -5.7 7.0 0.0 t= 122.33 Edep= 841.62 Dist= -1.00 NPE= 7.00 Parent= 15 MAKE_PREHITS: AERO iShape= 1 iDir= 7 NRO= 1 AttenLen= 200.0 PropVel= 0.2000E+11 TimeBin= 0.1000E-08 MAKE_PREHITS: AERO Rdim= 0.000 Rhit= 0.000 MAKE_PREHITS: AERO i= 1 s= 0.0 DistToRO= 0.000 attenuation= 1.000 prop time= 0.000 # Parent Elemnt Time NPE AERO MAKE_PREHITS 1 15 564 122.3 7.000 # Element Parent1 Parent2 Timebin Binned T NPE AERO PREDIGI 1 564 15 0 123 122.500 7.000 PREDIGI: Grand total hits in event= 737 Max hits by any subdetector= 827 PREDIGI: PRSC VETO BAVE DSVE DSHV DSVV CHVE PRWC CALO BCAT PRIL CAIL PREDIGI: 35.7 0.0 209.5 177.6 0.0 0.0 32.1 0.0 135.0 0.0 0.0 0.0 Energy in MeV PREDIGI: 46 0 275 76 0 0 24 33 282 1 0 0 hits FILL_PREDIGI_NTUPLE: nxxxx= 46 , allmpd= 1023 for PRSC FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 511 for VETO FILL_PREDIGI_NTUPLE: nxxxx= 275 , allmpd= 1023 for BAVE FILL_PREDIGI_NTUPLE: nxxxx= 76 , allmpd= 1023 for DSVE FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 1023 for DSHV FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 1023 for DSVV FILL_PREDIGI_NTUPLE: nxxxx= 24 , allmpd= 511 for CHVE FILL_PREDIGI_NTUPLE: nxxxx= 33 , allmpd= 511 for PRWC FILL_PREDIGI_NTUPLE: nxxxx= 282 , allmpd= 1023 for CALO FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 63 for BCAT [snip] last line shows the problem, there should be 1 hit and fill_predigi_ntuple thinks there are none. for 3d event: Event# 3 seeds 1026622434 328990969 turn off initialization_ntuple (#5) to speed up debug found and fixed problem in predigi. recompile and rerun. now nbcat=1 as expected but ntuple info does not agree with debug output: also fixed a bug in s/r predigi that did not correctly sum hits in same PRIL,CAIL element. PAW > scan 1 ! ! ! ! nbcat ebcat abcat dbcat elbcat tbcat +-------+-------------+--------------+--------------+-------------+-------------+--------------+ | Event | nbcat | ebcat | abcat | dbcat | elbcat | tbcat | +-------+-------------+--------------+--------------+-------------+-------------+--------------+ | 1 | 1 | 0. | 3. | z'1' | 284 | 103.5 | let's look at lots of details with debug level 4: % run.kopio.geant.script 7127 1 1026622434 328990969 hmmm... now things check out ok. debug printout agrees with ntuple: =====>HITS IN DETECTOR ** AERO ** OF SET ** BCAT ** HIT TRACK BCMO AERO X Y Z NPE TIME PRNT EDEP 1 5 143 1 138. 1.44 0.289E+04 3.00 103. 5.00 745. SET BCAT DETECTOR AERO NWHI= 100 NWDI= 100 VOLUME BCMO NBITSD= 10 VOLUME AERO NBITSD= 1 HIT ELEMENT =X NBITSH= 0 ORIG = 0.1000E+04 FACT = 0.1000E+03 HIT ELEMENT =Y NBITSH= 0 ORIG = 0.1000E+04 FACT = 0.1000E+03 HIT ELEMENT =Z NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+03 HIT ELEMENT =NPE NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+01 HIT ELEMENT =TIME NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+03 HIT ELEMENT =PRNT NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+01 HIT ELEMENT =EDEP NBITSH= 0 ORIG = 0.0000E+00 FACT = 0.1000E+03 PREDIGI: nbitsv= 10 1 PREDIGI: hit#= 1 numbv= 143 1 FIND_VOLUME_TREE:nv= 2 namesv= BCMO AERO FIND_VOLUME_TREE: Create new tree. iset= 10 idet= 1 PREDIGI: nlev= 3 names numbers= ENVL 1, BCMO 143, AERO 1, PREDIGI: volume tree ENVL 1,BCMO 143,AERO 1, MAKE_PREHITS: AERO Xglobal= 138.3 1.4 2892.2 Xlocal= -11.7 1.4 0.0 t= 103.42 Edep= 744.64 Dist= -1.00 NPE= 3.00 Parent= 5 MAKE_PREHITS: AERO iShape= 1 iDir= 7 NRO= 1 AttenLen= 200.0 PropVel= 0.2000E+11 TimeBin= 0.1000E-08 MAKE_PREHITS: AERO Rdim= 0.000 Rhit= 0.000 MAKE_PREHITS: AERO i= 1 s= 0.0 DistToRO= 0.000 attenuation= 1.000 prop time= 0.000 # Parent Elemnt Time NPE AERO MAKE_PREHITS 1 5 284 103.4 3.000 # Element Parent1 Parent2 Timebin Binned T NPE AERO PREDIGI 1 284 5 0 104 103.500 3.000 PREDIGI: Grand total hits in event= 682 Max hits by any subdetector= 703 PREDIGI: PRSC VETO BAVE DSVE DSHV DSVV CHVE PRWC CALO BCAT PRIL CAIL PREDIGI: 152.3 0.0 176.3 0.0 0.0 0.0 20.9 14.9 173.8 3.0 0.0 0.0 Energy in MeV PREDIGI: 136 0 229 0 0 0 26 107 183 1 0 0 hits FILL_PREDIGI_NTUPLE: nxxxx= 136 , allmpd= 1023 for PRSC FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 511 for VETO FILL_PREDIGI_NTUPLE: nxxxx= 229 , allmpd= 1023 for BAVE FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 1023 for DSVE FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 1023 for DSHV FILL_PREDIGI_NTUPLE: nxxxx= 0 , allmpd= 1023 for DSVV FILL_PREDIGI_NTUPLE: nxxxx= 26 , allmpd= 511 for CHVE FILL_PREDIGI_NTUPLE: nxxxx= 107 , allmpd= 511 for PRWC FILL_PREDIGI_NTUPLE: nxxxx= 183 , allmpd= 1023 for CALO FILL_PREDIGI_NTUPLE: nxxxx= 1 , allmpd= 63 for BCAT Does enabling of initialization_ntuple affect behavior?? test % run.kopio.geant.script 7128 1 1026622434 328990969 seems ok now. perhaps other bugs affected it. modify so that dxxxx = 100*(set number) + detector number ivbias.F - new "as VBIAS of cernlib but for integers" Makefile - modified "add IVBIAS" test % run.kopio.geant.script 7129 10 plot.kumac - modified "PAW: macros setdet,sd5 added" all work on predigi, detector blocks and ntuples is completed. still need to update documentation George reports a problem with reproducibility of events using same random seeds -------- Date: Fri, 26 Mar 2004 09:54:36 -0500 From: George Redlinger Reply-To: redlinger@bnl.gov To: David Jaffe Subject: weirdness Hi David, I did a simple test of the reproducibility of the Monte Carlo in the BATCH version, and found that I did not get the same result if I tried just to simulate one event. However, if I start a few events before, then I do get the same result for the event in question. Here are some details: >From the logfile of the original job, here are the seeds of the first 4 events. I now want to re-simulate just event 4. BATCHLOG: run 1005 call 1 Event 1 Events gen. so far 1 Time for last 1 events 0.000 CPU-SEC Time so far 0.000 CPU-SEC Seeds 72111610 1005 BATCHLOG: run 1005 call 44 Event 2 Events gen. so far 2 Time for last 1 events 16.53 CPU-SEC Time so far 16.53 CPU-SEC Seeds 1081374465 2099015062 BATCHLOG: run 1005 call 56 Event 3 Events gen. so far 3 Time for last 1 events 1.780 CPU-SEC Time so far 18.31 CPU-SEC Seeds 1893243045 1454800598 BATCHLOG: run 1005 call 87 Event 4 Events gen. so far 4 Time for last 1 events 11.41 CPU-SEC Time so far 29.72 CPU-SEC Seeds 781814480 773193553 >From the logfile attempting just to simulate event 4 above: BATCHLOG: run 10001 call 1 Event 1 Events gen. so far 1 Time for last 1 events 0.1000E-01 CPU-SEC Time so far 0.1000E-01 CPU-SEC Seeds 781814480 773193553 Here is the MC truth information from the two runs: Event 4 of the original run PAW > nt/scan //lun1/1 ! 1 4 ! int(idtrue) int(mother) decaymode zfin +-------+----------------+----------------+--------------+--------------+ | Event | int(idtrue) | int(mother) | decaymode | zfin | +-------+----------------+----------------+--------------+--------------+ | 4 | | | | | | * 1 | 10 | 0 | 7 | 1341.62 | | * 2 | 10 | 0 | 5 | 4596.62 | | * 3 | 10 | 0 | 6 | 2217.64 | | * 4 | 10 | 0 | 5 | 82.8846 | | * 5 | 10 | 0 | -1 | 103.927 | | * 6 | 10 | 0 | -1 | 101.83 | | * 7 | 10 | 0 | -1 | 3347.05 | | * 8 | 10 | 0 | -1 | 3414.62 | | * 9 | 10 | 0 | 8 | 2712.46 | | * 10 | 9 | 1 | -1 | 1528.25 | | * 11 | 2 | 1 | -1 | 1488.07 | | * 12 | 4 | 1 | -1 | 1341.62 | | * 13 | 7 | 2 | 1 | 4596.62 | | * 14 | 7 | 2 | 1 | 4596.62 | | * 15 | 7 | 2 | 1 | 4596.62 | | * 16 | 1 | 15 | -2 | 5000. | | * 17 | 1 | 15 | -2 | 4750.4 | | * 18 | 1 | 14 | -2 | 5000. | | * 19 | 1 | 14 | -2 | 4316.2 | | * 20 | 1 | 13 | -2 | 5000. | | * 21 | 1 | 13 | -2 | 5000. | | * 22 | 8 | 3 | -2 | 5000. | | * 23 | 9 | 3 | -1 | 2265.86 | | * 24 | 7 | 3 | 1 | 2217.64 | | * 25 | 1 | 24 | -1 | 2276.67 | | * 26 | 1 | 24 | -1 | 2679.59 | | * 27 | 7 | 4 | 1 | 82.8846 | | * 28 | 7 | 4 | 1 | 82.8847 | | * 29 | 7 | 4 | 1 | 82.8846 | | * 30 | 1 | 29 | -1 | 103.574 | | * 31 | 1 | 29 | -1 | 103.011 | | * 32 | 1 | 28 | -1 | 100.811 | | * 33 | 1 | 28 | -1 | 101.589 | | * 34 | 1 | 27 | -1 | 100.317 | | * 35 | 1 | 27 | -1 | 101.192 | | * 36 | 9 | 9 | -2 | 4712.7 | | * 37 | 5 | 9 | -2 | 3515.33 | | * 38 | 4 | 9 | -1 | 2712.46 | +-------+----------------+----------------+--------------+--------------+ Event 1 of the subsequent run PAW > nt/scan //lun2/1 ! 1 1 ! int(idtrue) int(mother) decaymode zfin +-------+----------------+----------------+--------------+--------------+ | Event | int(idtrue) | int(mother) | decaymode | zfin | +-------+----------------+----------------+--------------+--------------+ | 1 | | | | | | * 1 | 10 | 0 | 7 | 1341.62 | | * 2 | 10 | 0 | 7 | 795.061 | | * 3 | 10 | 0 | 2 | 204.87 | | * 4 | 10 | 0 | 7 | 727.543 | | * 5 | 10 | 0 | -1 | 49.2209 | | * 6 | 10 | 0 | -1 | 52.3542 | | * 7 | 10 | 0 | 7 | 4471.15 | | * 8 | 10 | 0 | -1 | 51.1222 | | * 9 | 10 | 0 | 8 | 1266.41 | | * 10 | 9 | 1 | -1 | 1528.25 | | * 11 | 2 | 1 | -1 | 1488.07 | | * 12 | 4 | 1 | -1 | 1341.62 | | * 13 | 8 | 2 | 1 | 795.607 | | * 14 | 3 | 2 | -1 | 807.929 | | * 15 | 4 | 2 | -1 | 795.061 | | * 16 | 5 | 13 | 1 | 795.623 | | * 17 | 4 | 13 | -1 | 795.607 | | * 18 | 7 | 3 | 1 | 204.87 | | * 19 | 7 | 3 | 1 | 204.87 | | * 20 | 1 | 19 | -1 | 206.949 | | * 21 | 1 | 19 | -1 | 209.419 | | * 22 | 1 | 18 | -1 | 207.732 | | * 23 | 1 | 18 | -1 | 207.474 | | * 24 | 8 | 4 | 1 | 756.768 | | * 25 | 3 | 4 | -1 | 724.322 | | * 26 | 4 | 4 | -1 | 727.543 | | * 27 | 5 | 24 | 1 | 756.742 | | * 28 | 4 | 24 | -1 | 756.768 | | * 29 | 8 | 7 | -2 | 5000. | | * 30 | 3 | 7 | -2 | 5000. | | * 31 | 4 | 7 | -1 | 4471.15 | | * 32 | 9 | 9 | -1 | 1519.54 | | * 33 | 5 | 9 | 1 | 1495.98 | | * 34 | 4 | 9 | -1 | 1266.41 | +-------+----------------+----------------+--------------+--------------+ ------------------ end email I thought I had checked if the same random number generator was used throughout the code. have to check again, I guess. George will recompile, link and build new executable to make sure problem is not due to version conflict. functions and s/r's called to generated random numbers: grndm => n random # distributed (0,1) gpoiss => n random # distributed according to poisson dist granor => 2 random # normally distributed garndm => 1 random # distributed as -log(x) x=(0,1) I will do some test as George for run 7129 PAW > scan 1 ! 1 4 ! int(idtrue) int(mother) decaymode zfin random_1 random_2 +-------+----------------+----------------+--------------+--------------+-------------+-------------+ | Event | int(idtrue) | int(mother) | decaymode | zfin | random_1 | random_2 | +-------+----------------+----------------+--------------+--------------+-------------+-------------+ | 4 | | | | | 722909128 | 2046745496 | | * 1 | 10 | 0 | 1 | 1263.57 | | | | * 2 | 10 | 0 | -1 | 231.27 | | | | * 3 | 10 | 0 | 7 | 1461.23 | | | | * 4 | 10 | 0 | -1 | 154.646 | | | | * 5 | 10 | 0 | -1 | 217.63 | | | | * 6 | 10 | 0 | 8 | 481.171 | | | | * 7 | 10 | 0 | 7 | 101.675 | | | | * 8 | 10 | 0 | -1 | 49.8166 | | | | * 9 | 10 | 0 | -1 | 51.7421 | | | | * 10 | 10 | 0 | -1 | 209.13 | | | | * 11 | 10 | 0 | -1 | 2714.6 | | | | * 12 | 7 | 1 | 1 | 1263.57 | | | | * 13 | 4 | 1 | -1 | 1263.57 | | | | * 14 | 4 | 1 | -1 | 1263.57 | | | | * 15 | 1 | 12 | -1 | 1562.15 | | | | * 16 | 1 | 12 | -1 | 1207.73 | | | | * 17 | 8 | 3 | -1 | 1475.74 | | | | * 18 | 3 | 3 | -1 | 1568.42 | | | | * 19 | 4 | 3 | -1 | 1461.23 | | | | * 20 | 8 | 6 | 1 | 503.703 | | | | * 21 | 6 | 6 | 1 | 527.793 | | | | * 22 | 4 | 6 | -1 | 481.171 | | | | * 23 | 5 | 20 | 1 | 503.728 | | | | * 24 | 4 | 20 | -1 | 503.703 | | | | * 25 | 9 | 7 | -1 | 108.522 | | | | * 26 | 2 | 7 | -1 | 103.485 | | | | * 27 | 4 | 7 | -1 | 101.675 | | | now try % run.kopio.geant.script 7130 1 722909128 2046745496 PAW > close 0;h/del 0;h/fil 1 /u1/djaffe/KOPIO/fullmc/hist/kopio_mc_7130.hbook$ PAW > scan 1 ! 1 1 ! int(idtrue) int(mother) decaymode zfin random_1 random_2 +-------+----------------+----------------+--------------+--------------+-------------+-------------+ | Event | int(idtrue) | int(mother) | decaymode | zfin | random_1 | random_2 | +-------+----------------+----------------+--------------+--------------+-------------+-------------+ | 1 | | | | | 722909128 | 2046745496 | | * 1 | 10 | 0 | 1 | 1263.57 | | | | * 2 | 10 | 0 | -1 | 231.27 | | | | * 3 | 10 | 0 | -1 | 107.606 | | | | * 4 | 10 | 0 | -1 | 203.427 | | | | * 5 | 10 | 0 | 7 | 4772.05 | | | | * 6 | 10 | 0 | -1 | 2644.57 | | | | * 7 | 10 | 0 | 8 | 290.281 | | | | * 8 | 10 | 0 | 8 | 38.4297 | | | | * 9 | 10 | 0 | -1 | 48.1781 | | | | * 10 | 7 | 1 | 1 | 1263.57 | | | | * 11 | 4 | 1 | -1 | 1263.57 | | | | * 12 | 4 | 1 | -1 | 1263.57 | | | | * 13 | 1 | 10 | -1 | 1562.15 | | | | * 14 | 1 | 10 | -1 | 1207.73 | | | | * 15 | 8 | 5 | -2 | 5000. | | | | * 16 | 3 | 5 | -2 | 5000. | | | | * 17 | 4 | 5 | -1 | 4772.05 | | | | * 18 | 9 | 7 | -1 | 359.522 | | | | * 19 | 5 | 7 | 1 | 290.394 | | | | * 20 | 4 | 7 | -1 | 290.281 | | | | * 21 | 8 | 8 | -1 | 107.798 | | | | * 22 | 6 | 8 | 1 | 115.078 | | | | * 23 | 4 | 8 | -1 | 38.4297 | | | so that reproduces George's results. note that things begin to differ with 1st KL that decays (decaymode=-1 means interacts or stops) added some debug output to gudcay to print random seeds gudcay.F - modified "add debug output. random seeds" event 1, run 7129 1580038058 721061216 event 4, run 7129 722909128 2046745496 <---- compared event 1, run 7130 722909128 2046745496 <---- above % run.kopio.geant.script 7031 4 1580038058 721061216 % run.kopio.geant.script 7032 1 722909128 2046745496 comparison of seeds at gudcay time: run 7031 run 7032 GUDCAY: Entrance. itra= 1 seeds= 69382367 12664051 GUDCAY: Entrance. itra= 1 seeds= 69382367 12664051 GUDCAY: ....Exit. seeds= 364504421 211286919 GUDCAY: ....Exit. seeds= 364504421 211286919 GUDCAY: Entrance. itra= 12 seeds= 820003180 2723256 GUDCAY: Entrance. itra= 12 seeds= 820003180 2723256 GUDCAY: ....Exit. seeds= 1838666579 1154048946 GUDCAY: ....Exit. seeds= 1838666579 1154048946 GUDCAY: Entrance. itra= 2 seeds= 658139837 7306328 | GUDCAY: Entrance. itra= 2 seeds= 625276618 15740928 GUDCAY: ....Exit. seeds= 496662981 434127283 | GUDCAY: ....Exit. seeds= 1340955111 1946631513 GUDCAY: Entrance. itra= 3 seeds= 1551942930 20693746 | GUDCAY: Entrance. itra= 5 seeds= 483034130 9145337 GUDCAY: ....Exit. seeds= 122808836 2070929573 | GUDCAY: ....Exit. seeds= 88038319 557407036 GUDCAY: Entrance. itra= 17 seeds= 809817169 4206327 | GUDCAY: Entrance. itra= 5 seeds= 1837101757 14875927 GUDCAY: ....Exit. seeds= 2064602507 1508317133 | GUDCAY: ....Exit. seeds= 1270900447 1432014812 so something happens external to GUDCAY. print_seeds.F - new "debug utility: print current random seeds" kopio_step.F - modified "debug reporting of random seeds" Makefile - modified "add print_seeds" kopio_kine.F - modified "debug reporting of random seeds" try again % run.kopio.geant.script 7034 1 722909128 2046745496 % run.kopio.geant.script 7033 4 1580038058 721061216 difference begins at for 7033 < GUSTEP : ENTRANCE seeds= 959932567 521672814 < GUSTEP : EXIT seeds= 959932567 521672814 for 7034 > GUSTEP : ENTRANCE seeds= 975077578 1402077123 > GUSTEP : EXIT seeds= 975077578 1402077123 % grep "959932567 521672814" -B6 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7033.log GUSTEP : ENTRANCE seeds= 1458861640 225552534 GUSTEP : EXIT seeds= 1458861640 225552534 GUSTEP : ENTRANCE seeds= 712700871 1327549879 GUSTEP : EXIT seeds= 712700871 1327549879 GUSTEP : ENTRANCE seeds= 123671096 1882842726 GUSTEP : EXIT seeds= 123671096 1882842726 ******* GUSTEP : ENTRANCE seeds= 959932567 521672814 GUSTEP : EXIT seeds= 959932567 521672814 % grep "975077578 1402077123" -B6 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7034.log GUSTEP : ENTRANCE seeds= 1458861640 225552534 GUSTEP : EXIT seeds= 1458861640 225552534 GUSTEP : ENTRANCE seeds= 712700871 1327549879 GUSTEP : EXIT seeds= 712700871 1327549879 GUSTEP : ENTRANCE seeds= 123671096 1882842726 GUSTEP : EXIT seeds= 123671096 1882842726 ****** GUSTEP : ENTRANCE seeds= 975077578 1402077123 GUSTEP : EXIT seeds= 975077578 1402077123 two jobs agree to point indicated in 7034 before seeds disagree: =====> TRACK 2 STACK NR 2 NTMULT= 726 KAON 0 LONG TOFG = 10.309 NS X Y Z R NAME NUMBER SLENG STEP DESTEP GEKIN MECHANISMS -17.9057 0.2945 231.2703 17.9081 col1 1 0.0000 0.0000 0.0 eV 204.268 MeV NULL GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= GUSTEP: z1= 0.00 z= 231.27 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 645857393 2027313440 GUSTEP : ENTRANCE seeds= 512482167 541627061 -10.8363 5.9860 252.4877 12.3797 col1 1 23.0770 23.0770 0.0 eV 204.268 MeV HADR INHE GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= 12 20 GUSTEP: z1= 0.00 z= 252.49 z2= 999999.00 1stKL=F decayed=F kill=F after seeds disagree =====> TRACK 3 STACK NR 0 NTMULT= 1070 KAON 0 LONG TOFG = -0.043 NS X Y Z R NAME NUMBER SLENG STEP DESTEP GEKIN MECHANISMS -3.5254 -0.0055 -3.8298 3.5254 ENVL 1 0.0000 0.0000 0.0 eV 353.838 MeV NULL GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= GUSTEP: z1= 0.00 z= -3.83 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 668011848 1029975104 GUSTEP : ENTRANCE seeds= 98177211 1460917084 -3.8058 0.0554 47.5010 3.8062 ENVL 1 51.3316 51.3316 0.0 eV 353.838 MeV NEXT GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= 1 GUSTEP: z1= 0.00 z= 47.50 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 98177211 1460917084 GUSTEP : ENTRANCE seeds= 98177211 1460917084 -3.8058 0.0554 47.5010 3.8062 SPLR 1 51.3316 0.0000 0.0 eV 353.838 MeV NULL GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= GUSTEP: z1= 0.00 z= 47.50 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 98177211 1460917084 GUSTEP : ENTRANCE seeds= 1730522021 275198192 -3.8260 0.0598 51.2017 3.8264 SPLR 1 55.0323 3.7007 0.0 eV 353.824 MeV HADR ECOH GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= 12 13 GUSTEP: z1= 0.00 z= 51.20 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 1730522021 275198192 GUSTEP : ENTRANCE seeds= 1648142922 1386386478 -3.6978 0.0225 52.5001 3.6979 SPLR 1 56.3376 1.3053 0.0 eV 353.824 MeV NEXT GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= 1 GUSTEP: z1= 0.00 z= 52.50 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 1648142922 1386386478 GUSTEP : ENTRANCE seeds= 1648142922 1386386478 -3.6978 0.0225 52.5001 3.6979 VAP0 1 56.3376 0.0000 0.0 eV 353.824 MeV NULL GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= GUSTEP: z1= 0.00 z= 52.50 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 1648142922 1386386478 GUSTEP : ENTRANCE seeds= 1648142922 1386386478 0.9896 -1.3393 100.0010 1.6652 VAP0 1 104.0886 47.7510 0.0 eV 353.824 MeV NEXT GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= 1 GUSTEP: z1= 0.00 z= 100.00 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 1648142922 1386386478 GUSTEP : ENTRANCE seeds= 1648142922 1386386478 0.9896 -1.3393 100.0010 1.6652 col0 1 104.0886 0.0000 0.0 eV 353.824 MeV NULL GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= GUSTEP: z1= 0.00 z= 100.00 z2= 999999.00 1stKL=F decayed=F kill=F GUSTEP : EXIT seeds= 1648142922 1386386478 GUSTEP : ENTRANCE seeds= 1161411357 1075516644 1.7400 -1.5574 107.6060 2.3352 col0 1 111.7337 7.6451 0.0 eV 353.824 MeV HADR INHE GUSTEP:ievent= 1 evts gen= 1 1stKL=F decayed=F kill=F mechanisms= 12 20 GUSTEP: z1= 0.00 z= 107.61 z2= 999999.00 1stKL=F decayed=F kill=F increase debug level, try again % run.kopio.geant.script 7035 4 1580038058 721061216 % run.kopio.geant.script 7036 1 722909128 2046745496 check gheisha routines from KLOE: csk0la.F csreg.F gheish.F ghesig.F All use GRNDM more details: % grep "123671096 1882842726" -5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7035.log GUSTEP:name= col1 vect= -35.4 24.4 223.8 0.5 0.9 -0.2 0.0 GUSTEP : EXIT seeds= 1458861640 225552534 GUSTEP : ENTRANCE seeds= 712700871 1327549879 GUSTEP:name= col1 vect= -34.5 26.0 223.4 -0.8 0.5 0.3 0.0 GUSTEP : EXIT seeds= 712700871 1327549879 GUSTEP : ENTRANCE seeds= 123671096 1882842726 GUSTEP:name= col1 vect= -35.3 26.6 223.8 0.7 -0.7 0.1 0.0 GUSTEP : EXIT seeds= 123671096 1882842726 GUSTEP : ENTRANCE seeds= 959932567 521672814 GUSTEP:name= col1 vect= -35.3 26.6 223.8 -0.8 -0.1 -0.6 0.0 GUSTEP:interacted or left_det.istack= 2 PARTICLE_ID_STACK(1-4,istack)= 10 0 2 -1 GUSTEP : EXIT seeds= 959932567 521672814 GUSTEP : ENTRANCE seeds= 1273036567 708210012 % grep "123671096 1882842726" -5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7036.log GUSTEP:name= col1 vect= -35.4 24.4 223.8 0.5 0.9 -0.2 0.0 GUSTEP : EXIT seeds= 1458861640 225552534 GUSTEP : ENTRANCE seeds= 712700871 1327549879 GUSTEP:name= col1 vect= -34.5 26.0 223.4 -0.8 0.5 0.3 0.0 GUSTEP : EXIT seeds= 712700871 1327549879 GUSTEP : ENTRANCE seeds= 123671096 1882842726 GUSTEP:name= col1 vect= -35.3 26.6 223.8 0.7 -0.7 0.1 0.0 GUSTEP : EXIT seeds= 123671096 1882842726 GUSTEP : ENTRANCE seeds= 975077578 1402077123 GUSTEP:name= col1 vect= -35.3 26.6 223.8 0.6 -0.1 -0.8 0.0 GUSTEP:interacted or left_det.istack= 2 PARTICLE_ID_STACK(1-4,istack)= 10 0 2 -1 GUSTEP : EXIT seeds= 975077578 1402077123 GUSTEP : ENTRANCE seeds= 1439809004 1521424663 bn while letting the debugger chew on an event % run.kopio.geant.script 7038 1 722909128 2046745496 i checked out v03_0 and ran the same tests. no problem,. v04_5 was first version with LET_GEANT_DECAY_IT, try that. also no problem. v06_0 summary has "7. fix bug with LET_GEANT_DECAY_IT", try it. v06_0 has the bug too, compare the DKM for these two columns, both events have same initial random seed run 6001, event 10 run 6002, event 1 RESTACK: Original temp. stack follows... RESTACK: Original temp. stack follows... # ID Mom G# DKM Px Py Pz | # ID Mom G# DKM Px Py Pz 1 10 0 1 1 0.3003E-01 0.1801E-02 1.040 1 10 0 1 1 0.3003E-01 0.1801E-02 1.040 2 10 0 2 -1 -.7012E-02 0.1340E-02 0.7926 2 10 0 2 -1 -.7012E-02 0.1340E-02 0.7926 3 10 0 3 -1 0.6126E-01 -.8387E-03 1.270 3 10 0 3 -1 0.6126E-01 -.8387E-03 1.270 4 10 0 4 5 0.1596E-01 0.1097E-02 0.7136 | 4 10 0 4 6 0.1596E-01 0.1097E-02 0.7136 5 10 0 5 -1 -.3557E-01 -.2205E-02 0.7589 | 5 10 0 5 -1 -.3557E-01 -.2205E-02 0.7589 6 10 0 6 -1 -.3497E-01 0.2897E-03 0.5766 | 6 10 0 6 7 -.3497E-01 0.2897E-03 0.5766 7 10 0 7 7 -.4134E-02 0.5914E-03 0.5687 | 7 10 0 7 6 -.4134E-02 0.5914E-03 0.5687 8 10 0 8 -1 -.5569E-01 0.2069E-02 1.083 | 8 10 0 8 -1 -.5569E-01 0.2069E-02 1.083 9 10 0 9 -1 -.4460E-01 -.1080E-02 0.8247 | 9 10 0 9 -1 -.4460E-01 -.1080E-02 0.8247 10 10 0 10 5 -.2228E-01 0.8136E-03 0.7969 | 10 10 0 10 8 -.2228E-01 0.8136E-03 0.7969 11 10 0 11 -1 0.5816E-02 0.2039E-02 0.7286 | 11 10 0 11 -1 0.5816E-02 0.2039E-02 0.7286 12 10 0 12 -1 0.6356E-01 0.2437E-02 1.644 | 12 10 0 12 -1 0.6356E-01 0.2437E-02 1.644 13 10 0 13 7 -.7453E-02 -.9062E-03 0.7557 | 13 10 0 13 -1 -.7453E-02 -.9062E-03 0.7557 14 10 0 14 -1 -.3242E-01 0.1292E-02 0.5248 | 14 10 0 14 -1 -.3242E-01 0.1292E-02 0.5248 15 10 0 15 -1 -.7624E-01 -.7321E-03 1.345 | 15 10 0 15 -1 -.7624E-01 -.7321E-03 1.345 16 7 1 16 1 0.3904E-01 0.1153 0.2303 16 7 1 16 1 0.3904E-01 0.1153 0.2303 >>>>>> note that kopio_step.F and print_seeds.F have debug code that must be >>>>>> removed ok. for run 7038, before seed changes, the particle is a neutron(ipart=13). vect=-35.3091927, 26.604126, 223.806854, 0.713221073, -0.697435915, 0.0699915737, 0.0132750012) need to check to see if v05_5 has same irreproducibility problem. from comments on v06_0, i note that some weird behavior was seen with neutrons and random seeds that i thought i fixed. need to check this again, i suppose. Fri Mar 26 17:14:08 EST 2004 **************************************************** Mon Mar 29 09:00:03 EST 2004 after seed changes: ipart=13 vect=-35.3091927, 26.604126, 223.806854, 0.632030606, -0.0861769393, -0.770136893, 7.13208294e-07) lmec = 30, 12, 13, 12, note that total momentum has changed from 13 MeV/c to 7e-4 MeV/c gustep called by gutrak called by gutrev called by grun . TEMPORARILY add gtneut.F to Makefile ** 30mar04 removed gtneut.F from Makefile kopio_gu.F - modify "TEMPORARY DEBUG" fldist.F - modify "TEMPORARY DEBUG" ghesig.F - modify "TEMPORARY DEBUG" kopio_guhadr.F - modify "TEMPORARY DEBUG" % run.kopio.geant.script 7041 4 1580038058 721061216 % run.kopio.geant.script 7042 1 722909128 2046745496 bnlku24_djaffe[375]% grep -n "123671096 1882842726" -5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7041.log 495074- GTNEUT : BEFORE GUPHAD seeds= 712700871 1327549879 495075- GUPHAD : ENTRANCE seeds= 712700871 1327549879 495076- GUPHAD : EXIT seeds= 712700871 1327549879 495077- GTNEUT : BEFORE GUHADR seeds= 712700871 1327549879 495078- GUHADR : Before GCALOR seeds= 712700871 1327549879 495079: GUHADR : EXIT seeds= 123671096 1882842726 495080- just a statement to stop on 495081: GTNEUT : AFTER GUHADR seeds= 123671096 1882842726 495082: GTNEUT : EXIT seeds= 123671096 1882842726 495083- just a statement to stop on 495084- just a statement to stop on 495085: GUSTEP : ENTRANCE seeds= 123671096 1882842726 495086- just a statement to stop on 495087: GUSTEP : EXIT seeds= 123671096 1882842726 495088- just a statement to stop on 495089: GTNEUT : ENTRANCE seeds= 123671096 1882842726 495090: GTNEUT : BEFORE GUHADR seeds= 123671096 1882842726 495091- just a statement to stop on 495092- just a statement to stop on 495093: GUHADR : Before GCALOR seeds= 123671096 1882842726 495094- just a statement to stop on 495095- GUHADR : EXIT seeds= 959932567 521672814 495096- GTNEUT : AFTER GUHADR seeds= 959932567 521672814 495097- GTNEUT : EXIT seeds= 959932567 521672814 495098- GUSTEP : ENTRANCE seeds= 959932567 521672814 bnlku24_djaffe[376]% grep -n "123671096 1882842726" -5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7042.log 24604- GTNEUT : BEFORE GUPHAD seeds= 712700871 1327549879 24605- GUPHAD : ENTRANCE seeds= 712700871 1327549879 24606- GUPHAD : EXIT seeds= 712700871 1327549879 24607- GTNEUT : BEFORE GUHADR seeds= 712700871 1327549879 24608- GUHADR : Before GCALOR seeds= 712700871 1327549879 24609: GUHADR : EXIT seeds= 123671096 1882842726 24610- just a statement to stop on 24611: GTNEUT : AFTER GUHADR seeds= 123671096 1882842726 24612: GTNEUT : EXIT seeds= 123671096 1882842726 24613- just a statement to stop on 24614- just a statement to stop on 24615: GUSTEP : ENTRANCE seeds= 123671096 1882842726 24616- just a statement to stop on 24617: GUSTEP : EXIT seeds= 123671096 1882842726 24618- just a statement to stop on 24619: GTNEUT : ENTRANCE seeds= 123671096 1882842726 24620: GTNEUT : BEFORE GUHADR seeds= 123671096 1882842726 24621- just a statement to stop on 24622- just a statement to stop on 24623: GUHADR : Before GCALOR seeds= 123671096 1882842726 24624- just a statement to stop on 24625- GUHADR : EXIT seeds= 975077578 1402077123 24626- GTNEUT : AFTER GUHADR seeds= 975077578 1402077123 24627- GTNEUT : EXIT seeds= 975077578 1402077123 24628- GUSTEP : ENTRANCE seeds= 975077578 1402077123 gcalor_unix.F - modify "TEMPORARY DEBUG" % run.kopio.geant.script 7043 4 1580038058 721061216 % run.kopio.geant.script 7044 1 722909128 2046745496 bnlku24_djaffe[390]% grep -n "123671096 1882842726" -A5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7043.log 513799: GCALOR : BEFORE CALL MICAP seeds= 123671096 1882842726 513800- MICAP : BEFORE CALL COLISN seeds= 773106192 870980269 513801- MICAP : AFTER CALL COLISN seeds= 685207242 1661446821 513802- GCALOR : AFTER CALL MICAP seeds= 685207242 1661446821 bnlku24_djaffe[391]% grep -n "123671096 1882842726" -A5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7044.log 24953: GCALOR : BEFORE CALL MICAP seeds= 123671096 1882842726 24954- MICAP : BEFORE CALL COLISN seeds= 773106192 870980269 24955- MICAP : AFTER CALL COLISN seeds= 1273036567 708210012 24956- GCALOR : AFTER CALL MICAP seeds= 1273036567 708210012 add more print statements to micap % run.kopio.geant.script 7045 4 1580038058 721061216 % run.kopio.geant.script 7046 1 722909128 2046745496 bnlku24_djaffe[395]% grep -n "123671096 1882842726" -A5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7045.log 532455: COLISN : BEFORE 1st FLTRNF seeds= 123671096 1882842726 532456- COLISN : EXIT seeds= 773106192 870980269 532457- MICAP : BEFORE CALL COLISN seeds= 773106192 870980269 532458- COLISN : DETERMINE COLLISION TYPE seeds= 773106192 870980269 532459- COLISN : DETERMINE NN CROSSSECTION seeds= 570441673 2010572451 532460- MICAP : AFTER CALL COLISN seeds= 685207242 1661446821 bnlku24_djaffe[396]% grep -n "123671096 1882842726" -A5 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7046.log 25281: COLISN : BEFORE 1st FLTRNF seeds= 123671096 1882842726 25282- COLISN : EXIT seeds= 773106192 870980269 25283- MICAP : BEFORE CALL COLISN seeds= 773106192 870980269 25284- COLISN : DETERMINE COLLISION TYPE seeds= 773106192 870980269 25285- COLISN : DETERMINE NN CROSSSECTION seeds= 570441673 2010572451 25286- MICAP : AFTER CALL COLISN seeds= 1273036567 708210012 add more print statements to COLISN % run.kopio.geant.script 7047 4 1580038058 721061216 % run.kopio.geant.script 7048 1 722909128 2046745496 bnlku24_djaffe[409]% grep -n "123671096 1882842726" -A15 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7047.log 536304: COLISN : BEFORE 1st FLTRNF seeds= 123671096 1882842726 536305- COLISN : EXIT seeds= 773106192 870980269 536306- MICAP : BEFORE CALL COLISN seeds= 773106192 870980269 536307- COLISN : DETERMINE COLLISION TYPE seeds= 773106192 870980269 536308- COLISN : DETERMINE NN CROSSSECTION seeds= 570441673 2010572451 536309- COLISN : THERMAL SCATTER seeds= 50312295 1539124389 536310- COLISN : AFTER THERMAL SCATTER seeds= 685207242 1661446821 536311- MICAP : AFTER CALL COLISN seeds= 685207242 1661446821 536312- GCALOR : AFTER CALL MICAP seeds= 685207242 1661446821 bnlku24_djaffe[410]% grep -n "123671096 1882842726" -A15 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7048.log 25308: GCALOR : BEFORE CALL MICAP seeds= 123671096 1882842726 25309: COLISN : BEFORE 1st FLTRNF seeds= 123671096 1882842726 25310- COLISN : EXIT seeds= 773106192 870980269 25311- MICAP : BEFORE CALL COLISN seeds= 773106192 870980269 25312- COLISN : DETERMINE COLLISION TYPE seeds= 773106192 870980269 25313- COLISN : DETERMINE NN CROSSSECTION seeds= 570441673 2010572451 25314- COLISN : THERMAL SCATTER seeds= 50312295 1539124389 25315- COLISN : AFTER THERMAL SCATTER seeds= 1273036567 708210012 ***** 25316- MICAP : AFTER CALL COLISN seeds= 1273036567 708210012 25317- GCALOR : AFTER CALL MICAP seeds= 1273036567 708210012 THERMAL SCATTER done in THRMSC: add debug to s/r THRMSC, THRSEL % run.kopio.geant.script 7049 4 1580038058 721061216 % run.kopio.geant.script 7050 1 722909128 2046745496 bnlku24_djaffe[418]% grep -n "123671096 1882842726" -A15 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7049.log 540919- COLISN : THERMAL SCATTER seeds= 50312295 1539124389 540920- just a statement to stop on 540921- just a statement to stop on 540922- THRMSC : ENTRANCE seeds= 50312295 1539124389 540923- THRMSC : AFTER 20 seeds= 50312295 1539124389 540924- THRMSC : AFTER 30 seeds= 1978004385 1370444406 540925- THRMSC : AFTER 40 seeds= 1978004385 1370444406 bnlku24_djaffe[419]% grep -n "123671096 1882842726" -A15 /u1/djaffe/KOPIO/fullmc/log/kopio_mc_7050.log 25314- COLISN : THERMAL SCATTER seeds= 50312295 1539124389 25315- just a statement to stop on 25316- just a statement to stop on 25317- THRMSC : ENTRANCE seeds= 50312295 1539124389 25318- THRMSC : AFTER 20 seeds= 50312295 1539124389 25319- THRMSC : AFTER 30 seeds= 2091105979 2110821266 25320- THRMSC : AFTER 40 seeds= 2091105979 2110821266 chunk of relevant code: [snip] IF(PTEST.GT.FLTRNF(0))GO TO 30 ETA=-ALOG(FLTRNF(0)*FLTRNF(0))*TDK CALL PRINT_SEEDS(6,'THRMSC','BEFORE 30') GO TO 40 30 CONTINUE ETA=RNMAXF(TDK) CALL PRINT_SEEDS(6,'THRMSC','AFTER 30') [snip] RNMAXF??? *-- Author : C********************************************************************* FUNCTION RNMAXF(T) C T := most probable value of distribution C********************************************************************* DATA FF/0./ SAVE FF,R1SQ,W,U U=EXPRNF(U) IF(FF) 30 ,10 ,30 <<<**** HISTORY DEPENDENT!!!!!!! 10 R1=FLTRNF(0) R2=FLTRNF(0) R1SQ=R1*R1 R2SQ=R2*R2 RSQ=R1SQ+R2SQ IF(RSQ-1.) 20 ,20 ,10 20 W=EXPRNF(W)/RSQ FF=1. RNMAXF=(R2SQ*W+U)*T GO TO 40 30 FF=0. RNMAXF=(R1SQ*W+U)*T 40 RETURN END ----------------- This is the only call to RNMAXF in all the GEANT/GCALOR code. using a test program, I verified that RNMAXF does indeed depend on the calling history. I wrote a new version that simply sets FF=0. for every call and verified that it gives the same distribution as the original RNMAXF. I can only assume that the FF toggle was to speed things up. i notified the author of gcalor of this bug. gcalor_unix.F - modified "make fcn RNMAXF independent of calling history" test! % run.kopio.geant.script 7049 4 1580038058 721061216 % run.kopio.geant.script 7050 1 722909128 2046745496 (unfortunately I overwrote the log files that initially showed the problem now run 7049 no longer produces 722909128 2046745496 as seeds for 4th event. test % run.kopio.geant.script 7151 10 use seed from 10th event for new run: % run.kopio.geant.script 7152 1 394110931 1041330809 *********************** Tue Mar 30 09:35:16 EST 2004 1st event of 7152 and 10th event of 7151 have identical original stacks. looks like bug is fixed. kopio_gu.F - modified "remove unused code" kopio_guhadr.F - modified "remove unused code" prepare to commit to CVS ########################## sizes % ls -lrt $MY_EXE total 24376 -rwxrwxr-x 1 djaffe djaffe 9467748 Mar 30 10:11 kopio_geant.out -rwxrwxr-x 1 djaffe djaffe 15453383 Mar 30 10:11 kopio_inter.out ################## New files from % grep "\- new" ../Notes/v07_1.notes | sort dmapper.f - new "PAW: map DNUM to SNAME" dmapper.kumac - new "PAW: map DNUM to SNAME" fix.kopiont1.inc.script - new "change char*32 to char*4 in kopiont1.inc" ivbias.F - new "as VBIAS of cernlib but for integers" print_seeds.F - new "debug utility: print current random seeds" ####################### modified files from % grep "\- modified" ../Notes/v07_1.notes | sort book_predigi_ntuple.F - modified "only book predigi ntuple for enabled det. sets" control.kopio.ffread - modified "comments added" fill_predigi_hits.F - modified "only treat enabled det. sets" gcalor_unix.F - modified "make fcn RNMAXF independent of calling history" gudcay.F - modified "add debug output. random seeds" initialization_ntuple.F - modified "DETNAMES, DET BITS mods" initialization_ntuple.inc - modified "DETNAMES, DET BITS mods" kopio_charged_veto.F - modified "comments added" kopio_decay_vacuum.F - modified "handle <3 CV layers correctly" kopio_detectors.F - modified "makes sure CV exists before calling GSDET" kopio_gu.F - modified "remove unused code" kopio_guhadr.F - modified "remove unused code" kopio_kine.F - modified "debug reporting of random seeds" kopio_step.F - modified "debug reporting of random seeds" Makefile - modified "add IVBIAS, print_seeds" order_predigi_hits.F - modified "only treat enabled det. sets" plot.kumac - modified "PAW: macros setdet,sd5 added" predigi.F - modified "only fill predigi ntuple for enabled det. sets" predigi_ntuple.inc - modified "dxxxx definition changed" % cvs diff -D now > cvs.diff.now ###################### NEW FILES FOR CVS cvs add ivbias.F print_seeds.F cvs commit -m "debug tool" print_seeds.F cvs commit -m "integer version of vbias" ivbias.F ####################### MODIFIED FILES FOR CVS cvs commit -m "only book predigi ntuple for enabled det. sets" book_predigi_ntuple.F cvs commit -m "comments added" control.kopio.ffread cvs commit -m "only treat enabled det. sets" fill_predigi_ntuple.F cvs commit -m "make fcn RNMAXF independent of calling history" gcalor_unix.F cvs commit -m "add debug output. random seeds" gudcay.F cvs commit -m "DETNAMES, DET BITS mods" initialization_ntuple.F cvs commit -m "DETNAMES, DET BITS mods" initialization_ntuple.inc cvs commit -m "comments added" kopio_charged_veto.F cvs commit -m "handle <3 CV layers correctly" kopio_decay_vacuum.F cvs commit -m "makes sure CV exists before calling GSDET" kopio_detectors.F cvs commit -m "remove unused code" kopio_gu.F cvs commit -m "remove unused code" kopio_guhadr.F cvs commit -m "debug reporting of random seeds" kopio_kine.F cvs commit -m "debug reporting of random seeds" kopio_step.F cvs commit -m "add IVBIAS, print_seeds" Makefile cvs commit -m "only treat enabled det. sets" order_predigi_hits.F cvs commit -m "PAW: macros setdet,sd5 added" plot.kumac cvs commit -m "only fill predigi ntuple for enabled det. sets" predigi.F cvs commit -m "dxxxx definition changed" predigi_ntuple.inc ########################### TAG cvs tag v07_2 check % cd /u1/djaffe/KOPIO/fullmc/checkout/ % cvs checkout -d v07_2 mc/geant_v0 % cd v07_2;source setup.CERNLIB.script ; source setup.USER.script ; make all ; ls -lrt $MY_EXE -rwxrwxr-x 1 djaffe djaffe 9467744 Mar 30 10:28 kopio_geant.out -rwxrwxr-x 1 djaffe djaffe 15453379 Mar 30 10:29 kopio_inter.out within 4 bytes, OK. test job % run.kopio.geant.script 7200 100 OK SUMMARY OF MODIFICATIONS: ======================== 1. DET BITS and DETNAMES blocks modified and removed from ntuple id#1 and put in ntuple id#5. PREDIGI block in ntuple#1 modified. All modifs designed for ROOT compatibility. 2. Handle <3 charged veto layers correctly when selected by user. 3. Fix bug in gcalor code (fcn RNMAXF) that prevented reproducibility of events with same random number seeds. KNOWN PROBLEMS: ================ > Saturation in scintillator not included > PR cathodes not simulated > DS vetos not optimally placed > CAL inner liner has geometry overlap problems. > storage of average hit position for cylindrical detectors is flawed Tue Mar 30 13:39:00 EST 2004