1 |
* |
* |
2 |
* $Id: gpdcal.F,v 3.1.1.1 2002/07/11 16:02:14 cafagna Exp $ |
* $Id: gpdcal.F,v 3.3 2005/06/21 02:42:03 cafagna Exp $ |
3 |
* |
* |
4 |
* $Log: gpdcal.F,v $ |
* $Log: gpdcal.F,v $ |
5 |
|
* Revision 3.3 2005/06/21 02:42:03 cafagna |
6 |
|
* Major modification to the geometry and to the random number chain |
7 |
|
* |
8 |
|
* Revision 3.2 2003/12/17 11:32:48 pamela |
9 |
|
* CALO SIMULATION COMPLETED: geometry and special tracking parameters updated and simulation checked by a comparison with the Trieste's standalone Monte Carlo simulation |
10 |
|
* |
11 |
* Revision 3.1.1.1 2002/07/11 16:02:14 cafagna |
* Revision 3.1.1.1 2002/07/11 16:02:14 cafagna |
12 |
* First GPAMELA release on CVS |
* First GPAMELA release on CVS |
13 |
* |
* |
70 |
* The tungsten plane case |
* The tungsten plane case |
71 |
* |
* |
72 |
IS = ISCAL |
IS = ISCAL |
73 |
ID = IDCASI |
ID = IDCAST |
74 |
IT = -1 |
IT = -1 |
75 |
CSET = 'CAL ' |
CSET = 'CAL ' |
76 |
* |
* |
115 |
* |
* |
116 |
NTHCAL=0 |
NTHCAL=0 |
117 |
DO I=1,NHITS |
DO I=1,NHITS |
118 |
NTHCAL=NTHCAL+1 |
NTHCAL = NTHCAL + 1 |
119 |
ICASTRIP(NTHCAL)=VHITS(2,I) |
ICAPL(NTHCAL) = NUMBV((NVCAL-2),I) |
120 |
ICAPLANE(NTHCAL)=VHITS(1,I) |
ICASI(NTHCAL) = NUMBV((NVCAL-1),I) |
121 |
ICAMOD(NTHCAL)=VHITS(3,I) |
ICAST(NTHCAL) = NUMBV((NVCAL),I) |
122 |
ENESTRIP(NTHCAL)=VHITS(4,I) |
XINCAL(NTHCAL) = VHITS(1,I) |
123 |
ENDDO |
YINCAL(NTHCAL) = VHITS(2,I) |
124 |
cl DO I=1,NHITS |
ZINCAL(NTHCAL) = VHITS(3,I) |
125 |
cl NTHCAL = NTHCAL + 1 |
ERELCAL(NTHCAL) = VHITS(4,I) |
|
cl ICAPL(NTHCAL) = NUMBV((NVCAL-2),I) |
|
|
cl ICASI(NTHCAL) = NUMBV((NVCAL-1),I) |
|
|
cl ICAST(NTHCAL) = NUMBV((NVCAL),I) |
|
|
cl XINCAL(NTHCAL) = VHITS(1,I) |
|
|
cl YINCAL(NTHCAL) = VHITS(2,I) |
|
|
cl ZINCAL(NTHCAL) = VHITS(3,I) |
|
|
cl ERELCAL(NTHCAL) = VHITS(4,I) |
|
126 |
c IPARCAL(NTHCAL) = VHITS(5,I) |
c IPARCAL(NTHCAL) = VHITS(5,I) |
127 |
c P0CAL(NTHCAL) = VHITS(6,I) |
c P0CAL(NTHCAL) = VHITS(6,I) |
128 |
cl ENDDO |
ENDDO |
129 |
|
C |
130 |
|
C The energy released per strip |
131 |
|
C |
132 |
|
NV = NVOL1 |
133 |
|
NVM= NVMAX |
134 |
|
* |
135 |
|
* The tungsten plane case |
136 |
|
* |
137 |
|
IS = ISCAL |
138 |
|
ID = IDCASI |
139 |
|
IT = -1 |
140 |
|
CSET = 'CAL ' |
141 |
|
* |
142 |
|
* Check on the volume level |
143 |
|
* |
144 |
|
IF (NV.GT.NVM) THEN |
145 |
|
WRITE(CHMAIL,10000) CSET,CNSED(IS,ID),NVOL,NVMAX, |
146 |
|
+ IDRUN,IDEVT |
147 |
|
CALL GMAIL(1,0) |
148 |
|
GO TO 10 |
149 |
|
ENDIF |
150 |
|
CALL VZERO(VHITS,NH*NHM) |
151 |
|
CALL VZERO(ITRA ,NHM) |
152 |
|
NHITS = -1 |
153 |
|
* |
154 |
|
* Update the max number of hits to be retrived |
155 |
|
* |
156 |
|
NNHM = NHM |
157 |
|
IF(NNHM.LE.0) THEN |
158 |
|
WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NTHCALI,NHM, |
159 |
|
+ IDRUN,IDEVT |
160 |
|
CALL GMAIL(1,0) |
161 |
|
GO TO 10 |
162 |
|
ENDIF |
163 |
|
CALL VZERO(NUMBV,NVOL*NHM) |
164 |
|
CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL,NH,NNHM,1, |
165 |
|
+ IT,NUMD,ITRA,NUMBV,VHITS,NHITS) |
166 |
|
* |
167 |
|
* If there was a problem in GPRHIT then exit |
168 |
|
* |
169 |
|
IF(NHITS.LT.0) THEN |
170 |
|
WRITE(CHMAIL,10200) CSET,CNSED(IS,ID),NHITS,NHM, |
171 |
|
+ IDRUN,IDEVT |
172 |
|
CALL GMAIL(1,0) |
173 |
|
GO TO 10 |
174 |
|
ENDIF |
175 |
|
* |
176 |
|
* >>>>>>>>>>>>>>>>>>>>>> DIGI action |
177 |
|
* |
178 |
|
* |
179 |
|
* Fill the CWN common |
180 |
|
* |
181 |
c |
c |
182 |
|
NTHCALI=0 |
183 |
|
DO I=1,NHITS |
184 |
|
NTHCALI=NTHCALI+1 |
185 |
|
ICASTRIP(NTHCALI)=NUMBV(NVCALI,I) |
186 |
|
ICAPLANE(NTHCALI)=NUMBV((NVCALI-1),I) |
187 |
|
ICAMOD(NTHCALI)=VHITS(1,I) |
188 |
|
ENESTRIP(NTHCALI)=VHITS(2,I) |
189 |
|
ENDDO |
190 |
|
c |
191 |
10000 FORMAT(' GPDCAL: VOLUME level too big: SET=',A4,', DET=',A4,', |
10000 FORMAT(' GPDCAL: VOLUME level too big: SET=',A4,', DET=',A4,', |
192 |
+ NVOL=',I3,', NVMAX=',I3,', RUN=',I5,', EVT=',I8) |
+ NVOL=',I3,', NVMAX=',I3,', RUN=',I5,', EVT=',I8) |
193 |
10100 FORMAT(' GPDCAL: MAX number of hits retrived: SET=',A4, |
10100 FORMAT(' GPDCAL: MAX number of hits retrived: SET=',A4, |