Skip to content

Commit

Permalink
netchargfluctu
Browse files Browse the repository at this point in the history
  • Loading branch information
nidamalikk committed Jan 28, 2025
1 parent 2e76a01 commit 68062b0
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 46 deletions.
80 changes: 34 additions & 46 deletions PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,38 @@
# 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.
#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".
#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
#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.

o2physics_add_dpl_workflow(meanpt-fluctuations
SOURCES MeanptFluctuations.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(mean-pt-fluc-id
SOURCES meanPtFlucId.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

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

o2physics_add_dpl_workflow(identified-meanpt-fluctuations
SOURCES IdentifiedMeanPtFluctuations.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(robust-fluctuation-observables
SOURCES RobustFluctuationObservables.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(v0pt-pp-task
SOURCES Diff_pT_fluct_PID.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(factorial-moments
SOURCES FactorialMomentsTask.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(netchargefluct
SOURCES NetchargeFluctuations.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)
o2physics_add_dpl_workflow(meanpt - fluctuations
SOURCES MeanptFluctuations.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(mean - pt - fluc - id SOURCES meanPtFlucId.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis)

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

o2physics_add_dpl_workflow(identified - meanpt - fluctuations SOURCES IdentifiedMeanPtFluctuations.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(robust - fluctuation - observables SOURCES RobustFluctuationObservables.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(v0pt - pp - task SOURCES Diff_pT_fluct_PID.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(factorial - moments
SOURCES FactorialMomentsTask.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

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.

// 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 (const auto 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;
}

0 comments on commit 68062b0

Please sign in to comment.