Skip to content

Commit

Permalink
Merge branch 'AliceO2Group:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
prchakra authored Feb 17, 2025
2 parents 573b534 + 987576d commit 6619342
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 16 deletions.
16 changes: 14 additions & 2 deletions PWGDQ/Core/CutsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ AnalysisCompositeCut* o2::aod::dqcuts::GetCompositeCut(const char* cutName)
cut->AddCut(GetAnalysisCut("electronPIDnsigmaMedium"));
return cut;
}

if (!nameStr.compare("electronSelection1_ionut_withTOFPID")) {
cut->AddCut(GetAnalysisCut("jpsiStandardKine"));
cut->AddCut(GetAnalysisCut("electronStandardQualityForO2MCdebug"));
cut->AddCut(GetAnalysisCut("dcaCut1_ionut"));
cut->AddCut(GetAnalysisCut("electronPIDnsigmaMedium_withLargeTOFPID"));
return cut;
}
if (!nameStr.compare("electronSelection1_idstoreh")) { // same as electronSelection1_ionut, but with kIsSPDAny -> kIsITSibAny
cut->AddCut(GetAnalysisCut("jpsiStandardKine"));
cut->AddCut(GetAnalysisCut("electronStandardQualityForO2MCdebug4"));
Expand Down Expand Up @@ -5406,7 +5412,13 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName)
cut->AddCut(VarManager::kTPCnSigmaPi, 2.7, 3000.0);
return cut;
}

