|
| 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 | +/// \file strangecasctrack.cxx |
| 13 | +/// \brief Analysis of strangeness tracking efficiency via primary production of Omega and Xi in Run 3 |
| 14 | +/// \author Yakiv Paroviak (yakiv.paroviak@cern.ch) |
| 15 | + |
| 16 | +#include "PWGLF/DataModel/LFStrangenessTables.h" |
| 17 | + |
| 18 | +#include "Common/DataModel/Centrality.h" |
| 19 | +#include "Common/DataModel/EventSelection.h" |
| 20 | +#include "Common/DataModel/Multiplicity.h" |
| 21 | + |
| 22 | +#include "Framework/ASoAHelpers.h" |
| 23 | +#include "Framework/AnalysisDataModel.h" |
| 24 | +#include "Framework/AnalysisTask.h" |
| 25 | +#include "Framework/runDataProcessing.h" |
| 26 | + |
| 27 | +using namespace o2; |
| 28 | +using namespace o2::framework; |
| 29 | +using namespace o2::framework::expressions; |
| 30 | +using namespace o2::constants::math; |
| 31 | + |
| 32 | +struct StrangeCascTrack { |
| 33 | + |
| 34 | + using TraCascDatas = soa::Join<aod::TraCascIndices, aod::TraCascCores>; |
| 35 | + using CascDatas = soa::Join<aod::CascIndices, aod::CascBBs, aod::CascCores>; |
| 36 | + |
| 37 | + HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; |
| 38 | + |
| 39 | + Configurable<bool> doProcessPP{"doProcessPP", true, "true for pp, false for PbPb and OO"}; |
| 40 | + Configurable<bool> doProcessPbPb{"doProcessPbPb", false, "true for PbPb, false for pp and OO"}; |
| 41 | + Configurable<bool> doProcessOO{"doProcessOO", false, "true for OO, false for pp and PbPb"}; |
| 42 | + |
| 43 | + Configurable<bool> doProcessMC{"doProcessMC", false, "true for MC, false for data"}; |
| 44 | + |
| 45 | + Configurable<bool> doRequireFT0{"doRequireFT0", false, "true for offline trigger for Run 3"}; |
| 46 | + Configurable<bool> doApplyPID{"doApplyPID", false, "true for offline trigger for Run 3"}; |
| 47 | + Configurable<bool> doApplyCuts{"doApplyCuts", true, "true for offline trigger for Run 3"}; |
| 48 | + |
| 49 | + ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0}, "p_{T} (GeV/c)"}; |
| 50 | + ConfigurableAxis axisMult{"axisMult", {VARIABLE_WIDTH, 0.0f, 0.01f, 1.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 70.0f, 100.0f}, "Multiplicity"}; |
| 51 | + ConfigurableAxis axisOmegaMass{"axisOmegaMass", {2000, 1.6, 1.8}, "#Omega M_{inv} (GeV/c^{2})"}; |
| 52 | + ConfigurableAxis axisXiMass{"axisXiMass", {2000, 1.2, 1.4}, "#Xi M_{inv} (GeV/c^{2})"}; |
| 53 | + |
| 54 | + Configurable<double> CutDCAtoPVxy{"CutDCAtoPVxy", 0.02f, "max cascade dca to PV in xy"}; |
| 55 | + Configurable<double> CutDCAtoPVz{"CutDCAtoPVz", 0.02f, "max cascade dca to PV in z"}; |
| 56 | + |
| 57 | + void init(InitContext const&) |
| 58 | + { |
| 59 | + histos.add("Events/EvCounter", "Event Counter", kTH1F, {{1, 0, 1}}); |
| 60 | + histos.add("Events/PVx", "PV x position", kTH1F, {{200, -0.1, 0.1}}); |
| 61 | + histos.add("Events/PVy", "PV y position", kTH1F, {{200, -0.1, 0.1}}); |
| 62 | + histos.add("Events/PVz", "PV z position", kTH1F, {{100, -20, 20}}); |
| 63 | + histos.add("Events/Mult", "Multiplicity", kTH1F, {axisMult}); |
| 64 | + |
| 65 | + histos.add("Tracked/Phi", "Phi", kTH1F, {{100, 0., 2 * M_PI}}); |
| 66 | + histos.add("Tracked/Eta", "Eta", kTH1F, {{102, -2.01, 2.01}}); |
| 67 | + histos.add("Tracked/DCAxy", "DCA to xy", kTH1F, {{500, 0., 0.5}}); |
| 68 | + histos.add("Tracked/DCAz", "DCA to z", kTH1F, {{500, 0., 0.5}}); |
| 69 | + histos.add("Tracked/EvMult", "Multiplicity of events with >=1 cascade", kTH1F, {axisMult}); |
| 70 | + histos.add("Tracked/MassOmega", "Invariant mass hypothesis", kTH1F, {axisOmegaMass}); |
| 71 | + histos.add("Tracked/MassXi", "Invariant mass hypothesis", kTH1F, {axisXiMass}); |
| 72 | + histos.add("Tracked/Omega", "", kTHnD, {axisOmegaMass, axisPt, axisMult}); |
| 73 | + histos.add("Tracked/Xi", "", kTHnD, {axisXiMass, axisPt, axisMult}); |
| 74 | + |
| 75 | + histos.add("All/Phi", "Phi", kTH1F, {{100, 0., 2 * M_PI}}); |
| 76 | + histos.add("All/Eta", "Eta", kTH1F, {{102, -2.01, 2.01}}); |
| 77 | + histos.add("All/DCAxy", "DCA to xy", kTH1F, {{1000, 0, 1.}}); |
| 78 | + histos.add("All/DCAz", "DCA to z", kTH1F, {{1000, 0, 1.}}); |
| 79 | + histos.add("All/EvMult", "Multiplicity of events with >=1 cascade", kTH1F, {axisMult}); |
| 80 | + histos.add("All/MassOmega", "Invariant mass hypothesis", kTH1F, {axisOmegaMass}); |
| 81 | + histos.add("All/MassXi", "Invariant mass hypothesis", kTH1F, {axisXiMass}); |
| 82 | + histos.add("All/Omega", "", kTHnD, {axisOmegaMass, axisPt, axisMult}); |
| 83 | + histos.add("All/Xi", "", kTHnD, {axisXiMass, axisPt, axisMult}); |
| 84 | + } |
| 85 | + |
| 86 | + void processTracked(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision, |
| 87 | + aod::TraCascDatas const& tracascades) |
| 88 | + { |
| 89 | + double mult = doProcessPP ? collision.centFT0M() : collision.centFT0C(); |
| 90 | + int64_t casccollid = 0; |
| 91 | + for (auto const& cascade : tracascades) { |
| 92 | + |
| 93 | + double dcaxy = cascade.dcaXYCascToPV(); |
| 94 | + double dcaz = cascade.dcaZCascToPV(); |
| 95 | + if (doApplyCuts && ((dcaxy > CutDCAtoPVxy) || (dcaz > CutDCAtoPVz))) |
| 96 | + continue; // DCA check |
| 97 | + |
| 98 | + if (collision.index() != casccollid) { |
| 99 | + histos.fill(HIST("Tracked/EvMult"), mult); // count and list mult of events with at least one cascade |
| 100 | + casccollid = collision.index(); |
| 101 | + } |
| 102 | + |
| 103 | + double pt = cascade.pt(); |
| 104 | + double phi = cascade.phi(); |
| 105 | + double eta = cascade.eta(); |
| 106 | + double massXi = cascade.mXi(); |
| 107 | + double massOmega = cascade.mOmega(); |
| 108 | + |
| 109 | + histos.fill(HIST("Tracked/DCAxy"), dcaxy); |
| 110 | + histos.fill(HIST("Tracked/DCAz"), dcaz); |
| 111 | + histos.fill(HIST("Tracked/Phi"), phi); |
| 112 | + histos.fill(HIST("Tracked/Eta"), eta); |
| 113 | + histos.fill(HIST("Tracked/MassXi"), massXi); |
| 114 | + histos.fill(HIST("Tracked/MassOmega"), massOmega); |
| 115 | + histos.fill(HIST("Tracked/Xi"), massXi, pt, mult); |
| 116 | + histos.fill(HIST("Tracked/Omega"), massOmega, pt, mult); |
| 117 | + } |
| 118 | + } |
| 119 | + |
| 120 | + void processAll(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision, |
| 121 | + aod::CascDatas const& cascades) |
| 122 | + { |
| 123 | + histos.fill(HIST("Events/EvCounter"), 0.5); |
| 124 | + double mult = doProcessPP ? collision.centFT0M() : collision.centFT0C(); |
| 125 | + histos.fill(HIST("Events/Mult"), mult); |
| 126 | + double pvx = collision.posX(); |
| 127 | + double pvy = collision.posY(); |
| 128 | + double pvz = collision.posZ(); |
| 129 | + histos.fill(HIST("Events/PVx"), pvx); |
| 130 | + histos.fill(HIST("Events/PVy"), pvy); |
| 131 | + histos.fill(HIST("Events/PVz"), pvz); |
| 132 | + |
| 133 | + int64_t casccollid = 0; |
| 134 | + for (auto const& cascade : cascades) { |
| 135 | + |
| 136 | + double dcaxy = cascade.dcaXYCascToPV(); |
| 137 | + double dcaz = cascade.dcaZCascToPV(); |
| 138 | + if (doApplyCuts && ((dcaxy > CutDCAtoPVxy) || (dcaz > CutDCAtoPVz))) |
| 139 | + continue; // DCA check |
| 140 | + |
| 141 | + if (collision.index() != casccollid) { |
| 142 | + histos.fill(HIST("All/EvMult"), mult); // count and list mult of events with at least one cascade |
| 143 | + casccollid = collision.index(); |
| 144 | + } |
| 145 | + |
| 146 | + double pt = cascade.pt(); |
| 147 | + double phi = cascade.phi(); |
| 148 | + double eta = cascade.eta(); |
| 149 | + double massXi = cascade.mXi(); |
| 150 | + double massOmega = cascade.mOmega(); |
| 151 | + |
| 152 | + histos.fill(HIST("All/DCAxy"), dcaxy); |
| 153 | + histos.fill(HIST("All/DCAz"), dcaz); |
| 154 | + histos.fill(HIST("All/Phi"), phi); |
| 155 | + histos.fill(HIST("All/Eta"), eta); |
| 156 | + histos.fill(HIST("All/MassXi"), massXi); |
| 157 | + histos.fill(HIST("All/MassOmega"), massOmega); |
| 158 | + histos.fill(HIST("All/Xi"), massXi, pt, mult); |
| 159 | + histos.fill(HIST("All/Omega"), massOmega, pt, mult); |
| 160 | + } |
| 161 | + } |
| 162 | + PROCESS_SWITCH(StrangeCascTrack, processTracked, "process tracked cascades", true); |
| 163 | + PROCESS_SWITCH(StrangeCascTrack, processAll, "process all cascades", true); |
| 164 | +}; |
| 165 | + |
| 166 | +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
| 167 | +{ |
| 168 | + return WorkflowSpec{ |
| 169 | + adaptAnalysisTask<StrangeCascTrack>(cfgc), |
| 170 | + }; |
| 171 | +} |
0 commit comments