*
* $Id: gpdgeo.inc,v 1.5 2009-06-12 18:39:52 pam-rm2 Exp $
*
* $Log: gpdgeo.inc,v $
* Revision 1.5  2009-06-12 18:39:52  pam-rm2
* - Introduced user-defined names of output files and random seeds number.
* Users can do it use options of PamVMCApplication constructor:
* PamVMCApplication(const char* name,  const char *title, const char*
* filename="pamtest", Int_t seed=0).
* The Random object that I use is TRandom3 object which has astronomical
* large period (in case of default initialization 0). All random generators
* in the code use this object by calling of gRandom singleton which keeps
* it.
*
* - Corrected TOF digitization routine. No problems with TDC hits due to
* hadronic interactions anymore.
*
* - Some small changes was done to compile code under Root 5.23. +
* geant4_vmc v. 2.6 without any warnings
*
* - Some classes of PamG4RunConfiguartion was changed for geant4_vmc v.
* 2.6.Some obsolete classes was deleted as soon as developers implemented
* regions.
*
* - Navigation was changed from "geomRootToGeant4" to "geomRoot", because on
* VMC web page written that as soon as Geant4 has no option ONLY/MANY
* translation of overlapped geometry to Geant4 through VGM could be wrong.
* I'd like to stay with Root navigation:
* http://root.cern.ch/root/vmc/Geant4VMC.html. This should be default
* option.
*
* - New Tracker digitization routine written by Sergio was implemented
*
* - PamVMC again became compatible with geant4_vmc v.2.5 and ROOT 5.20.
*  The problem was that ROOT developers introduced in TVirtualMC class a new
* method SetMagField and new base class:TVirtualMagField from which
* user-defined classes shoukd be derived
*
* Revision 1.1  2009-02-19 17:46:24  nikolas
* Cleaning up before releasing
*
* Revision 3.23  2008/01/29 18:25:16  pamela
* Review of the shell and TOF geometries. New materials around the shell
* added to simulate the insulation.
*
* Revision 3.22  2006/12/17 14:53:11  cafagna
* Full review of the CARD geometry. S1 table added
*
* Revision 3.21  2006/11/30 12:29:14  cafagna
* CARD geometry updated. New S1 "table", legs included, added. Top magnetic screen has been added as well.
*
* Revision 3.20  2006/11/28 10:26:14  pam-ba
* S3 positioning completed
*
* Revision 3.19  2006/11/16 18:45:29  pam-ba
* Simulated an aluminum container for S4
*
* Revision 3.18  2006/11/16 12:01:13  pam-ba
* S4 dimensions corrected.
*
* Revision 3.17  2006/11/10 11:39:34  pam-ba
* S2 and S1 z-positions corrected, He3 and plystyrene mixture added, Top Plate geometry simulated and titanium mixture added.
*
* Revision 3.16  2006/10/12 11:11:21  pam-ba
* ND geometry updated.
*
* Revision 3.15  2006/06/30 15:38:16  pam-ba
* S22 and S12 heights positioned in GPAMELA at the nominal heights in PAMELA (see document: Main geometrical parameters of the PAMELA sub-detectors, 20 December 2005)
*
* Revision 3.14  2006/05/18 10:52:31  pam-ba
* TOF geometry completed and a new material, the polystyrene (density 35 g/l), added
*
* Revision 3.13  2006/05/09 12:01:16  cafagna
* Calo geometry updated
*
* Revision 3.12  2006/05/02 12:30:02  bottai
*  change in trcp dimension in order to not overlap with its mother
*
* Revision 3.11  2006/05/02 11:32:14  pam-ba
* TOF geometry and position updated and a new material, the mylar, added
*
* Revision 3.10  2006/04/09 23:28:54  cafagna
* Several new things, among this: ND and CARD
*
* Revision 3.9  2005/12/20 12:21:04  cafagna
* gpnd directory added along with ND files
*
* Revision 3.8  2005/12/16 10:20:18  cafagna
* Bug fixed in the new update
*
* Revision 3.7  2005/12/16 09:13:55  cafagna
* New small valume added to the tracker frame
*
* Revision 3.6  2005/12/13 10:31:29  pam-ba
* added a new volume, TPGI, in the spectrometer
*
* Revision 3.5  2005/12/05 12:15:20  pam-ba
* new spectrometer geometry and internal magnetic field
*
* Revision 3.4  2005/07/25 11:53:21  cafagna
* Several updates. See history for details
*
* Revision 3.3  2005/06/21 02:42:08  cafagna
* Major modification to the geometry and to the random number chain
*
* Revision 3.2  2002/12/05 10:17:42  pamela
* Update CAS and CALO geometries and positions. Makefile updated as well
*
* Revision 3.1.1.1  2002/07/11 16:01:59  cafagna
* First GPAMELA release on CVS
*
*
*
* gpdgeo.inc
*
*                16/07/2004  16.44.06  by  Alexey Bakaldin
*                17/10/2002  22.31.45  by  Jens Lund
*CMZ :  3.00/00 14/11/2000  09.13.05  by  Emiliano Mocchiutti
*CMZ :  2.02/00 12/10/2000  18.43.21  by  Francesco Cafagna
*CMZ :  2.01/00 05/04/2000  14.35.17  by  Marialuigia Ambriola
*CMZ :  2.00/00 03/03/2000  15.39.05  by  Francesco Cafagna
*CMZ :  1.02/00 04/02/2000  18.40.04  by  Francesco Cafagna
*CMZ :  1.01/00 06/05/96  11.40.48  by  Francesco Cafagna
*CMZ :  1.00/02 02/04/96  16.44.16  by  Francesco Cafagna
*-- Author :    Francesco Cafagna   05/12/95
      DATA PAME/0.,53.,130./
