photosC.h
1 #ifndef _photosC_h_included_
2 #define _photosC_h_included_
3 
4 namespace Photospp
5 {
6 
7 const static int NMXHEP = 10000;
8 const static double PI = 3.14159265358979324;
9 const static double TWOPI = 6.28318530717958648;
10 
11 /** Definition of the PHOEVT common block */
12 extern struct HEPEVT
13 {
14  int nevhep;
15  int nhep;
16  int isthep[NMXHEP];
17  int idhep[NMXHEP];
18  int jmohep[NMXHEP][2];
19  int jdahep[NMXHEP][2];
20  double phep[NMXHEP][5];
21  double vhep[NMXHEP][4];
22  int qedrad[NMXHEP]; // to be bool once compatibility with F77 removed
23  const static int nmxhep=NMXHEP;
24  // NEVPHO,NPHO,ISTPHO(NMXPHO),IDPHO(NMXPHO),
25  // JMOPHO(2,NMXPHO),JDAPHO(2,NMXPHO),PPHO(5,NMXPHO),VPHO(4,NMXPHO)
26  // int qedrad[NMXHEP] was an add up
27  // for HEPEVT in F77 times. Separate common PH_PHOQED
28  // also phoif_.chkif[NMXPHO] was add up for PHOEVT
29  // now it is pho.qedrad
30 } hep,pho;
31 //ph_hepevt_,phoevt_;
32 
33 
34 
35 extern struct PHOCOP
36 {
37  double alpha;
38  double xphcut;
39 } phocop;
40 
41 extern struct PHNUM
42 {
43  double iev;
44 } phnum;
45 
46 extern struct PHOKEY
47 {
48  double fsec;
49  double fint;
50  double expeps;
51  int interf;
52  int isec;
53  int itre;
54  int iexp;
55  int iftop;
56  int ifw;
57 } phokey;
58 
59 extern struct PHOSTA
60 {
61  int status[10];
62  int ifstop;
63 } phosta;
64 
65 extern struct PHOLUN
66 {
67  int phlun;
68 } pholun;
69 
70 extern struct PHOPHS
71 {
72  double xphmax;
73  double xphoto;
74  double costhg;
75  double sinthg;
76 } phophs;
77 
78 extern struct TOFROM
79 {
80  double QQ[4];
81  double XM;
82  double th1;
83  double fi1;
84 } tofrom;
85 
86 extern struct PHOPRO
87 {
88  double probh;
89  double corwt;
90  double xf;
91  int irep;
92 } phopro;
93 
94 extern struct PHOREST
95 {
96  double fi3;
97  double fi1;
98  double th1;
99  int irep; // provably line to be removed
100 } phorest;
101 
102 extern struct PHWT
103 {
104  double beta;
105  double wt1;
106  double wt2;
107  double wt3;
108 } phwt;
109 
110 extern struct PHOCORWT
111 {
112  double phocorwt3;
113  double phocorwt2;
114  double phocorwt1;
115 } phocorwt;
116 
117 extern struct PHOMOM
118 {
119  double mchsqr;
120  double mnesqr;
121  double pneutr[5];
122 } phomom;
123 
124 extern struct PHOCMS
125 {
126  double bet[3];
127  double gam;
128 } phocms;
129 
130 extern struct PHOEXP
131 {
132  const static int NX = 10;
133  double pro[NX];
134  int nchan;
135  int expini; // bool
136 } phoexp;
137 
138 //debug mode on if ipoin < 1 and ipoinm > 1
139 extern struct PHLUPY
140 {
141  int ipoin;
142  int ipoinm;
143 } phlupy;
144 
145 /** Initialize kinematic corrections */
146 void PHCORK(int modcor);
147 
148 /** Single branch processing */
149 void PHOTOS_MAKE_C(int id);
150 
151 /* Central management routine. Defines what action
152  will be performed at point ID. */
153 void PHTYPE(int ID);
154 
155 } // namespace Photospp
156 #endif
157