Skip to content

Commit 06c0a5d

Browse files
Update candidateCreatorLb.cxx
1 parent 5a94735 commit 06c0a5d

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

PWGHF/TableProducer/candidateCreatorLb.cxx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ using namespace o2::hf_trkcandsel;
4343
/// Reconstruction of Λb candidates
4444
struct HfCandidateCreatorLb {
4545
Produces<aod::HfCandLbBase> rowCandidateBase;
46-
46+
Produces<aod::HfCandLbProngs> rowCandidateProngs;
4747
// vertexing
4848
Configurable<float> bz{"bz", 20., "magnetic field"};
4949
Configurable<bool> propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"};
@@ -217,8 +217,6 @@ struct HfCandidateCreatorLb {
217217
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
218218
auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));
219219

220-
int hfFlag = 1 << hf_cand_lb::DecayType::LbToLcPi;
221-
222220
// fill the candidate table for the Lb here:
223221
rowCandidateBase(collision.globalIndex(),
224222
collision.posX(), collision.posY(), collision.posZ(),
@@ -228,10 +226,8 @@ struct HfCandidateCreatorLb {
228226
pvecLc[0], pvecLc[1], pvecLc[2],
229227
pvecPion[0], pvecPion[1], pvecPion[2],
230228
impactParameter0.getY(), impactParameter1.getY(),
231-
std::sqrt(impactParameter0.getSigmaY2()), std::sqrt(impactParameter1.getSigmaY2()),
232-
lcCand.globalIndex(), trackPion.globalIndex(),
233-
hfFlag);
234-
229+
std::sqrt(impactParameter0.getSigmaY2()), std::sqrt(impactParameter1.getSigmaY2()));
230+
rowCandidateProngs(lcCand.globalIndex(), trackPion.globalIndex());
235231
// calculate invariant mass
236232
auto arrayMomenta = std::array{pvecLc, pvecPion};
237233
massLcPi = RecoDecay::m(std::move(arrayMomenta), std::array{massLc, massPi});
@@ -259,19 +255,17 @@ struct HfCandidateCreatorLbExpressions {
259255

260256
void processMc(aod::HfCand3Prong const& lcCandidates,
261257
aod::TracksWMc const& tracks,
262-
aod::McParticles const& mcParticles)
258+
aod::McParticles const& mcParticles,
259+
aod::HfCandLbProngs const& candsLb)
263260
{
264261
int indexRec = -1;
265262
int8_t sign = 0;
266263
int8_t flag = 0;
267264
int8_t origin = 0;
268265
int8_t debug = 0;
269266

270-
rowCandidateLb->bindExternalIndices(&tracks);
271-
rowCandidateLb->bindExternalIndices(&lcCandidates);
272-
273267
// Match reconstructed candidates.
274-
for (const auto& candidate : *rowCandidateLb) {
268+
for (const auto& candidate : candsLb) {
275269
flag = 0;
276270
origin = 0;
277271
debug = 0;

0 commit comments

Comments
 (0)