1+ R__LOAD_LIBRARY (libDPMJET .so )
2+ R__LOAD_LIBRARY (libDpmJetLib .so )
13R__LOAD_LIBRARY (libStarlib .so )
24R__ADD_INCLUDE_PATH ($STARlight_ROOT /include )
35
46#include "randomgenerator.h"
57#include "upcXevent.h"
8+ #include "upcevent.h"
69#include "starlight.h"
710#include "inputParameters.h"
811
@@ -96,7 +99,14 @@ class GeneratorStarlight_class : public Generator
9699 {"kIncohPsi2sToMuPi" , 4 , 444013 , 20 , -1.0 , -1.0 , 0.01 , 100443 , 1 }, //
97100 {"kIncohPsi2sToElPi" , 4 , 444011 , 20 , -1.0 , -1.0 , 0.01 , 100443 , 1 }, //
98101 {"kIncohUpsilonToMu" , 4 , 553013 , 20 , -1.0 , -1.0 , 0.01 , 553 , 0 }, //
99- {"kIncohUpsilonToEl" , 4 , 553011 , 20 , -1.0 , -1.0 , 0.01 , 553 , 0 }, //
102+ {"kIncohUpsilonToEl" , 4 , 553011 , 20 , -1.0 , -1.0 , 0.01 , 553 , 0 }, //
103+ {"kDpmjetSingle" , 5 , 113 , 20 , -1.0 , -1.0 , 0.01 , -1 , 0 }, //
104+ {"kTauLowToEl3Pi" , 1 , 15 , 292 , 0.4 , 15.0 , 0.01 , -1 , 1 }, // from 0.4 to 15 GeV
105+ {"kTauLowToPo3Pi" , 1 , 15 , 292 , 0.4 , 15.0 , 0.01 , -1 , 1 }, // from 0.4 to 15 GeV
106+ {"kTauMediumToEl3Pi" , 1 , 15 , 264 , 1.8 , 15.0 , 0.01 , -1 , 1 }, // from 1.8 to 15 GeV
107+ {"kTauMediumToPo3Pi" , 1 , 15 , 264 , 1.8 , 15.0 , 0.01 , -1 , 1 }, // from 1.8 to 15 GeV
108+ {"kTauHighToEl3Pi" , 1 , 15 , 220 , 4.0 , 15.0 , 0.01 , -1 , 1 }, // from 4.0 to 15 GeV
109+ {"kTauHighToPo3Pi" , 1 , 15 , 220 , 4.0 , 15.0 , 0.01 , -1 , 1 }, // from 4.0 to 15 GeV
100110 };
101111
102112 const int nProcess = sizeof (slConfig )/sizeof (SLConfig );
@@ -146,10 +156,16 @@ class GeneratorStarlight_class : public Generator
146156 setParameter ("IF_STRENGTH = 1. #% of interfernce (0.0 - 0.1)" );
147157 setParameter ("INT_PT_MAX = 0.24 #Maximum pt considered, when interference is turned on" );
148158 setParameter ("INT_PT_N_BINS = 120 #Number of pt bins when interference is turned on" );
149- setParameter ("XSEC_METHOD = 1 # Set to 0 to use old method for calculating gamma-gamma luminosity" ); //CM
150- setParameter ("BSLOPE_DEFINITION = 0 " ); // using default slope
159+ setParameter ("XSEC_METHOD = 0 # Set to 0 to use old method for calculating gamma-gamma luminosity" ); //CM
160+ setParameter ("BSLOPE_DEFINITION = 1 " ); // using default slope
151161 setParameter ("BSLOPE_VALUE = 4.0" ); // default slope value
152162 setParameter ("PRINT_VM = 0" ); // print cross sections and fluxes vs rapidity in stdout for VM photoproduction processes
163+
164+ // Photonuclear specific options, energies in Lab frame. These values should be within the range of the values specified in the DPMJet input file (when DPMJet is used)
165+ if (slConfig [idx ].prod_mode == 5 || slConfig [idx ].prod_mode == 6 || slConfig [idx ].prod_mode == 7 ){
166+ setParameter ("MIN_GAMMA_ENERGY = 1000.0" );
167+ setParameter ("MAX_GAMMA_ENERGY = 600000.0" );
168+ }
153169
154170 if (not mInputParameters .init ()) {
155171 std ::cout << "InitStarLight parameter initialization has failed" << std ::endl ;
@@ -171,6 +187,11 @@ class GeneratorStarlight_class : public Generator
171187 return false;
172188 }
173189
190+ if (mInputParameters .interactionType () >= 5 ) {
191+ mUpcEvent = mStarLight -> produceUpcEvent ();
192+ mUpcEvent .boost (0.5 * (TMath ::ACosH (mInputParameters .beam1LorentzGamma ()) - TMath ::ACosH (mInputParameters .beam2LorentzGamma ())));
193+ }
194+
174195 mEvent = mStarLight -> produceEvent ();
175196 // boost event to the experiment CM frame
176197 mEvent .boost (0.5 * (TMath ::ACosH (mInputParameters .beam1LorentzGamma ()) - TMath ::ACosH (mInputParameters .beam2LorentzGamma ())));
@@ -185,17 +206,28 @@ class GeneratorStarlight_class : public Generator
185206 {
186207 int nVtx (0 );
187208 float vtx (0 ), vty (0 ), vtz (0 ), vtt (0 );
188- const std ::vector < vector3 > * slVtx (mEvent .getVertices ());
209+ const std ::vector < vector3 > * slVtx ;
210+ const std ::vector < starlightParticle > * slPartArr ;
211+ int npart = 0 ;
212+
213+ if (mInputParameters .interactionType () >= 5 ) {
214+ slVtx = mUpcEvent .getVertices ();
215+ slPartArr = mUpcEvent .getParticles ();
216+ npart = mUpcEvent .getParticles ()-> size ();
217+ }
218+ else {
219+ slVtx = mEvent .getVertices ();
220+ slPartArr = mEvent .getParticles ();
221+ npart = mEvent .getParticles ()-> size ();
222+ }
223+
189224 if (slVtx == 0 ) { // not vertex assume 0,0,0,0;
190225 vtx = vty = vtz = vtt = 0.0 ;
191- } else { // a vertex exits
192- slVtx = mEvent .getVertices ();
193- nVtx = slVtx -> size ();
194- } // end if
195-
196- const std ::vector < starlightParticle > * slPartArr (mEvent .getParticles ());
197- const int npart (mEvent .getParticles ()-> size ());
198-
226+ }
227+ else { // a vertex exits
228+ nVtx = slVtx -> size ();
229+ } // end if
230+
199231 if (mPdgMother != -1 ){ //Reconstruct mother particle for VM processes
200232 TLorentzVector lmoth ;
201233 TLorentzVector ldaug ;
@@ -219,7 +251,7 @@ class GeneratorStarlight_class : public Generator
219251 mParticles .push_back (particle );
220252 o2 ::mcutils ::MCGenHelper ::encodeParticleStatusAndTracking (mParticles .back (), false);
221253 }
222- if (!mDecayEvtGen ){ // Don't import daughters in case of external decayer
254+ if (!mDecayEvtGen || mPdgMother == -1 ){ // Don't import daughters in case of external decayer
223255 for (int ipart = 0 ;ipart < npart ;ipart ++ ) {
224256 const starlightParticle * slPart (& (slPartArr -> at (ipart )));
225257 if (nVtx < 1 ) { // No verticies
@@ -232,7 +264,7 @@ class GeneratorStarlight_class : public Generator
232264 } // end if
233265 TParticle particle (slPart -> getPdgCode (),
234266 1 ,
235- 0 ,
267+ ( mPdgMother != -1 ? 0 : -1 ) ,
236268 -1 ,
237269 slPart -> getFirstDaughter (),
238270 slPart -> getLastDaughter (),
@@ -245,7 +277,7 @@ class GeneratorStarlight_class : public Generator
245277 mParticles .push_back (particle );
246278 o2 ::mcutils ::MCGenHelper ::encodeParticleStatusAndTracking (mParticles .back (), true);
247279 }
248- }
280+ }
249281 return true;
250282 }
251283
@@ -254,6 +286,7 @@ class GeneratorStarlight_class : public Generator
254286 inputParameters mInputParameters ; // simulation input information.
255287 randomGenerator mRandomGenerator ; // STARLIGHT's own random generator
256288 upcXEvent mEvent ; // object holding STARlight simulated event.
289+ upcEvent mUpcEvent ;
257290 std ::string mSelectedConfiguration = "" ;
258291 int mPdgMother = -1 ;
259292 bool mDecayEvtGen = 0 ;
0 commit comments