Skip to content

Commit

Permalink
Merge branch 'master' into njacazio-patch-1-1
Browse files Browse the repository at this point in the history
  • Loading branch information
njacazio authored Nov 29, 2024
2 parents 6deb1cb + ae7029f commit d2dc4e3
Show file tree
Hide file tree
Showing 86 changed files with 7,711 additions and 3,692 deletions.
4 changes: 2 additions & 2 deletions Common/DataModel/PIDResponseITS.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct ITSResponse {
static float expSignal(const float momentum)
{
static constexpr float inverseMass = 1. / o2::track::pid_constants::sMasses[id];
static constexpr float charge = static_cast<float>(o2::track::pid_constants::sCharges[id]);
// static constexpr float charge = static_cast<float>(o2::track::pid_constants::sCharges[id]);
const float bg = momentum * inverseMass;
if (id == o2::track::PID::Helium3 || id == o2::track::PID::Alpha) {
return (mITSRespParamsZ2[0] / (std::pow(bg, mITSRespParamsZ2[1])) + mITSRespParamsZ2[2]);
Expand All @@ -65,7 +65,7 @@ struct ITSResponse {
static float expResolution(const float momentum)
{
static constexpr float inverseMass = 1. / o2::track::pid_constants::sMasses[id];
static constexpr float charge = static_cast<float>(o2::track::pid_constants::sCharges[id]);
// static constexpr float charge = static_cast<float>(o2::track::pid_constants::sCharges[id]);
const float bg = momentum * inverseMass;
float relRes = mResolutionParams[0] * std::erf((bg - mResolutionParams[1]) / mResolutionParams[2]);
return relRes;
Expand Down
43 changes: 35 additions & 8 deletions Common/Tasks/centralityStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,19 @@ struct centralityStudy {
Configurable<float> scaleSignalFT0M{"scaleSignalFT0M", 1.00f, "scale FT0M signal for convenience"};
Configurable<float> scaleSignalFV0A{"scaleSignalFV0A", 1.00f, "scale FV0A signal for convenience"};

// _______________________________________
// upc rejection criteria
// reject low zna/c
Configurable<float> minZNACsignal{"minZNACsignal", 15.0f, "min zna/c signal"};
Configurable<float> maxFT0CforZNACselection{"maxFT0CforZNACselection", 35000.0f, "max ft0c signal for minZNACsignal to work"};
struct : ConfigurableGroup {
Configurable<float> minZNACsignal{"minZNACsignal", -999999.0f, "min zna/c signal"};
Configurable<float> maxFT0CforZNACselection{"maxFT0CforZNACselection", -99999.0f, "max ft0c signal for minZNACsignal to work"};

Configurable<float> minFV0Asignal{"minFV0Asignal", -999999.0f, "min fv0a signal"};
Configurable<float> maxFT0CforFV0Aselection{"maxFT0CforFV0Aselection", -99999.0f, "max ft0c signal for minFV0Asignal to work"};

Configurable<float> minFDDAsignal{"minFDDAsignal", -999999.0f, "min fdda signal"};
Configurable<float> maxFT0CforFDDAselection{"maxFT0CforFDDAselection", -99999.0f, "max ft0c signal for minFDDAsignal to work"};
} upcRejection;

// Configurable Axes for 2d plots, etc
ConfigurableAxis axisMultFV0A{"axisMultFV0A", {1000, 0, 100000}, "FV0A amplitude"};
Expand Down Expand Up @@ -244,9 +254,17 @@ struct centralityStudy {
}
histos.fill(HIST("hCollisionSelection"), 14 /* Not ITS ROF pileup (strict) */);

if (collision.multFT0C() < maxFT0CforZNACselection &&
collision.multZNA() < minZNACsignal &&
collision.multZNC() < minZNACsignal) {
if (collision.multFT0C() < upcRejection.maxFT0CforZNACselection &&
collision.multZNA() < upcRejection.minZNACsignal &&
collision.multZNC() < upcRejection.minZNACsignal) {
return;
}
if (collision.multFT0C() < upcRejection.maxFT0CforFV0Aselection &&
collision.multFV0A() < upcRejection.minFV0Asignal) {
return;
}
if (collision.multFT0C() < upcRejection.maxFT0CforFDDAselection &&
collision.multFDDA() < upcRejection.minFDDAsignal) {
return;
}
histos.fill(HIST("hCollisionSelection"), 15 /* pass em/upc rejection */);
Expand Down Expand Up @@ -320,11 +338,20 @@ struct centralityStudy {
}
histos.fill(HIST("hBCSelection"), 4); // FV0OrA

if (multbc.multBCFT0C() < maxFT0CforZNACselection &&
multbc.multBCZNA() < minZNACsignal &&
multbc.multBCZNC() < minZNACsignal) {
if (multbc.multBCFT0C() < upcRejection.maxFT0CforZNACselection &&
multbc.multBCZNA() < upcRejection.minZNACsignal &&
multbc.multBCZNC() < upcRejection.minZNACsignal) {
return;
}
if (multbc.multBCFT0C() < upcRejection.maxFT0CforFV0Aselection &&
multbc.multBCFV0A() < upcRejection.minFV0Asignal) {
return;
}
if (multbc.multBCFT0C() < upcRejection.maxFT0CforFDDAselection &&
multbc.multBCFDDA() < upcRejection.minFDDAsignal) {
return;
}

histos.fill(HIST("hBCSelection"), 5); // znac

// if we got here, we also finally fill the FT0C histogram, please
Expand Down
12 changes: 9 additions & 3 deletions DPG/Tasks/AOTTrack/qaEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
///

// O2 includes
#include <memory>
#include <vector>

#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "Framework/HistogramRegistry.h"
Expand Down Expand Up @@ -74,6 +77,7 @@ static constexpr int PDGs[nParticles] = {11, 13, 211, 321, 2212, 1000010020, 100
-11, -13, -211, -321, -2212, -1000010020, -1000010030, -1000020030, -1000020040};

// Histograms
std::shared_ptr<TH1> hPtmotherGenerated; // histogram to store pT of Xi and Lambda

// Pt
std::array<std::shared_ptr<TH1>, nParticles> hPtIts;
Expand Down Expand Up @@ -332,6 +336,7 @@ struct QaEfficiency {
phiMin, phiMax,
yMin, yMax);
const int histogramIndex = id + pdgSign * nSpecies;
hPtmotherGenerated = histos.add<TH1>("MC/mother/pt/generated", "Generated pT of mother Lambda or Xi", kTH1D, {axisPt});

// Pt
hPtIts[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/its", PDGs[histogramIndex]), "ITS tracks " + tagPt, kTH1D, {axisPt});
Expand Down Expand Up @@ -1242,19 +1247,20 @@ struct QaEfficiency {
}
} else {
if (mcParticle.getProcess() == 4) { // Particle decay
// Checking mothers
bool motherIsAccepted = true;
// Check for mothers if needed
if (checkForMothers.value && mothersPDGs.value.size() > 0 && mcParticle.has_mothers()) {
motherIsAccepted = false;
auto mothers = mcParticle.mothers_as<o2::aod::McParticles>();
// Loop over mother particles
for (const auto& mother : mothers) {
for (const auto& pdgToCheck : mothersPDGs.value) {
if (mother.pdgCode() == pdgToCheck) {
motherIsAccepted = true;
motherIsAccepted = true; // Mother matches the list of specified PDGs
break;
}
if (motherIsAccepted) {
break;
hPtmotherGenerated->Fill(mother.pt()); // Fill generated pT for Lambda
}
}
}
Expand Down
1 change: 1 addition & 0 deletions PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class FemtoUniversePairCleaner
if (part1.globalIndex() == posChild.globalIndex() || part1.globalIndex() == negChild.globalIndex() || part1.globalIndex() == bachelor.globalIndex()) {
return false;
}
return part1.globalIndex() != part2.globalIndex();
} else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) {
/// Track-D0 combination part1 is hadron and part2 is D0
if (part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kD0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ struct femtoUniverseProducerTask {
void fillCollisions(CollisionType const& col, TrackType const& tracks)
{
const auto vtxZ = col.posZ();
int mult = 0;
float mult = 0;
int multNtr = 0;
if (ConfIsRun3) {
mult = col.multFV0M();
Expand Down Expand Up @@ -806,7 +806,7 @@ struct femtoUniverseProducerTask {
{
for (auto& c : col) {
const auto vtxZ = c.posZ();
int mult = 0;
float mult = 0;
int multNtr = 0;

if (std::abs(vtxZ) > ConfEvtZvtx) {
Expand All @@ -825,7 +825,7 @@ struct femtoUniverseProducerTask {
void fillCollisionsCentRun2(CollisionType const& col, TrackType const& tracks)
{
const auto vtxZ = col.posZ();
int cent = 0;
float cent = 0;
int multNtr = 0;
if (!ConfIsRun3) {
cent = col.centRun2V0M();
Expand Down Expand Up @@ -853,7 +853,7 @@ struct femtoUniverseProducerTask {
void fillCollisionsCentRun3(CollisionType const& col, TrackType const& tracks, V0Type const& fullV0s, CascadeType const& fullCascades, double irrate)
{
const auto vtxZ = col.posZ();
int cent = 0;
float cent = 0;
int multNtr = 0;
if (ConfIsRun3) {
multNtr = col.multNTracksPV();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,13 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended {
/// Event part
Configurable<float> ConfV0MLow{"ConfV0MLow", 0.0, "Lower limit for V0M multiplicity"};
Configurable<float> ConfV0MHigh{"ConfV0MHigh", 25000.0, "Upper limit for V0M multiplicity"};
Configurable<int> ConfTPCOccupancyLow{"ConfTPCOccupancyLow", 0, "Lower limit for TPC occupancy"};
Configurable<int> ConfTPCOccupancyHigh{"ConfTPCOccupancyHigh", 500, "Higher limit for TPC occupancy"};

Filter collV0Mfilter = ((o2::aod::femtouniversecollision::multV0M > ConfV0MLow) && (o2::aod::femtouniversecollision::multV0M < ConfV0MHigh));
using FilteredFDCollisions = soa::Filtered<aod::FDCollisions>;
using FilteredFDCollision = soa::Filtered<aod::FDCollisions>::iterator;
Filter collfilter = (o2::aod::femtouniversecollision::multV0M > ConfV0MLow) && (o2::aod::femtouniversecollision::multV0M < ConfV0MHigh) &&
(o2::aod::femtouniversecollision::occupancy > ConfTPCOccupancyLow) && (o2::aod::femtouniversecollision::occupancy < ConfTPCOccupancyHigh);
using FilteredFDCollisions = soa::Filtered<soa::Join<aod::FDCollisions, aod::FDExtCollisions>>;
using FilteredFDCollision = FilteredFDCollisions::iterator;

/// Particle part
ConfigurableAxis ConfTempFitVarBins{"ConfDTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,16 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
/// Event part
Configurable<float> ConfV0MLow{"ConfV0MLow", 0.0, "Lower limit for V0M multiplicity"};
Configurable<float> ConfV0MHigh{"ConfV0MHigh", 25000.0, "Upper limit for V0M multiplicity"};
Filter collV0Mfilter = ((o2::aod::femtouniversecollision::multV0M > ConfV0MLow) && (o2::aod::femtouniversecollision::multV0M < ConfV0MHigh));
using FilteredFDCollisions = soa::Filtered<aod::FDCollisions>;
using FilteredFDCollision = soa::Filtered<aod::FDCollisions>::iterator;
Configurable<int> ConfTPCOccupancyLow{"ConfTPCOccupancyLow", 0, "Lower limit for TPC occupancy"};
Configurable<int> ConfTPCOccupancyHigh{"ConfTPCOccupancyHigh", 500, "Higher limit for TPC occupancy"};
Configurable<float> ConfIntRateLow{"ConfIntRateLow", 0.0, "Lower limit for interaction rate"};
Configurable<float> ConfIntRateHigh{"ConfIntRateHigh", 10000.0, "Higher limit for interaction rate"};

Filter collfilter = (o2::aod::femtouniversecollision::multV0M > ConfV0MLow) && (o2::aod::femtouniversecollision::multV0M < ConfV0MHigh) &&
(o2::aod::femtouniversecollision::irrate > ConfIntRateLow) && (o2::aod::femtouniversecollision::irrate < ConfIntRateHigh) &&
(o2::aod::femtouniversecollision::occupancy > ConfTPCOccupancyLow) && (o2::aod::femtouniversecollision::occupancy < ConfTPCOccupancyHigh);
using FilteredFDCollisions = soa::Filtered<soa::Join<aod::FDCollisions, aod::FDExtCollisions>>;
using FilteredFDCollision = FilteredFDCollisions::iterator;
// Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.ConfEtaMax); // example filtering on configurable

/// Particle part
Expand Down
Loading

0 comments on commit d2dc4e3

Please sign in to comment.