Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f4d85b8
[PWGLF] Add the PID option for using TOF
Yunseul-Bae Jun 30, 2025
2b01436
[PWGLF] Apply clang-format
Yunseul-Bae Jun 30, 2025
dd005a4
[PWGLF] Apply O2 linter
Yunseul-Bae Jun 30, 2025
063d268
[PWGLF] O2 linter
Yunseul-Bae Jun 30, 2025
cd2d1a2
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 2, 2025
0eb5b09
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 3, 2025
83cff21
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 3, 2025
82e54a6
Merge branch 'AliceO2Group:master' into main
Yunseul-Bae Jul 3, 2025
a307d73
[PWGLF] *Debug* and Change PID select type with "switch"
Yunseul-Bae Jul 3, 2025
ab12549
[PWGEM] DielectronMC.h momentum loss of both tracks vs DCA (#11876)
feisenhu Jul 3, 2025
2e2ccdc
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
8876e54
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
e4aa4c8
[PWGHF] OmegaC task, enable running one data and one MC process funct…
fcatalan92 Jul 3, 2025
98370a5
[PWGCF] FemtoUniverse - MCTruth producer update (#11842)
kgwizdzi Jul 3, 2025
f1da368
[PWGDQ] Temporary test for issues in running in hyperloop (#11889)
lucamicheletti93 Jul 3, 2025
dcb065a
[Common] Add Oxygen and Neon to CollisionTypeHelper (#11879)
njacazio Jul 3, 2025
8ca5f35
[PWGDQ] add histograms,Cuts for Polarization (#11887)
zjxiongOvO Jul 3, 2025
a997888
[PWGLF] Optimised code (#11891)
sawankumawat Jul 3, 2025
2566e62
[PWGEM/Dilepton] add mc-tuned TPC dE/dx in MC and remove columns (#11…
dsekihat Jul 3, 2025
3635c64
[PWGHF] Σc0,++: Remove duplicated consuming of McParticles. (#11855)
mfaggin Jul 3, 2025
cec4bc8
[Common] Add time dependency study to centrality task (#11896)
jesgum Jul 3, 2025
78e4af0
[PWGJE,EMCAL-670] Add option to use Run2 alignment (#11892)
mhemmer-cern Jul 3, 2025
02aa365
[PWGEM/PhotonMeson] Add workaround for kTVXinEMC issues in data to BC…
nstrangm Jul 3, 2025
87be5da
[PWGCF,PWGHF,PWGJE] Propagate new MC flags to 2-prongs (#11782)
vkucera Jul 3, 2025
904db63
[PWGLF] Prevent fall-through in switch-case
Yunseul-Bae Jul 3, 2025
9c262af
[PWGLF] Add the PID option for using TOF
Yunseul-Bae Jun 30, 2025
e944e54
[PWGLF] Apply clang-format
Yunseul-Bae Jun 30, 2025
1c4650f
[PWGLF] Apply O2 linter
Yunseul-Bae Jun 30, 2025
c3b8b0b
[PWGLF] O2 linter
Yunseul-Bae Jun 30, 2025
220ea6c
[PWGLF] *Debug* and Change PID select type with "switch"
Yunseul-Bae Jul 3, 2025
f820baf
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
f89f182
[PWGLF] Apply clang-format
Yunseul-Bae Jul 3, 2025
acb2be8
[PWGLF] Prevent fall-through in switch-case
Yunseul-Bae Jul 3, 2025
58ad5ee
Merge branch 'main' of https://github.com/Yunseul-Bae/O2Physics
Yunseul-Bae Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions Common/Core/CollisionTypeHelper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or submit itself to any jurisdiction.

///
/// \file CollisionTypeHelper.h
/// \file CollisionTypeHelper.cxx
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
/// \brief Utility to handle the collision type from the GRP information
///
Expand All @@ -34,17 +34,26 @@ std::string o2::common::core::CollisionSystemType::getCollisionSystemName(collTy
return "XeXe";
case kCollSyspPb:
return "pPb";
case kCollSysOO:
return "OO";
case kCollSyspO:
return "pO";
case kCollSysNeNe:
return "NeNe";
case kCollSysUndef:
return "Undefined";
default:
LOG(warning) << "Undefined collision system type: " << collSys;
return "Undefined";
}
}

int o2::common::core::CollisionSystemType::getCollisionTypeFromGrp(o2::parameters::GRPLHCIFData* grplhcif)
{
const int ZBeamA = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamA);
const int ZBeamC = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamC);
LOG(debug) << "Collision system: " << ZBeamA << " * " << ZBeamC << " detected";
switch (ZBeamA * ZBeamC) {
const int zBeamA = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamA);
const int zBeamC = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamC);
LOG(debug) << "Collision system Z: " << zBeamA << " * " << zBeamC << " detected = " << zBeamA * zBeamC;
switch (zBeamA * zBeamC) {
case 1: // pp 1*1
return kCollSyspp;
case 6724: // Pb-Pb 82*82
Expand All @@ -53,8 +62,14 @@ int o2::common::core::CollisionSystemType::getCollisionTypeFromGrp(o2::parameter
return kCollSysXeXe;
case 82: // p-Pb 82*1
return kCollSyspPb;
case 64: // O-O 8*8
return kCollSysOO;
case 8: // p-O 8*1
return kCollSyspO;
case 100: // Ne-Ne 10*10
return kCollSysNeNe;
default:
LOG(fatal) << "Undefined collision system in getCollisionTypeFromGrp with BeamA = " << ZBeamA << " and BeamC = " << ZBeamC;
LOG(fatal) << "Undefined collision system in getCollisionTypeFromGrp with Z of BeamA = " << zBeamA << " and Z of BeamC = " << zBeamC;
return kCollSysUndef;
}
return kCollSysUndef;
Expand Down
5 changes: 4 additions & 1 deletion Common/Core/CollisionTypeHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ struct CollisionSystemType {
static constexpr collType kCollSysPbPb = 1; // PbPb
static constexpr collType kCollSysXeXe = 2; // XeXe
static constexpr collType kCollSyspPb = 3; // pPb
static constexpr collType kNCollSys = 4; // Number of collision systems
static constexpr collType kCollSysOO = 4; // OO (Oxygen-Oxygen)
static constexpr collType kCollSyspO = 5; // pO (proton-Oxygen)
static constexpr collType kCollSysNeNe = 6; // NeNe (Neon-Neon)
static constexpr collType kNCollSys = 7; // Number of collision systems

static std::string getCollisionSystemName(collType collSys);

Expand Down
30 changes: 30 additions & 0 deletions Common/Core/macros/testCollisionTypeHelper.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// 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.

/// \file testCollisionTypeHelper.C
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
/// \brief Test the CollisionTypeHelper functionality

#include "Common/Core/CollisionTypeHelper.h"

#include "CCDB/BasicCCDBManager.h"
#include "DataFormatsParameters/GRPLHCIFData.h"

void testCollisionTypeHelper(int runNumber = 544124)
{

auto& ccdb = o2::ccdb::BasicCCDBManager::instance();
ccdb.setURL("http://alice-ccdb.cern.ch");
o2::parameters::GRPLHCIFData* grpo = ccdb.getSpecificForRun<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF",
runNumber);
grpo->print();
int collsys = o2::common::core::CollisionSystemType::getCollisionTypeFromGrp(grpo);
}
54 changes: 45 additions & 9 deletions Common/Tasks/centralityStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
// Run 3 Pb-Pb centrality selections in 2023 data. It is compatible with
// derived data.

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "Common/DataModel/McCollisionExtra.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/McCollisionExtra.h"
#include "Common/DataModel/Multiplicity.h"

#include "CCDB/BasicCCDBManager.h"
#include "DataFormatsParameters/GRPECSObject.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/runDataProcessing.h"

#include "TH1F.h"
#include "TH2F.h"

Expand All @@ -32,13 +36,15 @@ using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3Match
struct centralityStudy {
// Raw multiplicities
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
Service<o2::ccdb::BasicCCDBManager> ccdb;

// Configurables
Configurable<bool> do2DPlots{"do2DPlots", true, "0 - no, 1 - yes"};
Configurable<bool> doOccupancyStudyVsCentrality2d{"doOccupancyStudyVsCentrality2d", true, "0 - no, 1 - yes"};
Configurable<bool> doOccupancyStudyVsRawValues2d{"doOccupancyStudyVsRawValues2d", true, "0 - no, 1 - yes"};
Configurable<bool> doOccupancyStudyVsCentrality3d{"doOccupancyStudyVsCentrality3d", false, "0 - no, 1 - yes"};
Configurable<bool> doOccupancyStudyVsRawValues3d{"doOccupancyStudyVsRawValues3d", false, "0 - no, 1 - yes"};
Configurable<bool> doTimeStudies{"doTimeStudies", false, "0 - no, 1 - yes"};
Configurable<bool> doNGlobalTracksVsRawSignals{"doNGlobalTracksVsRawSignals", true, "0 - no, 1 - yes"};
Configurable<bool> applySel8{"applySel8", true, "0 - no, 1 - yes"};
Configurable<bool> applyVtxZ{"applyVtxZ", true, "0 - no, 1 - yes"};
Expand Down Expand Up @@ -113,10 +119,10 @@ struct centralityStudy {
ConfigurableAxis axisCentrality{"axisCentrality", {100, 0, 100}, "FT0C percentile"};
ConfigurableAxis axisPVChi2{"axisPVChi2", {300, 0, 30}, "FT0C percentile"};
ConfigurableAxis axisDeltaTime{"axisDeltaTime", {300, 0, 300}, "#Delta time"};
ConfigurableAxis axisDeltaTimestamp{"axisDeltaTimestamp", {1440, 0, 24}, "#Delta timestamp - sor (hours)"};

// For profile Z
ConfigurableAxis axisPVz{"axisPVz", {400, -20.0f, +20.0f}, "PVz (cm)"};

ConfigurableAxis axisZN{"axisZN", {1100, -50.0f, +500.0f}, "ZN"};

void init(InitContext&)
Expand Down Expand Up @@ -227,6 +233,21 @@ struct centralityStudy {
histos.add("hFT0COccupancyVsNGlobalTracksVsCentrality", "hFT0COccupancyVsNGlobalTracksVsCentrality", kTH3F, {axisFT0COccupancy, axisMultGlobalTracks, axisCentrality});
}
}

if (doTimeStudies) {
ccdb->setURL("http://alice-ccdb.cern.ch");
ccdb->setCaching(true);
ccdb->setLocalObjectValidityChecking();
ccdb->setFatalWhenNull(false);

histos.add("hFT0AvsTime", "hFT0AvsTime", kTH2F, {axisDeltaTimestamp, axisMultFT0A});
histos.add("hFT0CvsTime", "hFT0CvsTime", kTH2F, {{axisDeltaTimestamp, axisMultFT0C}});
histos.add("hFT0MvsTime", "hFT0MvsTime", kTH2F, {{axisDeltaTimestamp, axisMultFT0M}});
histos.add("hFV0AvsTime", "hFV0AvsTime", kTH2F, {{axisDeltaTimestamp, axisMultFV0A}});
histos.add("hMFTTracksvsTime", "hMFTTracksvsTime", kTH2F, {{axisDeltaTimestamp, axisMultMFTTracks}});
histos.add("hNGlobalVsTime", "hNGlobalVsTime", kTH2F, {{axisDeltaTimestamp, axisMultGlobalTracks}});
histos.add("hNTPVContributorsvsTime", "hNTPVContributorsvsTime", kTH2F, {{axisDeltaTimestamp, axisMultPVContributors}});
}
}

template <typename TCollision>
Expand Down Expand Up @@ -403,19 +424,34 @@ struct centralityStudy {
histos.fill(HIST("hFT0COccupancyVsNGlobalTracksVsCentrality"), collision.ft0cOccupancyInTimeRange(), collision.multNTracksGlobal(), collision.centFT0C());
}
}

if (doTimeStudies && collision.has_multBC()) {
auto multbc = collision.template multBC_as<aod::MultBCs>();
uint64_t bcTimestamp = multbc.timestamp();
o2::parameters::GRPECSObject* grpo = ccdb->getForTimeStamp<o2::parameters::GRPECSObject>("GLO/Config/GRPECS", bcTimestamp);
uint64_t startOfRunTimestamp = grpo->getTimeStart();
float hoursAfterStartOfRun = static_cast<float>(bcTimestamp - startOfRunTimestamp) / 3600000.0;
histos.fill(HIST("hFT0AvsTime"), hoursAfterStartOfRun, collision.multFT0A());
histos.fill(HIST("hFT0CvsTime"), hoursAfterStartOfRun, collision.multFT0C());
histos.fill(HIST("hFT0MvsTime"), hoursAfterStartOfRun, collision.multFT0M());
histos.fill(HIST("hFV0AvsTime"), hoursAfterStartOfRun, collision.multFV0A());
histos.fill(HIST("hMFTTracksvsTime"), hoursAfterStartOfRun, collision.mftNtracks());
histos.fill(HIST("hNGlobalVsTime"), hoursAfterStartOfRun, collision.multNTracksGlobal());
histos.fill(HIST("hNTPVContributorsvsTime"), hoursAfterStartOfRun, collision.multPVTotalContributors());
}
}

void processCollisions(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections>::iterator const& collision)
void processCollisions(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC>::iterator const& collision, aod::MultBCs const&)
{
genericProcessCollision(collision);
}

void processCollisionsWithCentrality(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal>::iterator const& collision)
void processCollisionsWithCentrality(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::Mults2BC>::iterator const& collision, aod::MultBCs const&)
{
genericProcessCollision(collision);
}

void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs>::iterator const& collision)
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs, aod::Mults2BC>::iterator const& collision, aod::MultBCs const&)
{
genericProcessCollision(collision);
}
Expand Down
Loading
Loading