/[PAMELA software]/gpamela/gpcal/gpdcal.F
ViewVC logotype

Diff of /gpamela/gpcal/gpdcal.F

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3.3 by cafagna, Tue Jun 21 02:42:03 2005 UTC revision 3.5 by cafagna, Thu May 11 00:15:34 2006 UTC
# Line 1  Line 1 
1  *  *
2  * $Id: gpdcal.F,v 3.2 2003/12/17 11:32:48 pamela Exp $  * $Id: gpdcal.F,v 3.4 2005/07/25 11:53:20 cafagna Exp $
3  *  *
4  * $Log: gpdcal.F,v $  * $Log: gpdcal.F,v $
5    * Revision 3.4  2005/07/25 11:53:20  cafagna
6    * Several updates. See history for details
7    *
8    * Revision 3.3  2005/06/21 02:42:03  cafagna
9    * Major modification to the geometry and to the random number chain
10    *
11  * Revision 3.2  2003/12/17 11:32:48  pamela  * Revision 3.2  2003/12/17 11:32:48  pamela
12  * CALO SIMULATION COMPLETED: geometry and special tracking parameters updated and simulation checked by a comparison with the Trieste's standalone Monte Carlo simulation  * CALO SIMULATION COMPLETED: geometry and special tracking parameters updated and simulation checked by a comparison with the Trieste's standalone Monte Carlo simulation
13  *  *
# Line 27  Line 33 
33  *                                                                      *  *                                                                      *
34  ************************************************************************  ************************************************************************
35  #include "gcunit.inc"  #include "gcunit.inc"
36    #include "gcflag.inc"
37  #include "gpphit.inc"  #include "gpphit.inc"
38        PARAMETER (NH=NHCAL,NHM=NHMCAL,NVOL=3,NVOL1=2)        PARAMETER (NH1=NHCALI,NHM1=NHMCALI,NVOL1=2)
39          PARAMETER (NH=NHCAL,NHM=NHMCAL,NVOL=3)
40  #include "gprhit.inc"  #include "gprhit.inc"
41  #include "gpcal.inc"  #include "gpcal.inc"
42  #include "gpsed.inc"  #include "gpsed.inc"
# Line 40  Line 48 
48  *  *
49        INTEGER IS,ID,NV,NVM,NNHM        INTEGER IS,ID,NV,NVM,NNHM
50        CHARACTER*4 CSET        CHARACTER*4 CSET
51        INTEGER NUMD1(NVOL1),NUMBV1(NVOL1,NHM)        INTEGER ITRA1(NHM1),NUMD1(NVOL1),NUMBV1(NVOL1,NHM1)
52          REAL VHITS1(NH1,NHM1)
53  *  *
54  * Vector zeroed  * Vector zeroed
55  *  *
# Line 55  Line 64 
64        CALL VZERO(NUMD  ,NVOL)        CALL VZERO(NUMD  ,NVOL)
65        CALL VZERO(NUMD1 ,NVOL1)        CALL VZERO(NUMD1 ,NVOL1)
66  c ml:16/4/2003  c ml:16/4/2003
67        CALL VZERO(ICASTRIP,NHMCAL)        CALL VZERO(ICASTRIP,NHMCALI)
68        CALL VZERO(ICAPLANE,NHMCAL)        CALL VZERO(ICAPLANE,NHMCALI)
69        CALL VZERO(ICAMOD,NHMCAL)        CALL VZERO(ICAMOD,NHMCALI)
70        CALL VZERO(ENESTRIP,NHMCAL)        CALL VZERO(ENESTRIP,NHMCALI)
71  c end 16/4/2003  c end 16/4/2003
72  *  *
       NV = NVOL  
       NVM= NVMAX  
