next up previous
Next: List of reconstruction programs Up: Reconstruction program for the Previous: Event Printing and Drawing

Common blocks description

COMMON / RECONPARAM / fill up in subroutine CALOR_RECONST_INI:

C ---------------------------------------------------------------------
      real*4  energy_coeff1, energy_coeff2, energy_coeff
      real*4  sph_cutE_sup, coeff_radE_sup
      real*4  sph_cutE_clu, coeff_radE_clu
      real*4  sph_cut_sup,  coeff_rad_sup
      real*4  sph_cut_clu,  coeff_rad_clu
      real*4  Cl_Dist_Merge, Dist_Merge
      real*4  EC_min_mu, EC_max_mu
      real*4  EM_Energy, Cl_Dist_Merge_EM
      real*4  x0_1ECAL, x0_2ECAL
      real*4  R_moliere, theor_mu_densE, theor_mu_dens
      real*4  thresh_clust, thresh_hits
      real*4  TPC_trk_Dist_Merge
      real*4  TPC_Cl_Dist_Merge, TPC_Dist_Merge 
      real*4  TPC_Cl_Dist_MergeH, TPC_Dist_MergeH
      real*4  Energy_sigmaE, Energy_sigmaH
      real*4  Esup_clustE_thr,  Esup_clust_thr
      integer nhit_thrE, nhit_thr, nindbeg_thr, nindend_thr
      common/reconparam/ energy_coeff1, energy_coeff2, energy_coeff
     $, sph_cutE_sup, coeff_radE_sup
     $, sph_cutE_clu, coeff_radE_clu
     $, sph_cut_sup,  coeff_rad_sup
     $, sph_cut_clu,  coeff_rad_clu
     $, Cl_Dist_Merge, Dist_Merge
     $, EC_min_mu, EC_max_mu
     $, EM_Energy, Cl_Dist_Merge_EM
     $, x0_1ECAL, x0_2ECAL
     $, R_moliere, theor_mu_densE, theor_mu_dens
     $, nindbeg_thr, nindend_thr
     $, thresh_clust, thresh_hits
     $, nhit_thrE, Esup_clustE_thr
     $, nhit_thr, Esup_clust_thr
     $, TPC_trk_Dist_Merge
     $, TPC_Cl_Dist_Merge, TPC_Dist_Merge 
     $, TPC_Cl_Dist_MergeH, TPC_Dist_MergeH
     $, Energy_sigmaE, Energy_sigmaH
C ---------------------------------------------------------------------
      SAVE /RECONPARAM/
**************************************************************************

COMMON / CALOINPUT /
consists of TPC reconstruction information - can be filled with reconstructed TPC information in subroutine TPC_Reconst_Prep.
NTRKTPC - maximal allowed array size,
ninp1 - number of tracks at IP,
lpart1 - particle ID at IP,
lvert1 - vertex number (GEANT),
xmass1 - particle mass,
xcharge1 - particle charge,
xc1, yc1, zc1 - vertex coordinates,
cx1, cy1, cz1 - momentum direct cosines,
pm1 - particle momentum,
ninp2, lpart2, xmass2, xcharge2, xc2, yc2, zc2, cx2, cy2, cz2, pm2 - the same track parameters but at the calorimeter face, except,
lvert2 - address of mother particle at IP.
XHTPC, YHTPC, RHTPC, BHTPC, RHTPC, BHTPC, PHTPC, DPHTPC, ZHTPC, DHTPC - parameters of track helix hypothesis prediction (see subroutine Mom_Helix in rec_util.f).

C ---------------------------------------------------------------------
      integer NTRKTPC
      integer ninp0,lpart0,lvert0
      integer ninp1,lpart1,lvert1
      integer ninp2,lpart2,lvert2
C ---------------------------------------------------------------------
      real*4 xmass0,xcharge0,xc0,yc0,zc0,cx0,cy0,cz0,pm0
      real*4 xmass1,xcharge1,xc1,yc1,zc1,cx1,cy1,cz1,pm1
      real*4 xmass2,xcharge2,xc2,yc2,zc2,cx2,cy2,cz2,pm2
      real*4 XHTPC,YHTPC,RHTPC,BHTPC,PHTPC,DPHTPC,ZHTPC,DHTPC
C ---------------------------------------------------------------------
      PARAMETER (NTRKTPC=400)
C ---------------------------------------------------------------------
      common /caloinput/ 
     $  ninp0,lpart0(NTRKTPC),lvert0(NTRKTPC)
     $, xmass0(NTRKTPC),xcharge0(NTRKTPC)
     $, xc0(NTRKTPC),yc0(NTRKTPC),zc0(NTRKTPC)
     $, cx0(NTRKTPC),cy0(NTRKTPC),cz0(NTRKTPC),pm0(NTRKTPC)
     $, ninp1,lpart1(NTRKTPC),lvert1(NTRKTPC)
     $, xmass1(NTRKTPC),xcharge1(NTRKTPC)
     $, xc1(NTRKTPC),yc1(NTRKTPC),zc1(NTRKTPC)
     $, cx1(NTRKTPC),cy1(NTRKTPC),cz1(NTRKTPC),pm1(NTRKTPC)
     $, ninp2,lpart2(NTRKTPC),lvert2(NTRKTPC)
     $, xmass2(NTRKTPC),xcharge2(NTRKTPC)
     $, xc2(NTRKTPC),yc2(NTRKTPC),zc2(NTRKTPC)
     $, cx2(NTRKTPC),cy2(NTRKTPC),cz2(NTRKTPC),pm2(NTRKTPC)
     $, XHTPC(NTRKTPC),  YHTPC(NTRKTPC),  RHTPC(NTRKTPC)
     $, BHTPC(NTRKTPC),  PHTPC(NTRKTPC), DPHTPC(NTRKTPC)
     $, ZHTPC(NTRKTPC),  DHTPC(NTRKTPC)
C ---------------------------------------------------------------------
        save /caloinput/
C     documentation for CALOINPUT commong block

C     V.L. Morgunov 
C     MC information for the event
C
c     This part of common is filled in the GUKINE

C     ninp0          number of MC tree particles
C     lpart0(i)         particle ID code for this particle
C     lvert0(i)         Address of particle in HEP record
C     xmass0(i)         MC mass of particle
C     xcharge0(i)       charge of particle
C     xc0(i)            vertex(1) of particle
C     yc0(i)            vertex(2)
C     zc0(i)            vertex(3)
C     cx0(i)            px/p
C     cy0(i)            py/p
C     cz0(i)            pz/p
C     pm0(i)            p      all momenta are tree momenta
C
c     This part of common is filled in the TK?????

C     charged track information at the point of closest approach to
C     the IP
C     ninp1         number of charged tracks (equals to number of TK banks)
C     lpart1(i)         particle ID (if MC)
C     lvert1(i)         MC vertex number
C     xmass1(i)         mass of particle
C     xcharge1(i)        charge (-1., 0., 1., or 10. if unknown)
C     xc1(i)            -d0 * sin(phi)
C     yc1(i)             d0 * cos(phi)
C     zc1(i)             z0
C     pm1(i)             abs(p)
C     cx1(i)             sin(theta) * cos(phi)
C     cy1(i)             sin(theta) * sin(phi)
C     cz1(i)             cos(theta)

C     charged track information at the face of the calorimeter

c     This part of common is filled in the TK?????

C     the information from the previous block is repeated, but moved to 
C     the calorimeter face. 
C     ninp2         number of charged tracks (equals to number of TK banks)
C     lpart2(i)         particle ID (if MC)
C     lvert2(i)         MC vertex number
C     xmass2(i)         mass of particle
C     xcharge2(i)        charge (-1., 0., 1., or 10. if unknown)
c             Coordinates at the Calorimeter face
C     xc2(i)            -d0 * sin(phi)
C     yc2(i)             d0 * cos(phi)
C     zc2(i)             z0
c             Momentum at the Calorimeter face
C     pm2(i)             abs(p)
C     cx2(i)             sin(theta) * cos(phi)
C     cy2(i)             sin(theta) * sin(phi)
C     cz2(i)             cos(theta)

COMMON / TPCTRACK /

