|
| 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 | +// author Nida Malik ([email protected]) |
| 13 | +// Department of Physics, Aligarh Muslim University, India |
| 14 | +// to study the net charge fluctuations by observable, #nu_dyn |
| 15 | + |
| 16 | +#include "Framework/AnalysisTask.h" |
| 17 | +#include "Framework/runDataProcessing.h" |
| 18 | +#include "Common/DataModel/EventSelection.h" |
| 19 | +#include "Common/DataModel/Multiplicity.h" |
| 20 | +#include "Common/DataModel/Centrality.h" |
| 21 | +#include "Common/Core/TrackSelection.h" |
| 22 | +#include "Common/DataModel/TrackSelectionTables.h" |
| 23 | + |
| 24 | +using namespace o2; |
| 25 | +using namespace o2::framework; |
| 26 | +using namespace o2::framework::expressions; |
| 27 | +using namespace std; |
| 28 | + |
| 29 | +namespace o2::aod |
| 30 | +{ |
| 31 | +using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2V0Ms, aod::Mults>; |
| 32 | +using MyCollision = MyCollisions::iterator; |
| 33 | + |
| 34 | +using MyTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection>; |
| 35 | +using MyTrack = MyTracks::iterator; |
| 36 | +} // namespace o2::aod |
| 37 | + |
| 38 | +struct NetchargeFluctuations { |
| 39 | + HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; |
| 40 | + void init(o2::framework::InitContext&) |
| 41 | + { |
| 42 | + AxisSpec vtxZAxis = {100, -20, 20, "Z (cm)"}; |
| 43 | + AxisSpec dcaAxis = {1000, -100, 100, "DCA_{xy} (cm)"}; |
| 44 | + AxisSpec dcazAxis = {1000, -100, 100, "DCA_{z} (cm)"}; |
| 45 | + AxisSpec ptAxis = {40, 0.0, 4.0, "#it{p}_{T} (GeV/#it{c})"}; |
| 46 | + AxisSpec etaAxis = {30, -1.5, 1.5, "#eta"}; |
| 47 | + AxisSpec centAxis = {100, 0., 100., "centrality"}; |
| 48 | + AxisSpec multAxis = {2000, 0., 2000., "multiplicity"}; |
| 49 | + |
| 50 | + histos.add("hVertexZ_bef", "", kTH1F, {vtxZAxis}); |
| 51 | + histos.add("hVertexZ_aft", "", kTH1F, {vtxZAxis}); |
| 52 | + histos.add("hVertexZ_aft_sel", "", kTH1D, {vtxZAxis}); |
| 53 | + histos.add("hDCAxy_bef", "", kTH1D, {dcaAxis}); |
| 54 | + histos.add("hDCAxy_aft", "", kTH1D, {dcaAxis}); |
| 55 | + histos.add("hDCAz_bef", "", kTH1D, {dcazAxis}); |
| 56 | + histos.add("hDCAz_aft", "", kTH1D, {dcazAxis}); |
| 57 | + histos.add("hCentrality", "", kTH1D, {centAxis}); |
| 58 | + histos.add("hMultiplicity", "", kTH1D, {multAxis}); |
| 59 | + histos.add("hEta", "", kTH1F, {etaAxis}); |
| 60 | + histos.add("hPt", "", kTH1F, {ptAxis}); |
| 61 | + } |
| 62 | + |
| 63 | + void process(aod::MyCollision const& coll, aod::MyTracks const& inputTracks) |
| 64 | + { |
| 65 | + histos.fill(HIST("hVertexZ_bef"), coll.posZ()); |
| 66 | + |
| 67 | + if (std::fabs(coll.posZ()) > 10.f) { |
| 68 | + return; |
| 69 | + } |
| 70 | + histos.fill(HIST("hVertexZ_aft"), coll.posZ()); |
| 71 | + |
| 72 | + if (!coll.sel7()) { |
| 73 | + return; |
| 74 | + } |
| 75 | + histos.fill(HIST("hVertexZ_aft_sel"), coll.posZ()); |
| 76 | + histos.fill(HIST("hCentrality"), coll.centRun2V0M()); |
| 77 | + histos.fill(HIST("hMultiplicity"), coll.multFV0M()); |
| 78 | + |
| 79 | + for (auto const& track : inputTracks) { |
| 80 | + if (std::fabs(track.eta()) > 0.8) |
| 81 | + continue; |
| 82 | + if (!(track.pt() > 0.2 && track.pt() < 2.)) |
| 83 | + continue; |
| 84 | + |
| 85 | + histos.fill(HIST("hDCAxy_bef"), track.dcaXY()); |
| 86 | + histos.fill(HIST("hDCAz_bef"), track.dcaZ()); |
| 87 | + |
| 88 | + if (!track.isGlobalTrack()) |
| 89 | + continue; |
| 90 | + |
| 91 | + histos.fill(HIST("hDCAxy_aft"), track.dcaXY()); |
| 92 | + histos.fill(HIST("hDCAz_aft"), track.dcaZ()); |
| 93 | + histos.fill(HIST("hPt"), track.pt()); |
| 94 | + histos.fill(HIST("hEta"), track.eta()); |
| 95 | + } |
| 96 | + } |
| 97 | +}; |
| 98 | +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
| 99 | +{ |
| 100 | + WorkflowSpec workflow{adaptAnalysisTask<NetchargeFluctuations>(cfgc)}; |
| 101 | + return workflow; |
| 102 | +} |
0 commit comments