Skip to content

Commit 0355598

Browse files
authored
Merge 9494a8c into sapling-pr-archive-ehellbar
2 parents 6d15c3b + 9494a8c commit 0355598

5 files changed

Lines changed: 287 additions & 12 deletions

File tree

DATA/production/workflow-multiplicities.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ if [[ "$HIGH_RATE_PP" == "1" ]]; then
301301
: ${CUT_RANDOM_FRACTION_ITS:=0.97}
302302
elif [[ $BEAMTYPE == "PbPb" ]]; then
303303
: ${CUT_RANDOM_FRACTION_ITS:=-1}
304-
: ${CUT_MULT_MIN_ITS:=100}
305-
: ${CUT_MULT_MAX_ITS:=200}
304+
: ${CUT_MULT_MIN_ITS:=0}
305+
: ${CUT_MULT_MAX_ITS:=400}
306306
: ${CUT_MULT_VTX_ITS:=20}
307307
else
308308
: ${CUT_RANDOM_FRACTION_ITS:=0.95}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#NEV_TEST> 20
2+
### The external generator derives from GeneratorPythia8.
3+
[GeneratorExternal]
4+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C
5+
funcName=GeneratorPythia8GapTriggeredBeauty(4, -4.3, -2.2)
6+
[GeneratorPythia8]
7+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_inel_Mode2.cfg
8+
includePartonEvent=true
9+
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
int External() {
2+
3+
int checkPdgDecayMuon = 13;
4+
int checkPdgQuark = 5;
5+
6+
float ratioTrigger = 1. / 4; // one event triggered out of 4
7+
8+
std::string path{"o2sim_Kine.root"};
9+
10+
TFile file(path.c_str(), "READ");
11+
if (file.IsZombie()) {
12+
std::cerr << "Cannot open ROOT file" << path << "\n";
13+
return 1;
14+
}
15+
16+
auto tree = (TTree *)file.Get("o2sim");
17+
if (!tree) {
18+
std::cerr << "Cannot find tree o2sim in file" << path << "\n";
19+
return 1;
20+
}
21+
22+
std::vector<o2::MCTrack> *tracks{};
23+
tree->SetBranchAddress("MCTrack", &tracks);
24+
25+
o2::dataformats::MCEventHeader *eventHeader = nullptr;
26+
tree->SetBranchAddress("MCEventHeader.", &eventHeader);
27+
28+
int nEventsMB{};
29+
int nEventsInj{};
30+
int nQuarks{};
31+
int nMuons{};
32+
33+
int nMuonsInAcceptance{};
34+
35+
auto nEvents = tree->GetEntries();
36+
37+
for (int i = 0; i < nEvents; i++) {
38+
tree->GetEntry(i);
39+
// check subgenerator information
40+
if (eventHeader->hasInfo(o2::mcgenid::GeneratorProperty::SUBGENERATORID)) {
41+
bool isValid = false;
42+
int subGeneratorId = eventHeader->getInfo<int>(
43+
o2::mcgenid::GeneratorProperty::SUBGENERATORID, isValid);
44+
if (subGeneratorId == 0) {
45+
nEventsMB++;
46+
} else if (subGeneratorId == checkPdgQuark) {
47+
nEventsInj++;
48+
}
49+
} // if event header
50+
51+
int nmuonsev = 0;
52+
int nmuonsevinacc = 0;
53+
54+
for (auto &track : *tracks) {
55+
auto pdg = track.GetPdgCode();
56+
if (std::abs(pdg) == checkPdgQuark) {
57+
nQuarks++;
58+
continue;
59+
} // pdgquark
60+
auto y = track.GetRapidity();
61+
if (std::abs(pdg) == checkPdgDecayMuon) {
62+
int igmother = track.getMotherTrackId();
63+
auto gmTrack = (*tracks)[igmother];
64+
int gmpdg = gmTrack.GetPdgCode();
65+
if (int(std::abs(gmpdg) / 100.) == 5 ||
66+
int(std::abs(gmpdg) / 1000.) == 5) {
67+
nMuons++;
68+
nmuonsev++;
69+
if (-4.3 < y && y < -2.2) {
70+
nMuonsInAcceptance++;
71+
nmuonsevinacc++;
72+
}
73+
} // gmpdg
74+
75+
} // pdgdecay
76+
77+
} // loop track
78+
// std::cout << "#muons per event: " << nmuonsev << "\n";
79+
// std::cout << "#muons in acceptance per event: " << nmuonsev << "\n";
80+
} // events
81+
82+
std::cout << "#events: " << nEvents << "\n";
83+
std::cout << "# MB events: " << nEventsMB << "\n";
84+
std::cout << Form("# events injected with %d quark pair: ", checkPdgQuark)
85+
<< nEventsInj << "\n";
86+
if (nEventsMB < nEvents * (1 - ratioTrigger) * 0.95 ||
87+
nEventsMB > nEvents * (1 - ratioTrigger) *
88+
1.05) { // we put some tolerance since the number of
89+
// generated events is small
90+
std::cerr << "Number of generated MB events different than expected\n";
91+
return 1;
92+
}
93+
if (nEventsInj < nEvents * ratioTrigger * 0.95 ||
94+
nEventsInj > nEvents * ratioTrigger * 1.05) {
95+
std::cerr << "Number of generated events injected with " << checkPdgQuark
96+
<< " different than expected\n";
97+
return 1;
98+
}
99+
std::cout << "#muons: " << nMuons << "\n";
100+
std::cout << "#muons in acceptance: " << nMuonsInAcceptance << "\n";
101+
102+
return 0;
103+
} // external
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
### beams
2+
Beams:idA 2212 # proton
3+
Beams:idB 2212 # proton
4+
Beams:eCM 13600. # GeV
5+
6+
### processes
7+
SoftQCD:inelastic on # all inelastic processes
8+
9+
### decays
10+
ParticleDecays:limitTau0 on
11+
ParticleDecays:tau0Max 10.
12+
13+
### switching on Pythia Mode2
14+
ColourReconnection:mode 1
15+
ColourReconnection:allowDoubleJunRem off
16+
ColourReconnection:m0 0.3
17+
ColourReconnection:allowJunctions on
18+
ColourReconnection:junctionCorrection 1.20
19+
ColourReconnection:timeDilationMode 2
20+
ColourReconnection:timeDilationPar 0.18
21+
StringPT:sigma 0.335
22+
StringZ:aLund 0.36
23+
StringZ:bLund 0.56
24+
StringFlav:probQQtoQ 0.078
25+
StringFlav:ProbStoUD 0.2
26+
StringFlav:probQQ1toQQ0join 0.0275,0.0275,0.0275,0.0275
27+
MultiPartonInteractions:pT0Ref 2.15
28+
BeamRemnants:remnantMode 1
29+
BeamRemnants:saturation 5
30+
31+
# Correct decay lengths (wrong in PYTHIA8 decay table)
32+
# Lb
33+
5122:tau0 = 0.4390
34+
# Xic0
35+
4132:tau0 = 0.0455
36+
# OmegaC
37+
4332:tau0 = 0.0803
38+
Lines changed: 135 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,138 @@
11
{
22
"qa-event-track": {
3-
"checkOnlyPVContributor": "true",
4-
"overwriteAxisRangeForPbPb": "!OVERWRITEAXISRANGEFORPBPBVALUE!",
5-
"processData": "!ANALYSIS_QC_is_data!",
6-
"processDataIU": "false",
7-
"processDataIUFiltered": "false",
8-
"processMC": "!ANALYSIS_QC_is_mc!",
9-
"processTableData": "false",
10-
"processTableMC": "false",
11-
"trackSelection": "1"
12-
}
3+
"maxEta": "2",
4+
"checkOnlyPVContributor": "1",
5+
"minPhi": "-1",
6+
"binsPt": {
7+
"values": [
8+
0,
9+
0,
10+
0.1,
11+
0.2,
12+
0.3,
13+
0.4,
14+
0.5,
15+
0.6,
16+
0.7,
17+
0.8,
18+
0.9,
19+
1,
20+
1.1,
21+
1.2,
22+
1.3,
23+
1.4,
24+
1.5,
25+
2,
26+
5,
27+
10,
28+
20,
29+
50
30+
]
31+
},
32+
"minPt": "-10",
33+
"selectPrim": "0",
34+
"selectSec": "0",
35+
"forceTRD": "0",
36+
"processDataIU": "0",
37+
"doDebug": "0",
38+
"minTPCcrossedRows": "70",
39+
"processTrackMatch": "!ANALYSIS_QC_is_data!",
40+
"binsDeltaPt": {
41+
"values": [
42+
100,
43+
-0.495,
44+
0.505
45+
]
46+
},
47+
"selectPID": "0",
48+
"PartIdentifier": "2",
49+
"forceNotTRD": "0",
50+
"binsInvPt": {
51+
"values": [
52+
0,
53+
0,
54+
0.1,
55+
0.2,
56+
0.3,
57+
0.4,
58+
0.5,
59+
0.6,
60+
0.7,
61+
0.8,
62+
0.9,
63+
1,
64+
1.1,
65+
1.2,
66+
1.3,
67+
1.4,
68+
1.5,
69+
2,
70+
5,
71+
10,
72+
20,
73+
50
74+
]
75+
},
76+
"minEta": "-2",
77+
"doExtraPIDqa": "0",
78+
"tfCut": "1",
79+
"processRun2ConvertedData": "0",
80+
"addRunInfo": "1",
81+
"maxPhi": "10",
82+
"binsVertexPosZ": {
83+
"values": [
84+
100,
85+
-20,
86+
20
87+
]
88+
},
89+
"selectGoodEvents": "1",
90+
"maxPt": "1e+10",
91+
"binsDeltaSigned1Pt": {
92+
"values": [
93+
100,
94+
-0.495,
95+
0.505
96+
]
97+
},
98+
"binsSigned1Pt": {
99+
"values": [
100+
300,
101+
-5,
102+
5
103+
]
104+
},
105+
"binsVertexNumContrib": {
106+
"values": [
107+
200,
108+
0,
109+
200
110+
]
111+
},
112+
"binsTrackMultiplicity": {
113+
"values": [
114+
1000,
115+
0,
116+
1000
117+
]
118+
},
119+
"checkFakeMatches": "0",
120+
"overwriteAxisRangeForPbPb": "!OVERWRITEAXISRANGEFORPBPBVALUE!",
121+
"activateChecksTRD": "0",
122+
"binsVertexPosXY": {
123+
"values": [
124+
500,
125+
-1,
126+
1
127+
]
128+
},
129+
"processData": "!ANALYSIS_QC_is_data!",
130+
"trackSelection": "1",
131+
"selectCharge": "0",
132+
"checkPIDforTracking": "0",
133+
"processRun2ConvertedMC": "0",
134+
"isRun3": "1",
135+
"processMC": "!ANALYSIS_QC_is_mc!",
136+
"processDataIUFiltered": "0"
137+
}
13138
}

0 commit comments

Comments
 (0)