cd    +KEEP,TPCTRACK.
********************************************************************
*   This common collects an information about track grops 
*            at the calorimeter face
********************************************************************
C ---------------------------------------------------------------------
      integer ind_pm0,ind_pm1,ind_pm2,kk_tpc,ktpc1,ktpc2
      integer ngr,mgrup,kgrup,lgrup
      integer  n_tr_gr,la_tr_gr,n_tr_not_gr,la_tr_not_gr
C ---------------------------------------------------------------------
      real*4 TPC_distance,xgr,ygr,zgr,cxgr,cygr,czgr,grmom
C ---------------------------------------------------------------------
      Common /TPCTRACK/ ind_pm0(ntrktpc+1),ind_pm1(ntrktpc+1),
     &  ind_pm2(ntrktpc+1)
     $, kk_tpc, TPC_distance(ntrktpc,ntrktpc)
     $, ktpc1(500), ktpc2(500) 
     $, ngr, mgrup(100), kgrup(100), lgrup(100,50)
     $, xgr(100),ygr(100),zgr(100),cxgr(100)
     $, cygr(100),czgr(100),grmom(100)
     $, n_tr_gr,la_tr_gr(250), n_tr_not_gr,la_tr_not_gr(250)
C ---------------------------------------------------------------------
        save /tpctrack/
**************************************************************************
*               Filled in tpc_reconst_prep.f
**************************************************************************
*  ind_pm*(ninp*)  -- index for /caloinput/ COMMON for track
*                     in decreasing momentum order
* ----------------------------------------------------------------------
*  kk_tpc              -- number of rasonable distances in matrix
*  TPC_distance(k1,k2) -- collect kk_tpc distances of pairs of tracks
*                         with distance less then TPC_trk_Dist_Merge
*      ktpc1(kk_tpc)   --  first index of TPC_distance matrix
*                                  in increasing distance order
*      ktpc2(kk_tpc)   --  second index of TPC_distance matrix
*                                  in increasing distance order 
* ----------------------------------------------------------------------
*   ngr  --  number of group of tracks at the calorimeter face
*   mgrup(k) -- number of members in group k in array lgrup(k,i)
*   kgrup(k) -- number of close-by pairs in group k
*   lgrup(k,i) -- addresses of i-track in the /caloinput/ common
*                 that belongs to k-group
********************************************************************
*   lgrup has to be equivalent to Lgrup in Pair_to_group parameter value
********************************************************************
*   xgr,ygr,zgr -- coordinates of group center
*   cgr,cgr,cgr -- direction of group of tracks
*   grmom       -- momentum of group of tracks
*   n_tr_gr, la_tr_gr() -- List of tracks belong to any group
*   n_tr_not_gr,la_tr_not_gr()-- List of tracks do not belong to any group
**************************************************************************

INCLUDE caloampl.inc
There are several common blocks consist of geometrical keywords and raw amplitudes (hits) for all calorimeters and it's parts. Used in ECAL_RECONST_PREP and HCAL_RECONST_PREP to fill COMMON / ECRECONST / and / HCRECONST / with starting reconstruction amplitudes and coordinates.

All commons are filled during GEANT simulation run or from reading the event file if the simulation was in separate run.

COMMONs
/myBec1/ - ECAL barrel first sampling structure - 1.4 mm W,
/myBec1/ - ECAL barrel second sampling structure - 4.2 mm W,
/myBhca/ - HCAL barrel sampling structure
/myEPec1/ - ECAL endcap +Z first sampling structure - 1.4 mm W,
/myEPec2/ - ECAL endcap +Z second sampling structure - 4.2 mm W,
/myEPhca/ - HCAL endcap +Z sampling structure
/myEMec1/ - ECAL endcap -Z first sampling structure - 1.4 mm W,
/myEMec2/ - ECAL endcap -Z second sampling structure - 4.2 mm W,
/myEMhca/ - HCAL endcap -Z sampling structure

Where:
MBEC1 - number of stored words in common, KBEC1 or BBEC1 - geometrical keyword or hit amplitude

Subroutine Clearcomm has to be called before reading or generation of next event for hits common blocks cleaning. This subroutine also sets hits counters to initial value.

C ---------------------------------------------------------------------
C                  BARREL
C ---------------------------------------------------------------------
      PARAMETER (LBEC1=40000)
C ---------------------------------------------------------------------
      common/myBec1/MBEC1, BBEC1(LBEC1)
      DIMENSION   KBEC1(LBEC1)
      equivalence(KBEC1(1),BBEC1(1))
        save /myBec1/
C ---------------------------------------------------------------------
      PARAMETER (LBEC2=10000)
C ---------------------------------------------------------------------
      common/myBec2/MBEC2, BBEC2(LBEC2)
      DIMENSION   KBEC2(LBEC2)
      equivalence(KBEC2(1),BBEC2(1))
        save /myBec2/
C ---------------------------------------------------------------------
      PARAMETER (LBHCA=10000)
C ---------------------------------------------------------------------
      common/myBhca/MBHCA, BBHCA(LBHCA)
      DIMENSION   KBHCA(LBHCA)
      equivalence(KBHCA(1),BBHCA(1))
        save /myBhca/
C ---------------------------------------------------------------------
C                  ENDCAP Z+
C ---------------------------------------------------------------------
      PARAMETER (LEPEC1=40000)
C ---------------------------------------------------------------------
      common/myEPec1/MEPEC1,BEPEC1(LEPEC1)
      DIMENSION   KEPEC1(LEPEC1)
      equivalence(KEPEC1(1),BEPEC1(1))
        save /myEPec1/
C ---------------------------------------------------------------------
      PARAMETER (LEPEC2=10000)
C ---------------------------------------------------------------------
      common/myEPec2/MEPEC2,BEPEC2(LEPEC2)
      DIMENSION   KEPEC2(LEPEC2)
      equivalence(KEPEC2(1),BEPEC2(1))
        save /myEPec2/
C ---------------------------------------------------------------------
      PARAMETER (LEPHCA=10000)
C ---------------------------------------------------------------------
      common/myEPhca/MEPHCA,BEPHCA(LEPHCA)
      DIMENSION   KEPHCA(LEPHCA)
      equivalence(KEPHCA(1),BEPHCA(1))
        save /myEPhca/
C ---------------------------------------------------------------------
C                  ENDCAP Z-
C ---------------------------------------------------------------------
      PARAMETER (LEMEC1=40000)
C ---------------------------------------------------------------------
      common/myEMec1/MEMEC1,BEMEC1(LEMEC1)
      DIMENSION KEMEC1(LEMEC1)
      equivalence(KEMEC1(1),BEMEC1(1))
        save /myEMec1/
C ---------------------------------------------------------------------
      PARAMETER (LEMEC2=10000)
C ---------------------------------------------------------------------
      common/myEMec2/MEMEC2,BEMEC2(LEMEC2)
      DIMENSION KEMEC2(LEMEC2)
      equivalence(KEMEC2(1),BEMEC2(1))
        save /myEMec2/
C ---------------------------------------------------------------------
      PARAMETER (LEMHCA=10000)
C ---------------------------------------------------------------------
      common/myEMhca/MEMHCA,BEMHCA(LEMHCA)
      DIMENSION KEMHCA(LEMHCA)
      equivalence(KEMHCA(1),BEMHCA(1))
        save /myEMhca/
C ---------------------------------------------------------------------

COMMON / TRACKCORE /

+KEEP,TRACKCORE.
c======================================================================
c          Core track information collection
c======================================================================
c      Arrayes index is track number in main TPC common
c======================================================================
       integer NTRCKCORE
C ---------------------------------------------------------------------
      PARAMETER (NTRCKCORE=400)
C ---------------------------------------------------------------------
       real  chisq,chisqe,chisqh
       real  enrgy,enrgye,enrgyh
       real  enr,enre,enrh
       real  enr2,enre2,enrh2
       real  enr3,enre3,enrh3
       real  e_loss_ave_e,e_loss_ave_h
       real  e_loss_ave_e2,e_loss_ave_h2
       real  e_loss_ave_e3,e_loss_ave_h3
       real  e_sume_1,e_sume_2
       integer n_used_track
       integer nhit_ecal,nhit_hcal
       integer nhit_ecal2,nhit_hcal2  
       integer nhit_ecal3,nhit_hcal3  
       integer i_no_first_hit
       integer i_last_lay_e,i_no_cont_e,i_no_cont_ea
       integer i_last_lay_h,i_no_cont_h,i_no_cont_ha
       integer i_track_start_e,i_track_start_h 
       integer n_lay_mips_e,lay_mip_e,lay_mip_ea
       integer n_lay_mips_h,lay_mip_h,lay_mip_ha
       integer n_hite_1,n_hite_2