*     AB:
C     DATA SHEL/69.8,70.,75./
cml     DATA SHEL/40.6,52.35,52.5,43.62253,43.77253/
cml     DATA MSHE/52.25,52.5,20./
cml     DATA BSPH/52.25,52.5,90.,180.,0.,360./
cml:
* ab mod        DATA SHEL/38.25,52.5,52.65,43.77,43.92/
* ab mod        DATA MSHE/52.5,52.75,20./
* ab mod        DATA BSPH/52.5,52.75,90.,180.,0.,360./
c     end ml
*     END: AB.
C     DATA TFLA/126.8,127.,0.,33.45,0.,360./
        DATA TFLA/0.,43.77253,0.125/
*     AB:
C     DATA TSPH/0., 150.,0.,0.,0.,360./
cml        DATA TSPH/239.83,240.,0.,0.,0.,360./
cml:
c ab mod        DATA TSPH/240.,240.17,0.,10.5062,0.,360./
* pressurized container upgrated by ab:
        DATA SHEL/38.8717,52.5,52.651,43.6423,43.7932/
        DATA MSHE/52.5,52.75,19.95/
        DATA BSPH/52.5,52.75,90.,180.,0.,360./
        DATA TSPH/240.,240.17,0.,10.5062,0.,360./        
        DATA COV1/240.17,240.1715,0.,10.5062,0.,360./        
        DATA COV2/240.1715,240.2165,0.,10.5062,0.,360./        
        DATA COV3/240.2165,240.2315,0.,10.5062,0.,360./                    
        DATA ZTSPH/-130.716/
        DATA ZSHEL/66.5559/
        DATA ZMSHE/7.7342/
        DATA ZBSPH/-12.2158/
c     end ml.
*     END: AB.
        DATA GAPTOP/2./
c ml:26/10/04        
c        DATA S1/20.4,16.5,.375/
c        DATA S2/20.4,16.5,.375/
c        DATA S1A/9.,7.5,.375/
c        DATA S2A/9.,7.5,.375/
        DATA S3/0.,0.,0./
c        DATA S4/18.,16.,.5/
        DATA S4/24.1,24.1,0.5/
        DATA S4AL/24.2,24.2,0.6/
        DATA S11M/0.,0.,0./
        DATA S12M/0.,0.,0./
        DATA S21M/0.,0.,0./
        DATA S22M/0.,0.,0./
        DATA S31M/0.,0.,0./
        DATA S32M/0.,0.,0./
        DATA POL1/0.,0.,0./
        DATA POL2/0.,0.,0./
        DATA POLY/0.,0.,0./
        DATA S11Y/2.55,16.5,0.35/
        DATA S12X/20.4,2.75,0.35/
        DATA S21X/9.,3.75,0.25/
        DATA S22Y/4.5,7.5,0.25/
        DATA S31Y/3.,7.5,0.35/
        DATA S32X/9.,2.5,0.35/
c        DATA HMYLTOF/0.0025/
        DATA HMYLTOF/0.0023/
        DATA HGLUTOF/0.01/
        DATA HPVCMAX/0.9/
        DATA HPVCMIN/0.4/
        DATA HALTOF/0.033/
        DATA HAIRS3/0.15/
        DATA HTABLE/24.7/
        DATA DTABLEAL/1.7/
        DATA XTPLA/23.2/
        DATA YTPLA/22.1/