if (!nameStr.compare("electronPIDnsigmaMedium_withLargeTOFPID")) {
cut->AddCut(VarManager::kTPCnSigmaEl, -3.0, 3.0);
cut->AddCut(VarManager::kTPCnSigmaPr, 2.7, 3000.0);
cut->AddCut(VarManager::kTPCnSigmaPi, 2.7, 3000.0);
cut->AddCut(VarManager::kTOFnSigmaEl, -5.0, 5.0);
return cut;
}
if (!nameStr.compare("electronPIDnsigmaSkewed")) {
cut->AddCut(VarManager::kTPCnSigmaEl, -2.0, 3.0);
cut->AddCut(VarManager::kTPCnSigmaPr, 3.5, 3000.0);
Expand Down
1 change: 1 addition & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
}
hm->AddHistogram(histClass, "Mass_PtFine", "", false, 75, massBins, VarManager::kMass, 69, ptBins, VarManager::kPt);
hm->AddHistogram(histClass, "Eta_Pt", "", false, 40, -2.0, 2.0, VarManager::kEta, 40, 0.0, 20.0, VarManager::kPt);
hm->AddHistogram(histClass, "Y_Pt", "", false, 40, -2.0, 2.0, VarManager::kRap, 40, 0.0, 20.0, VarManager::kPt);
hm->AddHistogram(histClass, "Mass_VtxZ", "", true, 30, -15.0, 15.0, VarManager::kVtxZ, 500, 0.0, 5.0, VarManager::kMass);
if (subGroupStr.Contains("pbpb")) {
hm->AddHistogram(histClass, "Mass_CentFT0C", "", false, 125, 0.0, 5.0, VarManager::kMass, 20, 0.0, 100.0, VarManager::kCentFT0C);
Expand Down
3 changes: 3 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,8 @@ void VarManager::SetDefaultVarNames()
fgVariableUnits[kVertexingTauzProjected] = "ns";
fgVariableNames[kVertexingTauxyProjected] = "Pair pseudo-proper Tauxy";
fgVariableUnits[kVertexingTauxyProjected] = "ns";
fgVariableNames[kVertexingTauxyProjectedPoleJPsiMass] = "Pair pseudo-proper Tauxy (with pole JPsi mass)";
fgVariableUnits[kVertexingTauxyProjectedPoleJPsiMass] = "ns";
fgVariableNames[kVertexingTauxyzProjected] = "Pair pseudo-proper Tauxyz";
fgVariableUnits[kVertexingTauxyzProjected] = "ns";
fgVariableNames[kCosPointingAngle] = "cos(#theta_{pointing})";
Expand Down Expand Up @@ -1521,6 +1523,7 @@ void VarManager::SetDefaultVarNames()
fgVarNamesMap["kVertexingLxyzProjected"] = kVertexingLxyzProjected;
fgVarNamesMap["kVertexingTauzProjected"] = kVertexingTauzProjected;
fgVarNamesMap["kVertexingTauxyProjected"] = kVertexingTauxyProjected;
fgVarNamesMap["kVertexingTauxyProjectedPoleJPsiMass"] = kVertexingTauxyProjectedPoleJPsiMass;
fgVarNamesMap["kVertexingTauxyProjectedNs"] = kVertexingTauxyProjectedNs;
fgVarNamesMap["kVertexingTauxyzProjected"] = kVertexingTauxyzProjected;
fgVarNamesMap["kVertexingTauz"] = kVertexingTauz;
Expand Down
3 changes: 3 additions & 0 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ class VarManager : public TObject
kVertexingLxyzProjected,
kVertexingTauzProjected,
kVertexingTauxyProjected,
kVertexingTauxyProjectedPoleJPsiMass,
kVertexingTauxyProjectedNs,
kVertexingTauxyzProjected,
kVertexingTauz,
Expand Down Expand Up @@ -3406,6 +3407,7 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
values[kVertexingLxyzProjected] = ((secondaryVertex[0] - collision.posX()) * v12.Px()) + ((secondaryVertex[1] - collision.posY()) * v12.Py()) + ((secondaryVertex[2] - collision.posZ()) * v12.Pz());
values[kVertexingLxyzProjected] = values[kVertexingLxyzProjected] / TMath::Sqrt((v12.Px() * v12.Px()) + (v12.Py() * v12.Py()) + (v12.Pz() * v12.Pz()));
values[kVertexingTauxyProjected] = values[kVertexingLxyProjected] * v12.M() / (v12.Pt());
values[kVertexingTauxyProjectedPoleJPsiMass] = values[kVertexingLxyProjected] * o2::constants::physics::MassJPsi / (v12.Pt());
values[kVertexingTauxyProjectedNs] = values[kVertexingTauxyProjected] / o2::constants::physics::LightSpeedCm2NS;
values[kVertexingTauzProjected] = values[kVertexingLzProjected] * v12.M() / TMath::Abs(v12.Pz());
values[kVertexingTauxyzProjected] = values[kVertexingLxyzProjected] * v12.M() / (v12.P());
Expand Down Expand Up @@ -3494,6 +3496,7 @@ void VarManager::FillPairVertexing(C const& collision, T const& t1, T const& t2,
values[kVertexingLxyzProjected] = (dxPair2PV * KFGeoTwoProng.GetPx()) + (dyPair2PV * KFGeoTwoProng.GetPy()) + (dzPair2PV * KFGeoTwoProng.GetPz());
values[kVertexingLxyzProjected] = values[kVertexingLxyzProjected] / TMath::Sqrt((KFGeoTwoProng.GetPx() * KFGeoTwoProng.GetPx()) + (KFGeoTwoProng.GetPy() * KFGeoTwoProng.GetPy()) + (KFGeoTwoProng.GetPz() * KFGeoTwoProng.GetPz()));
values[kVertexingTauxyProjected] = values[kVertexingLxyProjected] * KFGeoTwoProng.GetMass() / (KFGeoTwoProng.GetPt());
values[kVertexingTauxyProjectedPoleJPsiMass] = values[kVertexingLxyProjected] * o2::constants::physics::MassJPsi / (KFGeoTwoProng.GetPt());
values[kVertexingTauxyProjectedNs] = values[kVertexingTauxyProjected] / o2::constants::physics::LightSpeedCm2NS;
values[kVertexingTauzProjected] = values[kVertexingLzProjected] * KFGeoTwoProng.GetMass() / TMath::Abs(KFGeoTwoProng.GetPz());
}
Expand Down
5 changes: 3 additions & 2 deletions PWGDQ/Tasks/dqEfficiency_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ DECLARE_SOA_COLUMN(McFlag, mcFlag, int8_t);
DECLARE_SOA_COLUMN(Massee, massee, float);
DECLARE_SOA_COLUMN(Ptee, ptee, float);
DECLARE_SOA_COLUMN(Lxyee, lxyee, float);
DECLARE_SOA_COLUMN(LxyeePoleMass, lxyeepolemass, float);
DECLARE_SOA_COLUMN(Lzee, lzee, float);
DECLARE_SOA_COLUMN(AmbiguousInBunchPairs, AmbiguousJpsiPairsInBunch, bool);
DECLARE_SOA_COLUMN(AmbiguousOutOfBunchPairs, AmbiguousJpsiPairsOutOfBunch, bool);
Expand All @@ -100,7 +101,7 @@ DECLARE_SOA_TABLE(MuonTrackCuts, "AOD", "DQANAMUONCUTS", dqanalysisflags::IsMuon
DECLARE_SOA_TABLE(MuonAmbiguities, "AOD", "DQMUONAMB", dqanalysisflags::MuonAmbiguityInBunch, dqanalysisflags::MuonAmbiguityOutOfBunch); //! joinable to ReducedMuonTracks
DECLARE_SOA_TABLE(Prefilter, "AOD", "DQPREFILTER", dqanalysisflags::IsBarrelSelectedPrefilter); //! joinable to ReducedTracksAssoc
DECLARE_SOA_TABLE(BmesonCandidates, "AOD", "DQBMESONS", dqanalysisflags::massBcandidate, dqanalysisflags::deltaMassBcandidate, dqanalysisflags::pTBcandidate, dqanalysisflags::LxyBcandidate, dqanalysisflags::LxyzBcandidate, dqanalysisflags::LzBcandidate, dqanalysisflags::TauxyBcandidate, dqanalysisflags::TauzBcandidate, dqanalysisflags::DCAxyzBetweenProngs, dqanalysisflags::CosPBcandidate, dqanalysisflags::Chi2Bcandidate, dqanalysisflags::McFlag);
DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER", dqanalysisflags::Massee, dqanalysisflags::Ptee, dqanalysisflags::Lxyee, dqanalysisflags::Lzee, dqanalysisflags::AmbiguousInBunchPairs, dqanalysisflags::AmbiguousOutOfBunchPairs, dqanalysisflags::Corrassoc);
DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER", dqanalysisflags::Massee, dqanalysisflags::Ptee, dqanalysisflags::Lxyee, dqanalysisflags::LxyeePoleMass, dqanalysisflags::Lzee, dqanalysisflags::AmbiguousInBunchPairs, dqanalysisflags::AmbiguousOutOfBunchPairs, dqanalysisflags::Corrassoc);
} // namespace o2::aod

// Declarations of various short names
Expand Down Expand Up @@ -1839,7 +1840,7 @@ struct AnalysisSameEventPairing {
fHistMan->FillHistClass(histNames[icut][0].Data(), VarManager::fgValues); // reconstructed, unmatched
for (unsigned int isig = 0; isig < fRecMCSignals.size(); isig++) { // loop over MC signals
if (mcDecision & (static_cast<uint32_t>(1) << isig)) {
PromptNonPromptSepTable(VarManager::fgValues[VarManager::kMass], VarManager::fgValues[VarManager::kPt], VarManager::fgValues[VarManager::kVertexingTauxyProjected], VarManager::fgValues[VarManager::kVertexingTauzProjected], isAmbiInBunch, isAmbiOutOfBunch, isCorrect_pair);
PromptNonPromptSepTable(VarManager::fgValues[VarManager::kMass], VarManager::fgValues[VarManager::kPt], VarManager::fgValues[VarManager::kVertexingTauxyProjected], VarManager::fgValues[VarManager::kVertexingTauxyProjectedPoleJPsiMass], VarManager::fgValues[VarManager::kVertexingTauzProjected], isAmbiInBunch, isAmbiOutOfBunch, isCorrect_pair);
fHistMan->FillHistClass(histNamesMC[icut * fRecMCSignals.size() + isig][0].Data(), VarManager::fgValues); // matched signal
if (fConfigQA) {
if (isCorrectAssoc_leg1 && isCorrectAssoc_leg2) { // correct track-collision association
Expand Down
5 changes: 3 additions & 2 deletions PWGDQ/Tasks/tableReader_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ DECLARE_SOA_COLUMN(Chi2Bcandidate, chi2Bcandidate, float);
DECLARE_SOA_COLUMN(Massee, massJPsi2ee, float);
DECLARE_SOA_COLUMN(Ptee, ptJPsi2ee, float);
DECLARE_SOA_COLUMN(Lxyee, lxyJPsi2ee, float);
DECLARE_SOA_COLUMN(LxyeePoleMass, lxyJPsi2eePoleMass, float);
DECLARE_SOA_COLUMN(Lzee, lzJPsi2ee, float);
DECLARE_SOA_COLUMN(AmbiguousInBunchPairs, AmbiguousJpsiPairsInBunch, bool);
DECLARE_SOA_COLUMN(AmbiguousOutOfBunchPairs, AmbiguousJpsiPairsOutOfBunch, bool);
Expand All @@ -106,7 +107,7 @@ DECLARE_SOA_TABLE(MuonTrackCuts, "AOD", "DQANAMUONCUTSA", dqanalysisflags::IsMuo
DECLARE_SOA_TABLE(MuonAmbiguities, "AOD", "DQMUONAMBA", dqanalysisflags::MuonAmbiguityInBunch, dqanalysisflags::MuonAmbiguityOutOfBunch); //! joinable to ReducedMuonTracks
DECLARE_SOA_TABLE(Prefilter, "AOD", "DQPREFILTERA", dqanalysisflags::IsBarrelSelectedPrefilter); //! joinable to ReducedTracksAssoc
DECLARE_SOA_TABLE(BmesonCandidates, "AOD", "DQBMESONSA", dqanalysisflags::massBcandidate, dqanalysisflags::deltamassBcandidate, dqanalysisflags::pTBcandidate, dqanalysisflags::LxyBcandidate, dqanalysisflags::LxyzBcandidate, dqanalysisflags::LzBcandidate, dqanalysisflags::TauxyBcandidate, dqanalysisflags::TauzBcandidate, dqanalysisflags::CosPBcandidate, dqanalysisflags::Chi2Bcandidate);
DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER", dqanalysisflags::Massee, dqanalysisflags::Ptee, dqanalysisflags::Lxyee, dqanalysisflags::Lzee, dqanalysisflags::AmbiguousInBunchPairs, dqanalysisflags::AmbiguousOutOfBunchPairs);
DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER", dqanalysisflags::Massee, dqanalysisflags::Ptee, dqanalysisflags::Lxyee, dqanalysisflags::LxyeePoleMass, dqanalysisflags::Lzee, dqanalysisflags::AmbiguousInBunchPairs, dqanalysisflags::AmbiguousOutOfBunchPairs);
} // namespace o2::aod

// Declarations of various short names
Expand Down Expand Up @@ -1703,7 +1704,7 @@ struct AnalysisSameEventPairing {
isUnambiguous = !(isAmbiInBunch || isAmbiOutOfBunch);
if (sign1 * sign2 < 0) {
fHistMan->FillHistClass(histNames[icut][0].Data(), VarManager::fgValues);
PromptNonPromptSepTable(VarManager::fgValues[VarManager::kMass], VarManager::fgValues[VarManager::kPt], VarManager::fgValues[VarManager::kVertexingTauxyProjected], VarManager::fgValues[VarManager::kVertexingTauzProjected], isAmbiInBunch, isAmbiOutOfBunch);
PromptNonPromptSepTable(VarManager::fgValues[VarManager::kMass], VarManager::fgValues[VarManager::kPt], VarManager::fgValues[VarManager::kVertexingTauxyProjected], VarManager::fgValues[VarManager::kVertexingTauxyProjectedPoleJPsiMass], VarManager::fgValues[VarManager::kVertexingTauzProjected], isAmbiInBunch, isAmbiOutOfBunch);
if (isAmbiInBunch) {
fHistMan->FillHistClass(histNames[icut][3 + histIdxOffset].Data(), VarManager::fgValues);
}
Expand Down
21 changes: 11 additions & 10 deletions PWGLF/Tasks/Nuspex/antinucleiInJets.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,14 @@ struct AntinucleiInJets {
continue;
isAtLeastOneJetSelected = true;

// perpendicular cone
double coneRadius = std::sqrt(jet.area() / PI);
TVector3 jetAxis(jet.px(), jet.py(), jet.pz()); // before or after subtraction of perpendicular cone?
TVector3 ueAxis1(0, 0, 0);
TVector3 ueAxis2(0, 0, 0);
getPerpendicularAxis(jetAxis, ueAxis1, +1);
getPerpendicularAxis(jetAxis, ueAxis2, -1);

// get jet constituents
std::vector<fastjet::PseudoJet> jetConstituents = jet.constituents();
o2::aod::ITSResponse itsResponse;
Expand Down Expand Up @@ -541,14 +549,7 @@ struct AntinucleiInJets {
}
}

// perpendicular cone
double coneRadius = std::sqrt(jet.area() / PI);
TVector3 jetAxis(jet.px(), jet.py(), jet.pz());
TVector3 ueAxis1(0, 0, 0);
TVector3 ueAxis2(0, 0, 0);
getPerpendicularAxis(jetAxis, ueAxis1, +1);
getPerpendicularAxis(jetAxis, ueAxis2, -1);

// underlying event
for (auto track : tracks) { // o2-linter: disable=[const-ref-in-for-loop]

// get corresponding track and apply track selection criteria
Expand Down Expand Up @@ -678,12 +679,14 @@ struct AntinucleiInJets {
if ((std::fabs(jet.eta()) + rJet) > (maxEta - 0.05))
continue;
njetsInAcc++;
registryQC.fill(HIST("sumPtJetCone"), jet.pt());

// jet pt must be larger than threshold
fastjet::PseudoJet jetMinusBkg = backgroundSub.doRhoAreaSub(jet, rhoPerp, rhoMPerp);
if (getCorrectedPt(jetMinusBkg.pt()) < minJetPt)
continue;
njetsHighPt++;
registryQC.fill(HIST("sumPtJet"), jet.pt());

// jet properties and perpendicular cone
std::vector<fastjet::PseudoJet> jetConstituents = jet.constituents();
Expand All @@ -696,7 +699,6 @@ struct AntinucleiInJets {

registryQC.fill(HIST("jetEffectiveArea"), jet.area() / (PI * rJet * rJet));
registryQC.fill(HIST("NchJetCone"), static_cast<int>(jetConstituents.size()));
registryQC.fill(HIST("sumPtJetCone"), jet.pt());

// loop over jet constituents
for (const auto& particle : jetConstituents) { // o2-linter: disable=[const-ref-in-for-loop]
Expand Down Expand Up @@ -731,7 +733,6 @@ struct AntinucleiInJets {
registryQC.fill(HIST("NchUE"), 0.5 * nParticlesPerp);
registryQC.fill(HIST("NchJet"), static_cast<double>(jetConstituents.size()) - 0.5 * nParticlesPerp);
registryQC.fill(HIST("sumPtUE"), 0.5 * ptPerp);
registryQC.fill(HIST("sumPtJet"), jet.pt() - 0.5 * ptPerp);
}
registryQC.fill(HIST("nJetsFound"), static_cast<int>(jets.size()));
registryQC.fill(HIST("nJetsInAcceptance"), njetsInAcc);
Expand Down
107 changes: 107 additions & 0 deletions PWGLF/Tasks/Strangeness/lambdapolarization.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Qvectors.h"
#include "Common/DataModel/PIDResponseITS.h"

#include "Common/Core/trackUtilities.h"
#include "Common/Core/TrackSelection.h"
Expand All @@ -57,6 +58,7 @@
#include "CCDB/BasicCCDBManager.h"

#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "PWGMM/Mult/DataModel/Index.h" // for Particles2Tracks table

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -168,6 +170,18 @@ struct lambdapolarization {

std::string fullCCDBShiftCorrPath;

double GetPhiInRange(double phi)
{
double result = phi;
while (result < 0) {
result = result + 2. * TMath::Pi() / 2;
}
while (result > 2. * TMath::Pi() / 2) {
result = result - 2. * TMath::Pi() / 2;
}
return result;
}

template <typename T>
int GetDetId(const T& name)
{
Expand Down Expand Up @@ -301,6 +315,16 @@ struct lambdapolarization {
}
}

if (doprocessMC_ITSTPC) {
histos.add("hImpactParameter", "Impact parameter", kTH1F, {{200, 0.0f, 20.0f}});
histos.add("hEventPlaneAngle", "hEventPlaneAngle", kTH1F, {{200, -2.0f * TMath::Pi(), 2.0f * TMath::Pi()}});
histos.add("hEventPlaneAngleRec", "hEventPlaneAngleRec", kTH1F, {{200, -2.0f * TMath::Pi(), 2.0f * TMath::Pi()}});
histos.add("hNchVsImpactParameter", "hNchVsImpactParameter", kTH2F, {{200, 0.0f, 20.0f}, {500, -0.5f, 5000.5f}});
histos.add("hSparseMCGenWeight", "hSparseMCGenWeight", HistType::kTHnSparseF, {centAxis, {36, 0.0f, TMath::Pi()}, {50, 0.0f, 1}, ptAxis, {8, -0.8, 0.8}});
histos.add("hSparseMCRecWeight", "hSparseMCRecWeight", HistType::kTHnSparseF, {centAxis, {36, 0.0f, TMath::Pi()}, {50, 0.0f, 1}, ptAxis, {8, -0.8, 0.8}});
histos.add("hSparseMCRecAllTrackWeight", "hSparseMCRecAllTrackWeight", HistType::kTHnSparseF, {centAxis, {36, 0.0, TMath::Pi()}, {50, 0.0f, 1}, ptAxis, {8, -0.8, 0.8}});
}

if (cfgShiftCorrDef) {
for (auto i = 2; i < cfgnMods + 2; i++) {
histos.add(Form("psi%d/ShiftFIT", i), "", kTProfile3D, {centQaAxis, basisAxis, shiftAxis});
Expand Down Expand Up @@ -855,6 +879,89 @@ struct lambdapolarization {
} // FIXME: need to fill different histograms for different harmonic
}
PROCESS_SWITCH(lambdapolarization, processData, "Process Event for data", true);

using recoTracks = soa::Join<aod::TracksIU, aod::TracksExtra>;
void processMC_ITSTPC(aod::McCollision const& mcCollision, soa::Join<aod::McParticles, aod::ParticlesToTracks> const& mcParticles, recoTracks const&)
{
float imp = mcCollision.impactParameter();
float evPhi = mcCollision.eventPlaneAngle() / 2.0;
float centclass = -999;
if (imp >= 0 && imp < 3.49) {
centclass = 2.5;
}
if (imp >= 3.49 && imp < 4.93) {
centclass = 7.5;
}
if (imp >= 4.93 && imp < 6.98) {
centclass = 15.0;
}
if (imp >= 6.98 && imp < 8.55) {
centclass = 25.0;
}
if (imp >= 8.55 && imp < 9.87) {
centclass = 35.0;
}
if (imp >= 9.87 && imp < 11) {
centclass = 45.0;
}
if (imp >= 11 && imp < 12.1) {
centclass = 55.0;
}
if (imp >= 12.1 && imp < 13.1) {
centclass = 65.0;
}
if (imp >= 13.1 && imp < 14) {
centclass = 75.0;
}
// if (evPhi < 0)
// evPhi += 2. * TMath::Pi();

int nCh = 0;

if (centclass > 0 && centclass < 80) {
// event within range
histos.fill(HIST("hImpactParameter"), imp);
histos.fill(HIST("hEventPlaneAngle"), evPhi);
for (auto const& mcParticle : mcParticles) {

float deltaPhi = mcParticle.phi() - mcCollision.eventPlaneAngle();
// focus on bulk: e, mu, pi, k, p
int pdgCode = TMath::Abs(mcParticle.pdgCode());
if (pdgCode != 3122)
continue;
if (!mcParticle.isPhysicalPrimary())
continue;
if (TMath::Abs(mcParticle.eta()) > 0.8) // main acceptance
continue;
histos.fill(HIST("hSparseMCGenWeight"), centclass, GetPhiInRange(deltaPhi), TMath::Power(TMath::Cos(2.0 * GetPhiInRange(deltaPhi)), 2.0), mcParticle.pt(), mcParticle.eta());
nCh++;
bool validGlobal = false;
bool validAny = false;
if (mcParticle.has_tracks()) {
auto const& tracks = mcParticle.tracks_as<recoTracks>();
for (auto const& track : tracks) {
if (track.hasTPC() && track.hasITS()) {
validGlobal = true;
}
if (track.hasTPC() || track.hasITS()) {
validAny = true;
}
}
}
// if valid global, fill
if (validGlobal) {
histos.fill(HIST("hSparseMCRecWeight"), centclass, GetPhiInRange(deltaPhi), TMath::Power(TMath::Cos(2.0 * GetPhiInRange(deltaPhi)), 2.0), mcParticle.pt(), mcParticle.eta());
}
if (validAny) {
histos.fill(HIST("hSparseMCRecAllTrackWeight"), centclass, GetPhiInRange(deltaPhi), TMath::Power(TMath::Cos(2.0 * GetPhiInRange(deltaPhi)), 2.0), mcParticle.pt(), mcParticle.eta());
histos.fill(HIST("hEventPlaneAngleRec"), GetPhiInRange(deltaPhi));
}
// if any track present, fill
}
}
histos.fill(HIST("hNchVsImpactParameter"), imp, nCh);
}
PROCESS_SWITCH(lambdapolarization, processMC_ITSTPC, "Process MC for ITSTPC", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down

0 comments on commit 6619342

Please sign in to comment.