c----------------------------------------------------------------------
       common /trackcore/ n_used_track(NTRCKCORE)
     $, enr(NTRCKCORE),enre(NTRCKCORE),enrh(NTRCKCORE)
     $, enr2(NTRCKCORE),enre2(NTRCKCORE),enrh2(NTRCKCORE)
     $, enr3(NTRCKCORE),enre3(NTRCKCORE),enrh3(NTRCKCORE)
     $, enrgy(NTRCKCORE),enrgye(NTRCKCORE),enrgyh(NTRCKCORE)
     $, e_loss_ave_e(NTRCKCORE),e_loss_ave_h(NTRCKCORE)
     $, e_loss_ave_e2(NTRCKCORE),e_loss_ave_h2(NTRCKCORE)
     $, e_loss_ave_e3(NTRCKCORE),e_loss_ave_h3(NTRCKCORE) 
     $, nhit_ecal(NTRCKCORE),nhit_hcal(NTRCKCORE)
     $, nhit_ecal2(NTRCKCORE),nhit_hcal2(NTRCKCORE)
     $, nhit_ecal3(NTRCKCORE),nhit_hcal3(NTRCKCORE)
     $, chisq(NTRCKCORE),chisqe(NTRCKCORE),chisqh(NTRCKCORE) 
     $, i_no_first_hit(NTRCKCORE),i_no_cont_ea(NTRCKCORE)
     $, i_last_lay_e(NTRCKCORE),i_no_cont_e(NTRCKCORE)
     $, i_last_lay_h(NTRCKCORE),i_no_cont_h(NTRCKCORE)
     $, i_no_cont_ha(NTRCKCORE),lay_mip_ea(NTRCKCORE)
     $, i_track_start_e(NTRCKCORE),i_track_start_h(NTRCKCORE) 
     $, n_lay_mips_e(NTRCKCORE),lay_mip_e(NTRCKCORE)
     $, n_lay_mips_h(NTRCKCORE),lay_mip_h(NTRCKCORE)
     $, lay_mip_ha(NTRCKCORE)
     $, e_sume_1(NTRCKCORE),e_sume_2(NTRCKCORE)
     $, n_hite_1(NTRCKCORE),n_hite_2(NTRCKCORE)
c----------------------------------------------------------------------
       save /trackcore/
c----------------------------------------------------------------------
c         Common description
c----------------------------------------------------------------------
*     n_used_track  - Number of logical branch this track treated in
c        At the core collection step
*     enr           - Energy of cluster collected along track in calorimeter 
*     enre          - Energy of cluster collected along track in ECAL 
*     enrh          - Energy of cluster collected along track in HCAL  
c        At the second iteration
*     enr2          - Energy of cluster collected along track in calorimeter 
*     enre2         - Energy of cluster collected along track in ECAL
*     enrh2         - Energy of cluster collected along track in HCAL
c        At the third iteration
*     enr3          - Energy of cluster collected along track in calorimeter 
*     enre3         - Energy of cluster collected along track in ECAL
*     enrh3         - Energy of cluster collected along track in HCAL
c        After all iterations
*     enrgy         - Energy of cluster collected along track in calorimeter
*     enrgye        - Energy of cluster collected along track in ECAL
*     enrgyh        - Energy of cluster collected along track in HCAL
c
*     e_loss_ave_e  -
*     e_loss_ave_h  -
*     e_loss_ave_e2 -
*     e_loss_ave_h2 -
*     e_loss_ave_e3 -
*     e_loss_ave_h3 -
*     nhit_ecal     -  
*     nhit_hcal     -
*     nhit_ecal2    -
*     nhit_hcal2    -
*     nhit_ecal3    -
*     nhit_hcal3    -
*     chisq         - 
*     chisqe        -
*     chisqh        - 
*     i_no_first_hit -
*     i_no_cont_ea  -
*     i_last_lay_e  -
*     i_no_cont_e   -
*     i_last_lay_h  -
*     i_no_cont_h   -
*     i_no_cont_ha  -
*     lay_mip_ea    - 
*     i_track_start_e -
*     i_track_start_h - 
*     n_lay_mips_e  -
*     lay_mip_e     -
*     n_lay_mips_h  -
*     lay_mip_h     -
*     lay_mip_ha    -
*     e_sume_1      -
*     e_sume_2      -
*     n_hite_1      -
*     n_hite_2      -
c======================================================================

COMMON / ECLUSTERS /

+KEEP,ECLUSTERS.
**************************************************************************
*     The main common for neutral cluster collection in ECAL
**************************************************************************
      integer NECLUST,NEclusters,LESUP,LECLU
      integer NEHITS,NEHITS1,NEHITS2
      integer NEHITSO,NEBEG,NEEND,IHYPECL
      integer McluH
C ---------------------------------------------------------------------
      real*4 ENECL,ECLCHISQ,DNECL,EN1ECL,EN2ECL
      real*4 XECL_fst,YECL_fst,ZECL_fst
      real*4 XECL,YECL,ZECL,CXECL,CYECL,CZECL
      real*4 RECL,TECL,PECL
C ---------------------------------------------------------------------
      PARAMETER (NECLUST=500)
C ---------------------------------------------------------------------
       common/Eclusters/ NEclusters,LESUP(NECLUST),LECLU(NECLUST)
     $,NEHITS(NECLUST),NEHITS1(NECLUST),NEHITS2(NECLUST)
     $,NEHITSO(NECLUST), NEBEG(NECLUST),  NEEND(NECLUST)
     $,IHYPECL(NECLUST),  ENECL(NECLUST),ECLCHISQ(NECLUST)
     $, DNECL(NECLUST), EN1ECL(NECLUST) ,EN2ECL(NECLUST)
     $,  XECL_fst(NECLUST),YECL_fst(NECLUST),ZECL_fst(NECLUST)
     $,  XECL(NECLUST),   YECL(NECLUST),   ZECL(NECLUST)
     $, CXECL(NECLUST),  CYECL(NECLUST),  CZECL(NECLUST)
     $,  RECL(NECLUST),   TECL(NECLUST),   PECL(NECLUST)
     $, McluH(NECLUST)
C ---------------------------------------------------------------------
       save /ECLUSTERS/
*************************************************************************
*      ECAL  Neutral Clusters Common Block description
C ---------------------------------------------------------------------
*  NEclusters - Number of ECAL neutral clusters collected at this common
*  LESUP      - pointer to Super-cluster address in the COMMON/ECrecres/
*  LECLU      - pointer to Cluster address in the COMMON/ECrecres/
*  NEHITS     - Number of hits belongs to this cluster
*  NEHITSO    - Number of hits belongs to this cluster (working variable) 
*  NEBEG      - Number of layers have zero at the begining of ECAL
*  NEEND      - Number of layers have zero at the end of ECAL
*  IHYPECL    - Hypothesis number for this cluster,  
*                  see COMMON/caloevent/ for the hypothesis description 
*  ENECL      - Cluster energy 
*  ECLCHISQ   - Chi^2 from the inetria tensor definition (Sum of squared 
*               distances of hits from the main principal axes)
*  DNECL      - Cluster average density [MeV/hit]
*---------------------------------------------------------------------
*  XECL,YECL,ZECL - cluster center of gravity
*  CXECL,CYECL,CZECL - direct Cosine for the principal axis
*  RECL       - 3-D radius of center of gravity of cluster 
*  TECL       - Theta angle of center of gravity of cluster 
*  PECL       - Phi angle of center of gravity of cluster 
* ---------------------------------------------------------------------
*  NEHITS1    - Number of hits belongs to this cluster is at the 
*                 first part of ECAL (1 - 10 layers)
*  EN1ECL     - Cluster energy in the first part of ECAL (1 - 10 layers)
*  XECL_fst, YECL_fst,ZECL_fst  - Center of gravity of the first part 
*                                  of ECAL (1 - 10 layers)
*  NEHITS2    - Number of hits belongs to this cluster is at the   
*                 last part of the ECAL (11 - 40 layers)
*  EN2ECL     - Cluster energy in the second part of ECAL (11 - 40 layers) 
* ---------------------------------------------------------------------
*  McluH      - HCAL cluster address if merged exists (= 0 if not exists)
*************************************************************************

