You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::cout << " NB: we have a " << absPdg << " also in event with quark " << checkPdgQuarkTwo << ", i.e in an event with c-cbar pair present, tagged with a b-bbar (e.g. double-parton scattering)" << std::endl;
81
83
std::cout << " ### mother indices: ";
82
84
intidFirstMother=track.getMotherTrackId();
83
85
intidSecondMother=track.getSecondMotherTrackId();
@@ -86,13 +88,29 @@ int External() {
86
88
std::cout << i << " ";
87
89
motherIds.push_back(i);
88
90
}
91
+
std::cout << std::endl;
92
+
93
+
/// To establish if the partonic event is switched on or not, check if the motherIds are all -1 for the current hadron
94
+
/// This is ok for Lc excited states deriving from the replacement of a prompt D*+
95
+
/// Instead, Lc excited states coming from Lb decays (i.e. not coming from a D*+ replacement))have at least one mother that has idx !=-1 (*)
89
96
boolpartonicEventOn= false;
90
-
if(motherIds!=std::vector<int>{-1, -1}) {
97
+
boolmotherIdsAllMinus1= true;
98
+
for(intidx : motherIds) {
99
+
if(idx!=-1) {
100
+
/// one mother id different from
101
+
motherIdsAllMinus1= false;
102
+
break;
103
+
}
104
+
}
105
+
//if(motherIds != std::vector<int>{-1, -1}) {
106
+
if(!motherIdsAllMinus1) {
91
107
std::cout << "The " << absPdg << " particle has mothers. This should mean that it comes directly from parton hadronization, and that the partonic event was kept in the MC production " << std::endl;
/// if the partinc event is not really saved and we arrive here, it means that motherIds != {-1, -1} because
107
-
/// the hadron comes from the decay of a beauty hadron. This can happen if and only if this is not a replaced one (i.e. native from Lambdab0 decay)
124
+
/// if we arrive here, it means that the hadron comes from the decay of a beauty hadron.
125
+
/// This can happen if and only if this is not a replaced one (i.e. native from Lambdab0 decay)
108
126
if (std::find(motherPdgCodes.begin(), motherPdgCodes.end(), 5122) ==motherPdgCodes.end() &&std::find(motherPdgCodes.begin(), motherPdgCodes.end(), -5122) ==motherPdgCodes.end()) {
109
127
std::cerr << "The particle " << absPdg << " does not originate neither from a c/c-bar quark (replaced) nor from a Lambda_b0 decay. There is something wrong, aborting..." << std::endl;
110
128
return1;
111
129
}
130
+
/// since this is a native Lc excited state from Lb0 decay, we must not update the replacement counters
131
+
updateCounters= false;
112
132
}
113
133
}
114
134
std::cout << std::endl;
115
135
136
+
/// update the counters only if the Lc excited state comes from a replaced prompt D*+, i.e. not from a Lb0 decay
137
+
if (!updateCounters) continue;
138
+
116
139
/// only if we arrive here it means that everything is ok, and we can safely update the counters for the final statistics
if (pdgDau!=333) { // phi is antiparticle of itself
159
+
if (pdgDau!=333&&pdgDau!=111) { // phi and pi0 are antiparticles of themselves
137
160
pdgsDecayAntiPart.push_back(-pdgDau);
138
161
} else {
139
162
pdgsDecayAntiPart.push_back(pdgDau);
@@ -163,15 +186,15 @@ int External() {
163
186
std::cout <<"# signal hadrons: " << nSignals << "\n";
164
187
std::cout <<"# signal hadrons decaying in the correct channel: " << nSignalGoodDecay << "\n";
165
188
166
-
if (nEventsMB<nEvents* (1-ratioTrigger) *0.95||nEventsMB>nEvents* (1-ratioTrigger) *1.05) { // we put some tolerance since the number of generated events is small
189
+
if (nEventsMB<nEvents* (1-ratioTrigger) *0.90||nEventsMB>nEvents* (1-ratioTrigger) *1.10) { // we put some tolerance since the number of generated events is small
167
190
std::cerr << "Number of generated MB events different than expected\n";
168
191
return1;
169
192
}
170
-
if (nEventsInjOne<nEvents*ratioTrigger*0.5*0.95||nEventsInjOne>nEvents*ratioTrigger*0.5*1.05) {
193
+
if (nEventsInjOne<nEvents*ratioTrigger*0.5*0.90||nEventsInjOne>nEvents*ratioTrigger*0.5*1.10) {
171
194
std::cerr << "Number of generated events injected with " << checkPdgQuarkOne << " different than expected\n";
172
195
return1;
173
196
}
174
-
if (nEventsInjTwo<nEvents*ratioTrigger*0.5*0.95||nEventsInjTwo>nEvents*ratioTrigger*0.5*1.05) {
197
+
if (nEventsInjTwo<nEvents*ratioTrigger*0.5*0.90||nEventsInjTwo>nEvents*ratioTrigger*0.5*1.10) {
175
198
std::cerr << "Number of generated events injected with " << checkPdgQuarkTwo << " different than expected\n";
0 commit comments