Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGCF] Net charge #9525

Merged
merged 18 commits into from
Jan 30, 2025
9 changes: 2 additions & 7 deletions PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check warning on line 1 in PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Use kebab-case for names of workflows and match the name of the workflow file.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
Expand All @@ -9,7 +9,7 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

o2physics_add_dpl_workflow(meanpt-fluctuations

Check warning on line 12 in PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name meanpt-fluctuations does not match its file name MeanptFluctuations.cxx. (Matches meanptFluctuations.cxx.)
SOURCES MeanptFluctuations.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)
Expand All @@ -19,37 +19,32 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(netproton-cumulants

Check warning on line 22 in PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name netproton-cumulants does not match its file name NetProtonCumulants.cxx. (Matches netprotonCumulants.cxx.)
SOURCES NetProtonCumulants.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(identified-meanpt-fluctuations

Check warning on line 27 in PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name identified-meanpt-fluctuations does not match its file name IdentifiedMeanPtFluctuations.cxx. (Matches identifiedMeanptFluctuations.cxx.)
SOURCES IdentifiedMeanPtFluctuations.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(robust-fluctuation-observables

Check warning on line 32 in PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name robust-fluctuation-observables does not match its file name RobustFluctuationObservables.cxx. (Matches robustFluctuationObservables.cxx.)
SOURCES RobustFluctuationObservables.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(v0pt-pp-task

Check warning on line 37 in PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name v0pt-pp-task does not match its file name Diff_pT_fluct_PID.cxx. (Matches v0ptPpTask.cxx.)
SOURCES Diff_pT_fluct_PID.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(factorial-moments

Check warning on line 42 in PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name factorial-moments does not match its file name FactorialMomentsTask.cxx. (Matches factorialMoments.cxx.)
SOURCES FactorialMomentsTask.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(netproton-cumulants-mc
SOURCES netprotonCumulantsMc.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(kaon-isospin-fluctuations
SOURCES kaonIsospinFluctuations.cxx
o2physics_add_dpl_workflow(netcharge-fluctuations
SOURCES netchargeFluctuations.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)
102 changes: 102 additions & 0 deletions PWGCF/EbyEFluctuations/Tasks/netchargeFluctuations.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check warning on line 11 in PWGCF/EbyEFluctuations/Tasks/netchargeFluctuations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in PWGCF/EbyEFluctuations/Tasks/netchargeFluctuations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in PWGCF/EbyEFluctuations/Tasks/netchargeFluctuations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.
// author Nida Malik ([email protected])
// Department of Physics, Aligarh Muslim University, India
// to study the net charge fluctuations by observable, #nu_dyn

#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "Common/Core/TrackSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
using namespace std;

namespace o2::aod
{
using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2V0Ms, aod::Mults>;
using MyCollision = MyCollisions::iterator;

using MyTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection>;
using MyTrack = MyTracks::iterator;
} // namespace o2::aod

struct NetchargeFluctuations {
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
void init(o2::framework::InitContext&)
{
AxisSpec vtxZAxis = {100, -20, 20, "Z (cm)"};
AxisSpec dcaAxis = {1000, -100, 100, "DCA_{xy} (cm)"};
AxisSpec dcazAxis = {1000, -100, 100, "DCA_{z} (cm)"};
AxisSpec ptAxis = {40, 0.0, 4.0, "#it{p}_{T} (GeV/#it{c})"};
AxisSpec etaAxis = {30, -1.5, 1.5, "#eta"};
AxisSpec centAxis = {100, 0., 100., "centrality"};
AxisSpec multAxis = {2000, 0., 2000., "multiplicity"};

histos.add("hVertexZ_bef", "", kTH1F, {vtxZAxis});
histos.add("hVertexZ_aft", "", kTH1F, {vtxZAxis});
histos.add("hVertexZ_aft_sel", "", kTH1D, {vtxZAxis});
histos.add("hDCAxy_bef", "", kTH1D, {dcaAxis});
histos.add("hDCAxy_aft", "", kTH1D, {dcaAxis});
histos.add("hDCAz_bef", "", kTH1D, {dcazAxis});
histos.add("hDCAz_aft", "", kTH1D, {dcazAxis});
histos.add("hCentrality", "", kTH1D, {centAxis});
histos.add("hMultiplicity", "", kTH1D, {multAxis});
histos.add("hEta", "", kTH1F, {etaAxis});
histos.add("hPt", "", kTH1F, {ptAxis});
}

void process(aod::MyCollision const& coll, aod::MyTracks const& inputTracks)
{
histos.fill(HIST("hVertexZ_bef"), coll.posZ());

if (std::fabs(coll.posZ()) > 10.f) {
return;
}
histos.fill(HIST("hVertexZ_aft"), coll.posZ());

if (!coll.sel7()) {
return;
}
histos.fill(HIST("hVertexZ_aft_sel"), coll.posZ());
histos.fill(HIST("hCentrality"), coll.centRun2V0M());
histos.fill(HIST("hMultiplicity"), coll.multFV0M());

for (auto const& track : inputTracks) {
if (std::fabs(track.eta()) > 0.8)
continue;
if (!(track.pt() > 0.2 && track.pt() < 2.))
continue;

histos.fill(HIST("hDCAxy_bef"), track.dcaXY());
histos.fill(HIST("hDCAz_bef"), track.dcaZ());

if (!track.isGlobalTrack())
continue;

histos.fill(HIST("hDCAxy_aft"), track.dcaXY());
histos.fill(HIST("hDCAz_aft"), track.dcaZ());
histos.fill(HIST("hPt"), track.pt());
histos.fill(HIST("hEta"), track.eta());
}
}
};
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec workflow{adaptAnalysisTask<NetchargeFluctuations>(cfgc)};
return workflow;
}
Loading