COMMON / ECRECONST /

+KEEP,ECRECONST.
**************************************************************************
*          Main common for ECAL hit collection
**************************************************************************
      integer NLADE,L_cellE,ny_layE,Lsup_clustE,L_clustE,Lsub_clustE
      integer NHITSE,L_ch_trackE
C ---------------------------------------------------------------------
      real*4 a_cellE,x_cellE,y_cellE,z_cellE,r_cellE,t_cellE,p_cellE
      real*4 summ_barrel_ecal1,summ_barrel_ecal2,summ_barrel_ecal
      real*4 summ_ECAPP_ecal1, summ_ECAPP_ecal2, summ_ECAPP_ecal
      real*4 summ_ECAPM_ecal1, summ_ECAPM_ecal2, summ_ECAPM_ecal
      real*4 summ_ECAL
C ---------------------------------------------------------------------
      PARAMETER (NLADE=30000)
C ---------------------------------------------------------------------
      COMMON/ECreconst/ 
     $       L_cellE(nladE), a_cellE(nladE),    ny_layE(nladE)
     $ ,     x_cellE(nladE), y_cellE(nladE),    z_cellE(nladE)
     $ ,     r_cellE(nladE), t_cellE(nladE),    p_cellE(nladE)
     $ , Lsup_clustE(nladE),L_clustE(nladE),L_ch_trackE(nladE)
     $ , NHITSE,summ_barrel_ecal1,summ_barrel_ecal2,summ_barrel_ecal
     $ ,         summ_ECAPP_ecal1, summ_ECAPP_ecal2, summ_ECAPP_ecal
     $ ,         summ_ECAPM_ecal1, summ_ECAPM_ecal2, summ_ECAPM_ecal
     $ ,         Summ_ECAL
C ---------------------------------------------------------------------
       save /ecreconst/
