Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGDQ] Updates for X(3872) analysis #8898

Merged
merged 5 commits into from
Dec 11, 2024
Merged
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
25 changes: 16 additions & 9 deletions PWGDQ/Core/CutsLibrary.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 warning on line 1 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//

Check warning on line 11 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.
// Contact: iarsene@cern.ch, i.c.arsene@fys.uio.no
//
#include "PWGDQ/Core/CutsLibrary.h"
Expand All @@ -19,7 +19,7 @@
#include "AnalysisCompositeCut.h"
#include "VarManager.h"

AnalysisCompositeCut* o2::aod::dqcuts::GetCompositeCut(const char* cutName)

Check warning on line 22 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
//
// define composie cuts, typically combinations of all the ingredients needed for a full cut
Expand Down Expand Up @@ -302,7 +302,7 @@
cut->AddCut(GetAnalysisCut("electronStandardQualityForO2MCdebug"));
cut->AddCut(GetAnalysisCut("pidCut_lowP_Corr"));

AnalysisCompositeCut* pidCut_highP = new AnalysisCompositeCut("pidCut_highP", "pidCut_highP", kFALSE);

Check warning on line 305 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
pidCut_highP->AddCut(GetAnalysisCut("EleInclusion_highP_Corr"));
pidCut_highP->AddCut(GetAnalysisCut("PionExclusion_highP_Corr"));
cut->AddCut(pidCut_highP);
Expand Down Expand Up @@ -907,7 +907,7 @@
}

if (!nameStr.compare("Jpsi_TPCPost_calib_debug8")) {
cut->AddCut(GetAnalysisCut("jpsi_trackCut_debug3"));
cut->AddCut(GetAnalysisCut("jpsi_trackCut_debug5"));
cut->AddCut(GetAnalysisCut("jpsi_TPCPID_debug8"));
return cut;
}
Expand Down Expand Up @@ -2569,10 +2569,10 @@
cut->AddCut(GetAnalysisCut("trackQuality_compareDQEMframework"));
cut->AddCut(GetAnalysisCut("trackDCA1cm"));
AnalysisCompositeCut* cut_tpc_nSigma = new AnalysisCompositeCut("pid_TPCnSigma", "pid_TPCnSigma", kTRUE);
cut_tpc_nSigma->AddCut(GetAnalysisCut("lmee_commonDQEM_PID_TPC"));

Check warning on line 2572 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

AnalysisCompositeCut* cut_tof_nSigma = new AnalysisCompositeCut("pid_TOFnSigma", "pid_TOFnSigma", kTRUE);
cut_tof_nSigma->AddCut(GetAnalysisCut("lmee_commonDQEM_PID_TOF"));

Check warning on line 2575 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

AnalysisCompositeCut* cut_pid_OR = new AnalysisCompositeCut("e_NSigma", "e_NSigma", kFALSE);
cut_pid_OR->AddCut(cut_tpc_nSigma);
Expand Down Expand Up @@ -3897,6 +3897,14 @@
return cut;
}

if (!nameStr.compare("jpsi_trackCut_debug5")) {
cut->AddCut(VarManager::kEta, -0.9, 0.9);
cut->AddCut(VarManager::kTPCchi2, 0.0, 4.0);
cut->AddCut(VarManager::kTPCncls, 70., 159);
cut->AddCut(VarManager::kIsITSibAny, 0.5, 1.5);
return cut;
}

if (!nameStr.compare("lmee_trackCut_debug")) {
cut->AddCut(VarManager::kEta, -0.9, 0.9);
cut->AddCut(VarManager::kTPCchi2, 0.0, 4.0);
Expand Down Expand Up @@ -4155,9 +4163,7 @@
if (!nameStr.compare("pionQualityCut1")) {
cut->AddCut(VarManager::kPt, 0.15, 1000.0);
cut->AddCut(VarManager::kIsITSibAny, 0.5, 1.5);
cut->AddCut(VarManager::kTPCncls, 100, 161);
cut->AddCut(VarManager::kTrackDCAxy, -0.05, 0.05);
cut->AddCut(VarManager::kTrackDCAz, -0.1, 0.1);
cut->AddCut(VarManager::kTPCncls, 70, 161);
return cut;
}

Expand Down Expand Up @@ -4431,10 +4437,11 @@
}