c ml: 28/10/04:
c dimensions of top plate. At the moment, it is a reduced version,
c i.e. a gap of gas with a surface equal to S21. 
c        DATA TPLA/9.,7.5,.25/ 
c dimensions of top plate from CAD draws:
c        DATA TPLA/21.9,21.1,1.6/ 
        DATA TPLA/28.,27.165,1.6/
C        DATA TPCA/18.1,18.2,0.6/ 
C        DATA TPS2/10.,8.1,0.75/ 
        DATA TPCV/8.5,7.,0.25/ 
        DATA TPTU/2.55,1.95,0.6/
        DATA TPTM/3.45,3.3,0.75/
        DATA TPTL/21.9,21.1,.25/
c end ml.
c        DATA SCTIC/0.025/
c ml:26/10/04:
        DATA NS11Y/8/
        DATA NS12X/6/
        DATA NS21X/2/
        DATA NS22Y/2/
        DATA NS31Y/3/
        DATA NS32X/3/
c end ml.
C ml 28/03/06: official z coordinates in the PAMELA reference system with
c origin in the centre of the central plane of the central magnetic module:
c        DATA ZPAMS31,ZPAMS32/-23.49,-24.34/
        DATA DTPS3/0.845/
c        DATA ZS11,ZS12,ZS21,ZS22,ZS31,ZS32,ZS4
c ml 22/10/04:
c     +  /107.8,106.8,74.9,74.1,27.1,26.3,2.3/
c ml 28/10/04: introducing the top plate and calculating the zpos of S21, S22 
c starting from the zpos of CATA:
c     +   /106.66,105.66,74.9,74.1,27.1,26.3,2.3/
c     +   /106.66,105.66,74.875,74.125,27.1,26.3,2.3/
c        DATA ZTPLA/73.5/
C HORMG is the distance beteween the bottom the tracker and the center of
c the third magnetic module. 
        DATA HORMG/22.57/
c end ml 28/10/04
c end ml 22/10/04:
C CAT data
*EM:
*JeL:
        DATA CATA/28.0,0.6,27.165/
*END: JeL.
c        DATA CATB/22.05,21.05,0.55/
        DATA CATB/22.2,21.3,0.5/
c        DATA CATL/15.75,6.675,0.55/
c        DATA CATT/6.3,14.375,0.55/
        DATA CATL/2.6,14.9,0.4/
        DATA CATT/8.45,21.2,0.4/
        DATA CATH/9.4,7.7,0.5/
        DATA CATF/2.6,3.15,0.4/
        DATA CATO/9.3,0.05,0.5/
        DATA CATP/0.05,7.7,0.5/
c        DATA ZCAT/75.85/
C CAS data
*EM:
*JeL:
        DATA CASA/21.45,0.6,20.55/
*END: JeL.
C        DATA CASX/15.25,0.55,23./
C        DATA CASY/0.55,14.75,23./
        DATA CSSX/15.7,0.5,21.6/
        DATA CSSY/0.5,15.7,21.6/
        DATA CASX/15.6,0.4,21.5/
        DATA CASY/0.4,15.6,21.5/
        DATA CASXD/2.4/
        DATA CASYD/2.2/
C   DATA ZCAS/51.25/
*END: EM.
C CARD data
      DATA CARDB/27.,22.8,12.35/,
     +     CAR/18.15,4.8,1.8,3.6,5.8,0.4,76.,19.45/,
     +     ATZ/1.1/,   ! aluminium box thickness
     +     ATY/0.15/,  ! aluminium box thickness
     +     PT/0.9/,    ! plastic box thickness
     +     CARA/31.98273,17.45,20.,19.123,16.80,47.358,30.4/,
     +     CARB/37.18273,20.95,17.,18.67,16.014,47.661,35.6/,
     +     LEGB/2.15,3.575,11.85/,
     +     LEG1/0.65,0.,0.,0.15,6.85,6.85,0.,0.15,10.85,10.85,0./,
     +     LEG2/0.65,1.65,11.35/,
     +     LEG3/0.1,1.3,0.325/,
     +     LEG4/0.65,1.625,11.85/,
     +     LEG5/1.125,2.575,11.85/,
     +     LEG6/0.1,0.55,11.2/,
     +     LEG7/1.1,0.75,3.25/,
     +     LEG8/1.1,0.75,4.35/,
     +     LEG9/1.1,0.75,3.25/,
     +     LEGP/1.95,0.65,1.125,0.375,11.85,3.8,0.7,0.6/,          
     +     TPLT/27.,22.8,0.5/,
     +     TOPC/20.4,16.,0.5/,
     +     TOPT/0.5,0.,0.,2.25,2.25,0.,-26.565,2.25,2.25,0.,-26.565/,
     +     TOHO/0.,0.7,0.5/,
     +     TH11/2.8,3.2,0.5/,
     +     TH12/2.8,5.3,0.5/,
     +     TH21/1.7,3.,0.5/,
     +     TH22/4.9,3.,0.5/,   
     +     TOPP/23.6,14.4,5.5,17.2,19.4,10.2,4.5,6.2,4.1/,
     +     MGSC/16.,15.4,0.12456/,
     +     MGSH/9.8,8.,0.12456/
