Skip to content

Commit 4592055

Browse files
committed
MC/PWGEM: add ini for DYee in pp at 13.6 TeV
1 parent e882201 commit 4592055

3 files changed

Lines changed: 108 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[GeneratorExternal]
2+
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_DYll.C
3+
funcName = GeneratorPythia8GapTriggeredDYll(5, 1, 11, -1.5, +1.5, 2212, 2212, 13600.0)
4+
5+
[GeneratorPythia8]
6+
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/generator/configPythiaEmpty.cfg
7+
includePartonEvent = true
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
int External() {
2+
std::string path{"o2sim_Kine.root"};
3+
// Check that file exists, can be opened and has the correct tree
4+
TFile file(path.c_str(), "READ");
5+
if (file.IsZombie())
6+
{
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree *)file.Get("o2sim");
11+
if (!tree)
12+
{
13+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
14+
return 1;
15+
}
16+
std::vector<o2::MCTrack> *tracks{};
17+
tree->SetBranchAddress("MCTrack", &tracks);
18+
19+
// Check if all events are filled
20+
auto nEvents = tree->GetEntries();
21+
for (Long64_t i = 0; i < nEvents; ++i)
22+
{
23+
tree->GetEntry(i);
24+
if (tracks->empty())
25+
{
26+
std::cerr << "Empty entry found at event " << i << "\n";
27+
return 1;
28+
}
29+
}
30+
// check if each event has at least two oxygen ions
31+
for (int i = 0; i < nEvents; i++)
32+
{
33+
auto check = tree->GetEntry(i);
34+
int count = 0;
35+
for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
36+
{
37+
auto track = tracks->at(idxMCTrack);
38+
if (track.GetPdgCode() == 2212)
39+
{
40+
count++;
41+
}
42+
}
43+
if (count < 2)
44+
{
45+
std::cerr << "Event " << i << " has less than 2 oxygen ions\n";
46+
return 1;
47+
}
48+
}
49+
50+
return 0;
51+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
3+
#
4+
# Steering script for HF enhanced dielectron MC anchored to LHC24ap,aq apass1
5+
#
6+
7+
# example anchoring
8+
# taken from https://its.cern.ch/jira/browse/O2-5670
9+
export ALIEN_JDL_LPMANCHORPASSNAME=apass1
10+
export ALIEN_JDL_MCANCHOR=apass1
11+
export ALIEN_JDL_CPULIMIT=8
12+
export ALIEN_JDL_LPMRUNNUMBER=559348
13+
export ALIEN_JDL_LPMPRODUCTIONTYPE=MC
14+
export ALIEN_JDL_LPMINTERACTIONTYPE=pp
15+
export ALIEN_JDL_LPMPRODUCTIONTAG=LHC24a6
16+
export ALIEN_JDL_LPMANCHORRUN=559348
17+
export ALIEN_JDL_LPMANCHORPRODUCTION=LHC26ac
18+
export ALIEN_JDL_LPMANCHORYEAR=2026
19+
export ALIEN_JDL_OUTPUT=*.dat@disk=1,*.txt@disk=1,*.root@disk=2
20+
21+
export NTIMEFRAMES=1
22+
export NSIGEVENTS=20
23+
export SPLITID=100
24+
export PRODSPLIT=153
25+
export CYCLE=0
26+
27+
# on the GRID, this is set and used as seed; when set, it takes precedence over SEED
28+
#export ALIEN_PROC_ID=2963436952
29+
export SEED=0
30+
31+
# for pp and 50 events per TF, we launch only 4 workers.
32+
export NWORKERS=2
33+
34+
# define the generator via ini file
35+
# use 20/40/40 sampling for different generators
36+
# generate random number
37+
#RNDSIG=$(($RANDOM % 100))
38+
39+
CONFIGNAME="GeneratorDYee_GapTriggered_Gap5_pp13600GeV.ini"
40+
41+
export ALIEN_JDL_ANCHOR_SIM_OPTIONS="-gen external -ini $O2DPG_ROOT/MC/config/PWGEM/ini/$CONFIGNAME"
42+
43+
# run the central anchor steering script; this includes
44+
# * derive timestamp
45+
# * derive interaction rate
46+
# * extract and prepare configurations (which detectors are contained in the run etc.)
47+
# * run the simulation (and QC)
48+
# To disable QC, uncomment the following line
49+
#export DISABLE_QC=1
50+
${O2DPG_ROOT}/MC/run/ANCHOR/anchorMC.sh

0 commit comments

Comments
 (0)