if (!nameStr.compare("jpsi_TPCPID_debug8")) {
cut->AddCut(VarManager::kTOFbeta, 0.975, 1.025, false, VarManager::kPin, 0.0, 3.0);
cut->AddCut(VarManager::kTPCnSigmaEl, -3.0, 4.0);
cut->AddCut(VarManager::kTPCnSigmaPi, 2.0, 999, false, VarManager::kPin, 3.0, 999.0);
cut->AddCut(VarManager::kTPCnSigmaPr, 2.0, 999, false, VarManager::kPin, 3.0, 999.0);
cut->AddCut(VarManager::kTPCnSigmaEl, -2.0, 3.0, false, VarManager::kPin, 0.0, 3.0);
cut->AddCut(VarManager::kTPCnSigmaEl, -3.0, 3.0, false, VarManager::kPin, 3.0, 999.0);
cut->AddCut(VarManager::kTPCnSigmaPi, 3.0, 999, false, VarManager::kPin, 0.0, 3.0);
cut->AddCut(VarManager::kTPCnSigmaPi, 2.0, 999, false, VarManager::kPin, 5.0, 999.0);
cut->AddCut(VarManager::kTPCnSigmaPr, 3.0, 999, false, VarManager::kPin, 3.0, 999.0);
return cut;
}

Expand Down Expand Up @@ -4546,7 +4553,7 @@
return cut;
}

if (!nameStr.compare("lmee_commonDQEM_PID_TPC")) { // cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ

Check warning on line 4556 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
cut->AddCut(VarManager::kTPCnSigmaEl, -2.5, 3., false, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTPCnSigmaPi, -1e12, 3.5, true, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTPCnSigmaKa, -3., 3., true, VarManager::kPin, 0.0, 1e+10, false);
Expand All @@ -4554,7 +4561,7 @@
return cut;
}

if (!nameStr.compare("lmee_commonDQEM_PID_TOF")) { // cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ

Check warning on line 4564 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
cut->AddCut(VarManager::kTPCnSigmaEl, -2.5, 3., false, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTPCnSigmaPi, -3., 3.5, true, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTOFnSigmaEl, -3., 3., false, VarManager::kPin, 0.3, 1e+10, false);
Expand Down Expand Up @@ -5864,7 +5871,7 @@
}

if (!nameStr.compare("pairX3872")) {
cut->AddCut(VarManager::kCosthetaDileptonDitrack, 0.98, 1);
cut->AddCut(VarManager::kQ, 0.0, 0.3);
return cut;
}