C TRD data
c ml: 11/11/04
c        DATA TRFR/19,17.5,.2/
        DATA TRFR/21.1,19.0,.275/
        DATA TRFD/19.75,13.9,.2425/
        DATA TRFU/19.4,13.55,.2425/
        DATA TRFM/21.1,19.0,0.1375/
        DATA TRFL/20.175,14.325,1.13/
c        DATA TRFI/15.5,14.,.2/
        DATA TRR0/21.1,38.5,.25/
        DATA TRI0/10.65,8.85,.15/
        DATA TRRF/16.0,15.4,0.1/
        DATA TRRI/9.8,8.0,0.1/
c end ml.
        DATA TRBS/3.3,18.3,1./
*ml: 10/11/66:
        DATA TRAL/3.3,2.15,1./
        DATA TRR2/19.025,13.175,1.51/
*end ml.
        DATA TRDS/24.,24.5,13.5/
        DATA TRDT/3.,3.,.25/
        DATA TRDB/17.7,18.5,0/
        DATA TRSO/0.197,0.2,14./
C        DATA TRSI/0.,0.197,14./
        DATA TRSI/0.,0.2,14./
*ml: 12/11/04:
c        DATA TRRA/13.2,14.,0/
        DATA TRRA/18.25,12.4,0.76/
*end ml.
*ml: 17/11/04:
c        DATA TRAN/1.75,1.75,1.0/
c        DATA TRAI/1.75,1.65,0.9/
        DATA TRAN/1.8,1.8,1.0/
        DATA TRAI/1.0,1.0,1.0/
*end ml.
        DATA ZTRD/90.55/
        DATA GAPTRD/1.5/
C Spectrometer data, mod by Caf on 20 Jul 2005
        DATA SPEB/15.,14.4,22.615/
c ml: 31/10/05:
c        DATA MGFR/14.,13.4,4.0/
        DATA MGFR/15.,14.4,4.45/
c end ml.
c ml: 26/10/04:
c     DATA MGPL/12.,11.4,4.05/
        DATA MGPL/12.,11.4,4.0/
        DATA MGPA/8.1,6.6,4.0/
c     DATA MGPI/8.05,6.55,4.05/
c ml: 31/10/05:
c        DATA MGPI/8.1,6.6,4.0/
C        DATA MGPI/8.07,6.57,4./
C        DATA MGPI/8.07,6.57,4.03/
        DATA MGPI/8.07,6.57,4./
C end ml.
c ml:31/10/05:
c new volumes:
C        DATA TPGA/10.5,10.65,0.055/
        DATA TPGA/10.29,10.65,0.04/
        DATA TPGU/10.49,12.15,0.01/
        DATA TPGD/12.,11.4,0.005/
        DATA TPGI/8.07,6.57,0.015/
c end ml.
c ml:17/12/04:
c        DATA TRPB/12.,11.4,0.4/
c$$$ mod by Caf on 20 Jul 2005
c$$$        DATA TRPB/10.49,12.15,0.365/
c ml 31/10/05:
c       DATA TRPB/15.,14.4,0.365/
        DATA TRPB/10.49,12.15,0.365/
c end ml.
ccc ml: 20/04/05:
cc        DATA TRPL/0.,7.,0.4/
C #         DATA TPAI/8.0995,8.5,0.055/
C #         DATA TPAS/8.0995,9.75,0.06/
C # Mod by CAF on 15 Jul 2005
c        DATA TPAI/8.0995,1.25,0.055/
c        DATA TPAS/8.0995,9.75,0.365/
c ml: 15/12/05:
c ml 19/9/05:
c        DATA TPAS/8.144,9.9,0.365/
        DATA TPAS/8.2,9.9,0.365/
        DATA TPAI/8.144,1.25,0.05/
C # End mod
c        DATA TRSL/0.,7.,0./
C #         DATA TRSL/2.6665,7.,0.015/
        DATA TRSL/2.6665,3.5,0.015/
