* * quicky KUMAC to get position of e+ hits from GEANT simulations * * TP, 09-May-1998, PSI * * [1] Geant Runnumber; for histogram titles * *---------------------------------------------------------------------- * if ( [1] .eq. ' ' .or. [1] .eq. '?' .or. [1] .eq. '!') then mess mess Missing GEANT RunNumber as parameter. mess Needed for Histogram titles. mess mess Syntax: mess mess gean_position RunNo mess exitm endif runno = [1] file = geant_[1].rz rFile = geant_[1].root * * cuts for e+ and e- and gammas * cut $20 btest(int(partcode),0).and.btest(int(partcode),4) |require gamma in both detec. cut $21 btest(int(partcode),1).and.btest(int(partcode),5) |require e+ in both detec. cut $22 btest(int(partcode),2).and.btest(int(partcode),6) |require e- in both detec. * cut $11 p0>30. cut $10 desci>0.and.desco>0 cut $1 de_left_i>0.and.de_left_o>0 cut $2 de_top_i>0.and.de_top_o>0 cut $3 de_rite_i>0.and.de_rite_o>0 cut $4 de_bot_i>0.and.de_bot_o>0 * cut $5 btest(int(volno),0).and.btest(int(volno),4) | bits for left in and out cut $6 btest(int(volno),1).and.btest(int(volno),5) | bits for top in and out cut $7 btest(int(volno),2).and.btest(int(volno),6) | bits for right in and out cut $8 btest(int(volno),3).and.btest(int(volno),7) | bits for bottom in and out * 1d 1 'GEANT '//[runno]//' volno, dE gt 0' 256 -.5 255.5 1d 2 'GEANT '//[runno]//' volno, dE gt 0, e+ bit or e- bit required' 256 -.5 255.5 1d 3 'GEANT '//[runno]//' volno, dE ge 0, only gammas' 256 -.5 255.5 1d 4 'GEANT '//[runno]//' volno, dE gt 0, only gammas' 256 -.5 255.5 1d 5 'GEANT '//[runno]//' volno, volno gt 0' 256 -.5 255.5 goto fine 1d 1604 'GEANT '//[runno]//' only left, de gt 0, 50ns bins' 220 0. 11000. 1d 1606 'GEANT '//[runno]//' only top, de gt 0, 50ns bins' 220 0. 11000. 1d 1607 'GEANT '//[runno]//' only right, de gt 0, 50ns bins' 220 0. 11000. 1d 1608 'GEANT '//[runno]//' only bottom, de gt 0, 50ns bins' 220 0. 11000. 1d 1504 'GEANT '//[runno]//' left , de gt 0, 50ns bins' 220 0. 11000. 1d 1506 'GEANT '//[runno]//' top , de gt 0, 50ns bins' 220 0. 11000. 1d 1507 'GEANT '//[runno]//' right, de gt 0, 50ns bins' 220 0. 11000. 1d 1508 'GEANT '//[runno]//' bottom, de gt 0, 50ns bins' 220 0. 11000. 1d 1404 'GEANT '//[runno]//' left , e+ or e- bit, de gt 0, 50ns bins' 220 0. 11000. 1d 1406 'GEANT '//[runno]//' top , e+ or e- bit, de gt 0, 50ns bins' 220 0. 11000. 1d 1407 'GEANT '//[runno]//' right , e+ or e- bit, de gt 0, 50ns bins' 220 0. 11000. 1d 1408 'GEANT '//[runno]//' bottom, e+ or e- bit, de gt 0, 50ns bins' 220 0. 11000. 1d 1704 'GEANT '//[runno]//' left , only gamma, de ge 0, 50ns bins' 220 0. 11000. 1d 1706 'GEANT '//[runno]//' top , only gamma, de ge 0, 50ns bins' 220 0. 11000. 1d 1707 'GEANT '//[runno]//' right , only gamma, de ge 0, 50ns bins' 220 0. 11000. 1d 1708 'GEANT '//[runno]//' bottom, only gamma, de ge 0, 50ns bins' 220 0. 11000. mess NTPlot left id=1404 nt/pl 111.tsci $1.and.$5.and.($21.or.$22) -1404 mess NTPlot top id=1406 nt/pl 111.tsci $2.and.$6.and.($21.or.$22) -1406 mess NTPlot rite id=1407 nt/pl 111.tsci $3.and.$7.and.($21.or.$22) -1407 mess NTPlot bot id=1408 nt/pl 111.tsci $4.and.$8.and.($21.or.$22) -1408 mess NTPlot left id=1504 nt/pl 111.tsci $1.and.$5 -1504 mess NTPlot top id=1506 nt/pl 111.tsci $2.and.$6 -1506 mess NTPlot rite id=1507 nt/pl 111.tsci $3.and.$7 -1507 mess NTPlot bot id=1508 nt/pl 111.tsci $4.and.$8 -1508 mess NTPlot left=1604 nt/pl 111.tsci volno=17.and.$10 -1604 mess NTPlot top =1606 nt/pl 111.tsci volno=34.and.$10 -1606 mess NTPlot right=1607 nt/pl 111.tsci volno=68.and.$10 -1607 mess NTPlot bottom=1608 nt/pl 111.tsci volno=136.and.$10 -1608 * goto cont * fine: 1d 1001 'GEANT '//[runno]//' zsci, de gt 0, ' 112 -14.0 14.0 1d 1002 'GEANT '//[runno]//' zsci, e+ or e- bit, de gt 0, ' 112 -14.0 14.0 1d 1003 'GEANT '//[runno]//' zsci, only gammas, ' 112 -14.0 14.0 * 1d 406 'GEANT '//[runno]//' top , e+ or e- bit, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 407 'GEANT '//[runno]//' right , e+ or e- bit, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 408 'GEANT '//[runno]//' bottom, e+ or e- bit, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 504 'GEANT '//[runno]//' left , de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 506 'GEANT '//[runno]//' top , de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 507 'GEANT '//[runno]//' right, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 508 'GEANT '//[runno]//' bottom, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 604 'GEANT '//[runno]//' only left, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 606 'GEANT '//[runno]//' only top, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 607 'GEANT '//[runno]//' only right, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 608 'GEANT '//[runno]//' only bottom, de gt 0, 1ns bins' 11000 0.5 11000.5 * 1d 704 'GEANT '//[runno]//' left , only gamma, de ge 0, 1ns bins' 11000 0.5 11000.5 * 1d 706 'GEANT '//[runno]//' top , only gamma, de ge 0, 1ns bins' 11000 0.5 11000.5 * 1d 707 'GEANT '//[runno]//' right , only gamma, de ge 0, 1ns bins' 11000 0.5 11000.5 * 1d 708 'GEANT '//[runno]//' bottom, only gamma, de ge 0, 1ns bins' 11000 0.5 11000.5 * * mess Plot 1001=zsci dE>0 nt/pl 111.zsci $10 -1001 mess Plot 1002=zsci dE>0 and e+ or e- bit reuqired nt/pl 111.zsci $10.and.($21.or.$22) -1002 mess Plot 1003=zsci dE>=0, only gammas nt/pl 111.zsci volno>0.and.partcode=17 -1003 *mess NTPlot left id=404 *nt/pl 111.tsci $1.and.$5.and.($21.or.$22) -404 *mess NTPlot top id=406 *nt/pl 111.tsci $2.and.$6.and.($21.or.$22) -406 *mess NTPlot rite id=407 *nt/pl 111.tsci $3.and.$7.and.($21.or.$22) -407 *mess NTPlot bot id=408 *nt/pl 111.tsci $4.and.$8.and.($21.or.$22) -408 *mess NTPlot left id=504 *nt/pl 111.tsci $1.and.$5 -504 *mess NTPlot top id=506 *nt/pl 111.tsci $2.and.$6 -506 *mess NTPlot rite id=507 *nt/pl 111.tsci $3.and.$7 -507 *mess NTPlot bot id=508 *t/pl 111.tsci $4.and.$8 -508 *mess NTPlot left=604 *nt/pl 111.tsci volno=17.and.$10 -604 *mess NTPlot top =606 *nt/pl 111.tsci volno=34.and.$10 -606 *mess NTPlot right=607 *nt/pl 111.tsci volno=68.and.$10 -607 *mess NTPlot bottom=608 *nt/pl 111.tsci volno=136.and.$10 -608 *mess NTPlot left id=704 *nt/pl 111.tsci partcode=17.and.$5 -704 *mess NTPlot top id=706 *nt/pl 111.tsci partcode=17.and.$6 -706 *mess NTPlot rite id=707 *nt/pl 111.tsci partcode=17.and.$7 -707 *mess NTPlot bot id=708 *nt/pl 111.tsci partcode=17.and.$8 -708 *close 0 *hi/file 20 [file] ! n *hrou 0 *close 20 *mess *mess Histograms written to [file] *mess * *sh h2root [file] * *mess *mess Histogram file [file] converted to root format. *mess * *sh rm -vf [file] *sh mv -v [rfile] ../data