Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ALICE3/TableProducer/alice3-dileptonsmearing.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in ALICE3/TableProducer/alice3-dileptonsmearing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -154,7 +154,7 @@
}
} else {
// don't apply smearing
smearedelectron(ptgen, etagen, phigen, true);
smearedelectron(ptgen, etagen, phigen, false);
}
} // end of mc track loop
}
Expand Down
70 changes: 58 additions & 12 deletions ALICE3/Tasks/alice3-dilepton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@
registry.add("Reconstructed/Track/Phi", "Track Phi", kTH1F, {axisPhi});
registry.add("Reconstructed/Track/Eta_Pt", "Eta vs. Pt", kTH2F, {axisPt, axisEta}, true);

registry.add("Reconstructed/Track/PtMC", "Track Pt", kTH1F, {axisPt});
registry.add("Reconstructed/Track/EtaMC", "Track Eta", kTH1F, {axisEta});
registry.add("Reconstructed/Track/PhiMC", "Track Phi", kTH1F, {axisPhi});
registry.add("Reconstructed/Track/EtaMC_PtMC", "Eta vs. Pt", kTH2F, {axisPt, axisEta}, true);

registry.addClone("Reconstructed/Track/", "Reconstructed/TrackPID/");
registry.addClone("Reconstructed/Track/", "Reconstructed/TrackPIDPre/");
}
Expand Down Expand Up @@ -213,6 +218,10 @@
registry.fill(HIST("Reconstructed/Track/Eta"), track.etaSmeared());
registry.fill(HIST("Reconstructed/Track/Phi"), track.phiSmeared());
registry.fill(HIST("Reconstructed/Track/Eta_Pt"), track.ptSmeared(), track.etaSmeared());
registry.fill(HIST("Reconstructed/Track/PtMC"), mcParticle.pt());
registry.fill(HIST("Reconstructed/Track/EtaMC"), mcParticle.eta());
registry.fill(HIST("Reconstructed/Track/PhiMC"), mcParticle.phi());
registry.fill(HIST("Reconstructed/Track/EtaMC_PtMC"), mcParticle.pt(), mcParticle.eta());
} else {
registry.fill(HIST("Reconstructed/Track/SigmaOTofvspt"), track.pt(), track.nSigmaElectronOuterTOF());
registry.fill(HIST("Reconstructed/Track/SigmaITofvspt"), track.pt(), track.nSigmaElectronInnerTOF());
Expand All @@ -230,12 +239,20 @@
registry.fill(HIST("Reconstructed/TrackPID/Eta"), track.etaSmeared());
registry.fill(HIST("Reconstructed/TrackPID/Phi"), track.phiSmeared());
registry.fill(HIST("Reconstructed/TrackPID/Eta_Pt"), track.ptSmeared(), track.etaSmeared());
registry.fill(HIST("Reconstructed/TrackPID/PtMC"), mcParticle.pt());
registry.fill(HIST("Reconstructed/TrackPID/EtaMC"), mcParticle.eta());
registry.fill(HIST("Reconstructed/TrackPID/PhiMC"), mcParticle.phi());
registry.fill(HIST("Reconstructed/TrackPID/EtaMC_PtMC"), mcParticle.pt(), mcParticle.eta());

if (track.isTrackPrefilter() == 0) {
registry.fill(HIST("Reconstructed/TrackPIDPre/Pt"), track.ptSmeared());
registry.fill(HIST("Reconstructed/TrackPIDPre/Eta"), track.etaSmeared());
registry.fill(HIST("Reconstructed/TrackPIDPre/Phi"), track.phiSmeared());
registry.fill(HIST("Reconstructed/TrackPIDPre/Eta_Pt"), track.ptSmeared(), track.etaSmeared());
registry.fill(HIST("Reconstructed/TrackPIDPre/PtMC"), mcParticle.pt());
registry.fill(HIST("Reconstructed/TrackPIDPre/EtaMC"), mcParticle.eta());
registry.fill(HIST("Reconstructed/TrackPIDPre/PhiMC"), mcParticle.phi());
registry.fill(HIST("Reconstructed/TrackPIDPre/EtaMC_PtMC"), mcParticle.pt(), mcParticle.eta());
}
}
} else {
Expand Down Expand Up @@ -278,7 +295,7 @@
// Calculate the number of particles in the FIT acceptance
for (const auto& mcParticle : mcParticles_per_coll) {
if (mcParticle.isPhysicalPrimary()) {
if ((2.2 < mcParticle.eta() && mcParticle.eta() < 5.0) || (-3.4 < mcParticle.eta() && mcParticle.eta() < -2.3)) {

Check failure on line 298 in ALICE3/Tasks/alice3-dilepton.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.
auto pdgParticle = inspdg->GetParticle(mcParticle.pdgCode());
if (pdgParticle) {
float charge = pdgParticle->Charge() / 3.f; // Charge in units of |e|
Expand Down Expand Up @@ -429,6 +446,11 @@
registry.add("Reconstructed/Track/Phi", "Particle Phi", kTH1F, {axisPhi});
registry.add("Reconstructed/Track/Pre", "Particle Pre", kTH1F, {axisPre});
}
if (doprocessRecAllWithSmearing) {
registry.add("Reconstructed/Track/PtMC", "Track Pt", kTH1F, {axisPt});
registry.add("Reconstructed/Track/EtaMC", "Particle Eta", kTH1F, {axisEta});
registry.add("Reconstructed/Track/PhiMC", "Particle Phi", kTH1F, {axisPhi});
}

if (doprocessRecAll) {
registry.add("Reconstructed/Track/SigmaOTofvspt", "Track #sigma oTOF", kTH2F, {axisPt, axisSigmaEl});
Expand Down Expand Up @@ -519,7 +541,7 @@
&& std::abs(mother1_pdg) != o2::constants::physics::kOmega // omega
&& std::abs(mother1_pdg) != o2::constants::physics::kPhi // phi
&& std::abs(mother1_pdg) != o2::constants::physics::kJPsi // Jpsi
&& std::abs(mother1_pdg) != 100443 // psi2S

Check failure on line 544 in ALICE3/Tasks/alice3-dilepton.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.

Check failure on line 544 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
) {
return -1;
}
Expand Down Expand Up @@ -551,7 +573,7 @@
int mother1_pdg = mother_p1.pdgCode();
int mother2_pdg = mother_p2.pdgCode();

if (((500 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 599) || (5000 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 5999)) && ((500 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 599) || (5000 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 5999))) {

Check failure on line 576 in ALICE3/Tasks/alice3-dilepton.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 HFllType::kBe_Be; // bb->ee, decay type = 2
}

Expand All @@ -563,9 +585,9 @@
int grand_mother1_pdg = grand_mother_p1.pdgCode();
int grand_mother2_pdg = grand_mother_p2.pdgCode();

if (((400 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 499) || (4000 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 4999)) && ((400 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 499) || (4000 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 4999))) { // mother is charm

Check failure on line 588 in ALICE3/Tasks/alice3-dilepton.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 (((500 < std::abs(grand_mother1_pdg) && std::abs(grand_mother1_pdg) < 599) || (5000 < std::abs(grand_mother1_pdg) && std::abs(grand_mother1_pdg) < 5999)) && ((500 < std::abs(grand_mother2_pdg) && std::abs(grand_mother2_pdg) < 599) || (5000 < std::abs(grand_mother2_pdg) && std::abs(grand_mother2_pdg) < 5999))) { // grand mother is beauty

Check failure on line 590 in ALICE3/Tasks/alice3-dilepton.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 kBCe_BCe; // b->c->e and b->c->e, decay type = 1
} else {
return kCe_Ce; // prompt cc->ee, decay type = 0
Expand All @@ -574,8 +596,8 @@

if (motherid_p1 == grand_motherid_p2 || grand_motherid_p1 == motherid_p2) {
if (
(((500 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 599) || (5000 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 5999)) && ((500 < std::abs(grand_mother2_pdg) && std::abs(grand_mother2_pdg) < 599) || (5000 < std::abs(grand_mother2_pdg) && std::abs(grand_mother2_pdg) < 5999))) ||

Check failure on line 599 in ALICE3/Tasks/alice3-dilepton.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.
(((500 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 599) || (5000 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 5999)) && ((500 < std::abs(grand_mother1_pdg) && std::abs(grand_mother1_pdg) < 599) || (5000 < std::abs(grand_mother1_pdg) && std::abs(grand_mother1_pdg) < 5999)))) {

Check failure on line 600 in ALICE3/Tasks/alice3-dilepton.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 HFllType::kBCe_Be_SameB; // b->c->e and c->e, decay type = 3
}
}
Expand Down Expand Up @@ -614,7 +636,7 @@

if (motherid_p1 != grand_motherid_p2 && grand_motherid_p1 != motherid_p2) { // different mother and grand mother
if (
(((500 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 599) || (5000 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 5999)) && ((500 < std::abs(grand_mother2_pdg) && std::abs(grand_mother2_pdg) < 599) || (5000 < std::abs(grand_mother2_pdg) && std::abs(grand_mother2_pdg) < 5999))) ||

Check failure on line 639 in ALICE3/Tasks/alice3-dilepton.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.
(((500 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 599) || (5000 < std::abs(mother2_pdg) && std::abs(mother2_pdg) < 5999)) && ((500 < std::abs(grand_mother1_pdg) && std::abs(grand_mother1_pdg) < 599) || (5000 < std::abs(grand_mother1_pdg) && std::abs(grand_mother1_pdg) < 5999)))) {
return HFllType::kBCe_Be_DiffB; // b->c->e and c->e, decay type = 4
}
Expand Down Expand Up @@ -989,24 +1011,48 @@
} // end of processRec

void processRecAllWithSmearing(MyFilteredAlice3Collision const& collisions,
MyFilteredTracksWithSmearing const& tracks)
MyFilteredTracksWithSmearing const& tracks,
const aod::McParticles&)
{

for (const auto& track : tracks) {
if (!IsInAcceptance<true>(track)) {
continue;
}
registry.fill(HIST("Reconstructed/Track/Pt"), track.ptSmeared());
registry.fill(HIST("Reconstructed/Track/Eta"), track.etaSmeared());
registry.fill(HIST("Reconstructed/Track/Phi"), track.phiSmeared());
registry.fill(HIST("Reconstructed/Track/Pre"), track.isTrackPrefilter());
}

for (const auto& collision : collisions) {
registry.fill(HIST("Reconstructed/Event/VtxZ"), collision.posZ());
auto negTracks_coll = negTracksWithSmearing->sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), cache_rec);
auto posTracks_coll = posTracksWithSmearing->sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), cache_rec);

for (const auto& track : negTracks_coll) {
if (!IsInAcceptance<true>(track)) {
continue;
}
if (!track.has_mcParticle()) {
continue;
}
const auto mcParticle = track.template mcParticle_as<aod::McParticles>();
registry.fill(HIST("Reconstructed/Track/PtMC"), mcParticle.pt());
registry.fill(HIST("Reconstructed/Track/EtaMC"), mcParticle.eta());
registry.fill(HIST("Reconstructed/Track/PhiMC"), mcParticle.phi());
registry.fill(HIST("Reconstructed/Track/Pt"), track.ptSmeared());
registry.fill(HIST("Reconstructed/Track/Eta"), track.etaSmeared());
registry.fill(HIST("Reconstructed/Track/Phi"), track.phiSmeared());
registry.fill(HIST("Reconstructed/Track/Pre"), track.isTrackPrefilter());
}

for (const auto& track : posTracks_coll) {
if (!IsInAcceptance<true>(track)) {
continue;
}
if (!track.has_mcParticle()) {
continue;
}
const auto mcParticle = track.template mcParticle_as<aod::McParticles>();
registry.fill(HIST("Reconstructed/Track/PtMC"), mcParticle.pt());
registry.fill(HIST("Reconstructed/Track/EtaMC"), mcParticle.eta());
registry.fill(HIST("Reconstructed/Track/PhiMC"), mcParticle.phi());
registry.fill(HIST("Reconstructed/Track/Pt"), track.ptSmeared());
registry.fill(HIST("Reconstructed/Track/Eta"), track.etaSmeared());
registry.fill(HIST("Reconstructed/Track/Phi"), track.phiSmeared());
registry.fill(HIST("Reconstructed/Track/Pre"), track.isTrackPrefilter());
}

FillPairRecAll<true, PairType::kULS>(negTracks_coll, posTracks_coll);
FillPairRecAll<true, PairType::kLSpp>(posTracks_coll, posTracks_coll);
FillPairRecAll<true, PairType::kLSnn>(negTracks_coll, negTracks_coll);
Expand Down
35 changes: 23 additions & 12 deletions ALICE3/Tasks/alice3-prefilterdilepton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -300,20 +300,10 @@ struct Alice3DileptonPrefilter {
continue;
}
}
bool pass = false;
if constexpr (isWithSmearing) {
pass = true;
} else {
if ((std::abs(pos.nSigmaElectronRich()) < nSigmaElectronRich && nSigmaPionRich < std::abs(pos.nSigmaPionRich())) || (std::abs(pos.nSigmaElectronOuterTOF()) < nSigmaEleCutOuterTOF && nSigmaPionCutOuterTOF < std::abs(pos.nSigmaPionOuterTOF())) || (std::abs(pos.nSigmaElectronInnerTOF()) < nSigmaEleCutInnerTOF && nSigmaPionCutInnerTOF < std::abs(pos.nSigmaPionInnerTOF()))) {
if ((std::abs(ele.nSigmaElectronRich()) < nSigmaElectronRich && nSigmaPionRich < std::abs(ele.nSigmaPionRich())) || (std::abs(ele.nSigmaElectronOuterTOF()) < nSigmaEleCutOuterTOF && nSigmaPionCutOuterTOF < std::abs(ele.nSigmaPionOuterTOF())) || (std::abs(ele.nSigmaElectronInnerTOF()) < nSigmaEleCutInnerTOF && nSigmaPionCutInnerTOF < std::abs(ele.nSigmaPionInnerTOF()))) {
pass = true;
}
}
}

if (pass) {
ROOT::Math::PtEtaPhiMVector v1(pos.pt(), pos.eta(), pos.phi(), o2::constants::physics::MassElectron);
ROOT::Math::PtEtaPhiMVector v2(ele.pt(), ele.eta(), ele.phi(), o2::constants::physics::MassElectron);
ROOT::Math::PtEtaPhiMVector v1(pos.ptSmeared(), pos.etaSmeared(), pos.phiSmeared(), o2::constants::physics::MassElectron);
ROOT::Math::PtEtaPhiMVector v2(ele.ptSmeared(), ele.etaSmeared(), ele.phiSmeared(), o2::constants::physics::MassElectron);
ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
float angle = RecoDecay::constrainAngle(ROOT::Math::VectorUtil::Angle(v1, v2), -M_PI);
// o2::math_utils::bringToPMPi(angle);
Expand All @@ -325,6 +315,27 @@ struct Alice3DileptonPrefilter {
map_pfb[ele.globalIndex()] = 1;
registry.fill(HIST("ReconstructedFiltered/Pair/ULS/Mass_Pt"), v12.M(), v12.Pt());
}

} else {

if ((std::abs(pos.nSigmaElectronRich()) < nSigmaElectronRich && nSigmaPionRich < std::abs(pos.nSigmaPionRich())) || (std::abs(pos.nSigmaElectronOuterTOF()) < nSigmaEleCutOuterTOF && nSigmaPionCutOuterTOF < std::abs(pos.nSigmaPionOuterTOF())) || (std::abs(pos.nSigmaElectronInnerTOF()) < nSigmaEleCutInnerTOF && nSigmaPionCutInnerTOF < std::abs(pos.nSigmaPionInnerTOF()))) {
if ((std::abs(ele.nSigmaElectronRich()) < nSigmaElectronRich && nSigmaPionRich < std::abs(ele.nSigmaPionRich())) || (std::abs(ele.nSigmaElectronOuterTOF()) < nSigmaEleCutOuterTOF && nSigmaPionCutOuterTOF < std::abs(ele.nSigmaPionOuterTOF())) || (std::abs(ele.nSigmaElectronInnerTOF()) < nSigmaEleCutInnerTOF && nSigmaPionCutInnerTOF < std::abs(ele.nSigmaPionInnerTOF()))) {

ROOT::Math::PtEtaPhiMVector v1(pos.pt(), pos.eta(), pos.phi(), o2::constants::physics::MassElectron);
ROOT::Math::PtEtaPhiMVector v2(ele.pt(), ele.eta(), ele.phi(), o2::constants::physics::MassElectron);
ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
float angle = RecoDecay::constrainAngle(ROOT::Math::VectorUtil::Angle(v1, v2), -M_PI);
// o2::math_utils::bringToPMPi(angle);

registry.fill(HIST("Reconstructed/Pair/ULS/Mass_Pt"), v12.M(), v12.Pt());

if (v12.M() < maxMass && std::abs(angle) < maxOp) {
map_pfb[pos.globalIndex()] = 1;
map_pfb[ele.globalIndex()] = 1;
registry.fill(HIST("ReconstructedFiltered/Pair/ULS/Mass_Pt"), v12.M(), v12.Pt());
}
}
}
}
} // combination
}
Expand Down
Loading