|
| 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 | +/// \brief |
| 13 | +/// \author everyone |
| 14 | + |
| 15 | +#include <Framework/AnalysisDataModel.h> // tpcNClsCrossedRows |
| 16 | +#include <Framework/AnalysisTask.h> // |
| 17 | +#include <Framework/runDataProcessing.h> // |
| 18 | +#include <Framework/HistogramRegistry.h> |
| 19 | +#include <Framework/HistogramSpec.h> |
| 20 | +#include <Framework/InitContext.h> |
| 21 | +#include <Framework/OutputObjHeader.h> |
| 22 | +#include <Framework/Configurable.h> |
| 23 | +#include <Framework/AnalysisHelpers.h> |
| 24 | + |
| 25 | +#include <Common/DataModel/TrackSelectionTables.h> // TracksDCA |
| 26 | +#include <Common/DataModel/EventSelection.h> // ft0cOccupancyInTimeRange,trackOccupancyInTimeRange |
| 27 | +#include <Common/DataModel/Centrality.h> // |
| 28 | +#include <Common/DataModel/Multiplicity.h> // multNTracksPVeta1, multNTracksGlobal |
| 29 | + |
| 30 | +#include "Common/CCDB/EventSelectionParams.h" //kIsTriggerTVX, kNoSameBunchPileup, kIsGoodZvtxFT0vsPV |
| 31 | + |
| 32 | +#include <string> |
| 33 | +#include <vector> |
| 34 | +#include <cmath> |
| 35 | + |
| 36 | + |
| 37 | +using namespace o2; |
| 38 | +using namespace o2::framework; |
| 39 | +using namespace o2::framework::expressions; |
| 40 | + |
| 41 | +using CollisionCandidates = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::PVMults, aod::MultsGlobal, aod::Mults>; |
| 42 | +using TrackCandidates = soa::Join<aod::Tracks, aod::TracksDCA, aod::TracksExtra>; |
| 43 | + |
| 44 | +struct CentralityClassificationPbPb |
| 45 | +{ |
| 46 | + |
| 47 | + struct EventSelections : ConfigurableGroup { |
| 48 | + std::string prefix = "EventSelections-Configurations"; // JSON group name |
| 49 | + Configurable<bool> rejectSameBunchPileup{"rejectSameBunchPileup", true, "reject collisions in case of pileup with another collision in the same foundBC (Run 3 only)"}; |
| 50 | + Configurable<bool> requireSel8{"requireSel8", true, "require sel8 event selection"}; |
| 51 | + Configurable<bool> requireTriggerTVX{"requireTriggerTVX", true, "require FT0 vertex (acceptable FT0C-FT0A time difference) at trigger level"}; |
| 52 | + Configurable<bool> requireIsGoodZvtxFT0VsPV{"requireIsGoodZvtxFT0VsPV", true, "require events with PV position along z consistent (within 1 cm) between PV reconstructed using tracks and PV using FT0 A-C time difference (Run 3 only)"}; |
| 53 | + Configurable<bool> useFT0CbasedOccupancy{"useFT0CbasedOccupancy", true, "Use sum of FT0-C amplitudes for estimating occupancy? (if not, use track-based definition)"}; |
| 54 | + |
| 55 | + Configurable<float> maxZVtxPosition{"maxZVtxPosition", 10., "max Z vtx position"}; |
| 56 | + Configurable<float> minOccupancy{"minOccupancy", -1, "minimum occupancy from neighbouring collisions"}; |
| 57 | + Configurable<float> maxOccupancy{"maxOccupancy", -1, "maximum occupancy from neighbouring collisions"}; |
| 58 | + Configurable<float> maxCent{"maxCent", 100.0f, "max centrality percentil"}; |
| 59 | + Configurable<float> minCent{"minCent", 0.0f, "min centrality percentil"}; |
| 60 | + |
| 61 | + } eventSelections; |
| 62 | + |
| 63 | + |
| 64 | + struct TrackSelections : ConfigurableGroup { |
| 65 | + std::string prefix = "TrackSelections-Configurations"; // JSON group name |
| 66 | + Configurable<int> minTPCrows{"minTPCrows", 70, "minimum TPC crossed rows"}; |
| 67 | + |
| 68 | + Configurable<bool> requireTPCRefit{"RequireTPCRefit", true, "Require TPC Refit"}; |
| 69 | + Configurable<bool> requireITSRefit{"RequireITSRefit", true, "Require ITS Refit"}; |
| 70 | + Configurable<bool> requireITSibAny{"requireITSibAny", true, "Require ITS inner barrel (ib) any hits"}; |
| 71 | + |
| 72 | + //Configurable<float> dcaZpos{"dcaZpos", 0.2, "DCA Pos To PV (cm)"}; |
| 73 | + Configurable<float> dcaZconst{"dcaZconst", 0.0028f, "Constant term for DCAz cut (cm)"}; |
| 74 | + Configurable<float> dcaZpt{"dcaZpt", 0.0175f, "pT-dependent coefficient for DCAz cut (cm)"}; |
| 75 | + Configurable<float> dcaZexp{"dcaZexp", -0.88f, "Exponent for DCAz cut"}; |
| 76 | + Configurable<float> dcaXYconst{"dcaXYconst", 0.0035f, "Constant term for DCAxy cut (cm)"}; |
| 77 | + Configurable<float> dcaXYpt{"dcaXYpt", 0.0145f, "pT-dependent coefficient for DCAxy cut (cm)"}; |
| 78 | + Configurable<float> dcaXYexp{"dcaXYexp", 0.91f, "Exponent for DCAxy cut"}; |
| 79 | + Configurable<float> maxeta{"maxeta", 2.0f, "pseudorapidity cut"}; |
| 80 | + Configurable<float> minpT{"minpT", 0.15f, "Min pT cut"}; |
| 81 | + Configurable<float> maxChi2TPC{"maxChi2TPC", 4.0f, "Max Chi2 per cluster TPC "}; |
| 82 | + Configurable<float> maxChi2ITS{"maxChi2ITS", 36.0f, "Max Chi2 per cluster ITS "}; |
| 83 | + Configurable<float> minNCrossedRowsOverFindableClustersTPC{"minNCrossedRowsOverFindableClustersTPC", 0.8f, "Additional cut on the minimum value of the ratio between crossed rows and findable clusters in the TPC"}; |
| 84 | + } trackSelections; |
| 85 | + |
| 86 | + |
| 87 | + struct AxisConfigurations : ConfigurableGroup { |
| 88 | + std::string prefix = "axis-Configurations"; // JSON group name |
| 89 | + //ConfigurableAxis axisPt{"axispT", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "#it{p}_{T} (GeV/#it{c})"}; |
| 90 | + ConfigurableAxis axisEta{"axisEta", {100, -2.0f, 2.0f}, "Eta"}; |
| 91 | + ConfigurableAxis axisPhi{"axisPhi", {100, 0, 2 * M_PI}, " Phi"}; |
| 92 | + ConfigurableAxis axispT{"axispT", {100, 0.15f, 10}, " pT"}; |
| 93 | + ConfigurableAxis axisdcaZ{"axisdcaZ",{2000, -3.0f, 3.0f}, "dcaZ"}; |
| 94 | + ConfigurableAxis axisdcaXY{"axisdcaXY",{2000, -1.0f, 1.0f}, "dcaXY"}; |
| 95 | + ConfigurableAxis axisEvSelection{"axisEvSelection",{10, 0.5f, 10.5f}, ""}; |
| 96 | + ConfigurableAxis axisTrackSelection{"axisTrackSelection",{8, 0.5f, 8.5f}, ""}; |
| 97 | + ConfigurableAxis axisCent{"axisCent",{100, 0, 100}, ""}; |
| 98 | + //ConfigurableAxis axisUltCent{"axisUltCent",{VARIABLE_WIDTH, 0.0, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1.0}, ""}; |
| 99 | + ConfigurableAxis axisMult{"axisMult",{500, 0.0f, 5000.0f}, "Multiplicity"}; |
| 100 | + //ConfigurableAxis axisAmplitude{"axisAmplitude", {VARIABLE_WIDTH, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140,160, 180, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000,2500, 3000, 3500,4000, 4500, 5000, 6000, 7000, 8000, 9000, 10000, 12000, 14000, 16000, 18000, 20000, 25000, 30000, 35000, 40000, 45000, 50000,60000, 70000}, "FT0C Amplitude"}; |
| 101 | + ConfigurableAxis axisAmplitude{"axisAmplitude",{1400, 0.0f, 70000.0f},"FT0C Amplitude"}; |
| 102 | + ConfigurableAxis axisVz{"axisVz", {200, -10.0f, 10.0f}, "V_{z} (cm)"}; //nuevo |
| 103 | + } axisConfigurations; |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; |
| 108 | + |
| 109 | + |
| 110 | + void init(InitContext const&) |
| 111 | + { |
| 112 | + histos.add("hEventSelection", "hEventSelection", kTH1D, {axisConfigurations.axisEvSelection}); |
| 113 | + histos.add("hTrackSelection", "hTrackSelection", kTH1D, {axisConfigurations.axisTrackSelection}); |
| 114 | + |
| 115 | + histos.add("hEventNchCorrelationBefCuts", "hEventNchCorrelationBefCuts", kTH2F, {{5000, 0, 5000}, {2500, 0, 2500}}); |
| 116 | + histos.add("hEventNchCorrelation", "hEventNchCorrelation", kTH2F, {{5000, 0, 5000}, {2500, 0, 2500}}); |
| 117 | + |
| 118 | + histos.add("hEventPVcontributorsVsCentralityBefCuts", "hEventPVcontributorsVsCentralityBefCuts", kTH2F, {{100, 0, 100}, {5000, 0, 5000}}); |
| 119 | + histos.add("hEventPVcontributorsVsCentrality", "hEventPVcontributorsVsCentrality", kTH2F, {{100, 0, 100}, {5000, 0, 5000}}); |
| 120 | + |
| 121 | + histos.add("hEventGlobalTracksVsCentralityBefCuts", "hEventGlobalTracksVsCentralityBefCuts", kTH2F, {{100, 0, 100}, {2500, 0, 2500}}); |
| 122 | + histos.add("hEventGlobalTracksVsCentrality", "hEventGlobalTracksVsCentrality", kTH2F, {{100, 0, 100}, {2500, 0, 2500}}); |
| 123 | + |
| 124 | + histos.add("hNTracksVSetaBefCuts", "hNTracksVSetaBefCuts", kTH1D, {axisConfigurations.axisEta}); |
| 125 | + histos.add("hNTracksVSeta", "hNTracksVSeta", kTH1D, {axisConfigurations.axisEta}); |
| 126 | + |
| 127 | + histos.add("hNTracksVSphiBefCuts", "hNTracksVSphiBefCuts", kTH1D, {axisConfigurations.axisPhi}); |
| 128 | + histos.add("hNTracksVSphi", "hNTracksVSphi", kTH1D, {axisConfigurations.axisPhi}); |
| 129 | + |
| 130 | + histos.add("hdcaZVSptBefCuts", "hdcaZVSptBefCuts", kTH2F, {axisConfigurations.axisdcaZ, axisConfigurations.axispT}); |
| 131 | + histos.add("hdcaZVSpt", "hdcaZVSpt", kTH2F, {axisConfigurations.axisdcaZ, axisConfigurations.axispT}); |
| 132 | + |
| 133 | + histos.add("hdcaXYVSptBefCuts", "hdcaXYVSptBefCut", kTH2F, {axisConfigurations.axisdcaXY, axisConfigurations.axispT}); |
| 134 | + histos.add("hdcaXYVSpt", "hdcaXYVSpt", kTH2F, {axisConfigurations.axisdcaXY, axisConfigurations.axispT}); |
| 135 | + |
| 136 | + histos.add("hFT0CAmplitude", "hFT0CAmplitude", kTH1D, {axisConfigurations.axisAmplitude}); |
| 137 | + //histos.add("hUltCent", "hUltCent", kTH1F, {axisConfigurations.axisUltCent}); |
| 138 | + histos.add("hFT0CAmplitudeVSMult", "hFT0CAmplitudeVSMult", kTH2F, {axisConfigurations.axisAmplitude, axisConfigurations.axisMult}); |
| 139 | + histos.add("hFT0CAmplitudeVSpT", "hFT0CAmplitudeVSpT", kTH2F, {axisConfigurations.axisAmplitude, axisConfigurations.axispT}); |
| 140 | + histos.add("hFT0CAmplitudeVsVz", "hFT0CAmplitudeVsVz", kTH2F, {axisConfigurations.axisVz, axisConfigurations.axisAmplitude}); |
| 141 | + |
| 142 | + histos.add("hMultSelectedTracks", "Multiplicity of selected tracks;N_{tracks};Events", kTH1D, {axisConfigurations.axisMult}); |
| 143 | + histos.add("hMultGlobalTracks", "Global tracks multiplicity;multNTracksGlobal;Events", kTH1D, {axisConfigurations.axisMult}); |
| 144 | + histos.add("hMultPVeta1", "PV contributors (|#eta| < 1);multNTracksPVeta1;Events", kTH1D, {axisConfigurations.axisMult}); |
| 145 | + |
| 146 | + |
| 147 | + auto hEvSelCount = histos.get<TH1>(HIST("hEventSelection")); |
| 148 | + hEvSelCount->GetXaxis()->SetBinLabel(1, "All events"); |
| 149 | + hEvSelCount->GetXaxis()->SetBinLabel(2, "sel8"); |
| 150 | + hEvSelCount->GetXaxis()->SetBinLabel(3, "kIsTriggerTVX"); |
| 151 | + hEvSelCount->GetXaxis()->SetBinLabel(4, "Vertex Z position"); |
| 152 | + hEvSelCount->GetXaxis()->SetBinLabel(5, "kIsGoodZvtxFT0vsPV"); |
| 153 | + hEvSelCount->GetXaxis()->SetBinLabel(6, "kNoSameBunchPileup"); |
| 154 | + hEvSelCount->GetXaxis()->SetBinLabel(7, "Below min occup."); |
| 155 | + hEvSelCount->GetXaxis()->SetBinLabel(8, "Above max occup."); |
| 156 | + hEvSelCount->GetXaxis()->SetBinLabel(9, "Centrality"); |
| 157 | + hEvSelCount->GetXaxis()->SetBinLabel(10, "Selected events"); |
| 158 | + |
| 159 | + auto hTrackSelCount = histos.get<TH1>(HIST("hTrackSelection")); |
| 160 | + hTrackSelCount->GetXaxis()->SetBinLabel(1, "All tracks"); |
| 161 | + hTrackSelCount->GetXaxis()->SetBinLabel(2, "TPC tracks"); |
| 162 | + hTrackSelCount->GetXaxis()->SetBinLabel(3, "ITS tracks"); |
| 163 | + hTrackSelCount->GetXaxis()->SetBinLabel(4, "eta selection"); |
| 164 | + hTrackSelCount->GetXaxis()->SetBinLabel(5, "min pT selection"); |
| 165 | + hTrackSelCount->GetXaxis()->SetBinLabel(6, "dcaXY"); |
| 166 | + hTrackSelCount->GetXaxis()->SetBinLabel(7, "dcaZ"); |
| 167 | + hTrackSelCount->GetXaxis()->SetBinLabel(8, "Selected tracks"); |
| 168 | + |
| 169 | + } |
| 170 | + |
| 171 | + template <typename TCollision> |
| 172 | + bool isEventAccepted(const TCollision& collision, bool fillHists) |
| 173 | + { |
| 174 | + if (fillHists) { |
| 175 | + histos.fill(HIST("hEventSelection"), 1); |
| 176 | + histos.fill(HIST("hEventNchCorrelationBefCuts"), collision.multNTracksPVeta1(), collision.multNTracksGlobal()); |
| 177 | + histos.fill(HIST("hEventPVcontributorsVsCentralityBefCuts"), collision.centFT0C(), collision.multNTracksPVeta1()); |
| 178 | + histos.fill(HIST("hEventGlobalTracksVsCentralityBefCuts"), collision.centFT0C(), collision.multNTracksGlobal()); |
| 179 | + } |
| 180 | + |
| 181 | + if (eventSelections.requireSel8 && !collision.sel8()) { |
| 182 | + return false; |
| 183 | + } |
| 184 | + if (fillHists) { |
| 185 | + histos.fill(HIST("hEventSelection"), 2); |
| 186 | + } |
| 187 | + |
| 188 | + if (eventSelections.requireTriggerTVX && !collision.selection_bit(aod::evsel::kIsTriggerTVX)) { |
| 189 | + return false; |
| 190 | + } |
| 191 | + if (fillHists) { |
| 192 | + histos.fill(HIST("hEventSelection"), 3 ); |
| 193 | + } |
| 194 | + |
| 195 | + if (std::abs(collision.posZ()) > eventSelections.maxZVtxPosition) { |
| 196 | + return false; |
| 197 | + } |
| 198 | + if (fillHists) { |
| 199 | + histos.fill(HIST("hEventSelection"), 4); |
| 200 | + } |
| 201 | + |
| 202 | + if (eventSelections.requireIsGoodZvtxFT0VsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { |
| 203 | + return false; |
| 204 | + } |
| 205 | + if (fillHists) { |
| 206 | + histos.fill(HIST("hEventSelection"), 5 ); |
| 207 | + } |
| 208 | + |
| 209 | + if (eventSelections.rejectSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { |
| 210 | + return false; |
| 211 | + } |
| 212 | + if (fillHists) { |
| 213 | + histos.fill(HIST("hEventSelection"), 6); |
| 214 | + } |
| 215 | + |
| 216 | + float collisionOccupancy = eventSelections.useFT0CbasedOccupancy ? collision.ft0cOccupancyInTimeRange() : collision.trackOccupancyInTimeRange(); |
| 217 | + if (eventSelections.minOccupancy >= 0 && collisionOccupancy < eventSelections.minOccupancy) { |
| 218 | + return false; |
| 219 | + } |
| 220 | + if (fillHists) { |
| 221 | + histos.fill(HIST("hEventSelection"), 7); |
| 222 | + } |
| 223 | + |
| 224 | + if (eventSelections.maxOccupancy >= 0 && collisionOccupancy > eventSelections.maxOccupancy) { |
| 225 | + return false; |
| 226 | + } |
| 227 | + if (fillHists) { |
| 228 | + histos.fill(HIST("hEventSelection"), 8); |
| 229 | + } |
| 230 | + /* PONER CONFIGURABLES */ |
| 231 | + if (collision.centFT0C() < eventSelections.minCent || collision.centFT0C() > eventSelections.maxCent) { |
| 232 | + return false; |
| 233 | + } |
| 234 | + if (fillHists) { |
| 235 | + histos.fill(HIST("hEventSelection"), 9); |
| 236 | + } |
| 237 | + |
| 238 | + |
| 239 | + if (fillHists) { |
| 240 | + //Arfer Event Selection |
| 241 | + histos.fill(HIST("hEventSelection"), 10); |
| 242 | + histos.fill(HIST("hEventNchCorrelation"), collision.multNTracksPVeta1(), collision.multNTracksGlobal()); |
| 243 | + histos.fill(HIST("hEventPVcontributorsVsCentrality"), collision.centFT0C(), collision.multNTracksPVeta1()); |
| 244 | + histos.fill(HIST("hEventGlobalTracksVsCentrality"), collision.centFT0C(), collision.multNTracksGlobal()); |
| 245 | + } |
| 246 | + |
| 247 | + return true; |
| 248 | + } |
| 249 | + |
| 250 | + |
| 251 | + template <typename CheckTrack> |
| 252 | + bool IsTrackSelected(CheckTrack const& track, bool fillHists) |
| 253 | + { |
| 254 | + if (fillHists) { |
| 255 | + histos.fill(HIST("hTrackSelection"), 1); |
| 256 | + } |
| 257 | + |
| 258 | + //TPC cuts |
| 259 | + if (trackSelections.requireTPCRefit && !track.hasTPC()) { |
| 260 | + return false; |
| 261 | + } |
| 262 | + if (track.hasTPC() && (track.tpcNClsCrossedRows() < trackSelections.minTPCrows || track.tpcChi2NCl() > trackSelections.maxChi2TPC || track.tpcCrossedRowsOverFindableCls() < trackSelections.minNCrossedRowsOverFindableClustersTPC)) { |
| 263 | + return false; |
| 264 | + } |
| 265 | + if (fillHists) { |
| 266 | + histos.fill(HIST("hTrackSelection"), 2); |
| 267 | + } |
| 268 | + |
| 269 | + //ITS cuts |
| 270 | + if (trackSelections.requireITSRefit && !track.hasITS()) { |
| 271 | + return false; |
| 272 | + } |
| 273 | + if (trackSelections.requireITSibAny && !(track.itsClusterMap() & 0x7)) { |
| 274 | + return false; |
| 275 | + } |
| 276 | + if (track.hasITS() && track.itsChi2NCl() > trackSelections.maxChi2ITS) { |
| 277 | + return false; |
| 278 | + } |
| 279 | + if (fillHists) { |
| 280 | + histos.fill(HIST("hTrackSelection"), 3); |
| 281 | + } |
| 282 | + |
| 283 | + // eta cut |
| 284 | + if(fabs(track.eta()) > trackSelections.maxeta){ |
| 285 | + return false; |
| 286 | + } |
| 287 | + if (fillHists) { |
| 288 | + histos.fill(HIST("hTrackSelection"), 4); |
| 289 | + } |
| 290 | + |
| 291 | + // pT cut |
| 292 | + if(track.pt() < trackSelections.minpT){ |
| 293 | + return false; |
| 294 | + } |
| 295 | + if (fillHists) { |
| 296 | + histos.fill(HIST("hTrackSelection"), 5); |
| 297 | + } |
| 298 | + |
| 299 | + // dcaXY cut |
| 300 | + float maxDCAxy = trackSelections.dcaXYconst + trackSelections.dcaXYpt * std::pow(track.pt(), trackSelections.dcaXYexp); |
| 301 | + if(fabs(track.dcaXY()) > maxDCAxy){ |
| 302 | + return false; |
| 303 | + } |
| 304 | + if (fillHists) { |
| 305 | + histos.fill(HIST("hTrackSelection"), 6); |
| 306 | + } |
| 307 | + |
| 308 | + //dcaZ VS pt before max dcaZ=0.2 selection, but after dcaXY |
| 309 | + if (fillHists) { |
| 310 | + histos.fill(HIST("hdcaZVSptBefCuts"), track.dcaZ(), track.pt()); |
| 311 | + } |
| 312 | + |
| 313 | + // dcaZ cut |
| 314 | + float maxDCAz = trackSelections.dcaZconst + trackSelections.dcaZpt * std::pow(track.pt(), trackSelections.dcaZexp); |
| 315 | + if(fabs(track.dcaZ()) > maxDCAz){ |
| 316 | + return false; |
| 317 | + } |
| 318 | + if (fillHists) { |
| 319 | + histos.fill(HIST("hTrackSelection"), 7); |
| 320 | + } |
| 321 | + |
| 322 | + //dcaZ VS pt after max dcaZ=0.2 selection |
| 323 | + if (fillHists) { |
| 324 | + histos.fill(HIST("hdcaZVSpt"), track.dcaZ(), track.pt()); |
| 325 | + histos.fill(HIST("hTrackSelection"), 8); |
| 326 | + } |
| 327 | + |
| 328 | + return true; |
| 329 | + } |
| 330 | + |
| 331 | + |
| 332 | + void process(CollisionCandidates::iterator const& collision, TrackCandidates const& tracks, aod::FT0s const& ) |
| 333 | + { |
| 334 | + |
| 335 | + if (!isEventAccepted(collision, true)) { |
| 336 | + return; |
| 337 | + } |
| 338 | + |
| 339 | + //Looping over tracks before selection |
| 340 | + for (int i = 0; i < tracks.size(); i++) { |
| 341 | + auto track = tracks.iteratorAt(i); |
| 342 | + histos.fill(HIST("hNTracksVSetaBefCuts"), track.eta()); |
| 343 | + histos.fill(HIST("hNTracksVSphiBefCuts"), track.phi()); |
| 344 | + histos.fill(HIST("hdcaXYVSptBefCuts"), track.dcaXY(), track.pt()); |
| 345 | + } |
| 346 | + //Collision selection level |
| 347 | + if (!collision.has_foundFT0()) { |
| 348 | + return; |
| 349 | + } |
| 350 | + const auto& ft0 = collision.foundFT0(); |
| 351 | + float ft0cAmp = ft0.sumAmpC(); |
| 352 | + int multiplicity = collision.multNTracksPVeta1(); |
| 353 | + histos.fill(HIST("hFT0CAmplitude"),ft0cAmp); |
| 354 | + histos.fill(HIST("hFT0CAmplitudeVsVz"), collision.posZ(), ft0cAmp); |
| 355 | + histos.fill(HIST("hFT0CAmplitudeVSMult"), ft0cAmp, multiplicity); |
| 356 | + |
| 357 | + |
| 358 | + //Looping over selected tracks |
| 359 | + int nSelTracks = 0; |
| 360 | + for (int i = 0; i < tracks.size(); i++) { |
| 361 | + auto track = tracks.iteratorAt(i); |
| 362 | + if (!IsTrackSelected(track, true)) { |
| 363 | + continue; |
| 364 | + } |
| 365 | + nSelTracks++; |
| 366 | + histos.fill(HIST("hNTracksVSeta"), track.eta()); |
| 367 | + histos.fill(HIST("hNTracksVSphi"), track.phi()); |
| 368 | + histos.fill(HIST("hdcaXYVSpt"), track.dcaXY(), track.pt()); |
| 369 | + histos.fill(HIST("hFT0CAmplitudeVSpT"), ft0cAmp, track.pt()); |
| 370 | + } |
| 371 | + |
| 372 | + //histograms for mult |
| 373 | + histos.fill(HIST("hMultSelectedTracks"), nSelTracks); |
| 374 | + histos.fill(HIST("hMultGlobalTracks"), collision.multNTracksGlobal()); |
| 375 | + histos.fill(HIST("hMultPVeta1"), collision.multNTracksPVeta1()); |
| 376 | + |
| 377 | + } |
| 378 | +}; |
| 379 | + |
| 380 | +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
| 381 | +{ |
| 382 | + return WorkflowSpec{ |
| 383 | + adaptAnalysisTask<CentralityClassificationPbPb>(cfgc) |
| 384 | + }; |
| 385 | +} |
0 commit comments