/[PAMELA software]/PamVMC/trk/src/f77/gprspe.F
ViewVC logotype

Annotation of /PamVMC/trk/src/f77/gprspe.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Jun 12 18:39:59 2009 UTC (15 years, 7 months ago) by pam-rm2
Branch: MAIN
CVS Tags: v1r0, HEAD
Changes since 1.1: +0 -0 lines
- 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

1 nikolas 1.1 SUBROUTINE GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS)
2     **************************************************************************
3     * *
4     * Perform SPE resolution simulation for one hit *
5     * *
6     * *
7     * ANGLEX , angle between the X projected track and the axis *
8     * normal to silicon surface *
9     * *
10     * ANGLEY , angle between the Y projected track and the axis *
11     * normal to silicon surface * *
12     * *
13     * BMAGNET , value of magnetic field to be considered *
14     * *
15     * *
16     * SMULT , on exit is the strip multiplicity *
17     * *
18     * *
19     * DXPOS , on exit is the shift in X determination *
20     * *
21     * *
22     * DYPOS , on exit is the shift in Y determination *
23     * *
24     * *
25     * Called by: gpdspe *
26     * Author: Sergio Bottai, 25/05/05 4.40.38 *
27     * *
28     **************************************************************************
29     #include "gprspe.inc"
30     #include "gpdrspe.inc"
31     REAL BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS
32     PARAMETER (RADDEG=57.2957795130823209)
33     REAL RVAL1(1),XRAN1
34     INTEGER IANGLEX,IANGLEY
35    
36     YMULT=1.
37     XMULT=1.
38     DXPOS=0.
39     DYPOS=0.
40    
41    
42     C
43     C FIND THE X ANGULAR BIN
44     C
45     IANGLEX=NBINANG
46     IF(VANG(12).LE.ANGLEX) GO TO 123
47     DO II=1,NBINANG
48     IF((VANG(II).LE.ANGLEX).AND.(ANGLEX.LE.VANG(II+1))) THEN
49     IANGLEX=II
50     GO TO 123
51     ENDIF
52     ENDDO
53     123 CONTINUE
54     c PRINT*,'IANGX ',IANGLEX
55     C
56     C SAMPLE THE X MULTIPLICITY
57     C
58     CALL GRNDM(RVAL1,1)
59    
60     XRAN1=RVAL1(1)
61     IF(XRAN1.LE.XMULT1_2(IANGLEX)) THEN
62     XMULT=2.
63     ELSE IF((XMULT1_2(IANGLEX).LT.XRAN1).
64     + AND.(XRAN1.LE.XMULT3(IANGLEX)) ) THEN
65     XMULT=3.
66     ELSE
67     XMULT=4.
68     ENDIF
69    
70    
71    
72     IF( (ANGLEX.LE.ANGLECUT.AND.XMULT.LE.2).OR.
73     + (ANGLEX.GT.ANGLECUT.AND.XMULT.LE.3) ) THEN
74     C
75     C LMS CONDITION IS MET, SAMPLE THE X RESIDUALS
76     C
77     CALL GPRNHRAN(WX(1,IANGLEX),NDHIRES,-150.,0.3,DXPOS)
78    
79     C
80     C TRANSFORM IN CM
81     C
82     DXPOS=DXPOS*1.E-4
83    
84     ELSE
85     C
86     C HMS CONDITION IS MET, SAMPLE THE X RESIDUALS
87     C
88     DXPOS = GPGAUS(0.)*XRMSHMS(IANGLEX)
89     DXPOS=DXPOS*1.E-4
90     ENDIF
91    
92    
93     C
94     C FIND THE Y ANGULAR BIN
95     C
96     IANGLEY=NBINANG
97     IF(VANG(12).LE.ANGLEY) GO TO 124
98     DO II=1,NBINANG
99     IF((VANG(II).LE.ANGLEY).AND.(ANGLEY.LE.VANG(II+1))) THEN
100     IANGLEY=II
101     GO TO 124
102     ENDIF
103     ENDDO
104     124 CONTINUE
105    
106     C
107     C SAMPLE THE Y RESIDUALS
108     C
109     CALL GPRNHRAN(WY(1,IANGLEY),NDHIRES,-150.,0.3,DYPOS)
110     C
111     C TRANSFORM IN CM
112     C
113    
114     DYPOS=DYPOS*1.E-4
115    
116    
117     RETURN
118     END

  ViewVC Help
Powered by ViewVC 1.1.23