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 (Int_t iproc )
100 //______________________________________________________________________________
101 void TPHICgen::SetNEVENT (Int_t nevent )
103 GGINI.nevent = nevent;
105 //______________________________________________________________________________
106 void TPHICgen::SetILUMF (Int_t ilumf )
110 //______________________________________________________________________________
111 void TPHICgen::SetLUMFIL (TString lumfil )
113 for (Int_t i=0; i<lumfil.Length(); i++)
114 GGINI.lumfil[i] = lumfil[i];
116 //______________________________________________________________________________
117 void TPHICgen::SetEBMN (Float_t ebmn )
121 //______________________________________________________________________________
122 void TPHICgen::SetIZ (Int_t iz )
126 //______________________________________________________________________________
127 void TPHICgen::SetIA (Int_t ia )
131 //______________________________________________________________________________
132 void TPHICgen::SetAMAS (Float_t amas )
136 //______________________________________________________________________________
137 void TPHICgen::SetAMIN (Float_t amin )
141 //______________________________________________________________________________
142 void TPHICgen::SetAMAX (Float_t amax )
146 //______________________________________________________________________________
147 void TPHICgen::SetYMIN (Float_t ymin )
151 //______________________________________________________________________________
152 void TPHICgen::SetYMAX (Float_t ymax )
156 //______________________________________________________________________________
157 void TPHICgen::SetNMAS (Int_t nmas )
161 //______________________________________________________________________________
162 void TPHICgen::SetNY (Int_t ny )
166 //______________________________________________________________________________
167 void TPHICgen::SetKFERM (Int_t kferm )
171 //______________________________________________________________________________
172 void TPHICgen::SetKFONIUM (Int_t kfonium )
174 GGINI.kfonium = kfonium;
176 //______________________________________________________________________________
177 void TPHICgen::SetXMRES (Float_t xmres )
181 //______________________________________________________________________________
182 void TPHICgen::SetXGTRES (Float_t xgtres )
184 GGINI.xgtres = xgtres;
186 //______________________________________________________________________________
187 void TPHICgen::SetXGGRES (Float_t xggres )
189 GGINI.xggres = xggres;
191 //______________________________________________________________________________
192 void TPHICgen::SetMODDCY (Int_t moddcy )
194 GGINI.moddcy = moddcy;
196 //______________________________________________________________________________
197 void TPHICgen::SetTHETAMIN (Float_t thetamin)
199 GGINI.thetamin = thetamin;
201 //______________________________________________________________________________
202 void TPHICgen::SetKV1 (Int_t kv1 )
206 //______________________________________________________________________________
207 void TPHICgen::SetKV2 (Int_t kv2 )
212 //______________________________________________________________________________
213 // Getters for COMMON /GGEVNT/
214 Float_t TPHICgen::GetWSQ() const
218 //______________________________________________________________________________
219 Float_t TPHICgen::GetYGG() const
223 //______________________________________________________________________________
224 Float_t TPHICgen::GetXMG1() const
228 //______________________________________________________________________________
229 Float_t TPHICgen::GetXMG2() const
233 //______________________________________________________________________________
234 Float_t TPHICgen::GetP2G(Int_t i) const
236 return GGEVNT.p2g[i];
238 //______________________________________________________________________________
239 Float_t TPHICgen::GetPTAG1(Int_t i) const
241 return GGEVNT.ptag1[i];
243 //______________________________________________________________________________
244 Float_t TPHICgen::GetPTAG2(Int_t i) const
246 return GGEVNT.ptag2[i];
248 //______________________________________________________________________________
249 Int_t TPHICgen::GetNGG() const
253 //______________________________________________________________________________
254 Int_t TPHICgen::GetKGG(Int_t i) const
256 return GGEVNT.kgg[i];
258 //______________________________________________________________________________
259 Float_t TPHICgen::GetPGG(Int_t i, Int_t j) const
261 return GGEVNT.pgg[i][j];
264 //______________________________________________________________________________
265 // Getters for COMMON /GGXS/
266 Float_t TPHICgen::GetXSMAX0() const
270 //______________________________________________________________________________
271 Float_t TPHICgen::GetXSCUR0() const
275 //______________________________________________________________________________
276 Float_t TPHICgen::GetXSCUR () const
280 //______________________________________________________________________________
281 Float_t TPHICgen::GetXSTOT () const
285 //______________________________________________________________________________
286 Float_t TPHICgen::GetXSTOTE() const