c=========================================================================
c          Description of COMMON /ECreconst/
c               HIT/CELL INFORMATION 
c=========================================================================
c    NhitsE --------- number of hits in this common and in ECAL
c=========================================================================
c    summ_barrel_ecal1 --- Whole Energy deposited in ECAL-barrel 1 struct
c    summ_barrel_ecal2 --- Whole Energy deposited in ECAL-barrel 2 struct
c    ....... and so on
c-------------------------------------------------------------------------
c        L_cellE -- Cell Status word collect all information 
c                       related to cell assignment
c   L_cellE = 
c         i x 1 -- Super_Cluster number
c              +
c       i x 100 -- Cluster number in super-cluster or individual cluster
c
c          if L_cellE = 0 then  -- it is an individual hit 
c             (no one reconstruction or recognition program assigned it.
c-------------------------------------------------------------------------
c    L_ch_trackE - charged track address this hit belongs to (=0 if not)
c-------------------------------------------------------------------------
c    a_cellE -------- Amplitude of hit (cell)
c    ny_layE -------- Absorber layer number of hit (cell)
c    x,y,z_cellE ---- Cartezian coordinates of hit (cell)
c    r,t,p_cellE ---- Spherical coordinates of hit (cell)
c-------------------------------------------------------------------------
c          Working arraies
c-------------------------------------------------------------------------
c    Lsup_clustE ---- super-cluster address this hit (cell) belongs to 
c    L_clustE ------- cluster address this hit (cell) belongs to 
**************************************************************************

COMMON / HBRECONST /

+KEEP,HBRECONST.
**************************************************************************
*          Main common for HCAL hit collection
**************************************************************************
C ---------------------------------------------------------------------
      integer NLAD,L_cell,ny_lay,Lsup_clust,L_clust,Lsub_clust,NHITS
      integer L_ch_track
C ---------------------------------------------------------------------
      real*4 a_cell,x_cell,y_cell,z_cell,r_cell,t_cell,p_cell
      real*4 summ_barrel, summ_hcapP, summ_hcapM, Summ_HCAL
C ---------------------------------------------------------------------
      PARAMETER (NLAD=4000) ! maximum allowed number of hits in HCAL
C ---------------------------------------------------------------------
      common/HBreconst/ 
     $       L_cell(nlad), a_cell(nlad),    ny_lay(nlad)
     $ ,     x_cell(nlad), y_cell(nlad),    z_cell(nlad)
     $ ,     r_cell(nlad), t_cell(nlad),    p_cell(nlad)
     $ , Lsup_clust(nlad),L_clust(nlad),L_ch_track(nlad)
     $ , NHITS,summ_barrel, summ_hcapP, summ_hcapM, Summ_HCAL
C ---------------------------------------------------------------------
       save /hbreconst/
c=========================================================================
c          Description of COMMON /HBreconst/
c              HIT/CELL INFORMATION
c=========================================================================
c    Nhits --------- number of hits in HCAL
c-------------------------------------------------------------------------
c    summ_barrel --- Whole Energy deposited in HCAL-barrel
c    summ_hcapP ---- Whole Energy deposited in HCAL CAP + Z
c    summ_hcapM ---- Whole Energy deposited in HCAL CAP - Z
c-------------------------------------------------------------------------
c    L_ch_track - charged track address this hit belongs to (=0 if not)
c-------------------------------------------------------------------------
c        L_cell -- Cell Status word collects all information 
c                       related to cell assignment
c   L_cell = 
c       i x 1 -- Super_Cluster number
c            +
c       i x 100 -- Cluster number in super-cluster or individual cluster
c
c          if L_cell = 0 then  -- it is an individual hit 
c             (no one reconstruction or recognition program assigned it.
c-------------------------------------------------------------------------
c    a_cell -------- Amplitude of hit (cell)
c    ny_lay -------- Absorber layer number of hit (cell)
c    x,y,z_cell ---- Cartezian coordinates of hit (cell)
c    r,t,p_cell ---- Spherical coordinates of hit (cell)
c-------------------------------------------------------------------------
c          Working arraies
c-------------------------------------------------------------------------
c    Lsup_clust ---- super-cluster address this hit (cell) belongs to 
c    L_clust ------- cluster address this hit (cell) belongs to 
c=========================================================================

COMMON / HCLUSTERS /

+KEEP,HCLUSTERS.
**************************************************************************
*     The main common for neutral cluster collection in HCAL
**************************************************************************
C ---------------------------------------------------------------------
      integer NHCLUST,NHCLusters,LHSUP,LHCLU
      integer NHHITS,NHHITS1,NHHITS2
      integer NHHITSO,NHBEG,NHEND,IHYPHCL
      integer McluE
C ---------------------------------------------------------------------
      real*4 ENHCL,HCLCHISQ,DNHCL,EN1HCL,EN2HCL
      real*4 XHCL,YHCL,ZHCL,CXHCL,CYHCL,CZHCL
      real*4 RHCL,THCL,PHCL
C ---------------------------------------------------------------------
      PARAMETER (NHCLUST=200)
C ---------------------------------------------------------------------
       common/HCLusters/ NHCLusters,LHSUP(NHCLUST),LHCLU(NHCLUST)
     $,NHHITS(NHCLUST),NHHITS1(NHCLUST),NHHITS2(NHCLUST)
     $,NHHITSO(NHCLUST), NHBEG(NHCLUST),  NHEND(NHCLUST)
     $,IHYPHCL(NHCLUST), ENHCL(NHCLUST),HCLCHISQ(NHCLUST)
     $, DNHCL(NHCLUST), EN1HCL(NHCLUST) ,EN2HCL(NHCLUST)
     $,  XHCL(NHCLUST),   YHCL(NHCLUST),   ZHCL(NHCLUST)
     $, CXHCL(NHCLUST),  CYHCL(NHCLUST),  CZHCL(NHCLUST)
     $,  RHCL(NHCLUST),   THCL(NHCLUST),   PHCL(NHCLUST)
     $, McluE(NHCLUST)
C ---------------------------------------------------------------------
       save /HCLUSTERS/
*************************************************************************
*      HCAL  Neutral Clusters Common Block description
C ---------------------------------------------------------------------
*  NHclusters - Number of HCAL neutral clusters collected at this common
*  LHSUP      - pointer to Super-cluster address in the COMMON/HCrecres/
*  LHCLU      - pointer to Cluster address in the COMMON/HCrecres/
*  NHHITS     - Number of hits belongs to this cluster
*  NHHITSO    - Number of hits belongs to this cluster (working variable) 
*  NHBEG      - Number of layers have zero at the begining of HCAL
*  NHEND      - Number of layers have zero at the end of HCAL
*  IHYPHCL    - Hypothesis number for this cluster,  
*                  see COMMON/caloevent/ for the hypothesis description 
*  ENHCL      - Cluster energy 
*  HCLCHISQ   - Chi^2 from the inetria tensor definition (Sum of squared 
*               distances of hits from the main principal axes)
*  DNHCL      - Cluster average density [MeV/hit]
*---------------------------------------------------------------------
*  XHCL,YHCL,ZHCL - cluster center of gravity
*  CXHCL,CYHCL,CZHCL - direct Cosine for the principal axis
*  RHCL       - 3-D radius of center of gravity of cluster 
*  THCL       - Theta angle of center of gravity of cluster 
*  PHCL       - Phi angle of center of gravity of cluster 
* ---------------------------------------------------------------------
*  NHHITS1    - Number of hits belongs to this cluster is at the 
*                 first part of HCAL (1 - 10 layers)
*  EN1HCL     - Cluster energy in the first part of HCAL (1 - 10 layers)
*  XHCL_fst,YHCL_fst,ZHCL_fst  - Center of gravity of the first part 
*                                  of HCAL (1 - 10 layers)
*  NHHITS2    - Number of hits belongs to this cluster is at the   
*                 last part of the HCAL (11 - 40 layers)
*  EN2HCL     - Cluster energy in the second part of HCAL (11 - 40 layers) 
* ---------------------------------------------------------------------
*  McluE      - ECAL cluster address if merged exists (= 0 if not exists)
*************************************************************************

COMMON / ECRECRES /

+KEEP,ECRECRES.
**************************************************************************
*      Intermediate common for the cluster find procedure in ECAL
********************************************************************
C ---------------------------------------------------------------------
      integer NSUPE,NCLUE,NHsup_clustE, NH_clustE
      integer Ic_clustE,Isup_clsE,Iclu_clsE
      integer Lsup_clsE,Lclu_clsE,Nsup_clustE,N_clustE
C ---------------------------------------------------------------------
      real*4 Esup_clustE,E_clustE
      real*4 STTsup_clustE,STT_clustE
      real*4 SPTsup_clustE,SPT_clustE
      real*4 STBsup_clustE,STB_clustE
      real*4 SPBsup_clustE,SPB_clustE
      real*4 Rsup_clustE,  R_clustE
      real*4 Tsup_clustE,  T_clustE
      real*4 Psup_clustE,  P_clustE
      real*4 Xsup_clustE,  X_clustE
      real*4 Ysup_clustE,  Y_clustE
      real*4 Zsup_clustE,  Z_clustE
C ---------------------------------------------------------------------
       PARAMETER (NSUPE=70, NCLUE=500)
C ---------------------------------------------------------------------
       COMMON/ECrecres/ Nsup_clustE,N_clustE(NSUPE)
     $, NHsup_clustE(NSUPE), NH_clustE(NCLUE,NSUPE)
     $,  Esup_clustE(NSUPE),  E_clustE(NCLUE,NSUPE)
     $,STTsup_clustE(NSUPE),STT_clustE(NCLUE,NSUPE)
     $,SPTsup_clustE(NSUPE),SPT_clustE(NCLUE,NSUPE)
     $,STBsup_clustE(NSUPE),STB_clustE(NCLUE,NSUPE)
     $,SPBsup_clustE(NSUPE),SPB_clustE(NCLUE,NSUPE)
     $,  Rsup_clustE(NSUPE),  R_clustE(NCLUE,NSUPE)
     $,  Tsup_clustE(NSUPE),  T_clustE(NCLUE,NSUPE)
     $,  Psup_clustE(NSUPE),  P_clustE(NCLUE,NSUPE)
     $,  Xsup_clustE(NSUPE),  X_clustE(NCLUE,NSUPE)
     $,  Ysup_clustE(NSUPE),  Y_clustE(NCLUE,NSUPE)
     $,  Zsup_clustE(NSUPE),  Z_clustE(NCLUE,NSUPE)
     $,                      iC_clustE(NCLUE,NSUPE)
     $    ,Isup_clsE(NSUPE), Iclu_clsE(NCLUE)
     $ ,Lsup_clsE(NSUPE,NSUPE),Lclu_clsE(NCLUE,NCLUE)
C ---------------------------------------------------------------------
       save /ecrecres/
c======================================================================
c     Nsup_clust  -- Number of super-clusters found
c     N_clust     -- Number of clusters found
c     NH***_clust -- Number of hits in super-cluster N
c     E***_clust,S***_clust -- Energy and Sizes of sup, clusters
c     R          -- Energy radius of cluster (see program for definition)
c     T,P        -- Spherical coordinates of sup, clusters
c     X,Y,Z      -- Cartezian coordinates of sup, clusters
c          Working array
c     I***_cls   -- number of close neibours
c     L***_cls   -- addresses of close neibours
**************************************************************************

COMMON / HBRECRES /

+KEEP,HBRECRES.
**************************************************************************
*      Intermediate common for the cluster find procedure in HCAL
********************************************************************
C ---------------------------------------------------------------------
      integer NSUP,NCLU,NHsup_clust,NH_clust,Nsup_clust,N_clust
      integer Isup_cls,Iclu_cls,Lsup_cls,Lclu_cls
C ---------------------------------------------------------------------
      real*4  Esup_clust,  E_clust
      real*4 STTsup_clust,STT_clust
      real*4 SPTsup_clust,SPT_clust
      real*4 STBsup_clust,STB_clust
      real*4 SPBsup_clust,SPB_clust
      real*4 Rsup_clust,  R_clust
      real*4 Tsup_clust,  T_clust
      real*4 Psup_clust,  P_clust
      real*4 Xsup_clust,  X_clust
      real*4 Ysup_clust,  Y_clust
      real*4 Zsup_clust,  Z_clust
C ---------------------------------------------------------------------
       PARAMETER (NSUP=50, NCLU=200)
C ---------------------------------------------------------------------
       common/HBrecres/ Nsup_clust,N_clust(NSUP)
     $ , NHsup_clust(NSUP), NH_clust(NCLU,NSUP)
     $ ,  Esup_clust(NSUP),  E_clust(NCLU,NSUP)
     $ ,STTsup_clust(NSUP),STT_clust(NCLU,NSUP)
     $ ,SPTsup_clust(NSUP),SPT_clust(NCLU,NSUP)
     $ ,STBsup_clust(NSUP),STB_clust(NCLU,NSUP)
     $ ,SPBsup_clust(NSUP),SPB_clust(NCLU,NSUP)
     $ ,  Rsup_clust(NSUP),  R_clust(NCLU,NSUP)
     $ ,  Tsup_clust(NSUP),  T_clust(NCLU,NSUP)
     $ ,  Psup_clust(NSUP),  P_clust(NCLU,NSUP)
     $ ,  Xsup_clust(NSUP),  X_clust(NCLU,NSUP)
     $ ,  Ysup_clust(NSUP),  Y_clust(NCLU,NSUP)
     $ ,  Zsup_clust(NSUP),  Z_clust(NCLU,NSUP)
     $     ,Isup_cls(NSUP),      Iclu_cls(NCLU)
     $ ,Lsup_cls(NSUP,NSUP),Lclu_cls(NCLU,NCLU)
C ---------------------------------------------------------------------
       save /hbrecres/
c======================================================================
c     Nsup_clust  -- Number of super-clusters found
c     N_clust     -- Number of clusters found
c     NH***_clust -- Number of hits in super-cluster N
c     E***_clust,S***_clust -- Energy and Sizes of sup, clusters
c     R          -- Energy radius of cluster (see program for definition)
c     T,P        -- Spherical coordinates of sup, clusters
c     X,Y,Z      -- Cartezian coordinates of sup, clusters
c          Working array
c     I***_cls   -- number of close neibours
c     L***_cls   -- addresses of close neibours
**************************************************************************

COMMON / ECRECWORK /

+KEEP,ECRECWORK.
********************************************************************
*      Working common for the cluster find procedure 
********************************************************************
      integer Nhit_maxE,ladrNNE,ih_maxENN,jh_maxENN,ladr_wE
      integer idworkE,nx_wEork_h,ny_wEork_h,nn_wEorkh
C ---------------------------------------------------------------------
      real*4 a_maxENN,r_maxENN,ph_maxENN,th_maxENN,a_wE
      real*4 xh_wEork_st,yh_wEork_st,h_wEork
C ---------------------------------------------------------------------
      PARAMETER (Nhit_maxE=500)
C ---------------------------------------------------------------------
      common/ecrecwork/  ladrNNE(Nhit_maxE)
     $ , a_maxENN(Nhit_maxE), r_maxENN(Nhit_maxE)
     $ ,ih_maxENN(Nhit_maxE),jh_maxENN(Nhit_maxE)
     $ ,ph_maxENN(Nhit_maxE),th_maxENN(Nhit_maxE)
     $ ,a_wE(500),ladr_wE(500)
     $ ,idworkE,nx_wEork_h,ny_wEork_h
     $ ,nn_wEorkh ,xh_wEork_st,yh_wEork_st
     $ ,h_wEork(100000)
C ---------------------------------------------------------------------
       save /ecrecwork/
********************************************************************

COMMON / HBRECWORK /

+KEEP,HBRECWORK.
***********************************************************************
*      Working common for the cluster find procedure in HCAL
********************************************************************
C ---------------------------------------------------------------------
      integer Nhit_max,ladrNN,ih_maxNN,jh_maxNN,ladr_w
      integer idwork,nx_work_h,ny_work_h,nn_workh
C ---------------------------------------------------------------------
      real*4 a_maxNN,r_maxNN,ph_maxNN,th_maxNN
      real*4 xh_work_st,yh_work_st,h_work,a_w
C ---------------------------------------------------------------------
      PARAMETER (Nhit_max=200)
C ---------------------------------------------------------------------
       common/hbrecwork/  ladrNN(Nhit_max)
     $ , a_maxNN(Nhit_max), r_maxNN(Nhit_max)
     $ ,ih_maxNN(Nhit_max),jh_maxNN(Nhit_max)
     $ ,ph_maxNN(Nhit_max),th_maxNN(Nhit_max)
     $ ,a_w(500),ladr_w(500)
     $ ,idwork,nx_work_h,ny_work_h
     $ ,nn_workh ,xh_work_st,yh_work_st
     $ ,h_work(100000)
C ---------------------------------------------------------------------
       save /hbrecwork/
c======================================================================
c     PARAMETER Nhit_max is allowed for searching clusters
c     ladrNN      -- addresses of maximal amplitudes
C     a,l,i,j,p,t -- amplitude and coordinate information 
c                    for Nhit_max hits
***********************************************************************

COMMON / CALOEVENT /
Final event information - reconstructed objects four-vectors at IP.

+KEEP,CALOEVENT.
**************************************************************************
*         Main output common after the reconstruction
**************************************************************************
      integer NpjE,NpjH,Npj,NspvE,NspvH,Nspv,NpvE,NpvH,Npv
      integer ipvect,lpvect
C ---------------------------------------------------------------------
      real*4 PjetsE,SuPvectE,PvectE
      real*4 PjetsH,SuPvectH,PvectH
      real*4 Pjets, SuPvect, Pvect
C ---------------------------------------------------------------------
      PARAMETER (LPVECT=500)    ! 500 4-vectors is allowed to store
C ---------------------------------------------------------------------
      COMMON/caloevent/ Npv, Pvect(8,LPVECT)      
      dimension ipvect(8,LPVECT)
      equivalence (pvect(1,1),ipvect(1,1))
C ---------------------------------------------------------------------
       save /caloevent/
C ---------------------------------------------------------------------
c   Record of particle four-vectors (i) after the reconstruction.
c   Momentum given: - for charged at PCA, for neutrals at IP 
C ---------------------------------------------------------------------
C              Pvect(1,i) = P_x
C              Pvect(2,i) = P_y
C              Pvect(3,i) = P_z
C              Pvect(4,i) = sqrt(P**2 + M**2)
C              iPvect(5,i) - Reconstructed object hypothesis identificator
c                               (see below)
C              Pvect(6,i)  
c                 = 1.0         Direct IP connection for charged track
c                 = 4.0         particle has hits in ECAL and in HCAL 
c                                   Photon - like 
c                 = 5.0         particle has hits in ECAL and in HCAL 
c                                   Hadron - like
c                 = 6.0         particle has hits in ECAL and in HCAL 
c                                   or Hadron - like or photon - like
c                 = 7.0         particle has hits in HCAL only
c                                   Hadron - like
C              iPvect(7,i)  - pointer to -->
c                  for charged - track number from common /CALOINPUT/, 
C                                "charged track information at the point 
c                                  of closest approach to the IP"
C                  for neutral - cluster number in common/Eclusters/ or 
c                                               in common/Hclusters/
C              Pvect(8,i) = object charge
C ---------------------------------------------------------------------
C Reconstructed object hypothesis identificator and 
C             color in calorimeter drawings
C ---------------------------------------------------------------------
c            1 - neutral hadron like
c            2 - e+ or e- like
c            3 - mu+ or mu- like
c            4 - charged hadron like
c            5 - this particle has no ID, or any hypothesis was not assigned
c            6 - photon like
c   1 - black, 2 - red, 3 - green, 4 - blue, 5 - yellow, 6 - pink. 
**************************************************************************

COMMON /HBARGEOM /

+KEEP,HBARGEOM.
**************************************************************************
*     Geomerty and electronic cell database for HCAL Barrel
**************************************************************************
c--------------------------------------------------------- 
      integer ny_cell,ny_sampl,max_nx,max_nz
      integer nx_pad,ny_pad,nz_pad,nxp,nyp,nzp
      integer nswitch,nelect,nlay1,nlay2
c---------------------------------------------------------
      real Y_had_bar1,Y_had_bar2,Y_had_bar3,Z_size
      real t_st_steel,t_scint,t_fiber_gap,t_wall,toll_gap
      real x0_hbar, y0_hbar, x1_hbar, y1_hbar
      real x2_hbar, y2_hbar, x3_hbar, y3_hbar
      real x_plate_size,z_plate_size,y_plate_cent
      real x_sh_mod1,x_sh_mod2,y_sh_mod1,y_sh_mod2,z_sh_mod
      real x_step,y_step,z_step
      real x_center,y_center,z_center
c---------------------------------------------------------
      parameter (ny_cell=9)
      parameter (max_nx=15)
      parameter (max_nz=52)
      parameter (ny_sampl=40)
c---------------------------------------------------------
      common /hbargeom/Y_had_bar1,Y_had_bar2,Y_had_bar3,Z_size
     $,t_st_steel,t_scint,t_fiber_gap,t_wall,toll_gap
     $,x0_hbar, y0_hbar, x1_hbar, y1_hbar
     $,x2_hbar, y2_hbar, x3_hbar, y3_hbar
     $,x_sh_mod1,x_sh_mod2,y_sh_mod1,y_sh_mod2,z_sh_mod
     $,x_plate_size(ny_sampl),z_plate_size,y_plate_cent(ny_sampl)
     $,nx_pad(ny_cell),ny_pad(ny_cell),nz_pad(ny_cell),nlay1,nlay2
     $,nxp(ny_sampl),nyp(ny_sampl),nzp(ny_sampl)
     $,nswitch(ny_sampl),nelect(ny_cell)
c       Pad size for barrel
     $,x_step(ny_sampl),y_step,z_step(ny_sampl)
c       Electronic cell center for barrel
     $,x_center(max_nx,ny_cell,max_nz)
     $,y_center(max_nx,ny_cell,max_nz)
     $,z_center(max_nx,ny_cell,max_nz)
c---------------------------------------------------------
        save /hbargeom/
c---------------------------------------------------------
c     Electronic cell structure for barrel 
c     MUST be initialize in subroutine HBAGEOM
c---------------------------------------------------------
c  Y_cell  number =  1  2  3  4  5  6  7  8  9 
c      data nx_pad /15,15,14,13,12,11,10, 9, 8/
c      data ny_pad / 3, 3, 3, 4, 4, 4, 5, 5, 9/
c      data nz_pad /52,50,45,40,35,30,26,22,16/
C      data nlay1/32/, nlay2/8/
c---------------------------------------------------------
**************************************************************************

COMMON / HCAPDB /

+KEEP,HCAPDB.
***********************************************************************
c    Geometrical database for HCAL ENDCAP electronic cells 
***********************************************************************
       integer nz_0,nz_1,nz_2,nz_3,nz_4,nz_all
       integer kz_0,kz_1,kz_2,kz_3,kz_4
       integer kzmax_0,kzmax_1,kzmax_2,kzmax_3,kzmax_4
c---------------------------------------------------------------------
       integer nx_01, nx_02, nx_03
       integer ny_01, ny_02, ny_03
c---------------------------------------------------------------------
       integer nx_11a,nx_11b,nx_11
       integer nx_12a,nx_12b,nx_12, nx_13
       integer ny_11, ny_11a,ny_11b
       integer ny_12, ny_12a,ny_12b,ny_13
c---------------------------------------------------------------------
       integer nx_21a,nx_21b,nx_21
       integer nx_22a,nx_22b,nx_22, nx_23
       integer ny_21, ny_21a,ny_21b
       integer ny_22, ny_22a,ny_22b,ny_23
c---------------------------------------------------------------------
       integer nx_31a,nx_31b,nx_31
       integer nx_32a,nx_32b,nx_32,nx_33
       integer ny_31,ny_31a,ny_31b
       integer ny_32,ny_32a,ny_32b,ny_33
c---------------------------------------------------------------------
       integer nx_41,nx_42,nx_43
       integer ny_41,ny_42, ny_43
c---------------------------------------------------------------------
*                     8      9     12     10     14)
      Parameter (kz_0=4,kz_1=3,kz_2=4,kz_3=5,kz_4=7)
      Parameter (nz_0=2,nz_1=3,nz_2=3,nz_3=2,nz_4=2)
      Parameter (nz_all=nz_0+nz_1+nz_2+nz_3+nz_4)
c---------------------------------------------------------------------
      Parameter (nx_01=8,  nx_02=13, nx_03=17)
      Parameter (ny_01=7,  ny_02=7,  ny_03=6)
c---------------------------------------------------------------------
      Parameter (nx_11a=27,nx_11b=6, nx_11=nx_11a+nx_11b,
     $           nx_12a=22,nx_12b=8, nx_12=nx_12a+nx_12b, nx_13=17)
      Parameter (ny_11=10, ny_11a=10,ny_11b=7,
     $           ny_12=10, ny_12a=10,ny_12b=7,ny_13=6)
c---------------------------------------------------------------------
      Parameter (nx_21a=22,nx_21b=5,nx_21=nx_21a+nx_21b, 
     $           nx_22a=18,nx_22b=7,nx_22=nx_22a+nx_22b, nx_23=14)
      Parameter (ny_21=8,  ny_21a=8,ny_21b=6,
     $           ny_22=8,  ny_22a=8,ny_22b=6,  ny_23=5)
c---------------------------------------------------------------------
      Parameter (nx_31a=19,nx_31b=4,nx_31=nx_31a+nx_31b,
     $           nx_32a=16,nx_32b=6,nx_32=nx_32a+nx_32b, nx_33=10)
      Parameter (ny_31=7,  ny_31a=7,ny_31b=5,
     $           ny_32=7,  ny_32a=7,ny_32b=5, ny_33=4)
c---------------------------------------------------------------------
      Parameter (nx_41=15, nx_42=14,nx_43=10)
      Parameter (ny_41=4,  ny_42=4, ny_43=4)
c---------------------------------------------------------------------
cc MVL     REAL PHI1,DPHI,RNPDV,RNZ,ZC0,RMI1,RMA1,ZC01,RMI2,RMA2
cc MVL     REAL RMI3,RMA3,Z_C1,Z_C2,Z_C3,Z_C4,ZPOL,ZPLE
cc MVL      REAL Zpos0,Zpos1,Zpos2,Zpos3,Zpos4
      REAL  hcap_z_centr,bk_sampl
      REAL  r_magn,r_iner_base,r_iner_hole,gap_zero
      REAL sampling, first_shift, ang
      REAL shift_hca0,shift_hca1,shift_hca2,shift_hca3,shift_hca4
      REAL    dx_01,   dx_02,   dx_03,   dy_01   ,dy_02,   dy_03  
      REAL x_siz_01,x_siz_02,x_siz_03,y_siz_01,y_siz_02,y_siz_03
      REAL  stx_c01, stx_c02, stx_c03, sty_c01, sty_c02, sty_c03
      REAL   dx_01a,  dx_02a,x_siz_03a
      REAL    dx_11,   dx_12,   dx_13,   dy_11   ,dy_12,   dy_13  
      REAL x_siz_11,x_siz_12,x_siz_13,y_siz_11,y_siz_12,y_siz_13
      REAL  stx_c11, stx_c12, stx_c13, sty_c11, sty_c12, sty_c13
      REAL   dx_11a,  dx_11b,  dx_12a,  dx_12b
      REAL x_siz_11a, x_siz_11b, x_siz_12a, x_siz_12b
      REAL stx_c11a,stx_c11b,stx_c12a,stx_c12b
      REAL sty_c11a,sty_c11b,sty_c12a,sty_c12b
      REAL    dx_21,   dx_22,   dx_23,   dy_21   ,dy_22,   dy_23  
      REAL x_siz_21,x_siz_22,x_siz_23,y_siz_21,y_siz_22,y_siz_23
      REAL  stx_c21, stx_c22, stx_c23, sty_c21, sty_c22, sty_c23
      REAL  dx_21a,  dx_21b,  dx_22a,  dx_22b
      REAL x_siz_21a, x_siz_21b, x_siz_22a, x_siz_22b
      REAL stx_c21a,stx_c21b,stx_c22a,stx_c22b
      REAL sty_c21a,sty_c21b,sty_c22a,sty_c22b
      REAL    dx_31,   dx_32,   dx_33,   dy_31   ,dy_32,   dy_33  
      REAL x_siz_31,x_siz_32,x_siz_33,y_siz_31,y_siz_32,y_siz_33
      REAL  stx_c31, stx_c32, stx_c33, sty_c31, sty_c32, sty_c33
      REAL   dx_31a,  dx_31b,  dx_32a,  dx_32b
      REAL x_siz_31a, x_siz_31b, x_siz_32a, x_siz_32b
      REAL stx_c31a,stx_c31b,stx_c32a,stx_c32b
      REAL sty_c31a,sty_c31b,sty_c32a,sty_c32b
      REAL    dx_41,   dx_42,   dx_43,   dy_41   ,dy_42,   dy_43  
      REAL x_siz_41,x_siz_42,x_siz_43,y_siz_41,y_siz_42,y_siz_43
      REAL  stx_c41, stx_c42, stx_c43, sty_c41, sty_c42, sty_c43
       REAL tx_01,tx_02,tx_03,ty_01,ty_02,ty_03
       REAL tx_11,   tx_12,   tx_13,   ty_11,   ty_12,   ty_13
       REAL tx_11a,  tx_11b,  tx_12a,  tx_12b
       REAL ty_11a,  ty_11b,  ty_12a,  ty_12b
       REAL tx_21,   tx_22,   tx_23,   ty_21,   ty_22,   ty_23
       REAL tx_21a,  tx_21b,  tx_22a,  tx_22b
       REAL ty_21a,  ty_21b,  ty_22a,  ty_22b
       REAL tx_31,   tx_32,   tx_33,   ty_31,   ty_32,   ty_33
       REAL tx_31a,  tx_31b,  tx_32a,  tx_32b
       REAL ty_31a,  ty_31b,  ty_32a,  ty_32b
       REAL tx_41,   tx_42,  tx_43,   ty_41,   ty_42,   ty_43
       REAL x_cen_01, y_cen_01, z_cen_01, x_cen_02, y_cen_02
       REAL z_cen_02, x_cen_03, y_cen_03, z_cen_03
          
       REAL x_cen_11, y_cen_11, z_cen_11, x_cen_12
       REAL y_cen_12, z_cen_12, x_cen_13, y_cen_13, z_cen_13          
       REAL x_cen_21, y_cen_21, z_cen_21, x_cen_22, y_cen_22
       REAL z_cen_22, x_cen_23, y_cen_23
       REAL z_cen_23, x_cen_31, y_cen_31, z_cen_31
       REAL x_cen_32, y_cen_32, z_cen_32, x_cen_33
       REAL y_cen_33, z_cen_33, x_cen_41, y_cen_41
       REAL z_cen_41, x_cen_42, y_cen_42
       REAL z_cen_42, x_cen_43, y_cen_43, z_cen_43
c---------------------------------------------------------------------
      COMMON/HCAPDB/ 
c---------------------------------------------------------------------
ccc       Pad size and coordinates database for endcap
c---------------------------------------------------------------------
     $ r_magn,r_iner_base,r_iner_hole,gap_zero
     $,   sampling, bk_sampl, first_shift
     $,shift_hca0,shift_hca1,shift_hca2,shift_hca3,shift_hca4
     $,kzmax_0,kzmax_1,kzmax_2,kzmax_3,kzmax_4
     $,    dx_01,   dx_02,   dx_03,   dy_01   ,dy_02,   dy_03  
     $, x_siz_01,x_siz_02,x_siz_03,y_siz_01,y_siz_02,y_siz_03
     $,  stx_c01, stx_c02, stx_c03, sty_c01, sty_c02, sty_c03
     $,    tx_01,   tx_02,   tx_03,   ty_01,   ty_02,   ty_03
     $,    dx_01a,  dx_02a,x_siz_03a
c
     $,    dx_11,   dx_12,   dx_13,   dy_11   ,dy_12,   dy_13  
     $, x_siz_11,x_siz_12,x_siz_13,y_siz_11,y_siz_12,y_siz_13
     $,  stx_c11, stx_c12, stx_c13, sty_c11, sty_c12, sty_c13
     $,    tx_11,   tx_12,   tx_13,   ty_11,   ty_12,   ty_13
c
     $,    dx_11a,  dx_11b,  dx_12a,  dx_12b
     $, x_siz_11a, x_siz_11b, x_siz_12a, x_siz_12b
     $,  stx_c11a,stx_c11b,stx_c12a,stx_c12b
     $,    tx_11a,  tx_11b,  tx_12a,  tx_12b
     $,  sty_c11a,sty_c11b,sty_c12a,sty_c12b
     $,    ty_11a,  ty_11b,  ty_12a,  ty_12b
c
     $,    dx_21,   dx_22,   dx_23,   dy_21   ,dy_22,   dy_23  
     $, x_siz_21,x_siz_22,x_siz_23,y_siz_21,y_siz_22,y_siz_23
     $,  stx_c21, stx_c22, stx_c23, sty_c21, sty_c22, sty_c23
     $,    tx_21,   tx_22,   tx_23,   ty_21,   ty_22,   ty_23
c
     $,    dx_21a,  dx_21b,  dx_22a,  dx_22b
     $, x_siz_21a, x_siz_21b, x_siz_22a, x_siz_22b
     $,  stx_c21a,stx_c21b,stx_c22a,stx_c22b
     $,    tx_21a,  tx_21b,  tx_22a,  tx_22b
     $,  sty_c21a,sty_c21b,sty_c22a,sty_c22b
     $,    ty_21a,  ty_21b,  ty_22a,  ty_22b
c
     $,    dx_31,   dx_32,   dx_33,   dy_31   ,dy_32,   dy_33  
     $, x_siz_31,x_siz_32,x_siz_33,y_siz_31,y_siz_32,y_siz_33
     $,  stx_c31, stx_c32, stx_c33, sty_c31, sty_c32, sty_c33
     $,    tx_31,   tx_32,   tx_33,   ty_31,   ty_32,   ty_33
c
     $,    dx_31a,  dx_31b,  dx_32a,  dx_32b
     $, x_siz_31a, x_siz_31b, x_siz_32a, x_siz_32b
     $,  stx_c31a,stx_c31b,stx_c32a,stx_c32b
     $,    tx_31a,  tx_31b,  tx_32a,  tx_32b
     $,  sty_c31a,sty_c31b,sty_c32a,sty_c32b
     $,    ty_31a,  ty_31b,  ty_32a,  ty_32b
c
     $,    dx_41,   dx_42,   dx_43,   dy_41   ,dy_42,   dy_43  
     $, x_siz_41,x_siz_42,x_siz_43,y_siz_41,y_siz_42,y_siz_43
     $,  stx_c41, stx_c42, stx_c43, sty_c41, sty_c42, sty_c43
     $,    tx_41,   tx_42,  tx_43,   ty_41,   ty_42,   ty_43
c---------------------------------------------------------------------
ccc       Electronic cell center for endcap
c---------------------------------------------------------------------
     $, x_cen_01(nx_01,ny_01,nz_0)
     $, y_cen_01(nx_01,ny_01,nz_0)
     $, z_cen_01(nx_01,ny_01,nz_0)
     $, x_cen_02(nx_02,ny_02,nz_0)
     $, y_cen_02(nx_02,ny_02,nz_0)
     $, z_cen_02(nx_02,ny_02,nz_0)
     $, x_cen_03(nx_03,ny_03,nz_0)
     $, y_cen_03(nx_03,ny_03,nz_0)
     $, z_cen_03(nx_03,ny_03,nz_0)
c
     $, x_cen_11(nx_11,ny_11,nz_1)
     $, y_cen_11(nx_11,ny_11,nz_1)
     $, z_cen_11(nx_11,ny_11,nz_1)
     $, x_cen_12(nx_11,ny_12,nz_1)
     $, y_cen_12(nx_11,ny_12,nz_1)
     $, z_cen_12(nx_11,ny_12,nz_1)
     $, x_cen_13(nx_13,ny_13,nz_1)
     $, y_cen_13(nx_13,ny_13,nz_1)
     $, z_cen_13(nx_13,ny_13,nz_1)
c
     $, x_cen_21(nx_21,ny_21,nz_2)
     $, y_cen_21(nx_21,ny_21,nz_2)
     $, z_cen_21(nx_21,ny_21,nz_2)
     $, x_cen_22(nx_22,ny_22,nz_2)
     $, y_cen_22(nx_22,ny_22,nz_2)
     $, z_cen_22(nx_22,ny_22,nz_2)
     $, x_cen_23(nx_23,ny_23,nz_2)
     $, y_cen_23(nx_23,ny_23,nz_2)
     $, z_cen_23(nx_23,ny_23,nz_2)
c
     $, x_cen_31(nx_31,ny_31,nz_3)
     $, y_cen_31(nx_31,ny_31,nz_3)
     $, z_cen_31(nx_31,ny_31,nz_3)
     $, x_cen_32(nx_32,ny_32,nz_3)
     $, y_cen_32(nx_32,ny_32,nz_3)
     $, z_cen_32(nx_32,ny_32,nz_3)
     $, x_cen_33(nx_33,ny_33,nz_3)
     $, y_cen_33(nx_33,ny_33,nz_3)
     $, z_cen_33(nx_33,ny_33,nz_3)
c
     $, x_cen_41(nx_41,ny_41,nz_4)
     $, y_cen_41(nx_41,ny_41,nz_4)
     $, z_cen_41(nx_41,ny_41,nz_4)
     $, x_cen_42(nx_42,ny_42,nz_4)
     $, y_cen_42(nx_42,ny_42,nz_4)
     $, z_cen_42(nx_42,ny_42,nz_4)
     $, x_cen_43(nx_43,ny_43,nz_4)
     $, y_cen_43(nx_43,ny_43,nz_4)
     $, z_cen_43(nx_43,ny_43,nz_4)
     $, hcap_z_centr(nz_all)
c---------------------------------------------------------------------
      SAVE /HCAPDB/ 
***********************************************************************

COMMON / /



COMMON / /



COMMON / /



COMMON / /



COMMON / TPCMERGE /



hbargeom.inc hcapdb.inc reconparam.inc


next up previous
Next: List of reconstruction programs Up: Reconstruction program for the Previous: Event Printing and Drawing
Harald Vogt 2004-02-04