Skip to content

Commit 743647e

Browse files
authored
PWGEM/MC: remove J/psi from ee and add K0S for nm (#1676)
1 parent 96c75a6 commit 743647e

File tree

2 files changed

+64
-48
lines changed

2 files changed

+64
-48
lines changed

MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFee.C

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -263,29 +263,29 @@ class GeneratorPythia8GapTriggeredLFee : public GeneratorPythia8 {
263263
genphi->Init();
264264
CocktailParam *newgenphi = new CocktailParam(genphi);
265265

266-
// J/psi and psi(2S) need to be slightly different since no EXODUS but EvtGen decayer
267-
auto genJpsi = new o2::eventgen::O2_GeneratorParamJpsi;
268-
genJpsi->SetNSignalPerEvent(nPart); // signal per event for J/Psi
269-
270-
auto genPsi = new o2::eventgen::O2_GeneratorParamPsi;
271-
genPsi->SetNSignalPerEvent(nPart); // signal per event for Psi(2s)
272-
273-
TString pdgs = "443;100443";
274-
std::string spdg;
275-
TObjArray* obj = pdgs.Tokenize(";");
276-
fGeneratorCocktail->SetSizePdg(obj->GetEntriesFast());
277-
for (int i = 0; i < obj->GetEntriesFast(); i++) {
278-
spdg = obj->At(i)->GetName();
279-
fGeneratorCocktail->AddPdg(std::stoi(spdg), i);
280-
printf("PDG %d \n", std::stoi(spdg));
281-
}
282-
fGeneratorCocktail->SetForceDecay(kEvtDiElectron);
283-
284-
int target_pdg = 0;
266+
// // J/psi and psi(2S) need to be slightly different since no EXODUS but EvtGen decayer
267+
// auto genJpsi = new o2::eventgen::O2_GeneratorParamJpsi;
268+
// genJpsi->SetNSignalPerEvent(nPart); // signal per event for J/Psi
269+
//
270+
// auto genPsi = new o2::eventgen::O2_GeneratorParamPsi;
271+
// genPsi->SetNSignalPerEvent(nPart); // signal per event for Psi(2s)
272+
//
273+
// TString pdgs = "443;100443";
274+
// std::string spdg;
275+
// TObjArray* obj = pdgs.Tokenize(";");
276+
// fGeneratorCocktail->SetSizePdg(obj->GetEntriesFast());
277+
// for (int i = 0; i < obj->GetEntriesFast(); i++) {
278+
// spdg = obj->At(i)->GetName();
279+
// fGeneratorCocktail->AddPdg(std::stoi(spdg), i);
280+
// printf("PDG %d \n", std::stoi(spdg));
281+
// }
282+
// fGeneratorCocktail->SetForceDecay(kEvtDiElectron);
283+
284+
int target_pdg = 1;
285285

286286
if (mMode < 0) {
287-
target_pdg = 0;
288-
cout << "all-particle mode is selected. all 8 mesons are injected in each event" << endl;
287+
target_pdg = 1;
288+
cout << "all-particle mode is selected. all 6 mesons are injected in each event" << endl;
289289
cout << "add pi0 for signal" << endl;
290290
fGeneratorCocktail->AddGenerator(newgenpizero, 1);
291291
cout << "add eta for signal" << endl;
@@ -298,49 +298,50 @@ class GeneratorPythia8GapTriggeredLFee : public GeneratorPythia8 {
298298
fGeneratorCocktail->AddGenerator(newgenomega, 1);
299299
cout << "add phi for signal" << endl;
300300
fGeneratorCocktail->AddGenerator(newgenphi, 1);
301-
cout << "add j/psi for signal" << endl;
302-
fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi
303-
cout << "add psi(2S) for signal" << endl;
304-
fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s)
301+
//cout << "add j/psi for signal" << endl;
302+
//fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi
303+
//cout << "add psi(2S) for signal" << endl;
304+
//fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s)
305305
} else if (mMode < 100) {
306306
cout << "1-particle Mode is selected. 1 meson selected randomly per job is injected in each event" << endl;
307307
TRandom3 *r3 = new TRandom3(0);
308308
double rndm = r3->Rndm();
309309
printf("rndm = %f\n", rndm);
310310

311-
if(rndm < 1/8.) {
311+
if(rndm < 1/6.) {
312312
cout << "add pi0 for signal" << endl;
313313
fGeneratorCocktail->AddGenerator(newgenpizero, 1);
314314
target_pdg = 111;
315-
} else if (rndm < 2/8.) {
315+
} else if (rndm < 2/6.) {
316316
cout << "add eta for signal" << endl;
317317
fGeneratorCocktail->AddGenerator(newgeneta, 1);
318318
target_pdg = 221;
319-
} else if (rndm < 3/8.) {
319+
} else if (rndm < 3/6.) {
320320
cout << "add etaprime for signal" << endl;
321321
fGeneratorCocktail->AddGenerator(newgenetaprime, 1);
322322
target_pdg = 331;
323-
} else if (rndm < 4/8.) {
323+
} else if (rndm < 4/6.) {
324324
cout << "add rho for signal" << endl;
325325
fGeneratorCocktail->AddGenerator(newgenrho, 1);
326326
target_pdg = 113;
327-
} else if (rndm < 5/8.) {
327+
} else if (rndm < 5/6.) {
328328
cout << "add omega for signal" << endl;
329329
fGeneratorCocktail->AddGenerator(newgenomega, 1);
330330
target_pdg = 223;
331-
} else if (rndm < 6/8.) {
331+
} else if (rndm < 6/6.) {
332332
cout << "add phi for signal" << endl;
333333
fGeneratorCocktail->AddGenerator(newgenphi, 1);
334334
target_pdg = 333;
335-
} else if (rndm < 7/8.) {
336-
cout << "add j/psi for signal" << endl;
337-
fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi
338-
target_pdg = 443;
339-
} else {
340-
cout << "add psi(2S) for signal" << endl;
341-
fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s)
342-
target_pdg = 100443;
343335
}
336+
//else if (rndm < 7/8.) {
337+
// cout << "add j/psi for signal" << endl;
338+
// fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi
339+
// target_pdg = 443;
340+
//} else {
341+
// cout << "add psi(2S) for signal" << endl;
342+
// fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s)
343+
// target_pdg = 100443;
344+
//}
344345
delete r3;
345346
} else { //directly select meson pdg
346347
target_pdg = mMode;
@@ -369,14 +370,14 @@ class GeneratorPythia8GapTriggeredLFee : public GeneratorPythia8 {
369370
cout << "add phi for signal" << endl;
370371
fGeneratorCocktail->AddGenerator(newgenphi, 1);
371372
break;
372-
case 443 :
373-
cout << "add j/psi for signal" << endl;
374-
fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi
375-
break;
376-
case 100443 :
377-
cout << "add psi(2S) for signal" << endl;
378-
fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s)
379-
break;
373+
// case 443 :
374+
// cout << "add j/psi for signal" << endl;
375+
// fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi
376+
// break;
377+
// case 100443 :
378+
// cout << "add psi(2S) for signal" << endl;
379+
// fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s)
380+
// break;
380381
default:
381382
cout << "!WARNING! default : nothing is added to cocktail generator" << endl;
382383
target_pdg = 1;

MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFgamma.C

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,32 @@ class GeneratorPythia8GapTriggeredLFgamma : public GeneratorPythia8 {
8181
geneta->Init();
8282
CocktailParam *newgeneta = new CocktailParam(geneta);
8383

84+
// eta
85+
auto genk0s = new GeneratorParam(nPart,emlib,GeneratorParamEMlib::kK0s,"k0s"); // 310 for feed down
86+
genk0s->SetName("k0s");
87+
genk0s->SetMomentumRange(0., 25.);
88+
genk0s->SetPtRange(minPt, maxPt);
89+
genk0s->SetYRange(yMin, yMax);
90+
genk0s->SetPhiRange(phiMin, phiMax);
91+
genk0s->SetWeighting(weightMode); // flat pt, y and v2 zero
92+
genk0s->SetSelectAll(kTRUE);
93+
genk0s->SetDecayer(decayer);
94+
genk0s->Init();
95+
CocktailParam *newgenk0s = new CocktailParam(genk0s);
96+
8497
cout << "add pi0 for signal" << endl;
8598
fGeneratorCocktail->AddGenerator(newgenpizero, 1);
8699
cout << "add eta for signal" << endl;
87100
fGeneratorCocktail->AddGenerator(newgeneta, 1);
101+
cout << "add k0s for signal" << endl;
102+
fGeneratorCocktail->AddGenerator(newgenk0s, 1);
88103

89104
// print debug
90105
fGeneratorCocktail->PrintDebug();
91106
fGeneratorCocktail->Init();
92107

93108
addSubGenerator(0, "gap mb pythia");
94-
addSubGenerator(1, "injected cocktail");
109+
addSubGenerator(1, "event with injected signals");
95110

96111
};
97112

0 commit comments

Comments
 (0)