Skip to content

Commit

Permalink
[PWGDQ] X(3872) Analysis: Cuts, Histograms, Tables and Variables (Ali…
Browse files Browse the repository at this point in the history
…ceO2Group#6837)

* Update CutsLibrary.cxx

Correct the 'KineCutOnly' by removing the line of code that does nothing. Then, create a new version called 'KineCutOnly2' that includes a condition for low momentum.

* Update CutsLibrary.cxx

New PIDStandardKine (>0.5 GeV). It will be used to create an updated Jpsi2ee tree.

* Please consider the following formatting changes

* Update CutsLibrary.cxx

New cuts for tree creation

* Please consider the following formatting changes

* Update tableReader.cxx

Correct some typos and add the X table

* Update HistogramsLibrary.cxx

Add some new histograms (momentum, DCA, Mass, Angular Distance...) to the X(3872) analysis. 'Default Mass' means the mass of the dilepton candidate was replaced with the nominal mass of the J/psi.

* Update VarManager.cxx

Add Q and Delta R variables. These variables are used to study the X(3872) particle

* Update VarManager.h

Add some variables for the X(3872) analysis, such as Q, Delta R, DCA and Invariant Mass.

* Update tableReader.cxx

Add the X(3872) table

* Please consider the following formatting changes

* Update VarManager.h

Correct a typo

* Update tableReader.cxx

Fix a typo

* Update VarManager.h

Correct the Q variable. Replace the J/psi candidate mass with the PDG one.

---------

Co-authored-by: ALICE Action Bot <[email protected]>
  • Loading branch information
labranch94 and alibuild authored Jul 17, 2024
1 parent 4099de3 commit 2b21412
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 17 deletions.
33 changes: 29 additions & 4 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1260,11 +1260,36 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
if (!groupStr.CompareTo("dilepton-dihadron")) {
if (subGroupStr.EqualTo("xtojpsipipi")) {
hm->AddHistogram(histClass, "hMass_X3872", "", false, 1000, 3.0, 5.0, VarManager::kQuadMass);
hm->AddHistogram(histClass, "hPt_X3872", "", false, 200, 0.0, 20.0, VarManager::kQuadPt);
hm->AddHistogram(histClass, "hMass_Pt_X3872", "", false, 1000, 3.0, 5.0, VarManager::kQuadMass, 150, 0.0, 15.0, VarManager::kQuadPt);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_X3872", "", false, 1000, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass);
hm->AddHistogram(histClass, "hPt_X3872", "", false, 150, 0.0, 15.0, VarManager::kQuadPt);
hm->AddHistogram(histClass, "hMass_Pt_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 150, 0.0, 15.0, VarManager::kQuadPt);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_Pt_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 150, 0.0, 15.0, VarManager::kQuadPt);
hm->AddHistogram(histClass, "hCostheta_Jpsi_Dihadron", "", false, 100, -1.0, 1.0, VarManager::kCosthetaDileptonDitrack);
hm->AddHistogram(histClass, "hPtDilepton_PtDihadron", "", false, 200, 0, 20, VarManager::kPairPt, 100, 0, 10, VarManager::kDitrackPt);
hm->AddHistogram(histClass, "hPtDilepton_MassDihadron", "", false, 200, 0, 20, VarManager::kPairPt, 100, 3.0, 5.0, VarManager::kDitrackMass);
hm->AddHistogram(histClass, "hPtDilepton_PtDihadron", "", false, 150, 0, 15.0, VarManager::kPairPt, 100, 0, 10, VarManager::kDitrackPt);
hm->AddHistogram(histClass, "hPtDilepton_MassDihadron", "", false, 150, 0, 15.0, VarManager::kPairPt, 150, 0.0, 3.0, VarManager::kDitrackMass);
hm->AddHistogram(histClass, "hQ_X3872", "", false, 150, 0.0, 3.0, VarManager::kQ);
hm->AddHistogram(histClass, "hDeltaR1_X3872", "", false, 100, 0.0, 10.0, VarManager::kDeltaR1);
hm->AddHistogram(histClass, "hDeltaR2_X3872", "", false, 100, 0.0, 10.0, VarManager::kDeltaR2);
hm->AddHistogram(histClass, "hMass_Q_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 150, 0.0, 3.0, VarManager::kQ);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_Q_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 150, 0.0, 3.0, VarManager::kQ);
hm->AddHistogram(histClass, "hMass_DeltaR1_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 100, 0.0, 10.0, VarManager::kDeltaR1);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_DeltaR1_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 100, 0.0, 10.0, VarManager::kDeltaR1);
hm->AddHistogram(histClass, "hMass_DeltaR2_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 100, 0.0, 10.0, VarManager::kDeltaR2);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_DeltaR2_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 100, 0.0, 10.0, VarManager::kDeltaR2);
hm->AddHistogram(histClass, "hMass_X3872_MassDihadron", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 150, 0.0, 3.0, VarManager::kDitrackMass);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_X3872_MassDihadron", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 150, 0.0, 3.0, VarManager::kDitrackMass);
hm->AddHistogram(histClass, "hRap_X3872", "", false, 1000, 0.0, 5.0, VarManager::kRap);
hm->AddHistogram(histClass, "hMass_Rap_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 1000, 0.0, 5.0, VarManager::kRap);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_Rap_X3872", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 1000, 0.0, 5.0, VarManager::kRap);
hm->AddHistogram(histClass, "hDCAxyTrack1", "", false, 100, -0.1, 0.1, VarManager::kTrackDCAxy);
hm->AddHistogram(histClass, "hDCAzTrack1", "", false, 100, -0.1, 0.1, VarManager::kTrackDCAz);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_DCAxyTrack1", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 100, -0.1, 0.1, VarManager::kTrackDCAxy);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_DCAzTrack1", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 100, -0.1, 0.1, VarManager::kTrackDCAz);
hm->AddHistogram(histClass, "hMass_DCAxyTrack1", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 100, -0.1, 0.1, VarManager::kTrackDCAxy);
hm->AddHistogram(histClass, "hMass_DCAzTrack1", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 100, -0.1, 0.1, VarManager::kTrackDCAz);
hm->AddHistogram(histClass, "hPtTrack1", "", false, 100, 0.0, 10.0, VarManager::kPt);
hm->AddHistogram(histClass, "hMass_defaultDileptonMass_PtTrack1", "", false, 100, 3.0, 5.0, VarManager::kQuadDefaultDileptonMass, 100, 0.0, 10.0, VarManager::kPt);
hm->AddHistogram(histClass, "hMass_PtTrack1", "", false, 100, 3.0, 5.0, VarManager::kQuadMass, 100, 0.0, 10.0, VarManager::kPt);
}
}
if (!groupStr.CompareTo("dilepton-photon-mass")) {
Expand Down
6 changes: 6 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -889,4 +889,10 @@ void VarManager::SetDefaultVarNames()
fgVariableUnits[kDitrackMass] = "GeV/c2";
fgVariableNames[kDitrackPt] = "p_{T}";
fgVariableUnits[kDitrackPt] = "GeV/c";
fgVariableNames[kQ] = "mass difference";
fgVariableUnits[kQ] = "GeV/c2";
fgVariableNames[kDeltaR1] = "angular distance prong 1";
fgVariableUnits[kDeltaR1] = "";
fgVariableNames[kDeltaR2] = "angular distance prong 2";
fgVariableUnits[kDeltaR2] = "";
}
23 changes: 18 additions & 5 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,12 +647,16 @@ class VarManager : public TObject

// Dilepton-track-track variables
kQuadMass,
kQuadDefaultDileptonMass,
kQuadPt,
kQuadEta,
kQuadPhi,
kCosthetaDileptonDitrack,
kDitrackMass,
kDitrackPt,
kQ,
kDeltaR1,
kDeltaR2,

// DQ-HF correlation variables
kMassCharmHadron,
Expand Down Expand Up @@ -4029,16 +4033,16 @@ void VarManager::FillDileptonTrackTrack(T1 const& dilepton, T2 const& hadron1, T
values = fgValues;
}

double DefaultdileptonMass = 3.096;
double defaultDileptonMass = 3.096;
double hadronMass1 = o2::constants::physics::MassPionCharged;
double hadronMass2 = o2::constants::physics::MassPionCharged;
if (candidateType == kXtoJpsiPiPi) {
DefaultdileptonMass = 3.096;
defaultDileptonMass = 3.096;
hadronMass1 = o2::constants::physics::MassPionCharged;
hadronMass2 = o2::constants::physics::MassPionCharged;
}
if (candidateType == kChictoJpsiEE) {
DefaultdileptonMass = 3.096;
defaultDileptonMass = 3.096;
hadronMass1 = o2::constants::physics::MassElectron;
hadronMass2 = o2::constants::physics::MassElectron;
}
Expand All @@ -4047,18 +4051,27 @@ void VarManager::FillDileptonTrackTrack(T1 const& dilepton, T2 const& hadron1, T
ROOT::Math::PtEtaPhiMVector v2(hadron1.pt(), hadron1.eta(), hadron1.phi(), hadronMass1);
ROOT::Math::PtEtaPhiMVector v3(hadron2.pt(), hadron2.eta(), hadron2.phi(), hadronMass2);
ROOT::Math::PtEtaPhiMVector v123 = v1 + v2 + v3;
values[kQuadMass] = v123.M() - v1.M() + DefaultdileptonMass;
values[kQuadMass] = v123.M();
values[kQuadDefaultDileptonMass] = v123.M() - v1.M() + defaultDileptonMass;
values[kQuadPt] = v123.Pt();
values[kQuadEta] = v123.Eta();
values[kQuadPhi] = v123.Phi();

if (fgUsedVars[kCosthetaDileptonDitrack] || fgUsedVars[kPairMass] || fgUsedVars[kPairPt] || fgUsedVars[kDitrackPt] || fgUsedVars[kDitrackMass]) {
values[kTrackDCAxy] = hadron1.dcaXY();
values[kTrackDCAz] = hadron1.dcaZ();
values[kPt] = hadron1.pt();

if (fgUsedVars[kCosthetaDileptonDitrack] || fgUsedVars[kPairMass] || fgUsedVars[kPairPt] || fgUsedVars[kDitrackPt] || fgUsedVars[kDitrackMass] || fgUsedVars[kQ] || fgUsedVars[kDeltaR1] || fgUsedVars[kDeltaR2] || fgUsedVars[kRap]) {
ROOT::Math::PtEtaPhiMVector v23 = v2 + v3;
values[kPairMass] = v1.M();
values[kPairPt] = v1.Pt();
values[kDitrackMass] = v23.M();
values[kDitrackPt] = v23.Pt();
values[kCosthetaDileptonDitrack] = (v1.Px() * v123.Px() + v1.Py() * v123.Py() + v1.Pz() * v123.Pz()) / (v1.P() * v123.P());
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[kRap] = v123.Rapidity();
}
}

Expand Down
37 changes: 29 additions & 8 deletions PWGDQ/Tasks/tableReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ DECLARE_SOA_COLUMN(TauxyBcandidate, tauxyBcandidate, float);
DECLARE_SOA_COLUMN(TauzBcandidate, tauzBcandidate, float);
DECLARE_SOA_COLUMN(CosPBcandidate, cosPBcandidate, float);
DECLARE_SOA_COLUMN(Chi2Bcandidate, chi2Bcandidate, float);

// Xcandidate columns
DECLARE_SOA_COLUMN(massXcandidate, MXcandidate, float);
DECLARE_SOA_COLUMN(pTXcandidate, PtXcandidate, float);
DECLARE_SOA_COLUMN(rapidityXcandidate, YXcandidate, float);
DECLARE_SOA_COLUMN(etaXcandidate, EtaXcandidate, float);
DECLARE_SOA_COLUMN(massJpsicandidate, MJpsicandidate, float);
DECLARE_SOA_COLUMN(massDipioncandidate, MDipioncandidate, float);
DECLARE_SOA_COLUMN(pTJpsicandidate, PtJpsicandidate, float);
DECLARE_SOA_COLUMN(massDiff, Q, float);
DECLARE_SOA_COLUMN(angDistPion1, DeltaR1, float);
DECLARE_SOA_COLUMN(angDistPion2, DeltaR2, float);
DECLARE_SOA_COLUMN(cosDileptonDipion, CosDileptonDipion, float);
DECLARE_SOA_COLUMN(dcaxy, DcaXY, float);
DECLARE_SOA_COLUMN(dcaz, DcaZ, float);

} // namespace dqanalysisflags

DECLARE_SOA_TABLE(EventCuts, "AOD", "DQANAEVCUTS", dqanalysisflags::IsEventSelected);
Expand All @@ -84,6 +100,7 @@ DECLARE_SOA_TABLE(BarrelTrackCuts, "AOD", "DQANATRKCUTS", dqanalysisflags::IsBar
DECLARE_SOA_TABLE(MuonTrackCuts, "AOD", "DQANAMUONCUTS", dqanalysisflags::IsMuonSelected);
DECLARE_SOA_TABLE(Prefilter, "AOD", "DQPREFILTER", dqanalysisflags::IsPrefilterVetoed);
DECLARE_SOA_TABLE(BmesonCandidates, "AOD", "DQBMESONS", dqanalysisflags::massBcandidate, dqanalysisflags::pTBcandidate, dqanalysisflags::LxyBcandidate, dqanalysisflags::LxyzBcandidate, dqanalysisflags::LzBcandidate, dqanalysisflags::TauxyBcandidate, dqanalysisflags::TauzBcandidate, dqanalysisflags::CosPBcandidate, dqanalysisflags::Chi2Bcandidate);
DECLARE_SOA_TABLE(XCandidates, "AOD", "DQX3872", dqanalysisflags::massXcandidate, dqanalysisflags::pTXcandidate, dqanalysisflags::rapidityXcandidate, dqanalysisflags::etaXcandidate, dqanalysisflags::massJpsicandidate, dqanalysisflags::massDipioncandidate, dqanalysisflags::pTJpsicandidate, dqanalysisflags::massDiff, dqanalysisflags::angDistPion1, dqanalysisflags::angDistPion2, dqanalysisflags::cosDileptonDipion, dqanalysisflags::dcaxy, dqanalysisflags::dcaz);
} // namespace o2::aod

// Declarations of various short names
Expand Down Expand Up @@ -1783,13 +1800,15 @@ struct AnalysisDileptonHadron {
struct AnalysisDileptonTrackTrack {
OutputObj<THashList> fOutputList{"output"};

Configurable<std::string> fConfigTrackCuts{"cfgTrackCuts", "jpsiO2MCdebugCuts2", "Comma separated list of barrel track cuts"}; // used for select the tracks from SelectedTracks
Configurable<std::string> fConfigDileptonCut{"cfgDiLeptonCut", "pairJpsi", "Dilepton cut"};
Configurable<std::string> fConfigDitrackCut{"cfgDiTrackCut", "pairNoCut", "Track-Track cut"};
Configurable<std::string> fConfigQuadrupletCut{"cfgQuadrupletCut", "pairNoCut", "Dilepton-Track-Track cut"};
Configurable<std::string> fConfigAddDileptonHistogram{"cfgAddDileptonHistogram", "berral", "Comma separated list of histograms"};
Configurable<std::string> fConfigAddDitrackHistogram{"cfgAddDitrackHistogram", "berral", "Comma separated list of histograms"};
Configurable<std::string> fConfigAddQuadrupletHistogram{"cfgAddQuadrupletHistogram", "XtoJpsipipi", "Comma separated list of histograms"};
Configurable<std::string> fConfigTrackCuts{"cfgTrackCuts", "pionPIDCut1", "Comma separated list of barrel track cuts"}; // used for select the tracks from SelectedTracks
Configurable<std::string> fConfigDileptonCut{"cfgDiLeptonCut", "pairJpsi2", "Dilepton cut"};
Configurable<std::string> fConfigDitrackCut{"cfgDiTrackCut", "DipionPairCut1", "Track-Track cut"};
Configurable<std::string> fConfigQuadrupletCut{"cfgQuadrupletCut", "pairX3872Cut1", "Dilepton-Track-Track cut"};
Configurable<std::string> fConfigAddDileptonHistogram{"cfgAddDileptonHistogram", "barrel", "Comma separated list of histograms"};
Configurable<std::string> fConfigAddDitrackHistogram{"cfgAddDitrackHistogram", "barrel", "Comma separated list of histograms"};
Configurable<std::string> fConfigAddQuadrupletHistogram{"cfgAddQuadrupletHistogram", "xtojpsipipi", "Comma separated list of histograms"};

Produces<aod::XCandidates> XTable;

Filter eventFilter = aod::dqanalysisflags::isEventSelected == 1;
Filter dileptonFilter = aod::reducedpair::mass > 1.0f && aod::reducedpair::mass < 4.0f;
Expand Down Expand Up @@ -1922,6 +1941,8 @@ struct AnalysisDileptonTrackTrack {
if (fIsUnlikeSignDilepton) {
if (fIsUnlikeSignDitrack) {
fHistMan->FillHistClass(Form("QuadrupletSEUSUS_%s_%s_%s", fDileptonCut.GetName(), fDitrackCut.GetName(), (*cutname).Data()), fValuesQuadruplet);
XTable(fValuesQuadruplet[VarManager::kQuadMass], fValuesQuadruplet[VarManager::kQuadPt], fValuesQuadruplet[VarManager::kRap], fValuesQuadruplet[VarManager::kQuadEta], fValuesQuadruplet[VarManager::kPairMass], fValuesQuadruplet[VarManager::kDitrackMass], fValuesQuadruplet[VarManager::kPairPt], fValuesQuadruplet[VarManager::kQ], fValuesQuadruplet[VarManager::kDeltaR1], fValuesQuadruplet[VarManager::kDeltaR2], fValuesQuadruplet[VarManager::kCosthetaDileptonDitrack], fValuesQuadruplet[VarManager::kTrackDCAxy], fValuesQuadruplet[VarManager::kTrackDCAz]);

} else {
fHistMan->FillHistClass(Form("QuadrupletSEUSLS_%s_%s_%s", fDileptonCut.GetName(), fDitrackCut.GetName(), (*cutname).Data()), fValuesQuadruplet);
}
Expand All @@ -1934,7 +1955,7 @@ struct AnalysisDileptonTrackTrack {
}
}
}
} // check if the diTrack cut is selected
} // check if the Ditrack cut is selected
} // loop over hadron cuts
}
}
Expand Down

0 comments on commit 2b21412

Please sign in to comment.