Skip to content
Open
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
20 changes: 17 additions & 3 deletions PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ struct DiHadronCor {
O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows")
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z")
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, -1.0f, "max DCA to vertex xy, pT dependent in terms of N sigma. -1 for default cut")
O2_DEFINE_CONFIGURABLE(cfgDCAxyFunc, std::string, "(0.0026+0.005/(x^1.01))", "Functional form of pt-dependent DCAxy cut")
TF1* fPtDepDCAxy = nullptr;
O2_DEFINE_CONFIGURABLE(cfgCutMerging, float, 0.0, "Merging cut on track merge")
O2_DEFINE_CONFIGURABLE(cfgSelCollByNch, bool, true, "Select collisions by Nch or centrality")
O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, "Minimum multiplicity for collision")
Expand Down Expand Up @@ -160,7 +163,7 @@ struct DiHadronCor {

// make the filters and cuts.
Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ);
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
using FilteredTracksWithMCLabels = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>>;
Expand Down Expand Up @@ -287,6 +290,7 @@ struct DiHadronCor {
registry.add("zVtx", "zVtx", {HistType::kTH1D, {axisVertex}});
registry.add("zVtx_used", "zVtx_used", {HistType::kTH1D, {axisVertex}});
registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -1., 1.}, {200, 0, 5}}});
}
if (cfgSoloPtTrack && doprocessSame) {
registry.add("Nch_final_pt", "pT", {HistType::kTH1D, {axisPtTrigger}});
Expand Down Expand Up @@ -345,6 +349,12 @@ struct DiHadronCor {
same.setObject(new CorrelationContainer("sameEvent", "sameEvent", corrAxis, effAxis, userAxis));
mixed.setObject(new CorrelationContainer("mixedEvent", "mixedEvent", corrAxis, effAxis, userAxis));

if (cfgCutDCAxy > 0.) {
fPtDepDCAxy = new TF1("ptDepDCAxy", Form("[0]*%s", cfgDCAxyFunc->c_str()), 0.001, 1000);
fPtDepDCAxy->SetParameter(0, cfgCutDCAxy);
LOGF(info, "DCAxy pt-dependence function: %s", Form("%0.1f * %s", cfgCutDCAxy.value, cfgDCAxyFunc->c_str()));
}

LOGF(info, "End of init");
}

Expand Down Expand Up @@ -389,6 +399,9 @@ struct DiHadronCor {
template <typename TTrack>
bool trackSelected(TTrack track)
{
if (cfgCutDCAxy > 0. && (std::fabs(track.dcaXY()) > fPtDepDCAxy->Eval(track.pt())))
return false;

return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu));
}

