|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +#include "PWGLF/DataModel/LFDoubleCascTables.h" |
| 13 | +#include "PWGLF/DataModel/LFStrangenessTables.h" |
| 14 | + |
| 15 | +#include "Common/Core/PID/TPCPIDResponse.h" |
| 16 | +#include "Common/Core/RecoDecay.h" |
| 17 | +#include "Common/Core/trackUtilities.h" |
| 18 | +#include "Common/DataModel/Centrality.h" |
| 19 | +#include "Common/DataModel/EventSelection.h" |
| 20 | +#include "Common/DataModel/Multiplicity.h" |
| 21 | +#include "Common/DataModel/PIDResponse.h" |
| 22 | +#include "Common/DataModel/TrackSelectionTables.h" |
| 23 | + |
| 24 | +#include "DataFormatsParameters/GRPMagField.h" |
| 25 | +#include "DataFormatsParameters/GRPObject.h" |
| 26 | +#include "DetectorsBase/GeometryManager.h" |
| 27 | +#include "DetectorsBase/Propagator.h" |
| 28 | +#include "Framework/ASoAHelpers.h" |
| 29 | +#include "Framework/AnalysisDataModel.h" |
| 30 | +#include "Framework/AnalysisTask.h" |
| 31 | +#include "Framework/runDataProcessing.h" |
| 32 | +#include "ReconstructionDataFormats/Track.h" |
| 33 | + |
| 34 | +#include "TDatabasePDG.h" |
| 35 | +#include <Math/Vector4D.h> |
| 36 | + |
| 37 | +#include <random> |
| 38 | +#include <utility> |
| 39 | +#include <vector> |
| 40 | + |
| 41 | +using namespace o2; |
| 42 | +using namespace o2::framework; |
| 43 | +using namespace o2::framework::expressions; |
| 44 | + |
| 45 | +using Collisions = soa::Join<aod::Collisions, aod::EvSels, aod::MultZeqs, aod::FT0Mults>::iterator; |
| 46 | +using FullCascades = aod::CascDataExt; |
| 47 | +using FullV0s = aod::V0Datas; |
| 48 | +using TracksFull = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCPi, aod::pidTPCPr, aod::pidTPCKa>; |
| 49 | +struct xiLambdaCorr { |
| 50 | + ConfigurableAxis centAxis{"centAxis", {106, 0, 106}, "binning for the centrality"}; |
| 51 | + ConfigurableAxis zVtxAxis{"zVtxBins", {100, -20.f, 20.f}, "Binning for the vertex z in cm"}; |
| 52 | + // binning of (anti)lambda mass QA histograms |
| 53 | + ConfigurableAxis massLambdaAxis{"massLambdaAxis", {200, o2::constants::physics::MassLambda - 0.05f, o2::constants::physics::MassLambda + 0.05f}, "binning for the lambda invariant-mass"}; |
| 54 | + ConfigurableAxis massXiAxis{"massXiAxis", {200, o2::constants::physics::MassXiMinus - 0.05f, o2::constants::physics::MassXiMinus + 0.05f}, "binning for the Xi invariant-mass"}; |
| 55 | + ConfigurableAxis massXiLambdaAxis{"massXiLambdaAxis", {200, o2::constants::physics::MassXiMinus + o2::constants::physics::MassLambda, o2::constants::physics::MassXiMinus + o2::constants::physics::MassLambda + 0.1f}, "binning for the Xi+Lambda invariant-mass"}; |
| 56 | + |
| 57 | + Configurable<float> zVtxMax{"zVtxMax", 10.0f, "maximum z position of the primary vertex"}; |
| 58 | + Configurable<float> etaMax{"etaMax", 0.9f, "maximum eta"}; |
| 59 | + ConfigurableAxis momAxis{"momAxisFine", {5.e2, 0.f, 5.f}, "momentum axis binning"}; |
| 60 | + ConfigurableAxis mixTypeAxis{"mixTypeAxis", {4, -0.5f, 3.5f}, "mixing type axis"}; // xi - lambda , xi - anti-lambda, anti-xi - lambda, anti-xi - anti-lambda |
| 61 | + |
| 62 | + Configurable<float> cascPtMin{"cascPtMin", 1.f, "minimum (anti)casc pT (GeV/c)"}; |
| 63 | + Configurable<float> cascPtMax{"cascPtMax", 4.f, "maximum (anti)casc pT (GeV/c)"}; |
| 64 | + |
| 65 | + Configurable<float> minNTPCClus{"minNTPCClus", 100, "Minimum number of TPC clusters"}; |
| 66 | + Configurable<double> minCascCosPA{"minCascCosPA", 0.99f, "Minimum cosine of the pointing angle of the cascade"}; |
| 67 | + Configurable<double> minV0CosPA{"minV0CosPA", 0.97f, "Minimum cosine of the pointing angle of the V0"}; |
| 68 | + |
| 69 | + Configurable<float> nSigmaTPCCut{"nSigmaTPCCut", 3.f, "Number of sigmas for the TPC PID"}; |
| 70 | + Configurable<float> dcaBachToPV{"dcaBachToPV", 0.05f, "DCA of the bachelor to the primary vertex"}; |
| 71 | + Configurable<float> dcaV0Bach{"dcaV0Bach", 1.f, "DCA between the V0 daughters"}; |
| 72 | + |
| 73 | + Configurable<float> lambdaPtMin{"lambdaPtMin", 0.5f, "minimum (anti)lambda pT (GeV/c)"}; |
| 74 | + Configurable<float> lambdaPtMax{"lambdaPtMax", 4.f, "maximum (anti)lambda pT (GeV/c)"}; |
| 75 | + Configurable<float> dcaLambdaDauToPV{"dcaLambdaDauToPV", 0.05f, "DCA of the lambda daughter to the primary vertex"}; |
| 76 | + Configurable<float> minLambdaCosPA{"minLambdaCosPA", 0.99f, "Minimum cosine of the pointing angle of the lambda"}; |
| 77 | + |
| 78 | + Configurable<float> mLambdaWindow{"mLambdaWindow", 0.02f, "mLambdaWindow"}; |
| 79 | + Configurable<float> mXiWindow{"mXiWindow", 0.02f, "mXiWindow"}; |
| 80 | + |
| 81 | + HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; |
| 82 | + |
| 83 | + template <class T> |
| 84 | + bool selectTrack(T const& track) |
| 85 | + { |
| 86 | + if (std::abs(track.eta()) > etaMax) { |
| 87 | + return false; |
| 88 | + } |
| 89 | + if (track.tpcNClsFound() < minNTPCClus) { |
| 90 | + return false; |
| 91 | + } |
| 92 | + return true; |
| 93 | + } |
| 94 | + |
| 95 | + void init(o2::framework::InitContext&) |
| 96 | + { |
| 97 | + // event QA |
| 98 | + histos.add<TH1>("QA/zVtx", ";#it{z}_{vtx} (cm);Entries", HistType::kTH1F, {zVtxAxis}); |
| 99 | + histos.add<TH2>("QA/massLambda", ";#it{p}_{T} (GeV/#it{c});#it{m}_{#Lambda} (GeV/#it{c}^{2})", HistType::kTH2F, {momAxis, massLambdaAxis}); |
| 100 | + histos.add<TH2>("QA/massXi", ";#it{p}_{T} (GeV/#it{c});#it{m}_{#Xi} (GeV/#it{c}^{2})", HistType::kTH2F, {momAxis, massXiAxis}); |
| 101 | + histos.add("xiMinusLambda", "", {HistType::kTHnSparseF, {massXiLambdaAxis, momAxis, mixTypeAxis}}); |
| 102 | + } |
| 103 | + |
| 104 | + template <class C, class T> |
| 105 | + bool isSelectedCasc(C const& collision, T const&, FullCascades::iterator const& casc) |
| 106 | + { |
| 107 | + |
| 108 | + auto bachelor = casc.bachelor_as<T>(); |
| 109 | + auto posDau = casc.posTrack_as<T>(); |
| 110 | + auto negDau = casc.negTrack_as<T>(); |
| 111 | + |
| 112 | + if (!selectTrack(bachelor) || !selectTrack(posDau) || !selectTrack(negDau)) { |
| 113 | + return false; |
| 114 | + } |
| 115 | + if (casc.sign() > 0) { |
| 116 | + if (TMath::Abs(posDau.tpcNSigmaPi()) > nSigmaTPCCut || TMath::Abs(negDau.tpcNSigmaPr()) > nSigmaTPCCut) { |
| 117 | + return false; |
| 118 | + } |
| 119 | + } else if (casc.sign() < 0) { |
| 120 | + if (TMath::Abs(negDau.tpcNSigmaPi()) > nSigmaTPCCut || TMath::Abs(posDau.tpcNSigmaPr()) > nSigmaTPCCut) { |
| 121 | + return false; |
| 122 | + } |
| 123 | + } |
| 124 | + if (TMath::Abs(casc.dcabachtopv()) < dcaBachToPV) { |
| 125 | + return false; |
| 126 | + } |
| 127 | + if (TMath::Abs(casc.dcacascdaughters()) > dcaV0Bach) { |
| 128 | + return false; |
| 129 | + } |
| 130 | + if (casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < minCascCosPA) { |
| 131 | + return false; |
| 132 | + } |
| 133 | + if (TMath::Abs(casc.eta()) > etaMax) { |
| 134 | + return false; |
| 135 | + } |
| 136 | + // mass cuts |
| 137 | + bool massInWindow = false; |
| 138 | + if (casc.mXi() > o2::constants::physics::MassXiMinus - mXiWindow && casc.mXi() < o2::constants::physics::MassXiMinus + mXiWindow) { |
| 139 | + massInWindow = true; |
| 140 | + } |
| 141 | + if (!massInWindow) { |
| 142 | + return false; |
| 143 | + } |
| 144 | + histos.fill(HIST("QA/massXi"), casc.pt(), casc.mXi()); |
| 145 | + return true; |
| 146 | + }; |
| 147 | + |
| 148 | + template <class T> |
| 149 | + bool isSelectedLambda(T const&, FullV0s::iterator const& v0) |
| 150 | + { |
| 151 | + auto posDau = v0.posTrack_as<T>(); |
| 152 | + auto negDau = v0.negTrack_as<T>(); |
| 153 | + |
| 154 | + if (!selectTrack(posDau) || !selectTrack(negDau)) { |
| 155 | + return false; |
| 156 | + } |
| 157 | + if (v0.alpha() > 0) { |
| 158 | + if (TMath::Abs(posDau.tpcNSigmaPr()) > nSigmaTPCCut || TMath::Abs(negDau.tpcNSigmaPi()) > nSigmaTPCCut) { |
| 159 | + return false; |
| 160 | + } |
| 161 | + } else { |
| 162 | + if (TMath::Abs(posDau.tpcNSigmaPi()) > nSigmaTPCCut || TMath::Abs(negDau.tpcNSigmaPr()) > nSigmaTPCCut) { |
| 163 | + return false; |
| 164 | + } |
| 165 | + } |
| 166 | + |
| 167 | + if (TMath::Abs(v0.dcapostopv()) < dcaLambdaDauToPV || TMath::Abs(v0.dcanegtopv()) < dcaLambdaDauToPV) { |
| 168 | + return false; |
| 169 | + } |
| 170 | + |
| 171 | + if (v0.v0cosPA() < minLambdaCosPA) { |
| 172 | + return false; |
| 173 | + } |
| 174 | + if (TMath::Abs(v0.eta()) > etaMax) { |
| 175 | + return false; |
| 176 | + } |
| 177 | + // mass cuts |
| 178 | + bool massInWindow = false; |
| 179 | + float massLambda = v0.alpha() > 0 ? v0.mLambda() : v0.mAntiLambda(); |
| 180 | + if (v0.mLambda() > o2::constants::physics::MassLambda - mLambdaWindow && v0.mLambda() < o2::constants::physics::MassLambda + mLambdaWindow) { |
| 181 | + massInWindow = true; |
| 182 | + } |
| 183 | + if (!massInWindow) { |
| 184 | + return false; |
| 185 | + } |
| 186 | + histos.fill(HIST("QA/massLambda"), v0.pt(), massLambda); |
| 187 | + return true; |
| 188 | + }; |
| 189 | + |
| 190 | + template <class C, class T> |
| 191 | + void fillXiLambda(C const& collision, T const& tracks, FullV0s const& v0s, FullCascades const& cascades) |
| 192 | + { |
| 193 | + for (auto& casc : cascades) { |
| 194 | + if (!isSelectedCasc(collision, tracks, casc)) { |
| 195 | + continue; |
| 196 | + } |
| 197 | + for (auto& v0 : v0s) { |
| 198 | + if (!isSelectedLambda(tracks, v0)) { |
| 199 | + continue; |
| 200 | + } |
| 201 | + if (casc.posTrackId() == v0.posTrackId() || casc.posTrackId() == v0.negTrackId()) { |
| 202 | + continue; |
| 203 | + } |
| 204 | + |
| 205 | + int mixType = -1; |
| 206 | + if (casc.sign() > 0 && v0.alpha() > 0) { |
| 207 | + mixType = 0; // xi - lambda |
| 208 | + } else if (casc.sign() > 0 && v0.alpha() < 0) { |
| 209 | + mixType = 1; // xi - anti-lambda |
| 210 | + } else if (casc.sign() < 0 && v0.alpha() > 0) { |
| 211 | + mixType = 2; // anti-xi - lambda |
| 212 | + } else if (casc.sign() < 0 && v0.alpha() < 0) { |
| 213 | + mixType = 3; // anti-xi - anti-lambda |
| 214 | + } |
| 215 | + |
| 216 | + ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<float>> cascMom4D(casc.px(), casc.py(), casc.pz(), o2::constants::physics::MassXiMinus); |
| 217 | + ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<float>> lambdaMom4D{v0.px(), v0.py(), v0.pz(), o2::constants::physics::MassLambda}; |
| 218 | + auto xiLambdaMom4D = cascMom4D + lambdaMom4D; |
| 219 | + histos.fill(HIST("xiMinusLambda"), xiLambdaMom4D.M(), xiLambdaMom4D.Pt(), mixType); |
| 220 | + } |
| 221 | + } |
| 222 | + }; |
| 223 | + |
| 224 | + void processData(Collisions const& collision, TracksFull const& tracks, FullV0s const& v0s, FullCascades const& cascades) |
| 225 | + { |
| 226 | + |
| 227 | + if (!collision.sel8()) |
| 228 | + return; |
| 229 | + |
| 230 | + if (std::abs(collision.posZ()) > zVtxMax) |
| 231 | + return; |
| 232 | + |
| 233 | + if (!collision.selection_bit(aod::evsel::kNoITSROFrameBorder) || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) |
| 234 | + return; |
| 235 | + |
| 236 | + histos.fill(HIST("QA/zVtx"), collision.posZ()); |
| 237 | + fillXiLambda(collision, tracks, v0s, cascades); |
| 238 | + } |
| 239 | +}; |
| 240 | + |
| 241 | +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
| 242 | +{ |
| 243 | + return WorkflowSpec{ |
| 244 | + adaptAnalysisTask<xiLambdaCorr>(cfgc)}; |
| 245 | +} |
0 commit comments