Skip to content

Commit d5076a1

Browse files
authored
Fix seeding and include X particle (#42)
* WIP: add files for X simulations * Fix rpythia8 * Add B hadron productions * Fix path of the KrKr database * remove cfg which are migrated to O2DPG * restore ccbar example config * Revert "restore ccbar example config" This reverts commit faabf5a. * Revert "remove cfg which are migrated to O2DPG" This reverts commit 73b92ab. * revert to default LUTs
1 parent 274f504 commit d5076a1

File tree

6 files changed

+122
-6
lines changed

6 files changed

+122
-6
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### Force golden B-hadron hadronic decay modes
2+
### Based on AliRoot AliDecayerPythia8::ForceBeautyUpgrade, latest commit 3154cf8 on Nov 30, 2020
3+
4+
# Bs -> Ds- pi+
5+
531:onMode = off
6+
531:onIfMatch = 431 211
7+
# Lb: 50% to Lc any, 50% to Lc pion
8+
#FIXME: we should find a way to generate 50% of inclusive or Lc decays
9+
#FIXME: currently all the Lb -> Lc + pi
10+
5122:onMode = off
11+
#5122:onIfAll = 4122
12+
5122:onIfMatch = 4122 211
13+
14+
511:onMode = off
15+
511:onIfMatch = 413 211
16+
17+
521:onMode = off
18+
521:onIfMatch = 421 211

examples/pythia8/pythia8_bbbar.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### main
2+
Main:numberOfEvents 10000
3+
4+
### service
5+
Next:numberShowEvent = 0
6+
7+
### random
8+
Random:setSeed = on
9+
Random:seed = 123456789
10+
11+
### beams
12+
Beams:idA 2212 # proton
13+
Beams:idB 2212 # proton
14+
Beams:eCM 14000. # GeV
15+
16+
### processes
17+
HardQCD:hardbbbar on # g-g / q-qbar -> b-bbar

examples/pythia8/pythia_onia_X.cfg

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
### beams
2+
Beams:idA 2212 # proton
3+
Beams:idB 2212 # proton
4+
Beams:eCM 14000. # GeV
5+
#663:addChannel = 1 0. 0 1 -1
6+
#9920443:addParticle = X(3872) 3 0 0 3.87196 0.00012
7+
Onia:all = on
8+
Random:setSeed = on
9+
10+
Charmonium:states(3PJ) = 10441,20443,445,9920443
11+
Charmonium:O(3PJ)[3P0(1)] = 0.05,0.05,0.05,0.05
12+
Charmonium:O(3PJ)[3S1(8)] = 0.0031,0.0031,0.0031,0.0031
13+
Charmonium:gg2ccbar(3PJ)[3PJ(1)]g = off,off,off,on
14+
Charmonium:qg2ccbar(3PJ)[3PJ(1)]q = off,off,off,on
15+
Charmonium:qqbar2ccbar(3PJ)[3PJ(1)]g = off,off,off,on
16+
Charmonium:gg2ccbar(3PJ)[3S1(8)]g = off,off,off,on
17+
Charmonium:qg2ccbar(3PJ)[3S1(8)]q = off,off,off,on
18+
Charmonium:qqbar2ccbar(3PJ)[3S1(8)]g = off,off,off,on
19+
20+
### B0 -> J/psi X
21+
511:onMode = off
22+
511:onIfAny = 443
23+
24+
### B+/- -> J/psi X
25+
521:onMode = off
26+
521:onIfAny = 443
27+
28+
###B_s -> J/psi X
29+
531:onMode = off
30+
531:onIfAny = 443
31+
32+
##Lambda_b -> J/psi X
33+
5122:onMode = off
34+
5122:onIfAny = 443
35+
36+
37+
###J/psi -> mu+ mu-
38+
443:onMode = off
39+
443:onIfAll = 13 -13
40+
443:onIfAll = 11 -11 //e+e-
41+
42+
###Psi(2S) -> mu+ mu-
43+
100443:onMode = off
44+
100443:onIfAll = 13 -13
45+
100443:onIfAll = 11 -11 //e+e-
46+
47+
###Upsilon -> mu+ mu-
48+
553:onMode = off
49+
553:onIfAll = 13 -13
50+
553:onIfAll = 11 -11 //e+e-
51+
52+
###Upsilon(2S) -> mu+ mu-
53+
100553:onMode = off
54+
100553:onIfAll = 13 -13
55+
100553:onIfAll = 11 -11 //e+e-
56+
57+
###Upsilon(3S) -> mu+ mu-
58+
200553:onMode = off
59+
200553:onIfAll = 13 -13
60+
200553:onIfAll = 11 -11 //e+e-
61+
62+
9920443:addChannel = 1 0 443 211 -211
63+
9920443:onMode = off
64+
9920443:onIfMatch = 443 211 -211

examples/scripts/createO2tables.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ def copy_and_link(file_name):
266266
gen_log_file = f"gen.{run_number}.log"
267267
hepmc_file = f"hepmcfile.{run_number}.hepmc"
268268
custom_gen_option = f" --output {hepmc_file} --nevents {nevents}"
269-
write_to_runner(custom_gen + custom_gen_option,
269+
custom_seed = f" --seed {run_number}"
270+
write_to_runner(custom_gen + custom_gen_option + custom_seed,
270271
log_file=gen_log_file)
271272
write_to_runner(f"DelphesHepMC propagate.tcl {delphes_file} {hepmc_file}",
272273
log_file=delphes_log_file)

examples/scripts/default_configfile.ini

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ bfield = 5.
1111
sigmat = 0.020
1212

1313
# radius [cm]
14-
radius = 100.
14+
radius = 20.
1515

1616
# half length [cm]
1717
length = 200.
@@ -27,17 +27,22 @@ propagate_card = propagate.2kG.tcl
2727

2828
# path to the LUTs
2929
lut_path = $DELPHESO2_ROOT/examples/smearing/luts/
30+
#lut_path = /data/Run5data/LUTs
3031

3132
# tag of the LUTs to use in simulation
32-
lut_tag = 100cm.default
33+
#lut_tag = 100cm.default
34+
lut_tag = 20cm.scenario3
3335

3436
# path of the DELPHES aod utilities
3537
aod_path = $DELPHESO2_ROOT/examples/aod/
3638

3739
## Pythia setup
38-
[CCBAR]
40+
[CCBAR_Dforced]
3941
generators = $DELPHESO2_ROOT/examples/pythia8/pythia8_ccbar.cfg $DELPHESO2_ROOT/examples/pythia8/decays/force_hadronic_D.cfg
4042

43+
[BBBAR_BDforced]
44+
generators = $DELPHESO2_ROOT/examples/pythia8/pythia8_bbbar.cfg $DELPHESO2_ROOT/examples/pythia8/decays/force_hadronic_B.cfg $DELPHESO2_ROOT/examples/pythia8/decays/force_hadronic_D.cfg
45+
4146
[CCBAR_Lc_pK0s] # (need O2DPG loaded)
4247
generators = $DELPHESO2_ROOT/examples/pythia8/pythia8_ccbar.cfg $O2DPG_ROOT/MC/config/PWGHF/pythia8/decayer/force_hadronic_D.cfg $O2DPG_ROOT/MC/config/PWGHF/pythia8/decayer/force_hadronic_D_forceLcChannel2.cfg
4348

@@ -54,7 +59,7 @@ custom_gen = rpythia8 --config $O2DPG_ROOT/MC/config/common/pythia8/generator/py
5459
generators = $O2DPG_ROOT/MC/config/common/pythia8/generator/pythia8_hi.cfg
5560

5661
[INEL_HI_KRKR] # (need O2DPG loaded)
57-
generators = $O2DPG_ROOT/MC/config/common/pythia8/generator/pythia8_hi_krkr.cfg
62+
generators = $O2DPG_ROOT/MC/config/common/pythia8/generator/pythia8_KrKr.cfg
5863

5964
[GUN]
6065
custom_gen = rpythia8-gun --pdg 421 --px 1. --py 0. --pz 0. --xProd 0. --yProd 0. --zProd 0. --config $DELPHESO2_ROOT/examples/pythia8/decays/force_hadronic_D.cfg --decay
@@ -65,3 +70,5 @@ custom_gen = rpythia8-gun --pdg 4122 --px 1. --py 0. --pz 0. --xProd 1. --yProd
6570
[GUN_Lc_pK0s]
6671
custom_gen = rpythia8-gun --pdg 4122 --px 1. --py 0. --pz 0. --xProd 1. --yProd 0. --zProd 0. --config $O2DPG_ROOT/MC/config/PWGHF/pythia8/decayer/force_hadronic_D_forceLcChannel2.cfg --decay
6772

73+
[ONIA_X] #(need O2DPG loaded)
74+
custom_gen = rpythia8 --config $DELPHESO2_ROOT/examples/pythia8/pythia_onia_X.cfg

rpythia8/rpythia8.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
#include <string>
33

44
#include "Pythia8/Pythia.h"
5+
#include "Pythia8/ParticleData.h"
56
#include "Pythia8Plugins/HepMC2.h"
67

78
int main(int argc, char **argv)
89
{
910

10-
int nevents, inject_nevents;
11+
int nevents, inject_nevents, seed;
1112
std::string config, output, inject_config;
1213

1314
/** process arguments **/
@@ -21,6 +22,7 @@ int main(int argc, char **argv)
2122
("output,o" , po::value<std::string>(&output)->default_value("pythia8.hepmc"), "Output HepMC file")
2223
("inject-config" , po::value<std::string>(&inject_config), "Injected event configuration file")
2324
("inject-nevents" , po::value<int>(&inject_nevents)->default_value(1), "Number of events to inject")
25+
("seed" , po::value<int>(&seed)->default_value(1), "initial seed")
2426
;
2527

2628
po::variables_map vm;
@@ -40,11 +42,16 @@ int main(int argc, char **argv)
4042

4143
// pythia, config and init
4244
Pythia8::Pythia pythia;
45+
pythia.particleData.addParticle(9920443, "X(3872)", 3, 0, 0, 3.87196, 0.00012);
46+
4347
Pythia8::Rndm rndm;
4448
if (!config.empty() && !pythia.readFile(config)) {
4549
std::cout << "Error: could not read config file \"" << config << "\"" << std::endl;
4650
return 1;
4751
}
52+
std::cout<<"Random:seed =" + std::to_string(seed)<<std::endl;
53+
pythia.readString("Random:setSeed = on");
54+
pythia.readString("Random:seed =" + std::to_string(seed));
4855
pythia.init();
4956
rndm.init();
5057

@@ -61,6 +68,8 @@ int main(int argc, char **argv)
6168
std::cout << "Error: could not read config file \"" << inject_config << "\"" << std::endl;
6269
return 1;
6370
}
71+
pythia_inj->readString("Random:setSeed = on");
72+
pythia_inj->readString("Random:seed =" + std::to_string(seed));
6473
pythia_inj->init();
6574
}
6675

0 commit comments

Comments
 (0)