Skip to content

Commit 8b2fd92

Browse files
ypwanggYiping Wang
andauthored
Non-prmopt psi2S to Jpsi+pipi (#2073)
* non-prompt psi2s to jpsi pipi * remove unused code * small change in decay name --------- Co-authored-by: Yiping Wang <yipwang@lxbk1131.gsi.de>
1 parent fda2dc4 commit 8b2fd92

File tree

5 files changed

+327
-0
lines changed

5 files changed

+327
-0
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
####
2+
Decay B0
3+
# B -> cc= s
4+
0.000310000 psi(2S) K_S0 SVS; #[Reconstructed PDG2011]
5+
0.000310000 psi(2S) K_L0 SVS; #[Reconstructed PDG2011]
6+
#
7+
#
8+
0.000610000 psi(2S) K*0 SVV_HELAMP PKHplus PKphHplus PKHzero PKphHzero PKHminus PKphHminus; #[Reconstructed PDG2011]
9+
10+
0.0004 psi(2S) K+ pi- PHSP;
11+
0.0002 psi(2S) K0 pi0 PHSP;
12+
0.0002 psi(2S) K0 pi- pi+ PHSP;
13+
0.0001 psi(2S) K0 pi0 pi0 PHSP;
14+
0.0001 psi(2S) K+ pi- pi0 PHSP;
15+
0.0004 psi(2S) K_10 PHSP;
16+
#
17+
####
18+
0.000620000 psi(2S) K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
19+
20+
Enddecay
21+
22+
Decay anti-B0
23+
#
24+
0.000310000 psi(2S) K_S0 SVS; #[Reconstructed PDG2011]
25+
0.000310000 psi(2S) K_L0 SVS; #[Reconstructed PDG2011]
26+
#
27+
#
28+
0.000610000 psi(2S) anti-K*0 SVV_HELAMP PKHminus PKphHminus PKHzero PKphHzero PKHplus PKphHplus; #[Reconstructed PDG2011]
29+
30+
0.0004 psi(2S) K- pi+ PHSP;
31+
0.0002 psi(2S) anti-K0 pi0 PHSP;
32+
0.0002 psi(2S) anti-K0 pi+ pi- PHSP;
33+
0.0001 psi(2S) anti-K0 pi0 pi0 PHSP;
34+
0.0001 psi(2S) K- pi+ pi0 PHSP;
35+
0.0004 psi(2S) anti-K_10 PHSP;
36+
#
37+
0.000620000 psi(2S) anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
38+
####
39+
Enddecay
40+
41+
Decay B-
42+
#
43+
# B -> cc= s sum = 1.92%
44+
#
45+
0.000646000 psi(2S) K- SVS; #[Reconstructed PDG2011]
46+
0.000620000 psi(2S) K*- SVV_HELAMP PKHminus PKphHminus PKHzero PKphHzero PKHplus PKphHplus; #[Reconstructed PDG2011]
47+
0.0004 psi(2S) anti-K0 pi- PHSP;
48+
0.0002 psi(2S) K- pi0 PHSP;
49+
0.001900000 psi(2S) K- pi+ pi- PHSP; #[Reconstructed PDG2011]
50+
0.0001 psi(2S) K- pi0 pi0 PHSP;
51+
0.0001 psi(2S) anti-K0 pi- pi0 PHSP;
52+
0.0004 psi(2S) K_1- PHSP;
53+
#
54+
0.000025800 psi(2S) pi- PHSP; #[New mode added] #[Reconstructed PDG2011]
55+
56+
Enddecay
57+
58+
Decay B+
59+
#
60+
# B -> cc= s sum = 1.92%
61+
#
62+
0.000646000 psi(2S) K+ SVS; #[Reconstructed PDG2011]
63+
0.000620000 psi(2S) K*+ SVV_HELAMP PKHplus PKphHplus PKHzero PKphHzero PKHminus PKphHminus; #[Reconstructed PDG2011]
64+
0.0004 psi(2S) K0 pi+ PHSP;
65+
0.0002 psi(2S) K+ pi0 PHSP;
66+
0.001900000 psi(2S) K+ pi- pi+ PHSP; #[Reconstructed PDG2011]
67+
0.0001 psi(2S) K+ pi0 pi0 PHSP;
68+
0.0001 psi(2S) K0 pi+ pi0 PHSP;
69+
0.0004 psi(2S) K_1+ PHSP;
70+
#
71+
####
72+
0.000025800 psi(2S) pi+ PHSP; #[New mode added] #[Reconstructed PDG2011]
73+
74+
Enddecay
75+
76+
Decay B_s0
77+
# psi' = 0.34% CLNS 94/1315
78+
0.000465 psi(2S) eta' SVS;
79+
0.000235 psi(2S) eta SVS;
80+
0.000680000 psi(2S) phi SVV_HELAMP 1.0 0.0 1.0 0.0 1.0 0.0; #[Reconstructed PDG2011]
81+
0.0003 psi(2S) K- K+ PHSP;
82+
0.0003 psi(2S) anti-K0 K0 PHSP;
83+
0.0003 psi(2S) K0 K- pi+ PHSP;
84+
0.0003 psi(2S) anti-K0 K0 pi0 PHSP;
85+
0.0003 psi(2S) K- K+ pi0 PHSP;
86+
0.00034 psi(2S) phi pi+ pi- PHSP;
87+
0.00034 psi(2S) phi pi0 pi0 PHSP;
88+
0.0002 psi(2S) eta pi+ pi- PHSP;
89+
0.0002 psi(2S) eta pi0 pi0 PHSP;
90+
0.0004 psi(2S) eta' pi+ pi- PHSP;
91+
0.0004 psi(2S) eta' pi0 pi0 PHSP;
92+
0.0002 psi(2S) pi+ pi- PHSP;
93+
0.0002 psi(2S) pi0 pi0 PHSP;
94+
#
95+
# PR LHCb 04/08/2004 : add Bs -> phi mu mu, phi e e
96+
0.0000023 phi e+ e- BTOSLLALI;
97+
Enddecay
98+
99+
Decay anti-B_s0
100+
# psi' = 0.34% CLNS 94/1315
101+
#
102+
0.000465 psi(2S) eta' SVS;
103+
0.000235 psi(2S) eta SVS;
104+
0.000680000 psi(2S) phi SVV_HELAMP 1.0 0.0 1.0 0.0 1.0 0.0; #[Reconstructed PDG2011]
105+
0.0003 psi(2S) K- K+ PHSP;
106+
0.0003 psi(2S) anti-K0 K0 PHSP;
107+
0.0003 psi(2S) anti-K0 K+ pi- PHSP;
108+
0.0003 psi(2S) anti-K0 K0 pi0 PHSP;
109+
0.0003 psi(2S) K- K+ pi0 PHSP;
110+
0.00034 psi(2S) phi pi+ pi- PHSP;
111+
0.00034 psi(2S) phi pi0 pi0 PHSP;
112+
0.0002 psi(2S) eta pi+ pi- PHSP;
113+
0.0002 psi(2S) eta pi0 pi0 PHSP;
114+
0.0004 psi(2S) eta' pi+ pi- PHSP;
115+
0.0004 psi(2S) eta' pi0 pi0 PHSP;
116+
0.0002 psi(2S) pi+ pi- PHSP;
117+
0.0002 psi(2S) pi0 pi0 PHSP;
118+
#
119+
# PR LHCb 04/08/2004 : add Bs -> phi mu mu, phi e e
120+
0.0000023 phi e- e+ BTOSLLALI;
121+
122+
Enddecay
123+
124+
Decay Lambda_b0
125+
0.00038 Lambda0 psi(2S) PHSP;
126+
Enddecay
127+
128+
Decay anti-Lambda_b0
129+
0.00038 anti-Lambda0 psi(2S) PHSP;
130+
Enddecay
131+
132+
Decay Xi_b-
133+
0.00038 Xi- psi(2S) PHSP;
134+
Enddecay
135+
136+
Decay anti-Xi_b+
137+
0.00038 anti-Xi+ psi(2S) PHSP;
138+
Enddecay
139+
140+
Decay Omega_b-
141+
0.00038 Omega- psi(2S) PHSP;
142+
Enddecay
143+
144+
Decay anti-Omega_b+
145+
0.00038 anti-Omega+ psi(2S) PHSP;
146+
Enddecay
147+
148+
Decay B_c-
149+
# SemiLeptonic Decays
150+
0.00094 psi(2S) e- anti-nu_e PHOTOS PHSP;
151+
Enddecay
152+
153+
Decay B_c+
154+
# SemiLeptonic Decays
155+
0.00094 psi(2S) e+ nu_e PHOTOS PHSP;
156+
Enddecay
157+
158+
Decay psi(2S)
159+
1.000 J/psi pi+ pi- VVPIPI;
160+
Enddecay
161+
162+
Decay J/psi
163+
### from DECAY.DEC
164+
1.000 e+ e- PHOTOS VLL;
165+
Enddecay
166+
167+
End

MC/config/PWGDQ/EvtGen/GeneratorEvtGen.C

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ enum DecayModeEvt { kEvtAll = 0,
4242
kEvtElectronEM,
4343
kEvtDiElectronEM,
4444
kEvtGammaEM,
45+
kEvtBtoPsi2SToJpsiPiPi,
4546
kEvtBeautyUpgrade };
4647

4748
namespace o2
@@ -355,6 +356,9 @@ class GeneratorEvtGen : public T
355356
case kEvtBeautyUpgrade:
356357
SetDecayTable(Form("%s/BEAUTYUPGRADE.DEC", pathO2.Data()));
357358
break;
359+
case kEvtBtoPsi2SToJpsiPiPi:
360+
SetDecayTable(Form("%s/BTOPSITOJPSIPIPI.DEC", pathO2.Data()));
361+
break;
358362
}
359363
return;
360364
};

