Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions PWGLF/TableProducer/Common/kinkBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
Configurable<float> etaMax{"etaMax", 1., "eta daughter"};
Configurable<float> nTPCClusMinDaug{"nTPCClusMinDaug", 80, "daug NTPC clusters cut"};
Configurable<bool> askTOFforDaug{"askTOFforDaug", false, "If true, ask for TOF signal"};
Configurable<bool> doSVRadiusCut{"doSVRadiusCut", true, "If true, apply the cut on the radius of the secondary vertex and tracksIU"};

o2::vertexing::DCAFitterN<2> fitter;
o2::base::MatLayerCylSet* lut = nullptr;
Expand Down Expand Up @@ -203,7 +204,7 @@
h2ClsMapPtMoth = qaRegistry.add<TH2>("h2ClsMapPtMoth", "; p_{T} (GeV/#it{c}); ITS cluster map", HistType::kTH2F, {ptAxis, itsClusterMapAxis});
h2ClsMapPtDaug = qaRegistry.add<TH2>("h2ClsMapPtDaug", "; p_{T} (GeV/#it{c}); ITS cluster map", HistType::kTH2F, {ptAxis, itsClusterMapAxis});

for (int i = 0; i < 5; i++) {

Check failure on line 207 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mBBparamsDaug[i] = cfgBetheBlochParams->get("Daughter", Form("p%i", i));
}
mBBparamsDaug[5] = cfgBetheBlochParams->get("Daughter", "resolution");
Expand All @@ -212,8 +213,8 @@
template <typename T>
bool selectMothTrack(const T& candidate)
{
if (candidate.has_collision() && candidate.hasITS() && !candidate.hasTPC() && !candidate.hasTOF() && candidate.itsNCls() < 6 &&

Check failure on line 216 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
candidate.itsNClsInnerBarrel() == 3 && candidate.itsChi2NCl() < 36 && candidate.pt() > minPtMoth) {

Check failure on line 217 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
return false;
Expand All @@ -231,8 +232,8 @@
}

bool isGoodTPCCand = false;
if (candidate.itsNClsInnerBarrel() == 0 && candidate.itsNCls() < 4 &&

Check failure on line 235 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
candidate.tpcNClsCrossedRows() > 0.8 * candidate.tpcNClsFindable() && candidate.tpcNClsFound() > nTPCClusMinDaug) {

Check failure on line 236 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
isGoodTPCCand = true;
}

Expand Down Expand Up @@ -329,40 +330,40 @@

// cut on decay radius to 17 cm
float decRad2 = kinkCand.decVtx[0] * kinkCand.decVtx[0] + kinkCand.decVtx[1] * kinkCand.decVtx[1];
if (decRad2 < LayerRadii[3] * LayerRadii[3]) {
if (doSVRadiusCut && decRad2 < LayerRadii[3] * LayerRadii[3]) {
continue;
}

// get last layer hitted by the mother and the first layer hitted by the daughter
int lastLayerMoth = 0, firstLayerDaug = 0;
for (int i = 0; i < 7; i++) {

Check failure on line 339 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (trackMoth.itsClusterMap() & (1 << i)) {
lastLayerMoth = i;
}
}

for (int i = 0; i < 7; i++) {

Check failure on line 345 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (trackDaug.itsClusterMap() & (1 << i)) {
firstLayerDaug = i;
break;
}
}

if (lastLayerMoth >= firstLayerDaug) {
if (doSVRadiusCut && lastLayerMoth >= firstLayerDaug) {
continue;
}

if (decRad2 < LayerRadii[lastLayerMoth] * LayerRadii[lastLayerMoth]) {
if (doSVRadiusCut && decRad2 < LayerRadii[lastLayerMoth] * LayerRadii[lastLayerMoth]) {
continue;
}

for (int i = 0; i < 3; i++) {

Check failure on line 360 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
kinkCand.decVtx[i] -= kinkCand.primVtx[i];
}

propMothTrack.getPxPyPzGlo(kinkCand.momMoth);
propDaugTrack.getPxPyPzGlo(kinkCand.momDaug);
for (int i = 0; i < 3; i++) {

Check failure on line 366 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
kinkCand.momMoth[i] *= charge;
kinkCand.momDaug[i] *= charge;
}
Expand All @@ -372,7 +373,7 @@
kinkCand.kinkAngle = std::acos(spKink / (pMoth * pDaug));

std::array<float, 3> neutDauMom{0.f, 0.f, 0.f};
for (int i = 0; i < 3; i++) {

Check failure on line 376 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
neutDauMom[i] = kinkCand.momMoth[i] - kinkCand.momDaug[i];
}

Expand Down
Loading