1 /**************************************************************************
2 * Copyright(c) 1998-2002, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
16 //------------------------------------------------------------------------
17 // TPHICgen is an interface class to fortran event generator of
18 // two-photon processes in ultra-peripheral ion collisions
20 // Yuri.Kharlov@cern.ch
22 //------------------------------------------------------------------------
27 #include "TClonesArray.h"
28 #include "TParticle.h"
29 #include "TPHICcommon.h"
32 # define gginit gginit_
34 # define ggexit ggexit_
37 # define gginit gginit
39 # define ggexit ggexit
47 // Double_t pyr_(Int_t*);
48 Double_t ggrnd(Int_t*) {
50 do r=gRandom->Rndm(); while(0 >= r || r >= 1);
58 //------------------------------------------------------------------------------
59 TPHICgen::TPHICgen() : TGenerator("TPHIC","TPHIC")
64 //------------------------------------------------------------------------------
70 //______________________________________________________________________________
71 void TPHICgen::Initialize()
74 const Float_t kNucleonMass = 0.931494;
75 SetAMAS(GGINI.ia*kNucleonMass);
79 //______________________________________________________________________________
80 void TPHICgen::GenerateEvent()
86 //______________________________________________________________________________
87 void TPHICgen::Finish()
89 // calculate cross section and print out cross section and related variables
93 //______________________________________________________________________________
96 void TPHICgen::SetIPROC (const Int_t iproc )
100 //______________________________________________________________________________
101 void TPHICgen::SetNEVENT (const Int_t nevent )
103 GGINI.nevent = nevent;
105 //______________________________________________________________________________
106 void TPHICgen::SetILUMF (const Int_t ilumf )
110 //______________________________________________________________________________
111 void TPHICgen::SetLUMFIL (const TString lumfil )
113 for (Int_t i=0; i<lumfil.Length(); i++)
114 GGINI.lumfil[i] = lumfil[i];
116 //______________________________________________________________________________
117 void TPHICgen::SetEBMN (const Float_t ebmn )
121 //______________________________________________________________________________
122 void TPHICgen::SetIZ (const Int_t iz )
126 //______________________________________________________________________________
127 void TPHICgen::SetIA (const Int_t ia )
131 //______________________________________________________________________________
132 void TPHICgen::SetAMAS (const Float_t amas )
136 //______________________________________________________________________________
137 void TPHICgen::SetAMIN (const Float_t amin )
141 //______________________________________________________________________________
142 void TPHICgen::SetAMAX (const Float_t amax )
146 //______________________________________________________________________________
147 void TPHICgen::SetYMIN (const Float_t ymin )
151 //______________________________________________________________________________
152 void TPHICgen::SetYMAX (const Float_t ymax )
156 //______________________________________________________________________________
157 void TPHICgen::SetNMAS (const Int_t nmas )
161 //______________________________________________________________________________
162 void TPHICgen::SetNY (const Int_t ny )
166 //______________________________________________________________________________
167 void TPHICgen::SetKFERM (const Int_t kferm )
171 //______________________________________________________________________________
172 void TPHICgen::SetKFONIUM (const Int_t kfonium )
174 GGINI.kfonium = kfonium;
176 //______________________________________________________________________________
177 void TPHICgen::SetXMRES (const Float_t xmres )
181 //______________________________________________________________________________
182 void TPHICgen::SetXGTRES (const Float_t xgtres )
184 GGINI.xgtres = xgtres;
186 //______________________________________________________________________________
187 void TPHICgen::SetXGGRES (const Float_t xggres )
189 GGINI.xggres = xggres;
191 //______________________________________________________________________________
192 void TPHICgen::SetMODDCY (const Int_t moddcy )
194 GGINI.moddcy = moddcy;
196 //______________________________________________________________________________
197 void TPHICgen::SetTHETAMIN (const Float_t thetamin)
199 GGINI.thetamin = thetamin;
201 //______________________________________________________________________________
202 void TPHICgen::SetKV1 (const Int_t kv1 )
206 //______________________________________________________________________________
207 void TPHICgen::SetKV2 (const Int_t kv2 )
212 //______________________________________________________________________________
213 // Getters for COMMON /GGEVNT/
214 Float_t TPHICgen::GetWSQ()
218 //______________________________________________________________________________
219 Float_t TPHICgen::GetYGG()
223 //______________________________________________________________________________
224 Float_t TPHICgen::GetXMG1()
228 //______________________________________________________________________________
229 Float_t TPHICgen::GetXMG2()
233 //______________________________________________________________________________
234 Float_t TPHICgen::GetP2G(const Int_t i)
236 return GGEVNT.p2g[i];
238 //______________________________________________________________________________
239 Float_t TPHICgen::GetPTAG1(const Int_t i)
241 return GGEVNT.ptag1[i];
243 //______________________________________________________________________________
244 Float_t TPHICgen::GetPTAG2(const Int_t i)
246 return GGEVNT.ptag2[i];
248 //______________________________________________________________________________
249 Int_t TPHICgen::GetNGG()
253 //______________________________________________________________________________
254 Int_t TPHICgen::GetKGG(const Int_t i)
256 return GGEVNT.kgg[i];
258 //______________________________________________________________________________
259 Float_t TPHICgen::GetPGG(const Int_t i, const Int_t j)
261 return GGEVNT.pgg[i][j];
264 //______________________________________________________________________________
265 // Getters for COMMON /GGXS/
266 Float_t TPHICgen::GetXSMAX0()
270 //______________________________________________________________________________
271 Float_t TPHICgen::GetXSCUR0()
275 //______________________________________________________________________________
276 Float_t TPHICgen::GetXSCUR ()
280 //______________________________________________________________________________
281 Float_t TPHICgen::GetXSTOT ()
285 //______________________________________________________________________________
286 Float_t TPHICgen::GetXSTOTE()