| 1 |
mocchiut |
1.1 |
************************************************************************* |
| 2 |
|
|
* Program analysis.f |
| 3 |
|
|
* |
| 4 |
|
|
* - reads cluster information (LEVEL1, reduction.f output ntuple) |
| 5 |
|
|
* - perform track identification and fit |
| 6 |
|
|
* - create LEVEL2 ntuple |
| 7 |
|
|
* |
| 8 |
|
|
************************************************************************* |
| 9 |
|
|
subroutine analysisflight |
| 10 |
|
|
|
| 11 |
|
|
include 'commontracker.f' |
| 12 |
|
|
include 'common_momanhough.f' |
| 13 |
|
|
include 'common_mech.f' |
| 14 |
|
|
include 'common_xyzPAM.f' |
| 15 |
|
|
include 'common_mini_2.f' |
| 16 |
|
|
include 'calib.f' |
| 17 |
|
|
include 'level1.f' |
| 18 |
|
|
include 'level2.f' |
| 19 |
|
|
|
| 20 |
|
|
c include 'momanhough_init.f' |
| 21 |
|
|
|
| 22 |
|
|
* flag to set debug mode |
| 23 |
|
|
logical DEBUG |
| 24 |
|
|
common/dbg/DEBUG |
| 25 |
|
|
|
| 26 |
|
|
* flag to chose PFA |
| 27 |
|
|
character*10 PFA |
| 28 |
|
|
common/FINALPFA/PFA |
| 29 |
|
|
|
| 30 |
|
|
c parameter (inf=1.e8) !just a huge number... |
| 31 |
|
|
|
| 32 |
|
|
* external functions |
| 33 |
|
|
external npl |
| 34 |
|
|
external acoordsi,coordsi,nld,coord,dcoord |
| 35 |
|
|
|
| 36 |
|
|
DEBUG=.false.!.true.! |
| 37 |
|
|
************************************************************ |
| 38 |
|
|
************************************************************ |
| 39 |
|
|
************************************************************ |
| 40 |
|
|
* |
| 41 |
|
|
* track analysis |
| 42 |
|
|
* |
| 43 |
|
|
************************************************************ |
| 44 |
|
|
************************************************************ |
| 45 |
|
|
************************************************************ |
| 46 |
|
|
PFA='ETA' |
| 47 |
|
|
|
| 48 |
|
|
if(DEBUG)then |
| 49 |
|
|
print*,'----------------------------------' |
| 50 |
|
|
print*,'START... ',good1,nclstr1,nclstrmax_level2 |
| 51 |
|
|
endif |
| 52 |
|
|
|
| 53 |
|
|
*------------------------------------------------------ |
| 54 |
|
|
* LEVEL2 N-TUPLE INITIALIZATIONS |
| 55 |
|
|
call init_level2 |
| 56 |
|
|
c if(.not.good1)then |
| 57 |
|
|
if(good1.eq.0)then |
| 58 |
|
|
goto 8800 !fill nt-uple and go to next event |
| 59 |
|
|
endif |
| 60 |
|
|
*------------------------------------------------------ |
| 61 |
|
|
|
| 62 |
|
|
*------------------------------------------------------ |
| 63 |
|
|
* cut on maximum number of clusters |
| 64 |
|
|
*------------------------------------------------------ |
| 65 |
|
|
if(nclstr1.gt.nclstrmax_level2)then |
| 66 |
|
|
goto 8800 !fill nt-uple and go to next event |
| 67 |
|
|
endif |
| 68 |
|
|
|
| 69 |
|
|
do i=1,nclstr1 |
| 70 |
|
|
cl_used(i)=0 !init mask of clusters associated to a track |
| 71 |
|
|
enddo |
| 72 |
|
|
|
| 73 |
|
|
if(DEBUG)then |
| 74 |
|
|
print*,'----------------------------------' |
| 75 |
|
|
print*,iev,' ** ',nev2 |
| 76 |
|
|
endif |
| 77 |
|
|
|
| 78 |
|
|
* /////////////////////////////////////////////// |
| 79 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
| 80 |
|
|
|
| 81 |
|
|
iflag=0 |
| 82 |
|
|
call track_finding(iflag) |
| 83 |
|
|
if(iflag.eq.1)then !bad event |
| 84 |
|
|
goto 880 !fill ntp and go to next event |
| 85 |
|
|
endif |
| 86 |
|
|
|
| 87 |
|
|
iflag=0 |
| 88 |
|
|
call track_fitting(iflag) |
| 89 |
|
|
if(iflag.eq.1)then !bad event |
| 90 |
|
|
goto 880 !fill ntp and go to next event |
| 91 |
|
|
endif |
| 92 |
|
|
|
| 93 |
|
|
|
| 94 |
|
|
|
| 95 |
|
|
880 continue |
| 96 |
|
|
|
| 97 |
|
|
* ********************************************************** |
| 98 |
|
|
* stores info about clusters not associated with any track |
| 99 |
|
|
* ********************************************************** |
| 100 |
|
|
|
| 101 |
|
|
call fill_level2_siglets |
| 102 |
|
|
|
| 103 |
|
|
if(DEBUG)then |
| 104 |
|
|
|
| 105 |
|
|
print*,'' |
| 106 |
|
|
print*,'DONE!' |
| 107 |
|
|
print*,'' |
| 108 |
|
|
print*,'* summary *' |
| 109 |
|
|
print*,'tracks ',ntrk |
| 110 |
|
|
print*,'cl used ',(cl_used(i),i=1,nclstr1) |
| 111 |
|
|
print*,'' |
| 112 |
|
|
print*,'' |
| 113 |
|
|
endif |
| 114 |
|
|
|
| 115 |
|
|
8800 continue |
| 116 |
|
|
|
| 117 |
|
|
|
| 118 |
|
|
* /////////////////////////////////////////////// |
| 119 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
| 120 |
|
|
|
| 121 |
|
|
100 continue |
| 122 |
|
|
|
| 123 |
|
|
return |
| 124 |
|
|
end |
| 125 |
|
|
|
| 126 |
|
|
|
| 127 |
|
|
************************************************************ |
| 128 |
|
|
|
| 129 |
|
|
|
| 130 |
|
|
c# include "momanhough-subroutines.f" |
| 131 |
|
|
|
| 132 |
|
|
|