73  *  *
74  * The tungsten plane case  * The tungsten plane case
75  *  *
76          NV = NVOL
77          NVM= NVMAX
78        IS   = ISCAL        IS   = ISCAL
79        ID   = IDCAST        ID   = IDCAST
80        IT = -1        IT = -1
# Line 86  c end 16/4/2003 Line 95  c end 16/4/2003
95  * Update the max number of hits to be retrived  * Update the max number of hits to be retrived
96  *  *
97        NNHM = NHM        NNHM = NHM
98        IF(NNHM.LE.0) THEN  c$$$      IF(NNHM.LE.0) THEN
99           WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NTHCAL,NHM,  c$$$         WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NTHCAL,NHM,
100       +                        IDRUN,IDEVT  c$$$     +                        IDRUN,IDEVT
101           CALL GMAIL(1,0)  c$$$         CALL GMAIL(1,0)
102           GO TO 10  c$$$         GO TO 10
103        ENDIF  c$$$      ENDIF
104        CALL VZERO(NUMBV,NVOL*NHM)        CALL VZERO(NUMBV,NVOL*NHM)
105        CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL,NH,NNHM,1,        CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL,NH,NNHM,1,
106       +           IT,NUMD,ITRA,NUMBV,VHITS,NHITS)       +           IT,NUMD,ITRA,NUMBV,VHITS,NHITS)
# Line 144  C Line 153  C
153           CALL GMAIL(1,0)           CALL GMAIL(1,0)
154           GO TO 10           GO TO 10
155        ENDIF        ENDIF
156        CALL VZERO(VHITS,NH*NHM)        CALL VZERO(VHITS1,NH1*NHM1)
157        CALL VZERO(ITRA ,NHM)        CALL VZERO(ITRA1 ,NHM1)
158        NHITS = -1        NHITS = -1
159  *  *
160  * Update the max number of hits to be retrived  * Update the max number of hits to be retrived
161  *  *
162        NNHM = NHM        NNHM = NHM1
163        IF(NNHM.LE.0) THEN        IF(NNHM.LE.0) THEN
164           WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NTHCALI,NHM,           WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NTHCALI,NHM,
165       +                        IDRUN,IDEVT       +                        IDRUN,IDEVT
166           CALL GMAIL(1,0)           CALL GMAIL(1,0)
167           GO TO 10           GO TO 10
168        ENDIF        ENDIF
169        CALL VZERO(NUMBV,NVOL*NHM)        CALL VZERO(NUMBV1,NVOL1*NHM1)
170        CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL,NH,NNHM,1,        CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL1,NH1,NNHM,1,
171       +           IT,NUMD,ITRA,NUMBV,VHITS,NHITS)       +           IT,NUMD1,ITRA1,NUMBV1,VHITS1,NHITS)
172  *  *
173  * If there was a problem in GPRHIT then exit  * If there was a problem in GPRHIT then exit
174  *  *
# Line 176  C Line 185  C
185  * Fill the CWN common  * Fill the CWN common
186  *  *
187  c      c    
188          NTHCALI=0
189        DO I=1,NHITS        DO I=1,NHITS
190           NTHCALI=NTHCALI+1           NTHCALI=NTHCALI+1
191           ICASTRIP(NTHCALI)=NUMBV(NVCALI,I)           ICASTRIP(NTHCALI)=NUMBV1(NVCALI,I)
192           ICAPLANE(NTHCALI)=NUMBV((NVCALI-1),I)           ICAPLANE(NTHCALI)=NUMBV1((NVCALI-1),I)
193           ICAMOD(NTHCALI)=VHITS(1,I)           ICAMOD(NTHCALI)=VHITS1(1,I)
194           ENESTRIP(NTHCALI)=VHITS(2,I)           ENESTRIP(NTHCALI)=VHITS1(2,I)
195        ENDDO        ENDDO
196  c  c
197  10000 FORMAT(' GPDCAL: VOLUME level too big: SET=',A4,', DET=',A4,',  10000 FORMAT(' GPDCAL: VOLUME level too big: SET=',A4,', DET=',A4,',

Legend:
Removed from v.3.3  
changed lines
  Added in v.3.5

  ViewVC Help
Powered by ViewVC 1.1.23