Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyfram.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyfram.f
1 
2 C*********************************************************************
3 
4 C...PYFRAM
5 C...Performs transformations between different coordinate frames.
6 
7  SUBROUTINE pyfram(IFRAME)
8 
9 C...Double precision and integer declarations.
10  IMPLICIT DOUBLE PRECISION(a-h, o-z)
11  IMPLICIT INTEGER(i-n)
12  INTEGER pyk,pychge,pycomp
13 C...Commonblocks.
14  common/pydat1/mstu(200),paru(200),mstj(200),parj(200)
15  common/pypars/mstp(200),parp(200),msti(200),pari(200)
16  common/pyint1/mint(400),vint(400)
17  SAVE /pydat1/,/pypars/,/pyint1/
18 
19 C...Check that transformation can and should be done.
20  IF(iframe.EQ.1.OR.iframe.EQ.2.OR.(iframe.EQ.3.AND.
21  &mint(91).EQ.1)) THEN
22  IF(iframe.EQ.mint(6)) RETURN
23  ELSE
24  WRITE(mstu(11),5000) iframe,mint(6)
25  RETURN
26  ENDIF
27 
28  IF(mint(6).EQ.1) THEN
29 C...Transform from fixed target or user specified frame to
30 C...overall CM frame.
31  CALL pyrobo(0,0,0d0,0d0,-vint(8),-vint(9),-vint(10))
32  CALL pyrobo(0,0,0d0,-vint(7),0d0,0d0,0d0)
33  CALL pyrobo(0,0,-vint(6),0d0,0d0,0d0,0d0)
34  ELSEIF(mint(6).EQ.3) THEN
35 C...Transform from hadronic CM frame in DIS to overall CM frame.
36  CALL pyrobo(0,0,-vint(221),-vint(222),-vint(223),-vint(224),
37  & -vint(225))
38  ENDIF
39 
40  IF(iframe.EQ.1) THEN
41 C...Transform from overall CM frame to fixed target or user specified
42 C...frame.
43  CALL pyrobo(0,0,vint(6),vint(7),vint(8),vint(9),vint(10))
44  ELSEIF(iframe.EQ.3) THEN
45 C...Transform from overall CM frame to hadronic CM frame in DIS.
46  CALL pyrobo(0,0,0d0,0d0,vint(223),vint(224),vint(225))
47  CALL pyrobo(0,0,0d0,vint(222),0d0,0d0,0d0)
48  CALL pyrobo(0,0,vint(221),0d0,0d0,0d0,0d0)
49  ENDIF
50 
51 C...Set information about new frame.
52  mint(6)=iframe
53  msti(6)=iframe
54 
55  5000 FORMAT(1x,'Error: illegal values in subroutine PYFRAM.',1x,
56  &'No transformation performed.'/1x,'IFRAME =',1x,i5,'; MINT(6) =',
57  &1x,i5)
58 
59  RETURN
60  END