Expand Down Expand Up @@ -425,14 +438,14 @@ struct DiHadronCor {
if (mEfficiency == nullptr) {
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str());
}
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency);
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), static_cast<void*>(mEfficiency));
}
if (cfgCentralityWeight.value.empty() == false) {
mCentralityWeight = ccdb->getForTimeStamp<TH1D>(cfgCentralityWeight, timestamp);
if (mCentralityWeight == nullptr) {
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgCentralityWeight.value.c_str());
}
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), (void*)mCentralityWeight);
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), static_cast<void*>(mCentralityWeight));
}
correctionsLoaded = true;
}
Expand Down Expand Up @@ -544,6 +557,7 @@ struct DiHadronCor {
if (system == SameEvent) {
registry.fill(HIST("Trig_hist"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
}
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());

for (auto const& track2 : tracks2) {

Expand Down
43 changes: 23 additions & 20 deletions PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ struct FlowDecorrelation {
O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows")
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z")
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, 7.0f, "max DCA to vertex xy")
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, -1.0f, "max DCA to vertex xy, pT dependent in terms of N sigma. -1 for default cut")
O2_DEFINE_CONFIGURABLE(cfgDCAxyFunc, std::string, "(0.0026+0.005/(x^1.01))", "Functional form of pt-dependent DCAxy cut")
TF1* fPtDepDCAxy = nullptr;
O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, "Minimum multiplicity for collision")
O2_DEFINE_CONFIGURABLE(cfgCutMultMax, int, 10, "Maximum multiplicity for collision")
O2_DEFINE_CONFIGURABLE(cfgCutCentMin, float, 60.0f, "Minimum centrality for collision")
Expand Down Expand Up @@ -181,7 +183,7 @@ struct FlowDecorrelation {
AxisSpec axisChID = {220, 0, 220};
// make the filters and cuts.
Filter collisionFilter = (nabs(aod::collision::posZ) < cfgGeneralCuts.cfgCutVtxZ);
Filter trackFilter = (aod::track::pt > cfgGeneralCuts.cfgCutPtMin) && (aod::track::pt < cfgGeneralCuts.cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgGeneralCuts.cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgGeneralCuts.cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgGeneralCuts.cfgCutDCAxy);
Filter trackFilter = (aod::track::pt > cfgGeneralCuts.cfgCutPtMin) && (aod::track::pt < cfgGeneralCuts.cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgGeneralCuts.cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgGeneralCuts.cfgCutDCAz);
using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;

Expand All @@ -200,8 +202,8 @@ struct FlowDecorrelation {
o2::ft0::Geometry ft0Det;
o2::fv0::Geometry* fv0Det{};
static constexpr uint64_t Ft0IndexA = 96;
std::vector<o2::detectors::AlignParam>* offsetFT0;
std::vector<o2::detectors::AlignParam>* offsetFV0;
std::vector<o2::detectors::AlignParam>* offsetFT0{};
std::vector<o2::detectors::AlignParam>* offsetFV0{};
std::vector<float> cstFT0RelGain{};

// Corrections
Expand Down Expand Up @@ -256,9 +258,6 @@ struct FlowDecorrelation {
kFT0COuterRingMin = 144,
kFT0COuterRingMax = 207
};
std::array<float, 6> tofNsigmaCut;
std::array<float, 6> itsNsigmaCut;
std::array<float, 6> tpcNsigmaCut;
struct Ft0cCConstants {
double zFt0cDistance = -83.44;
double maxWidth = 12.;
Expand All @@ -283,7 +282,6 @@ struct FlowDecorrelation {
LOGF(fatal, "Centrality table is unavailable, cannot select collisions by centrality");
}
const AxisSpec axisPhi{72, 0.0, constants::math::TwoPI, "#varphi"};
const AxisSpec axisEta{40, -1., 1., "#eta"};
const AxisSpec axisEtaFull{90, -6., 6., "#eta"};
const AxisSpec axisCentrality{20, 0., 100., "cent"};

Expand Down Expand Up @@ -370,6 +368,7 @@ struct FlowDecorrelation {
if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) {
registry.add("Phi", "Phi", {HistType::kTH1D, {axisPhi}});
registry.add("Eta", "Eta", {HistType::kTH1D, {axisEta}});
registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -1., 1.}, {200, 0, 5}}});
registry.add("EtaCorrected", "EtaCorrected", {HistType::kTH1D, {axisEta}});
registry.add("Nch", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}});
registry.add("Nch_used", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); // histogram to see how many events are in the same and mixed event
Expand Down Expand Up @@ -494,6 +493,13 @@ struct FlowDecorrelation {
same.setObject(new CorrelationContainer("sameEvent_TPC_FV0", "sameEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis));
mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FV0", "mixedEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis));
}

if (cfgGeneralCuts.cfgCutDCAxy > 0.) {
cfgGeneralCuts.fPtDepDCAxy = new TF1("ptDepDCAxy", Form("[0]*%s", cfgGeneralCuts.cfgDCAxyFunc->c_str()), 0.001, 1000);
cfgGeneralCuts.fPtDepDCAxy->SetParameter(0, cfgGeneralCuts.cfgCutDCAxy);
LOGF(info, "DCAxy pt-dependence function: %s", Form("%0.1f * %s", cfgGeneralCuts.cfgCutDCAxy.value, cfgGeneralCuts.cfgDCAxyFunc->c_str()));
}

LOGF(info, "End of init");
}

