Skip to content

Commit ae09c84

Browse files
committed
minor corrections
1 parent e6d27cc commit ae09c84

File tree

1 file changed

+28
-44
lines changed

1 file changed

+28
-44
lines changed

PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx

Lines changed: 28 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/// \file taskElectronWeakBoson.cxx
1313
/// \brief task for WeakBoson (W/Z) based on electron in mid-rapidity
1414
/// \author S. Sakai & S. Ito (Univ. of Tsukuba)
15+
1516
#ifndef HomogeneousField
1617
#define HomogeneousField // o2-linter: disable=name/macro (required by KFParticle)
1718
#endif
@@ -320,13 +321,15 @@ struct HfTaskElectronWeakBoson {
320321
// LOG(info) << "Invarimass cal by KF particle ";
321322
for (const auto& track : tracks) {
322323

323-
if (track.pt() < ptZeeMin)
324+
if (track.pt() < ptZeeMin) {
324325
continue;
325-
if (std::abs(track.tpcNSigmaEl()) > nsigTpcMax)
326+
}
327+
if (std::abs(track.tpcNSigmaEl()) > nsigTpcMax) {
326328
continue;
327-
if (std::abs(track.eta()) > etaTrMax)
329+
}
330+
if (std::abs(track.eta()) > etaTrMax) {
328331
continue;
329-
332+
}
330333
int pdgAss = kElectron;
331334
if (track.sign() > 0) {
332335
pdgAss = kPositron;
@@ -335,9 +338,9 @@ struct HfTaskElectronWeakBoson {
335338
KFPTrack kfpTrackAssEle = createKFPTrackFromTrack(track);
336339
KFParticle kfpAssEle(kfpTrackAssEle, pdgAss);
337340
// reco by RecoDecay
338-
auto arr1 = RecoDecayPtEtaPhi::pVector(kfpIsoEle.GetPt(), kfpIsoEle.GetEta(), kfpIsoEle.GetPhi());
339-
auto arr2 = RecoDecayPtEtaPhi::pVector(kfpAssEle.GetPt(), kfpAssEle.GetEta(), kfpAssEle.GetPhi());
340-
double massZeeRecoDecay = RecoDecay::m(std::array{arr1, arr2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
341+
auto child1 = RecoDecayPtEtaPhi::pVector(kfpIsoEle.GetPt(), kfpIsoEle.GetEta(), kfpIsoEle.GetPhi());
342+
auto child2 = RecoDecayPtEtaPhi::pVector(kfpAssEle.GetPt(), kfpAssEle.GetEta(), kfpAssEle.GetPhi());
343+
double massZeeRecoDecay = RecoDecay::m(std::array{child1, child2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
341344

342345
// reco by KFparticle
343346
const KFParticle* electronPairs[2] = {&kfpIsoEle, &kfpAssEle};
@@ -346,10 +349,12 @@ struct HfTaskElectronWeakBoson {
346349
zeeKF.Construct(electronPairs, 2);
347350
// LOG(info) << "Invarimass cal by KF particle Chi2/NDF = " << zeeKF.GetChi2()/zeeKF.GetNDF();
348351
float massZeeChi2 = zeeKF.GetChi2() / zeeKF.GetNDF();
349-
if (zeeKF.GetNDF() < 1)
352+
if (zeeKF.GetNDF() < 1) {
350353
continue;
351-
if (std::abs(massZeeChi2) > kfChisqMassMax)
354+
}
355+
if (std::abs(massZeeChi2) > kfChisqMassMax) {
352356
continue;
357+
}
353358
float massZee, massZeeErr;
354359
zeeKF.GetMass(massZee, massZeeErr);
355360
// LOG(info) << "Invarimass cal by KF particle mass = " << massZee;
@@ -438,20 +443,27 @@ struct HfTaskElectronWeakBoson {
438443

439444
for (const auto& track : tracks) {
440445

441-
if (std::abs(track.eta()) > etaTrMax)
446+
if (std::abs(track.eta()) > etaTrMax) {
442447
continue;
443-
if (track.tpcNClsCrossedRows() < nclcrossTpcMin)
448+
}
449+
if (track.tpcNClsCrossedRows() < nclcrossTpcMin) {
444450
continue;
445-
if (std::abs(track.dcaXY()) > dcaxyMax)
451+
}
452+
if (std::abs(track.dcaXY()) > dcaxyMax) {
446453
continue;
447-
if (track.itsChi2NCl() > chi2ItsMax)
454+
}
455+
if (track.itsChi2NCl() > chi2ItsMax) {
448456
continue;
449-
if (track.tpcChi2NCl() > chi2TpcMax)
457+
}
458+
if (track.tpcChi2NCl() > chi2TpcMax) {
450459
continue;
451-
if (track.tpcNClsFound() < nclTpcMin)
460+
}
461+
if (track.tpcNClsFound() < nclTpcMin) {
452462
continue;
453-
if (track.itsNCls() < nclItsMin)
463+
}
464+
if (track.itsNCls() < nclItsMin) {
454465
continue;
466+
}
455467

456468
registry.fill(HIST("hEta"), track.eta());
457469
registry.fill(HIST("hITSchi2"), track.itsChi2NCl());
@@ -590,34 +602,6 @@ struct HfTaskElectronWeakBoson {
590602
}
591603

592604
} // end of track loop
593-
/*
594-
// calculate inv. mass
595-
if (selectedElectronsIso.size() > 0) {
596-
for (size_t i = 0; i < selectedElectronsIso.size(); i++) {
597-
const auto& e1 = selectedElectronsIso[i];
598-
for (size_t j = 0; j < selectedElectronsAss.size(); j++) {
599-
const auto& e2 = selectedElectronsAss[j];
600-
if (std::abs(e2.nSigEl) > nsigTpcMax)
601-
continue;
602-
if (e2.pt < ptZeeMin)
603-
continue;
604-
float ptIso = e1.pt;
605-
float ptAss = e2.pt;
606-
if (ptIso == ptAss)
607-
continue;
608-
auto arr1 = RecoDecayPtEtaPhi::pVector(e1.pt, e1.eta, e1.phi);
609-
auto arr2 = RecoDecayPtEtaPhi::pVector(e2.pt, e2.eta, e2.phi);
610-
double mass = RecoDecay::m(std::array{arr1, arr2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
611-
612-
if (e1.sign() * e2.sign() > 0) {
613-
registry.fill(HIST("hInvMassZeeLs"), ptIso, mass);
614-
} else {
615-
registry.fill(HIST("hInvMassZeeUls"), ptIso, mass);
616-
}
617-
}
618-
}
619-
} // end of inv. mass calculation
620-
*/
621605
// Z-hadron
622606
if (reconstructedZ.size() > 0) {
623607
for (const auto& zBoson : reconstructedZ) {

0 commit comments

Comments
 (0)