Expand Down
11 changes: 11 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,17 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
hm->AddHistogram(histClass, "Eta_Pt", "", false, 40, -2.0, 2.0, VarManager::kEta, 200, 0.0, 20.0, VarManager::kPt);
hm->AddHistogram(histClass, "Phi_Eta", "#phi vs #eta distribution", false, 200, -5.0, 5.0, VarManager::kEta, 200, -2. * o2::constants::math::PI, 2. * o2::constants::math::PI, VarManager::kPhi);
}
if (!groupStr.CompareTo("mctruth_quad")) {
hm->AddHistogram(histClass, "hMass_defaultDileptonMass", "", false, 1000, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass);
hm->AddHistogram(histClass, "hPt", "", false, 150, 0.0, 15.0, VarManager::kQuadPt);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_Pt", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 150, 0.0, 15.0, VarManager::kQuadPt);
hm->AddHistogram(histClass, "hQ", "", false, 150, 0.0, 3.0, VarManager::kQ);
hm->AddHistogram(histClass, "hDeltaR1", "", false, 100, 0.0, 10.0, VarManager::kDeltaR1);
hm->AddHistogram(histClass, "hDeltaR2", "", false, 100, 0.0, 10.0, VarManager::kDeltaR2);
hm->AddHistogram(histClass, "hDiTrackMass", "", false, 300, 0.0, 3.0, VarManager::kDitrackMass);
hm->AddHistogram(histClass, "hMCPt_MCRap", "", false, 200, 0.0, 20.0, VarManager::kMCPt, 100, -2.0, 2.0, VarManager::kMCY);
hm->AddHistogram(histClass, "hMCPhi", "", false, 100, -TMath::Pi(), TMath::Pi(), VarManager::kMCPhi);
}
if (!groupStr.CompareTo("mctruth_track")) {
hm->AddHistogram(histClass, "PtMC", "MC pT", false, 200, 0.0, 20.0, VarManager::kMCPt);
hm->AddHistogram(histClass, "EtaMC", "MC #eta", false, 50, -5.0, 5.0, VarManager::kMCEta);
Expand Down
78 changes: 78 additions & 0 deletions PWGDQ/Core/MCSignalLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1325,5 +1325,83 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
signal = new MCSignal(name, "Photon and electron pair from Pi0", {pronge, pronge, prongPhoton}, {1, 1, 1});
return signal;
}

//--------------------------------------------------------------------------------

if (!nameStr.compare("JpsiFromX3872")) {
MCProng prong(1, {443}, {true}, {false}, {0}, {0}, {false}, false, {9920443}, {false});
signal = new MCSignal(name, "Jpsi from X3872", {prong}, {-1});
return signal;
}

