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 #define IN_TPHICGEN_CXX
30 #include "TPHICcommon.h"
33 # define gginit gginit_
35 # define ggexit ggexit_
38 # define gginit gginit
40 # define ggexit ggexit
48 // Double_t pyr_(Int_t*);
49 Double_t ggrnd(Int_t*) {
51 do r=gRandom->Rndm(); while(0 >= r || r >= 1);
59 //------------------------------------------------------------------------------
60 TPHICgen::TPHICgen() : TGenerator("TPHIC","TPHIC")
65 //------------------------------------------------------------------------------
71 //______________________________________________________________________________
72 void TPHICgen::Initialize()
75 const Float_t kNucleonMass = 0.931494;
76 SetAMAS(GGINI.ia*kNucleonMass);
80 //______________________________________________________________________________
81 void TPHICgen::GenerateEvent()
87 //______________________________________________________________________________
88 void TPHICgen::Finish()
90 // calculate cross section and print out cross section and related variables
94 //______________________________________________________________________________
97 void TPHICgen::SetIPROC (Int_t iproc ) const
101 //______________________________________________________________________________
102 void TPHICgen::SetNEVENT (Int_t nevent ) const
104 GGINI.nevent = nevent;
106 //______________________________________________________________________________
107 void TPHICgen::SetILUMF (Int_t ilumf ) const
111 //______________________________________________________________________________
112 void TPHICgen::SetLUMFIL (TString lumfil ) const
114 for (Int_t i=0; i<lumfil.Length(); i++)
115 GGINI.lumfil[i] = lumfil[i];
117 //______________________________________________________________________________
118 void TPHICgen::SetEBMN (Float_t ebmn ) const
122 //______________________________________________________________________________
123 void TPHICgen::SetIZ (Int_t iz ) const
127 //______________________________________________________________________________
128 void TPHICgen::SetIA (Int_t ia ) const
132 //______________________________________________________________________________
133 void TPHICgen::SetAMAS (Float_t amas ) const
137 //______________________________________________________________________________
138 void TPHICgen::SetAMIN (Float_t amin ) const
142 //______________________________________________________________________________
143 void TPHICgen::SetAMAX (Float_t amax ) const
147 //______________________________________________________________________________
148 void TPHICgen::SetYMIN (Float_t ymin ) const
152 //______________________________________________________________________________
153 void TPHICgen::SetYMAX (Float_t ymax ) const
157 //______________________________________________________________________________
158 void TPHICgen::SetNMAS (Int_t nmas ) const
162 //______________________________________________________________________________
163 void TPHICgen::SetNY (Int_t ny ) const
167 //______________________________________________________________________________
168 void TPHICgen::SetKFERM (Int_t kferm ) const
172 //______________________________________________________________________________
173 void TPHICgen::SetKFONIUM (Int_t kfonium ) const
175 GGINI.kfonium = kfonium;
177 //______________________________________________________________________________
178 void TPHICgen::SetXMRES (Float_t xmres ) const
182 //______________________________________________________________________________
183 void TPHICgen::SetXGTRES (Float_t xgtres ) const
185 GGINI.xgtres = xgtres;
187 //______________________________________________________________________________
188 void TPHICgen::SetXGGRES (Float_t xggres ) const
190 GGINI.xggres = xggres;
192 //______________________________________________________________________________
193 void TPHICgen::SetMODDCY (Int_t moddcy ) const
195 GGINI.moddcy = moddcy;
197 //______________________________________________________________________________
198 void TPHICgen::SetTHETAMIN (Float_t thetamin) const
200 GGINI.thetamin = thetamin;
202 //______________________________________________________________________________
203 void TPHICgen::SetKV1 (Int_t kv1 ) const
207 //______________________________________________________________________________
208 void TPHICgen::SetKV2 (Int_t kv2 ) const
213 //______________________________________________________________________________
214 // Getters for COMMON /GGEVNT/
215 Float_t TPHICgen::GetWSQ() const
219 //______________________________________________________________________________
220 Float_t TPHICgen::GetYGG() const
224 //______________________________________________________________________________
225 Float_t TPHICgen::GetXMG1() const
229 //______________________________________________________________________________
230 Float_t TPHICgen::GetXMG2() const
234 //______________________________________________________________________________
235 Float_t TPHICgen::GetP2G(Int_t i) const
237 return GGEVNT.p2g[i];
239 //______________________________________________________________________________
240 Float_t TPHICgen::GetPTAG1(Int_t i) const
242 return GGEVNT.ptag1[i];
244 //______________________________________________________________________________
245 Float_t TPHICgen::GetPTAG2(Int_t i) const
247 return GGEVNT.ptag2[i];
249 //______________________________________________________________________________
250 Int_t TPHICgen::GetNGG() const
254 //______________________________________________________________________________
255 Int_t TPHICgen::GetKGG(Int_t i) const
257 return GGEVNT.kgg[i];
259 //______________________________________________________________________________
260 Float_t TPHICgen::GetPGG(Int_t i, Int_t j) const
262 return GGEVNT.pgg[i][j];
265 //______________________________________________________________________________
266 // Getters for COMMON /GGXS/
267 Float_t TPHICgen::GetXSMAX0() const
271 //______________________________________________________________________________
272 Float_t TPHICgen::GetXSCUR0() const
276 //______________________________________________________________________________
277 Float_t TPHICgen::GetXSCUR () const
281 //______________________________________________________________________________
282 Float_t TPHICgen::GetXSTOT () const
286 //______________________________________________________________________________
287 Float_t TPHICgen::GetXSTOTE() const