/[PAMELA software]/gpamela/gpgar/gpgacl.F
ViewVC logotype

Annotation of /gpamela/gpgar/gpgacl.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.1.1.1 - (hide annotations) (download) (vendor branch)
Thu Jul 11 16:02:15 2002 UTC (22 years, 4 months ago) by cafagna
Branch: v3r0
CVS Tags: firstrelease, v3r3, v3r1, v3r2
Changes since 3.1: +0 -0 lines
First GPAMELA release on CVS

1 cafagna 3.1 *
2     * $Id$
3     *
4     * $Log$
5     *
6     #if defined(GPAMELA_GARFIELD)
7     *CMZ : 3.00/00 16/07/2001 17.26.37 by Unknown
8     *-- Author : Marialuigia Ambriola 02/05/2001
9     SUBROUTINE GPGACL(IDPART,VPART,VXYZ,ECLTOT,NCLUS)
10     ********************************************************************************
11     *
12     * A silly subroutine to interface GARFIELD. It needs the particle and
13     * track parameter to be passed to GARFIELD. It returns the number of
14     * clusters generated and the total energy released in MeV
15     *
16     * Varibles definitions:
17     * IN
18     * - IDPART, GEANT particle ID
19     * - VPART , real array containing particle characteristics.
20     * VPART(1) = particle MASS (MeV)
21     * VPART(2) = particle charge
22     * VPART(3) = particle KInetic Energy
23     * - VXYZ, real array containing the track starting and ending points
24     * VXYZ(1) = X starting point
25     * VXYZ(2) = Y starting point
26     * VXYZ(3) = Z starting point
27     * VXYZ(4) = X ending point
28     * VXYZ(5) = Y ending point
29     * VXYZ(6) = Z ending point
30     *
31     * OUT
32     * - ECLTOT, Total energy released in the track, in MeV
33     * - NCLUS , Number of clusters generated along the track
34     *
35     * Called by: <USER>
36     *
37     * By Caf & ML on 2 May 2001
38     *
39     ********************************************************************************
40     IMPLICIT NONE
41     *
42     * Garfield commons
43     *
44     #include "dimensions.inc"
45     #include "parameters.inc"
46     *
47     *
48     * Local variables
49     *
50     #include "gcunit.inc"
51     REAL VPART(3),VXYZ(6),ECLTOT
52     INTEGER IDPART,NCLUS,IFAIL
53     LOGICAL DONE
54     REAL XCLS,YCLS,ZCLS,ECLS
55     INTEGER NPAIR
56     *
57     * Start filling in the particle properties and the track mode type (ITRTYPE)
58     *
59     CALL GPGAPART(IDPART,IFAIL)
60     IF(IFAIL.EQ.1) THEN
61     *
62     * No HEED corrispondence
63     *
64     WRITE(CHMAIL,10100)
65     CALL GMAIL(1,0)
66     TRMASS=VPART(1)
67     TRCHAR=VPART(2)
68     WRITE(PNAME,10000)IDPART
69     10000 FORMAT('GEANT',I3)
70     NCPNAM=8
71     ITRTYP=4
72     ENDIF
73     *
74     * The particle is definited
75     *
76     TRENER = VPART(3)
77     * PRINT*,'TRFLAG=',TRFLAG(1),TRFLAG(2),TRFLAG(3),TRFLAG(4),TRFLAG(5)
78     * TRFLAG(2) = .TRUE.
79     *
80     * Store the track parameters
81     *
82     XT0 = VXYZ(1)
83     YT0 = VXYZ(2)
84     ZT0 = VXYZ(3)
85     XT1 = VXYZ(4)
86     YT1 = VXYZ(5)
87     ZT1 = VXYZ(6)
88     * TRFLAG(1) = .TRUE.
89     *
90     * Initialize the track
91     *
92     CALL TRACLI
93     *
94     * Track it until DONE
95     *
96     ECLTOT = 0
97     NCLUS = 0
98     * PRINT*,'LTRMS,LTRDEL,LTREXB=',LTRMS,LTRDEL,LTREXB
99     * PRINT*,'BEFORE'
100     * PRINT*,'XT0,YT0,ZT0=',XT0,YT0,ZT0
101     * PRINT*,'VPART(1)=',VPART(1)
102     10 CALL TRACLS(XCLS,YCLS,ZCLS,ECLS,NPAIR,DONE,IFAIL)
103     IF(DONE) THEN
104     C # The cluster generation is over
105     GO TO 20
106     ENDIF
107     IF(IFAIL.NE.0. ) THEN
108     C # An error occurred
109     WRITE(CHMAIL,10200)
110     CALL GMAIL(1,0)
111     GO TO 20
112     ENDIF
113     c ML:
114     IF(ECLS.LE.0.) THEN
115     PRINT*,'ATTENZIONE IN GPGACL, Energia del cluster negativa:'
116     PRINT*,'ECLS=',ECLS
117     GO TO 20
118     ENDIF
119     c END ML.
120     ECLTOT = ECLTOT + ECLS
121     NCLUS = NCLUS + 1
122     GO TO 10
123     10100 FORMAT(' GPGACL: ERROR !!!! GEANT particle ID not found in ',
124     + 'HEED data base')
125     10200 FORMAT(' GPGACL: ERROR !!!! Error in cluster generation from ',
126     + 'TRACLS')
127     20 RETURN
128     END
129     #endif

  ViewVC Help
Powered by ViewVC 1.1.23