if (!nameStr.compare("eFromX3872")) {
MCProng prong(3, {11, 443, 9920443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
signal = new MCSignal(name, "Electron from Jpsi from X3872", {prong}, {1});
return signal;
}

if (!nameStr.compare("PionFromX3872")) {
MCProng prong(1, {211}, {true}, {false}, {0}, {0}, {false}, false, {9920443}, {false});
signal = new MCSignal(name, "Pion from Jpsi from X3872", {prong}, {-1});
return signal;
}

if (!nameStr.compare("JpsiFromPsi2S")) {
MCProng prong(1, {443}, {true}, {false}, {0}, {0}, {false}, false, {100443}, {false});
signal = new MCSignal(name, "Jpsi from Psi2S", {prong}, {-1});
return signal;
}

if (!nameStr.compare("eFromPsi2S")) {
MCProng prong(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
signal = new MCSignal(name, "Electron from Jpsi from Psi2S", {prong}, {1});
return signal;
}

if (!nameStr.compare("PionFromPsi2S")) {
MCProng prong(1, {211}, {true}, {false}, {0}, {0}, {false}, false, {100443}, {false});
signal = new MCSignal(name, "Pion from Jpsi from Psi2S", {prong}, {-1});
return signal;
}

if (!nameStr.compare("eeFromJpsiFromX3872")) {
MCProng prong(2, {11, 443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {9920443}, {false});
signal = new MCSignal(name, "Electron pair from Jpsi from X3872", {prong, prong}, {1, 1});
return signal;
}

if (!nameStr.compare("JpsiPiPiFromX3872")) {
MCProng prongJpsi(2, {443, 9920443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
MCProng prongPi(2, {211, 9920443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
signal = new MCSignal(name, "Jpsi and pion pair from X3872", {prongJpsi, prongPi, prongPi}, {1, 1, 1});
return signal;
}

if (!nameStr.compare("eePiPiFromX3872")) {
MCProng pronge(3, {11, 443, 9920443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
MCProng prongPi(2, {211, 9920443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
signal = new MCSignal(name, "Electron pair and pion pair from X3872", {pronge, pronge, prongPi, prongPi}, {2, 2, 1, 1});
return signal;
}

if (!nameStr.compare("eeFromJpsiFromPsi2S")) {
MCProng prong(2, {11, 443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {100443}, {false});
signal = new MCSignal(name, "Electron pair from Jpsi from Psi2S", {prong, prong}, {1, 1});
return signal;
}

if (!nameStr.compare("JpsiPiPiFromPsi2S")) {
MCProng prongJpsi(2, {443, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
signal = new MCSignal(name, "Jpsi and pion pair from Psi2S", {prongJpsi, prongPi, prongPi}, {1, 1, 1});
return signal;
}

if (!nameStr.compare("eePiPiFromPsi2S")) {
MCProng pronge(3, {11, 443, 100443}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
MCProng prongPi(2, {211, 100443}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
signal = new MCSignal(name, "Electron pair and pion pair from Psi2S", {pronge, pronge, prongPi, prongPi}, {2, 2, 1, 1});
return signal;
}
return nullptr;
}
36 changes: 36 additions & 0 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,8 @@ class VarManager : public TObject
static void FillPairMC(T1 const& t1, T2 const& t2, float* values = nullptr, PairCandidateType pairType = kDecayToEE);
template <typename T1, typename T2, typename T3>
static void FillTripleMC(T1 const& t1, T2 const& t2, T3 const& t3, float* values = nullptr, PairCandidateType pairType = kTripleCandidateToEEPhoton);
template <int candidateType, typename T1, typename T2>
static void FillQaudMC(T1 const& t1, T2 const& t2, T2 const& t3, float* values = nullptr);
template <int pairType, uint32_t collFillMap, uint32_t fillMap, typename C, typename T>
static void FillPairVertexing(C const& collision, T const& t1, T const& t2, bool propToSV = false, float* values = nullptr);
template <uint32_t collFillMap, uint32_t fillMap, typename C, typename T>
Expand Down Expand Up @@ -4556,6 +4558,40 @@ void VarManager::FillDileptonTrackTrack(T1 const& dilepton, T2 const& hadron1, T
}
}

//__________________________________________________________________
template <int candidateType, typename T1, typename T2>
void VarManager::FillQaudMC(T1 const& dilepton, T2 const& track1, T2 const& track2, float* values)
{
if (!values) {
values = fgValues;
}

double defaultDileptonMass = 3.096;
double hadronMass1 = o2::constants::physics::MassPionCharged;
double hadronMass2 = o2::constants::physics::MassPionCharged;
if (candidateType == kXtoJpsiPiPi) {
defaultDileptonMass = 3.096;
hadronMass1 = o2::constants::physics::MassPionCharged;
hadronMass2 = o2::constants::physics::MassPionCharged;
}

ROOT::Math::PtEtaPhiMVector v1(dilepton.pt(), dilepton.eta(), dilepton.phi(), defaultDileptonMass);
ROOT::Math::PtEtaPhiMVector v2(track1.pt(), track1.eta(), track1.phi(), hadronMass1);
ROOT::Math::PtEtaPhiMVector v3(track2.pt(), track2.eta(), track2.phi(), hadronMass2);
ROOT::Math::PtEtaPhiMVector v123 = v1 + v2 + v3;
ROOT::Math::PtEtaPhiMVector v23 = v2 + v3;
values[kQuadMass] = v123.M();
values[kQuadDefaultDileptonMass] = v123.M();
values[kQuadPt] = v123.Pt();
values[kQuadEta] = v123.Eta();
values[kQuadPhi] = v123.Phi();
values[kQ] = v123.M() - defaultDileptonMass - v23.M();
values[kDeltaR1] = sqrt(pow(v1.Eta() - v2.Eta(), 2) + pow(v1.Phi() - v2.Phi(), 2));
values[kDeltaR2] = sqrt(pow(v1.Eta() - v3.Eta(), 2) + pow(v1.Phi() - v3.Phi(), 2));
values[kDitrackMass] = v23.M();
values[kDitrackPt] = v23.Pt();
}

//__________________________________________________________________
template <int pairType, typename T1, typename T2>
float VarManager::calculatePhiV(T1 const& t1, T2 const& t2)
Expand Down
56 changes: 56 additions & 0 deletions PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,62 @@ DECLARE_SOA_TABLE(DileptonTrackCandidates, "AOD", "RTDILEPTONTRACK", //!

using DileptonTrackCandidate = DileptonTrackCandidates::iterator;

// candidate information
namespace dileptonTrackTrackCandidate
{
// infotmation about the dilepton-track-track
DECLARE_SOA_COLUMN(Mass, mass, float); //!
DECLARE_SOA_COLUMN(Pt, pt, float); //!
DECLARE_SOA_COLUMN(Eta, eta, float); //!
DECLARE_SOA_COLUMN(Phi, phi, float); //!
DECLARE_SOA_COLUMN(Rap, rap, float); //!
DECLARE_SOA_COLUMN(DeltaQ, deltaQ, float); //!
DECLARE_SOA_COLUMN(R1, r1, float); //! distance between the dilepton and the track1 in theta-phi plane
DECLARE_SOA_COLUMN(R2, r2, float); //! distance between the dilepton and the track2 in theta-phi plane
DECLARE_SOA_COLUMN(DileptonMass, dileptonMass, float); //!
DECLARE_SOA_COLUMN(DileptonPt, dileptonPt, float); //!
DECLARE_SOA_COLUMN(DileptonEta, dileptonEta, float); //!
DECLARE_SOA_COLUMN(DileptonPhi, dileptonPhi, float); //!
DECLARE_SOA_COLUMN(DileptonSign, dileptonSign, int); //!
DECLARE_SOA_COLUMN(DiTracksMass, diTracksMass, float); //!
DECLARE_SOA_COLUMN(DiTracksPt, diTracksPt, float); //!
DECLARE_SOA_COLUMN(TrackPt1, trackPt1, float); //!
DECLARE_SOA_COLUMN(TrackPt2, trackPt2, float); //!
DECLARE_SOA_COLUMN(TrackEta1, trackEta1, float); //!
DECLARE_SOA_COLUMN(TrackEta2, trackEta2, float); //!
DECLARE_SOA_COLUMN(TrackPhi1, trackPhi1, float); //!
DECLARE_SOA_COLUMN(TrackPhi2, trackPhi2, float); //!
DECLARE_SOA_COLUMN(TrackSign1, trackSign1, int); //!
DECLARE_SOA_COLUMN(TrackSign2, trackSign2, int); //!
} // namespace dileptonTrackTrackCandidate

DECLARE_SOA_TABLE(DileptonTrackTrackCandidates, "AOD", "RTDQUADPLET", //!
dileptonTrackTrackCandidate::Mass,
dileptonTrackTrackCandidate::Pt,
dileptonTrackTrackCandidate::Eta,
dileptonTrackTrackCandidate::Phi,
dileptonTrackTrackCandidate::Rap,
dileptonTrackTrackCandidate::DeltaQ,
dileptonTrackTrackCandidate::R1,
dileptonTrackTrackCandidate::R2,
dileptonTrackTrackCandidate::DileptonMass,
dileptonTrackTrackCandidate::DileptonPt,
dileptonTrackTrackCandidate::DileptonEta,
dileptonTrackTrackCandidate::DileptonPhi,
dileptonTrackTrackCandidate::DileptonSign,
dileptonTrackTrackCandidate::DiTracksMass,
dileptonTrackTrackCandidate::DiTracksPt,
dileptonTrackTrackCandidate::TrackPt1,
dileptonTrackTrackCandidate::TrackPt2,
dileptonTrackTrackCandidate::TrackEta1,
dileptonTrackTrackCandidate::TrackEta2,
dileptonTrackTrackCandidate::TrackPhi1,
dileptonTrackTrackCandidate::TrackPhi2,
dileptonTrackTrackCandidate::TrackSign1,
dileptonTrackTrackCandidate::TrackSign2);

using DileptonTrackTrackCandidate = DileptonTrackTrackCandidates::iterator;

namespace v0bits
{
DECLARE_SOA_COLUMN(PIDBit, pidbit, uint8_t); //!
Expand Down
Loading
Loading