(file) Return to coin_hbook.f CVS log (file) (dir) Up to [HallC] / Replay / kumacs

  1 jones 1.2       REAL FUNCTION coin_hbook()
  2                 IMPLICIT NONE
  3                 INCLUDE ?
  4           
  5                 LOGICAL FIRST
  6                 DATA FIRST /.TRUE./
  7                 SAVE FIRST
  8                 real haero_tot
  9                 real wlocut,whicut,q2min,thetacm,csum
 10                 logical good_electron,good_pion
 11                 logical good_pion1
 12                 logical coint_e_pi,coint_e_pi_delta
 13                 logical mmcut_relax,good_ran
 14           c
 15           
 16                 IF(FIRST) THEN
 17                    FIRST=.FALSE.
 18                    PRINT *,  'BOOKING HISTOS...'
 19                    CALL HBOOK1(3,'scal E1 track t=scleantrack',
 20                ^100,0.0,1.5,0)
 21                    CALL HBOOK1(4,'scal Etot track t=scleantrack',
 22 jones 1.2      ^100,0.0,2.0,0)
 23                    CALL HBOOK1(5,'scer npe t=scleantrack',100,0.,15.,0)  
 24                    CALL HBOOK1(6,'sbeta t=scleantrack',100,0.5,1.2,0)
 25                    CALL HBOOK2(7,'scal x vs Etot t=scleantrack',
 26                ^100,0.0,2.0,100,-60.0,60.0,0)        
 27                    CALL HBOOK2(8,'scal y vs Etot t=scleantrack',
 28                ^100,0.0,2.0,100,-30.0,30.0,0)        
 29           
 30           
 31           
 32                    CALL HBOOK1(13,'hbeta t=hclean',100,-1.,1.5,0)
 33                    CALL HBOOK1(14,'HMS s1xdedx t=hclean',100,0.0,800.,0)
 34                    CALL HBOOK1(15,'HMS TOFmass2 t=hclean',100,-1.,4.0,0)
 35           
 36                    CALL HBOOK1(22,'haero-pos-npe-sum t=hclean',100,0.0,40.,0)
 37                    CALL HBOOK1(23,'haero-neg-npe-sum t=hclean',100,0.0,40.,0)
 38                    CALL HBOOK1(25,'haero-tot-npe-sum t=hclean',100,0.0,40.,0)
 39           
 40                    CALL HBOOK1(32,'hcer adc bottom t=hcelan',100,0.0,400.,0)
 41                    CALL HBOOK1(33,'hcer adc top t=hclean',100,0.0,400.,0)
 42                    CALL HBOOK1(34,'hcer npe sum t=hclean',100,0.0,40.,0)
 43 jones 1.2          CALL HBOOK2(35,'xcer vs hcer_npe t=hclean',100,0.0,20.,
 44                ^100,-70.,70.,0)
 45           
 46                   
 47                    CALL HBOOK2(50,'HMS beta vs Cointime t=e pi',100,-10.,
 48                ^10.,100,0.8,1.2,0)
 49                    CALL HBOOK2(51,'SOS beta vs Cointime t=e pi',100,-10.,
 50                ^10.,100,0.8,1.2,0)
 51                    CALL HBOOK1(53,'SOS-HMS path corr(ns) t=e pi',100,-2.0,2.0,0)
 52                    CALL HBOOK2(54,'HMS ztgt vs SOS ztgt t=e pi',100,-8.,8.
 53                ^,100,-8.,8.0,0)
 54                  
 55                  CALL HBOOK1(62,'Mm(pi prod) t=coint e pi delta',500,0.8,1.2,0)
 56                  CALL HBOOK1(63,'Em t=coint e pi delta',500,0.5,1.7,0)
 57                  CALL HBOOK1(64,'Eexc t=coint e pi delta',500,-0.1,0.1,0)
 58           
 59                    CALL HBOOK1(65,'Q2 t=mmcut relax',100,1.0,4.,0)
 60                    CALL HBOOK1(66,'W t=mmcut relax',100,1.4,3.,0)
 61                    CALL HBOOK2(67,'W vs Q2 t=mmcut relax',100,1.,
 62                ^3.,100,1.4,3.0,0)
 63                    CALL HBOOK2(68,'-t vs phipi t-mmcut relax',100,
 64 jones 1.2      ^-0.5,0.5,100,-0.5,0.5,0)
 65                     
 66           
 67                   CALL HBOOK1(101,'t, t=mmcut relax',100,0,0.8,0)
 68                   CALL HBOOK1(102,'phipi, t=mmcut relax',100,0.,6.28,0) 
 69           
 70                    CALL HBOOK1(2001,'hsdelta t=hclean',100,-20.0,20.0,0)
 71                    CALL HBOOK1(2002,'ssdelta,t=sclean',100,-20.0,20.0,0)
 72           
 73                    CALL HBOOK1(3000,'Cointime t=e pi',100,-10.,10.,0)
 74                   ENDIF
 75             
 76                  haero_tot=haero_po+haero_ne
 77             
 78                    good_electron = .false.
 79                    if(scer_npe.gt.1.0.and.ssshtrk.gt.0.7)
 80                ^good_electron = .true.
 81                    good_pion1 = .false.
 82                    if(hcer_npe.lt.0.2.and.haero_tot.gt.4.)
 83                ^good_pion1 = .true.
 84                    good_pion = .false.
 85 jones 1.2          if(good_pion1.and.hsmass2.lt.1.0) good_pion= .true.
 86            
 87                    coint_e_pi = .false.
 88                 if(abs(cointime).lt.3.5.and.good_pion.and.good_electron)
 89                ^coint_e_pi=.true.
 90           
 91                   coint_e_pi_delta = .false.
 92                 if(coint_e_pi.and.abs(hsdelta).lt.8.5.and.abs(ssdelta).lt.15.)          
 93                ^coint_e_pi_delta= .true.  
 94                     mmcut_relax = .false.
 95                 if(coint_e_pi_delta.and.abs(missmass-0.939).lt.0.05)
 96                ^mmcut_relax=.true.    
 97           
 98                 good_ran=.false.
 99                 if(good_pion.and.good_electron.and.abs(hsdelta).lt.8.5.and.
100                ^abs(ssdelta).lt.15.0.and.abs(missmass-0.939).lt.0.05) then
101           
102                    good_ran=.true.
103                 endif
104                 
105           
106 jones 1.2       CALL HFILL(3,ssprtrk,0.,1.)
107                 CALL HFILL(4,ssshtrk,0.,1.)
108                 CALL HFILL(5,scer_npe,0.,1.)
109                 CALL HFILL(6,ssbeta,0.,1.)
110                 CALL HFILL(7,ssshtrk,scal_x,1.0)
111                 CALL HFILL(8,ssshtrk,scal_y,1.0)
112           
113                 CALL HFILL(13,hsbeta,0.,1.)
114                 CALL HFILL(14,hsdedx1,0.,1.)
115                 CALL HFILL(15,hsmass2,0.,1.)
116               
117                 CALL HFILL(22,haero_po,0.,1.)
118                 CALL HFILL(23,haero_ne,0.,1.)
119                 CALL HFILL(25,haero_tot,0.,1.)
120           
121                 CALL HFILL(32,hceradc1,0.,1.)
122                 CALL HFILL(33,hceradc2,0.,1.)
123                 CALL HFILL(34,hcer_npe,0.,1.)
124                 CALL HFILL(35,hcer_npe,hcersx,1.)
125                
126                 CALL HFILL(2001,hsdelta,0.,1.)
127 jones 1.2       CALL HFILL(2002,ssdelta,0.,1.)
128               
129                 if(good_pion.and.good_electron)then
130                 CALL HFILL(50, cointime,hsbeta,1.)
131                 CALL HFILL(51, cointime,ssbeta,1.)
132                 CALL HFILL(53, coinpath,0.,1.)
133                 CALL HFILL(54,sszbeam,hszbeam,1.)
134                 endif     
135           
136                 if(coint_e_pi_delta)then
137                 CALL HFILL(62, missmass,0.,1.)
138                 CALL HFILL(63, Em,0.,1.)
139                 CALL HFILL(64, Eexc,0.,1.)
140           
141                 endif
142                 
143                 if(good_ran) then
144                    CALL HFILL(3000,cointime,0.,1.)
145                 endif
146                 if(mmcut_relax)then
147                 CALL HFILL(65, Q2,0.,1.)
148 jones 1.2       CALL HFILL(66, W,0.,1.)
149                 CALL HFILL(67, Q2,W,1.)
150                 CALL HFILL(68,ctphix,ctphiy,1.)
151                 CALL HFILL(101,t,0.,1.)
152           c      print*, 'phi_pq=',phi_pq 
153                 CALL HFILL(102,phi_pq,0.,1.)
154           
155                 endif
156           
157                 coin_hbook = 1.
158                 return
159                 end
160           
161           
162           
163           
164           
165           
166           
167           
168           

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0