c        DATA TSPA/2.666,3.5,0.015/
        DATA TSPA/2.596,3.413,0.015/
        DATA THBP/2.6665,2.75,0.015/
c        DATA TRCP/0.005,7.,0.3/
c        DATA TRCP/0.025,10.125,0.25/
c ml: 19/9/05: (based on the measure of the final version of the tracker plane)
c        DATA TRCP/0.035,10.125,0.25/
c change TRCP in order to not overla with mother
        DATA TRCP/0.035,9.9,0.25/
        DATA TBAL/1.49,2.25,0.365/
c ml:16/11/05: distance between the bottom of the tracker and the bottom of
c the base plate.
        DATA ZSPEBP/2.97/
c        DATA ZSPEC/50.6/
C ml: 15/12/05: xglue is the dimension along x of the glue between each carbon
c               fiber barrel and the TRSL volume
        DATA XGLUE/0.0015/
C #         DATA NTRSL/3/
        DATA NTRSL/6/
        DATA NTHBP/3/
c     end ml.
C Calorimeter data
*EM:
*        DATA CASI/3.9,3.9,0.019/
        DATA CASI/3.904,3.904,0.019/
*F.V.&ML:
C        DATA CG10/12.1,12.1,0.0875/
C        DATA C10C/12.1,12.1,0.08/
C        DATA CAAB/12.1,12.1,0.133/
C        DATA CAPL/12.1,12.1,0./
C        DATA CAAD/12.1,12.1,0.133/
C        DATA CAPD/12.1,12.1,0./
C        DATA CALB/19.7,19.7,10.2/
*MA
        DATA DZM0/0.19/, DZST/0.390/
        DATA CG10/12.3,12.3,0.0875/
C #         DATA C10C/12.3,12.3,0.08/
C #         DATA CAAB/12.3,12.3,0.1315/
        DATA C10C/12.3,12.3,0.06/
        DATA CAAB/12.3,12.3,0.1315/
* end MA
        DATA CAPL/12.3,12.3,0./
        DATA CANS/12.3,12.3,0./
        DATA CAAD/12.3,12.3,0.133/
        DATA CAPD/12.3,12.3,0./
*ML:
*   DATA CALB/19.7,19.7,10.45/
        DATA CALB/23.2,23.2,10.589/
*END ML.
*END F.V.&ML.
*ML:
*        DATA CALS/20.,20.,10.5/
        DATA CALS/24.2,24.2,10.639/
        DATA ZCAL/13.05/
C with ZCAL=13.03 the distance between the bottom of the magnet and
C the top of the top silicon strips is about 44.24 mm, as it has to be
C if 37 mm is the height of the base plate and 7.24 mm is the distance 
C between the bottom of the end of the base plate and the top silicium 
C strips. Because of the difference is small and the height of the base
C plate could be approximate, I left ZCAL=13.05.  
C   DATA ZCAL/13.03/
*END ML.
*        DATA CALSTWID/0.36/
        DATA CALSTWID/0.244/
*
* NOTE: IF you change NCAPL, remember to modify the NCPL, NCSI, NOCAPL,
*     NOCASI array dimentions in $GPKEY, $GPDKEY common and data block.
*     The corresponding FFKEY call in GPFFR must be changed as well.
*     The GPDAT loop on these arrays should be checked too.
*
        DATA NCAPL/22/
        DATA NCAPLD/1/
        DATA DCASIX/0.242/
        DATA DCASIY/0.242/
        DATA DCASIZ/0.694/
        DATA NCASTR/32/
        DATA CAKA/12.3,12.3,0.0025/
        DATA CAGL/12.3,12.3,0.005/
        DATA CAKP/12.3,12.3,0.0025/
C
***** Neutron detector
      DATA NDBI/21.2,21.2,6.875/,NDTU/0.,0.925,10./,NDTI/0.,0.92,10./,
     +     NDPB/21.2,21.2,1.0/,NDCD/21.25,21.25,6.9/
      DATA NDBX/21.45,21.45,7./
      DATA NDCO/27.5,30.,0.5/
      DATA NDBO/27.5,30.,7.5/
      DATA NDBS/15.,4.275,7./
      DATA NDSS/14.8,4.075,6.8/
      DATA NDCI/21.2,11.3,0.325/
      DATA NDCM/21.2,4.25,0.325/
      DATA NDCE/14.6,2.875,0.325/
      DATA NDSI/1.,7.26,0.325/
      DATA NDSM/1.,5.8,0.325/
      DATA NDSE/4.2,1.05,0.325/
      DATA TNDBX/0.2/
      DATA TNDCD/0.05/
      DATA GNDTU/0.5/