Expand Down Expand Up @@ -615,6 +621,9 @@ struct FlowDecorrelation {
template <typename TTrack>
bool trackSelected(TTrack track)
{
if (cfgGeneralCuts.cfgCutDCAxy > 0. && (std::fabs(track.dcaXY()) > cfgGeneralCuts.fPtDepDCAxy->Eval(track.pt())))
return false;

return ((track.tpcNClsFound() >= cfgGeneralCuts.cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgGeneralCuts.cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgGeneralCuts.cfgCutITSclu));
}

Expand Down Expand Up @@ -671,14 +680,14 @@ struct FlowDecorrelation {
if (mEfficiency == nullptr) {
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str());
}
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency);
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), static_cast<void*>(mEfficiency));
}
if (cfgCentralityWeight.value.empty() == false) {
mCentralityWeight = ccdb->getForTimeStamp<TH1D>(cfgCentralityWeight, timestamp);
if (mCentralityWeight == nullptr) {
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgCentralityWeight.value.c_str());
}
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), (void*)mCentralityWeight);
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), static_cast<void*>(mCentralityWeight));
}
correctionsLoaded = true;
}
Expand Down Expand Up @@ -788,6 +797,7 @@ struct FlowDecorrelation {
if (cfgDrawEtaPhiDis && corType == kFT0A)
registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), eventWeight * triggerWeight);
}
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());

std::size_t channelSize = 0;
if (corType == kFT0A)
Expand Down Expand Up @@ -920,6 +930,7 @@ struct FlowDecorrelation {
if (system == SameEvent) {
registry.fill(HIST("Trig_hist_TPC_FV0"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight);
}
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());

std::size_t channelSize = 0;
channelSize = fv0.channel().size();
Expand Down Expand Up @@ -1093,8 +1104,6 @@ struct FlowDecorrelation {
if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
return true;
}
}
if (x < (Ft0aLocations.blockFar + Ft0aLocations.offSetX) && x > (Ft0aLocations.blockClose + Ft0aLocations.offSetX)) {
if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
return true;
}
Expand All @@ -1104,8 +1113,6 @@ struct FlowDecorrelation {
if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
return true;
}
}
if (x > (-Ft0aLocations.blockFar + Ft0aLocations.offSetX) && x < (-Ft0aLocations.blockClose + Ft0aLocations.offSetX)) {
if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
return true;
}
Expand All @@ -1115,9 +1122,6 @@ struct FlowDecorrelation {
if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY - Ft0aLocations.rectOffSet) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY - Ft0aLocations.rectOffSet)) {
return true;
}
}

if (x < (Ft0aLocations.blockClose + Ft0aLocations.offSetX) && x > (-Ft0aLocations.blockClose + Ft0aLocations.offSetX)) {
if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY + Ft0aLocations.rectOffSet) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY + Ft0aLocations.rectOffSet)) {
return true;
}
Expand All @@ -1127,13 +1131,11 @@ struct FlowDecorrelation {
if (x > (-Ft0aLocations.blockFar + Ft0aLocations.offSetX - Ft0aLocations.rectOffSet) && x < (-Ft0aLocations.blockClose + Ft0aLocations.offSetX - Ft0aLocations.rectOffSet)) {
return true;
}
}

if (y < (Ft0aLocations.blockClose + Ft0aLocations.offSetY) && y > (-Ft0aLocations.blockClose + Ft0aLocations.offSetY)) {
if (x < (Ft0aLocations.blockFar + Ft0aLocations.offSetX + Ft0aLocations.rectOffSet) && x > (Ft0aLocations.blockClose + Ft0aLocations.offSetX + Ft0aLocations.rectOffSet)) {
return true;
}
}

return false;
}

Expand Down Expand Up @@ -1474,6 +1476,7 @@ struct FlowDecorrelation {
if (system == SameEvent) {
registry.fill(HIST("Trig_hist_TPC_MFT"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
}
registry.fill(HIST("hDCAxy"), track1.dcaXY(), track1.pt());

for (auto const& track2 : tracks2) {

Expand Down
Loading