MC/config/PWGDQ/external/generator/generator_pythia8_NonPromptSignals_gaptriggered_dq.C

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,41 @@ FairGenerator*
351351
return gen;
352352
}
353353

354+
FairGenerator*
355+
GeneratorBeautyToPsiToJpsi_EvtGenMidY(double rapidityMin = -1.5, double rapidityMax = 1.5, bool verbose = false, TString pdgs = "511;521;531;541;5112;5122;5232;5132;5332")
356+
{
357+
auto gen = new o2::eventgen::GeneratorEvtGen<o2::eventgen::GeneratorPythia8NonPromptInjectedGapTriggeredDQ>();
358+
gen->setRapidity(rapidityMin, rapidityMax);
359+
gen->setPDG(5);
360+
gen->setRapidityHadron(rapidityMin,rapidityMax);
361+
gen->setHadronMultiplicity(1);
362+
TString pathO2table = gSystem->ExpandPathName("${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/pythia8/decayer/switchOffBhadrons.cfg");
363+
gen->readFile(pathO2table.Data());
364+
gen->setConfigMBdecays(pathO2table);
365+
gen->setVerbose(verbose);
366+
367+
std::string spdg;
368+
TObjArray* obj = pdgs.Tokenize(";");
369+
gen->SetSizePdg(obj->GetEntriesFast());
370+
for (int i = 0; i < obj->GetEntriesFast(); i++) {
371+
spdg = obj->At(i)->GetName();
372+
gen->AddPdg(std::stoi(spdg), i);
373+
printf("PDG %d \n", std::stoi(spdg));
374+
gen->addHadronPDGs(std::stoi(spdg));
375+
}
376+
gen->SetForceDecay(kEvtBtoPsi2SToJpsiPiPi);
377+
378+
// set random seed
379+
gen->readString("Random:setSeed on");
380+
uint random_seed;
381+
unsigned long long int random_value = 0;
382+
ifstream urandom("/dev/urandom", ios::in|ios::binary);
383+
urandom.read(reinterpret_cast<char*>(&random_value), sizeof(random_seed));
384+
gen->readString(Form("Random:seed = %d", random_value % 900000001));
385+
386+
// print debug
387+
// gen->PrintDebug();
388+
389+
return gen;
390+
}
391+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### The setup uses an external event generator
2+
### This part sets the path of the file and the function call to retrieve it
3+
4+
[GeneratorExternal]
5+
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/external/generator/generator_pythia8_NonPromptSignals_gaptriggered_dq.C
6+
funcName = GeneratorBeautyToPsiToJpsi_EvtGenMidY()
7+
8+
### The external generator derives from GeneratorPythia8.
9+
### This part configures the bits of the interface: configuration and user hooks
10+
11+
[GeneratorPythia8]
12+
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_hf.cfg
13+
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
14+
hooksFuncName = pythia8_userhooks_bbbar(-1.5,1.5)
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
int External()
2+
{
3+
int checkPdgSignal[] = {100443};
4+
int checkPdgDecay[] = {443, 211, -211};
5+
int leptonPdg = 11;
6+
Double_t rapidityWindow = 1.0;
7+
std::string path{"o2sim_Kine.root"};
8+
std::cout << "Check for\nsignal PDG " << checkPdgSignal[0] << "\n decay PDG " << checkPdgDecay[0] << ", " << checkPdgDecay[1] << ", " << checkPdgDecay[2] << "\n";
9+
TFile file(path.c_str(), "READ");
10+
if (file.IsZombie()) {
11+
std::cerr << "Cannot open ROOT file " << path << "\n";
12+
return 1;
13+
}
14+
auto tree = (TTree*)file.Get("o2sim");
15+
std::vector<o2::MCTrack>* tracks{};
16+
tree->SetBranchAddress("MCTrack", &tracks);
17+
18+
int nLeptons{};
19+
int nAntileptons{};
20+
int nLeptonPairs{};
21+
int nLeptonPairsToBeDone{};
22+
int nSignalJpsi{};
23+
int nSignalPionsPos{};
24+
int nSignalPionsNeg{};
25+
int nSignalPsi2S{};
26+
int nSignalJpsiWithinAcc{};
27+
int nSignalPionsPosWithinAcc{};
28+
int nSignalPionsNegWithinAcc{};
29+
auto nEvents = tree->GetEntries();
30+
o2::steer::MCKinematicsReader mcreader("o2sim", o2::steer::MCKinematicsReader::Mode::kMCKine);
31+
Int_t bpdgs[] = {511, 521, 531, 5112, 5122, 5232, 5132};
32+
Int_t sizePdg = sizeof(bpdgs)/sizeof(Int_t);
33+
Bool_t hasBeautyMoth = kFALSE;
34+
35+
for (int i = 0; i < nEvents; i++) {
36+
tree->GetEntry(i);
37+
for (auto& track : *tracks) {
38+
auto pdg = track.GetPdgCode();
39+
auto rapidity = track.GetRapidity();
40+
auto idMoth = track.getMotherTrackId();
41+
int idJpsi = -1; int IdChild0 = -1; int IdChild1 = -1;
42+
if (pdg == leptonPdg) {
43+
// count leptons
44+
nLeptons++;
45+
} else if(pdg == -leptonPdg) {
46+
// count anti-leptons
47+
nAntileptons++;
48+
} else if (pdg == checkPdgSignal[0]) {
49+
hasBeautyMoth = kFALSE;
50+
if(idMoth){ // check beauty mother
51+
auto tdM = mcreader.getTrack(i, idMoth);
52+
for(int i=0; i<sizePdg; i++){ if (TMath::Abs(tdM->GetPdgCode()) == bpdgs[i] ) hasBeautyMoth = kTRUE; }
53+
}
54+
if(hasBeautyMoth){
55+
nSignalPsi2S++;
56+
for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) {
57+
auto pdgDau = tracks->at(j).GetPdgCode();
58+
if(TMath::Abs(pdgDau) == checkPdgDecay[0] ) { nSignalJpsi++; if( std::abs(track.GetRapidity()) < rapidityWindow) nSignalJpsiWithinAcc++; idJpsi = j; }
59+
if(pdgDau == checkPdgDecay[1] ) { nSignalPionsPos++; if( std::abs(track.GetRapidity()) < rapidityWindow) nSignalPionsPosWithinAcc++; }
60+
if(pdgDau == checkPdgDecay[2] ) { nSignalPionsNeg++; if( std::abs(track.GetRapidity()) < rapidityWindow) nSignalPionsNegWithinAcc++; }
61+
}
62+
63+
auto trackJpsi = tracks->at(idJpsi);
64+
for (int j{trackJpsi.getFirstDaughterTrackId()}; j <= trackJpsi.getLastDaughterTrackId(); ++j) {
65+
auto pdgDau = tracks->at(j).GetPdgCode();
66+
if(pdgDau == leptonPdg ) IdChild0 = j;
67+
if(pdgDau == -leptonPdg ) IdChild1 = j;
68+
}
69+
auto child0 = tracks->at(IdChild0);
70+
auto child1 = tracks->at(IdChild1);
71+
// check for parent-child relations
72+
auto pdg0 = child0.GetPdgCode();
73+
auto pdg1 = child1.GetPdgCode();
74+
if (std::abs(pdg0) == leptonPdg && std::abs(pdg1) == leptonPdg && pdg0 == -pdg1) {
75+
nLeptonPairs++;
76+
if (child0.getToBeDone() && child1.getToBeDone()) {
77+
nLeptonPairsToBeDone++;
78+
}
79+
}
80+
}
81+
}
82+
}
83+
}
84+
std::cout << "#events: " << nEvents << "\n"
85+
<< "#leptons: " << nLeptons << "\n"
86+
<< "#antileptons: " << nAntileptons << "\n"
87+
<< "#signal (jpsi <- psi2S): " << nSignalJpsi << "; within acceptance (|y| < " << rapidityWindow << "): " << nSignalJpsiWithinAcc << "\n"
88+
<< "#signal (pi+ <- psi2S): " << nSignalPionsPos << "; within acceptance (|y| < " << rapidityWindow << "): " << nSignalPionsPosWithinAcc << "\n"
89+
<< "#signal (pi- <- psi2S): " << nSignalPionsNeg << "; within acceptance (|y| < " << rapidityWindow << "): " << nSignalPionsNegWithinAcc << "\n"
90+
<< "#lepton pairs: " << nLeptonPairs << "\n"
91+
<< "#lepton pairs to be done: " << nLeptonPairs << "\n";
92+
93+
94+
if (nLeptonPairs == 0 || nLeptons == 0 || nAntileptons == 0) {
95+
std::cerr << "Number of leptons, number of anti-leptons as well as number of lepton pairs should all be greater than 1.\n";
96+
return 1;
97+
}
98+
if (nLeptonPairs != nLeptonPairsToBeDone) {
99+
std::cerr << "The number of lepton pairs should be the same as the number of lepton pairs which should be transported.\n";
100+
return 1;
101+
}
102+
103+
return 0;
104+
}

0 commit comments

Comments
 (0)