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

Diff of /gpamela/gpcal/gpucal.F

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

revision 3.2 by pamela, Wed Dec 17 11:32:48 2003 UTC revision 3.5 by mocchiut, Thu Jan 23 13:56:00 2014 UTC
# Line 1  Line 1 
1  *  *
2  * $Id: gpucal.F,v 3.1.1.1 2002/07/11 16:02:14 cafagna Exp $  * $Id: gpucal.F,v 3.4 2005/12/14 03:13:53 cafagna Exp $
3  *  *
4  * $Log: gpucal.F,v $  * $Log: gpucal.F,v $
5    * Revision 3.4  2005/12/14 03:13:53  cafagna
6    * Neutron detector added. Geometry and GPCALOR package
7    *
8    * Revision 3.3  2005/06/21 02:42:04  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
12    * CALO SIMULATION COMPLETED: geometry and special tracking parameters updated and simulation checked by a comparison with the Trieste's standalone Monte Carlo simulation
13    *
14  * Revision 3.1.1.1  2002/07/11 16:02:14  cafagna  * Revision 3.1.1.1  2002/07/11 16:02:14  cafagna
15  * First GPAMELA release on CVS  * First GPAMELA release on CVS
16  *  *
# Line 48  Line 57 
57  #include "gcflag.inc"  #include "gcflag.inc"
58  #include "gpencal.inc"  #include "gpencal.inc"
59  *end ml  *end ml
60  *EM:  *EM:
61        PARAMETER (CALIB=0.0001085200)        PARAMETER (CALIB=0.0001085200)
62  *END EM.  *END EM.
63        INTEGER IACT,IS,ID,IPA,IT,NUMVOL(20),IMEC,IDHIT        INTEGER IACT,IS,ID,IPA,IT,NUMVOL(20),IMEC,IDHIT
64  CML17/04/03      REAL DELOSS,PATH,TRAPAR(7),VHIT(NHCAL),XYZM(3),XYZD(3)        REAL DELOSS,PATH,TRAPAR(7),VHIT(NHCAL),XYZM(3),XYZD(3)
65        REAL DELOSS,PATH,TRAPAR(7),XYZM(3),XYZD(3)  *      REAL DELOSS,PATH,TRAPAR(7),XYZM(3),XYZD(3)
66        REAL DELTA2,SIGMA2,SIGMA,GRNDM0,GPGAUS,PATHINI        REAL DELTA2,SIGMA2,SIGMA,GRNDM0,GPGAUS,PATHINI
67        LOGICAL SAVE        LOGICAL SAVE
68  *  *
# Line 63  CML17/04/03      REAL DELOSS,PATH,TRAPAR Line 72  CML17/04/03      REAL DELOSS,PATH,TRAPAR
72  *  *
73  * It's a new event  * It's a new event
74  *  *
75        IF(IEVOLD.NE.IEVENT) THEN  C #       IF(IEVOLD.NE.IEVENT) THEN
76  c         print*,'IS,ID,NUMVOL=',IS,ID,NUMVOL  C # c         print*,'IS,ID,NUMVOL=',IS,ID,NUMVOL
77  c         print*,'GPUCAL:last event=',ievold  C # c         print*,'GPUCAL:last event=',ievold
78    C #          IEVOLD=IEVENT
79    C #          CALL VZERO(ENEMAT,44*9*32)
80    C #       ENDIF
81    
82    C # Please note that ENEMAT is zeroed just on the very first event here.
83    C # Then is cleared into GUTREV on an event by event basis.
84          IF(IEVOLD.EQ.-1) THEN
85           IEVOLD=IEVENT           IEVOLD=IEVENT
86           CALL VZERO(ENEMAT,44*9*32)           CALL VZERO(ENEMAT,44*9*32)
87        ENDIF        ENDIF
88    
89  *end ml.  *end ml.
90  *  *
91  * Track is inside a volume  * Track is inside a volume
# Line 80  c         print*,'GPUCAL:last event=',ie Line 97  c         print*,'GPUCAL:last event=',ie
97  cccc            VHIT(4) = (DELOSS/CALIB) + VHIT(4)  cccc            VHIT(4) = (DELOSS/CALIB) + VHIT(4)
98  * END EM  * END EM
99  C ML  C ML
100  CML17/04/03            VHIT(4) = DELOSS + VHIT(4)              VHIT(4) = DELOSS + VHIT(4)
101              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=
102       +           ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS       +           ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS
103  *END ML  *END ML
# Line 91  CML17/04/03            VHIT(4) = DELOSS Line 108  CML17/04/03            VHIT(4) = DELOSS
108  *  *
109        IF(IACT.EQ.1) THEN        IF(IACT.EQ.1) THEN
110           SAVE = .FALSE.           SAVE = .FALSE.
111  CML17/04/03         CALL VZERO(VHIT,NHCAL)           CALL VZERO(VHIT,NHCAL)
112  CML17/04/03         DO I=1,3           DO I=1,3
113  CML17/04/03            VHIT(I) = TRAPAR(I)              VHIT(I) = TRAPAR(I)
114  CML17/04/03         ENDDO           ENDDO
115           IF(IMEC.GT.0) THEN           IF(IMEC.GT.0) THEN
116              SAVE = .TRUE.              SAVE = .TRUE.
117  *EM:  *EM:
118  c            VHIT(4) = DELOSS/CALIB  c            VHIT(4) = DELOSS/CALIB
119  *END EM.  *END EM.
120  CML17/04/03            VHIT(4) = DELOSS              VHIT(4) = DELOSS
121  C ML:  C ML:
122              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=
123       +           ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS       +           ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS
# Line 123  c         ENDIF Line 140  c         ENDIF
140  *EM:  *EM:
141  c            VHIT(4) = (DELOSS/CALIB) + VHIT(4)  c            VHIT(4) = (DELOSS/CALIB) + VHIT(4)
142  *END EM  *END EM
143  CML17/04/03            VHIT(4) = DELOSS + VHIT(4)              VHIT(4) = DELOSS + VHIT(4)
144  *ML:  *ML:
145              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=
146       +           ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS       +           ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS
# Line 156  CML17/04/03            IF(VHIT(4).LT.0.) Line 173  CML17/04/03            IF(VHIT(4).LT.0.)
173           IF(IDHIT.EQ.-1) THEN           IF(IDHIT.EQ.-1) THEN
174  *ML:  *ML:
175  *            IF(SAVE) CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,4,IDHIT)  *            IF(SAVE) CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,4,IDHIT)
176  CL            IF(SAVE) CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,1,IDHIT)              IF(SAVE) THEN
177                   CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,1,IDHIT)
178    c               CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT)
179                ENDIF
180  *END ML.  *END ML.
181              IF (IDHIT.EQ.0) THEN              IF (IDHIT.EQ.0) THEN
182                 WRITE(CHMAIL,10000) IS,ID,IT                 WRITE(CHMAIL,10000) IS,ID,IT
# Line 180  CL            IF(SAVE) CALL GSCHIT (IS,I Line 200  CL            IF(SAVE) CALL GSCHIT (IS,I
200  *EM:  *EM:
201  c               VHIT(4) = (DELOSS/CALIB) + VHIT(4)  c               VHIT(4) = (DELOSS/CALIB) + VHIT(4)
202  * END EM.  * END EM.
203  CML17/04/03               VHIT(4) = DELOSS + VHIT(4)                 VHIT(4) = DELOSS + VHIT(4)
204  *ML:  *ML:
205                 ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=                 ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))=
206       +              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS       +              ENEMAT(NUMVOL(1),NUMVOL(2),NUMVOL(3))+DELOSS
# Line 212  CML17/04/03               IF(VHIT(4).LT. Line 232  CML17/04/03               IF(VHIT(4).LT.
232  *  *
233              IF(IDHIT.EQ.-1) THEN              IF(IDHIT.EQ.-1) THEN
234  *ML  *ML
235  *               IF (SAVE) CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,4,IDHIT)  C               IF (SAVE) CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,4,IDHIT)
236                   IF (SAVE) THEN
237                      CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,1,IDHIT)
238                   ENDIF
239  CL               IF (SAVE) CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,1,IDHIT)  CL               IF (SAVE) CALL GSCHIT (IS,ID,1,NUMVOL,VHIT,1,IDHIT)
240  *END ML.  *END ML.
241                 IF (IDHIT.EQ.0) THEN                 IF (IDHIT.EQ.0) THEN

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

  ViewVC Help
Powered by ViewVC 1.1.23