Skip to content

Commit 7c7177f

Browse files
committed
Add helicity angle analysis
1 parent 1852107 commit 7c7177f

2 files changed

Lines changed: 23 additions & 10 deletions

File tree

PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ class FemtoUniverseMath
6464
return 0.5 * trackRelK.P();
6565
}
6666

67+
/// Boost particles from LAB Frame to Pair Rest Frame (for lambda daughters)
6768
/// \tparam T type of tracks
6869
/// \param part1 Particle 1
6970
/// \param mass1 Mass of particle 1
7071
/// \param part2 Particle 2
7172
/// \param mass2 Mass of particle 2
7273
template <typename T>
73-
static float getthetastar(const T& part1, const float mass1, const T& part2, const float mass2)
74+
static ROOT::Math::PxPyPzMVector boostPRF(const T& part1, const float mass1, const T& part2, const float mass2)
7475
{
7576
const ROOT::Math::PtEtaPhiMVector vecpart1(part1.pt(), part1.eta(), part1.phi(), mass1);
7677
const ROOT::Math::PtEtaPhiMVector vecpart2(part2.pt(), part2.eta(), part2.phi(), mass2);
@@ -88,10 +89,7 @@ class FemtoUniverseMath
8889
partOneCMS = boostPRF(partOneCMS);
8990
partTwoCMS = boostPRF(partTwoCMS);
9091

91-
const ROOT::Math::PtEtaPhiMVector partOneCMSGeo(partOneCMS);
92-
const ROOT::Math::PtEtaPhiMVector partTwoCMSGeo(partTwoCMS);
93-
94-
return (partOneCMSGeo.Theta() - partTwoCMSGeo.Theta());
92+
return partOneCMS;
9593
}
9694

9795
/// Compute the qij of a pair of particles

PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
#include "Framework/ASoAHelpers.h"
2525
#include "Framework/RunningWorkflowInfo.h"
2626
#include "Framework/StepTHn.h"
27+
#include "Framework/O2DatabasePDGPlugin.h"
2728
#include "DataFormatsParameters/GRPObject.h"
2829

2930
#include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h"
3031
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h"
3132
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h"
3233
#include "PWGCF/FemtoUniverse/Core/femtoUtils.h"
34+
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h"
3335

3436
using namespace o2;
3537
using namespace o2::analysis::femto_universe;
@@ -38,6 +40,9 @@ using namespace o2::framework::expressions;
3840
using namespace o2::soa;
3941

4042
struct femtoUniverseDebugV0 {
43+
44+
Service<o2::framework::O2DatabasePDG> pdg;
45+
4146
SliceCache cache;
4247

4348
Configurable<int> ConfPDGCodeV0{"ConfPDGCodePartOne", 3122, "V0 - PDG code"};
@@ -71,21 +76,24 @@ struct femtoUniverseDebugV0 {
7176
/// Histogram output
7277
HistogramRegistry EventRegistry{"Event", {}, OutputObjHandlingPolicy::AnalysisObject};
7378
HistogramRegistry V0Registry{"FullV0QA", {}, OutputObjHandlingPolicy::AnalysisObject};
79+
HistogramRegistry thetaRegistry{"ThetaQA", {}, OutputObjHandlingPolicy::AnalysisObject};
7480

7581
void init(InitContext&)
7682
{
7783
eventHisto.init(&EventRegistry);
7884
posChildHistos.init(&V0Registry, ConfChildTempFitVarpTBins, ConfChildTempFitVarBins, false, ConfPDGCodeChildPos.value, true);
7985
negChildHistos.init(&V0Registry, ConfChildTempFitVarpTBins, ConfChildTempFitVarBins, false, ConfPDGCodeChildNeg, true);
8086
V0Histos.init(&V0Registry, ConfV0TempFitVarpTBins, ConfV0TempFitVarBins, false, ConfPDGCodeV0.value, true);
87+
88+
thetaRegistry.add("Theta/hTheta", " ; p (GeV/#it{c}); cos(#theta)", kTH2F, {{100, 0, 10}, {50, -5, 5}});
8189
}
8290

83-
/// Porduce QA plots for V0 selection in FemtoUniverse framework
91+
/// Produce QA plots for V0 selection in FemtoUniverse framework
8492
void process(o2::aod::FdCollision const& col, FemtoFullParticles const& parts)
8593
{
8694
auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache);
8795
eventHisto.fillQA(col);
88-
for (auto& part : groupPartsOne) {
96+
for (const auto& part : groupPartsOne) {
8997
if (!part.has_children()) {
9098
continue;
9199
}
@@ -95,14 +103,21 @@ struct femtoUniverseDebugV0 {
95103
LOG(warn) << "Indices of V0 children do not match";
96104
continue;
97105
}
98-
// check cuts on V0 children
99-
if ((posChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) && (posChild.cut() & ConfCutChildPos) == ConfCutChildPos) &&
100-
(negChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) && (negChild.cut() & ConfCutChildNeg) == ConfCutChildNeg) &&
106+
107+
// Check cuts on V0 children
108+
if (posChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) &&
109+
negChild.partType() == uint8_t(aod::femtouniverseparticle::ParticleType::kV0Child) &&
101110
isFullPIDSelected(posChild.pidCut(), posChild.p(), 999.f, ConfChildPosIndex.value, ConfChildnSpecies.value, ConfChildPIDnSigmaMax.value, ConfChildPosPidnSigmaMax.value, 1.f) &&
102111
isFullPIDSelected(negChild.pidCut(), negChild.p(), 999.f, ConfChildNegIndex.value, ConfChildnSpecies.value, ConfChildPIDnSigmaMax.value, ConfChildNegPidnSigmaMax.value, 1.f)) {
112+
auto protonMass = pdg->Mass(2212);
113+
auto pionMass = pdg->Mass(211);
114+
auto protonBoosted = FemtoUniverseMath::boostPRF<decltype(posChild)>(posChild, protonMass, negChild, pionMass);
115+
auto cosineTheta = (protonBoosted.Px() * part.px() + protonBoosted.Py() * part.py() + protonBoosted.Pz() * part.pz()) / (protonBoosted.P() * part.p());
116+
103117
V0Histos.fillQA<false, true>(part);
104118
posChildHistos.fillQA<false, true>(posChild);
105119
negChildHistos.fillQA<false, true>(negChild);
120+
thetaRegistry.fill(HIST("Theta/hTheta"), part.p(), cosineTheta);
106121
}
107122
}
108123
}

0 commit comments

Comments
 (0)