Skip to content

Commit 039a4e0

Browse files
authored
DPMJET and other new processes in STARlight (#1765)
* DPMJET and other new processes * Changing suffix since this is not a normal ini file for o2sim
1 parent 5869eb1 commit 039a4e0

File tree

7 files changed

+130
-23
lines changed

7 files changed

+130
-23
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Decay tau-
2+
1.0 e- anti-nu_e nu_tau PHOTOS TAULNUNU; #[Reconstructed PDG2011]
3+
Enddecay
4+
Decay tau+
5+
1.0 pi+ pi+ pi- anti-nu_tau TAUHADNU -0.108 0.775 0.149 1.364 0.400 1.23 0.4; #[Reconstructed PDG2011]
6+
Enddecay
7+
End
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Decay tau-
2+
1.0 pi- pi- pi+ nu_tau TAUHADNU -0.108 0.775 0.149 1.364 0.400 1.23 0.4; #[Reconstructed PDG2011]
3+
Enddecay
4+
Decay tau+
5+
1.0 e+ anti-nu_tau nu_e PHOTOS TAULNUNU; #[Reconstructed PDG2011]
6+
Enddecay
7+
End

MC/config/PWGUD/external/generator/GeneratorStarlight.C

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
R__LOAD_LIBRARY(libDPMJET.so)
2+
R__LOAD_LIBRARY(libDpmJetLib.so)
13
R__LOAD_LIBRARY(libStarlib.so)
24
R__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;

MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@ FairGenerator*
1616
gen->selectConfiguration(configuration);
1717
gen->setCollisionSystem(energyCM, beam1Z, beam1A, beam2Z, beam2A);
1818

19-
gen->SetSizePdg(3);
19+
gen->SetSizePdg(5);
2020
gen->AddPdg(443,0);
2121
gen->AddPdg(100443,1);
2222
gen->AddPdg(223,2);
23-
gen->SetPolarization(1); //Transversal
23+
gen->AddPdg(15,3);
24+
gen->AddPdg(-15,4);
25+
if (configuration.find("kTau") == std::string::npos) gen->SetPolarization(1); //Transversal
2426

2527
TString pathO2 = gSystem->ExpandPathName("$O2DPG_ROOT/MC/config/PWGUD/external/generator/DecayTablesEvtGen");
2628
if (configuration.find("Psi2sToMuPi") != std::string::npos) gen->SetDecayTable(Form("%s/PSI2S.MUMUPIPI.DEC",pathO2.Data()));
2729
else if (configuration.find("Psi2sToElPi") != std::string::npos) gen->SetDecayTable(Form("%s/PSI2S.EEPIPI.DEC",pathO2.Data()));
2830
else if (configuration.find("RhoPrime") != std::string::npos) gen->SetDecayTable(Form("%s/RHOPRIME.RHOPIPI.DEC",pathO2.Data()));
2931
else if (configuration.find("OmegaTo3Pi") != std::string::npos) gen->SetDecayTable(Form("%s/OMEGA.3PI.DEC",pathO2.Data()));
3032
else if (configuration.find("JpsiToElRad") != std::string::npos) gen->SetDecayTable(Form("%s/JPSI.EE.DEC",pathO2.Data()));
33+
else if (configuration.find("ToEl3Pi") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.EL3PI.DEC",pathO2.Data()));
34+
else if (configuration.find("ToPo3Pi") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.PO3PI.DEC",pathO2.Data()));
3135

3236
return gen;
33-
}
37+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
**********************************************************************
2+
* Example for a DTUNUC input file.
3+
* Uncomment the input-cards according to your requirements.
4+
*
5+
* Format: A10,6E10.0,A8
6+
* (except for the section enclosed by "PHOINPUT" and "ENDINPUT"
7+
* which is format-free)
8+
* lines starting with "*" are comment lines
9+
**********************************************************************
10+
*
11+
* projectile / target / Energy
12+
* -------------------
13+
* 1 2 3 4 5 6 7
14+
*23456789012345678901234567890123456789012345678901234567890123456789012345678
15+
PROJPAR 0.0 PHOTON
16+
TARPAR 208.0 82.0
17+
ENERGY 1000.0 600000.0
18+
*ENERGY 100.0
19+
* Initialize the random number generator
20+
RNDMINIT 55.0 101.0 15.0 73.0
21+
*
22+
*
23+
* PHOJET-specific input
24+
* ---------------------
25+
* The following lines control the event-generation with PHOJET for
26+
* individual photon/nucleon-nucleon collisions.
27+
* For details see the PHOJET-manual available at
28+
* http://lepton.bartol.udel.edu/~eng/phojet.html
29+
* Any options explained in the PHOJET-manual can be used in between
30+
* the "PHOINPUT" and "ENDINPUT" cards.
31+
PHOINPUT
32+
PROCESS 1 0 1 1 1 1 1 1
33+
ENDINPUT
34+
*
35+
* Output
36+
* ------
37+
* some default output (particle multiplicities etc.)
38+
HISTOGRAM 101.0 102.0
39+
*
40+
* Start of event generation
41+
* -------------------------
42+
*START 5000.0 0.0
43+
START 100.0 0.0
44+
STOP
45+
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7...

MC/config/PWGUD/ini/makeStarlightConfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
parser.add_argument('--rapidity', default='cent', choices=['cent_rap', 'muon_rap', 'cent_eta', 'muon_eta'],
1818
help='Rapidity to select')
1919

20-
parser.add_argument('--process',default=None, choices=['kTwoGammaToMuLow', 'kTwoGammaToElLow', 'kTwoGammaToMuMedium', 'kTwoGammaToElMedium', 'kTwoGammaToMuHigh', 'kTwoGammaToElHigh', 'kTwoGammaToRhoRho', 'kTwoGammaToF2', 'kCohRhoToPi', 'kCohRhoToElEl', 'kCohRhoToMuMu', 'kCohRhoToPiWithCont', 'kCohRhoToPiFlat', 'kCohPhiToKa', 'kDirectPhiToKaKa','kCohOmegaTo2Pi', 'kCohOmegaTo3Pi', 'kCohOmegaToPiPiPi', 'kCohJpsiToMu', 'kCohJpsiToEl', 'kCohJpsiToElRad', 'kCohJpsiToProton', 'kCohPsi2sToMu','kCohPsi2sToEl', 'kCohPsi2sToMuPi', 'kCohPsi2sToElPi', 'kCohUpsilonToMu', 'kCohUpsilonToEl', 'kIncohRhoToPi', 'kIncohRhoToElEl', 'kIncohRhoToMuMu', 'kIncohRhoToPiWithCont', 'kIncohRhoToPiFlat', 'kIncohPhiToKa', 'kIncohOmegaTo2Pi', 'kIncohOmegaTo3Pi', 'kIncohOmegaToPiPiPi', 'kIncohJpsiToMu', 'kIncohJpsiToEl', 'kIncohJpsiToElRad', 'kIncohJpsiToProton', 'kIncohJpsiToLLbar', 'kIncohPsi2sToMu', 'kIncohPsi2sToEl', 'kIncohPsi2sToMuPi', 'kIncohPsi2sToElPi', 'kIncohUpsilonToMu', 'kIncohUpsilonToEl'],
20+
parser.add_argument('--process',default=None, choices=['kTwoGammaToMuLow', 'kTwoGammaToElLow', 'kTwoGammaToMuMedium', 'kTwoGammaToElMedium', 'kTwoGammaToMuHigh', 'kTwoGammaToElHigh', 'kTwoGammaToRhoRho', 'kTwoGammaToF2', 'kCohRhoToPi', 'kCohRhoToElEl', 'kCohRhoToMuMu', 'kCohRhoToPiWithCont', 'kCohRhoToPiFlat', 'kCohPhiToKa', 'kDirectPhiToKaKa','kCohOmegaTo2Pi', 'kCohOmegaTo3Pi', 'kCohOmegaToPiPiPi', 'kCohJpsiToMu', 'kCohJpsiToEl', 'kCohJpsiToElRad', 'kCohJpsiToProton', 'kCohPsi2sToMu','kCohPsi2sToEl', 'kCohPsi2sToMuPi', 'kCohPsi2sToElPi', 'kCohUpsilonToMu', 'kCohUpsilonToEl', 'kIncohRhoToPi', 'kIncohRhoToElEl', 'kIncohRhoToMuMu', 'kIncohRhoToPiWithCont', 'kIncohRhoToPiFlat', 'kIncohPhiToKa', 'kIncohOmegaTo2Pi', 'kIncohOmegaTo3Pi', 'kIncohOmegaToPiPiPi', 'kIncohJpsiToMu', 'kIncohJpsiToEl', 'kIncohJpsiToElRad', 'kIncohJpsiToProton', 'kIncohJpsiToLLbar', 'kIncohPsi2sToMu', 'kIncohPsi2sToEl', 'kIncohPsi2sToMuPi', 'kIncohPsi2sToElPi', 'kIncohUpsilonToMu', 'kIncohUpsilonToEl', 'kDpmjetSingle', 'kTauLowToEl3Pi', 'kTauLowToPo3Pi', 'kTauMediumToEl3Pi', 'kTauMediumToPo3Pi' ,'kTauHighToEl3Pi' ,'kTauHighToPo3Pi'],
2121
help='Process to switch on')
2222

2323

@@ -68,7 +68,7 @@
6868

6969
### Generator
7070
fout.write('[GeneratorExternal] \n')
71-
if 'Psi2sToMuPi' in args.process or 'Psi2sToElPi' in args.process or 'RhoPrime' in args.process or 'OmegaTo3Pi' in args.process or 'JpsiToElRad' in args.process :
71+
if 'Psi2sToMuPi' in args.process or 'Psi2sToElPi' in args.process or 'RhoPrime' in args.process or 'OmegaTo3Pi' in args.process or 'JpsiToElRad' in args.process or 'kTau' in args.process:
7272
fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C \n')
7373
fout.write('funcName = GeneratorStarlightToEvtGen("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,pZ,pA,tZ,tA))
7474
else:
@@ -78,7 +78,7 @@
7878
###Trigger
7979
fout.write('[TriggerExternal] \n')
8080
fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C \n')
81-
if 'kTwoGamma' in args.process:
81+
if 'kTwoGamma' in args.process or 'kTau' in args.process:
8282
if args.rapidity == 'cent_eta':
8383
fout.write('funcName = selectDirectPartInAcc(-0.9,0.9) \n')
8484
if args.rapidity == 'muon_eta':

MC/config/PWGUD/trigger/selectParticlesInAcceptance.C

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,24 @@ o2::eventgen::Trigger selectDaughterPartInAcc(double etaMin = -1., double etaMax
2424
for (const auto& particle : particles) {
2525
if (particle.GetFirstMother() == -1)
2626
if ((particle.Y() < etaMin) || (particle.Y() > etaMax)) return kFALSE;
27-
if (particle.GetFirstMother() != -1 && particle.GetFirstDaughter() == -1 && particle.GetPdgCode() != 22)
27+
if (particle.GetFirstMother() != -1 && particle.GetFirstDaughter() == -1 && particle.GetPdgCode() != 22 && TMath::Abs(particle.GetPdgCode()) != 12 && TMath::Abs(particle.GetPdgCode()) != 14 && TMath::Abs(particle.GetPdgCode()) != 16)
2828
if ((particle.Eta() < etaMin) || (particle.Eta() > etaMax)) return kFALSE;
2929
}
3030
return kTRUE;
3131
};
3232
}
3333

34+
o2::eventgen::Trigger selectDileptonsInAcc(double etaMin = -1., double etaMax = -1.)
35+
{
36+
return [etaMin, etaMax](const std::vector<TParticle>& particles) -> bool {
37+
for (const auto& particle : particles) {
38+
if (particle.GetFirstMother() != -1 && particle.GetFirstDaughter() == -1 && (TMath::Abs(particle.GetPdgCode()) == 11 || TMath::Abs(particle.GetPdgCode() == 13)))
39+
if ((particle.Eta() < etaMin) || (particle.Eta() > etaMax)) return kFALSE;
40+
}
41+
return kTRUE;
42+
};
43+
}
44+
3445
o2::eventgen::Trigger selectDirectPartInAcc(double etaMin = -1., double etaMax = -1.)
3546
{
3647
return [etaMin, etaMax](const std::vector<TParticle>& particles) -> bool {
@@ -41,4 +52,4 @@ o2::eventgen::Trigger selectDirectPartInAcc(double etaMin = -1., double etaMax =
4152
}
4253
return kTRUE;
4354
};
44-
}
55+
}

0 commit comments

Comments
 (0)