Skip to content

Commit 27b9bdd

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 4a69af0 + 71e1a65 commit 27b9bdd

File tree

169 files changed

+12284
-4779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+12284
-4779
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/PWGCF/Tasks @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye @glromane
3737
/PWGDQ @alibuild @iarsene @mcoquet642 @lucamicheletti93
3838
/PWGEM @alibuild @feisenhu @dsekihat @ivorobye
39-
/PWGEM/Dilepton @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu
39+
/PWGEM/Dilepton @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu @hscheid
4040
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern @dsekihat
4141
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @NicoleBastid @hahassan7 @jpxrk @apalasciano @zhangbiao-phy @gluparel
4242
# PWG-LF

Common/Core/CollisionTypeHelper.cxx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
///
13-
/// \file CollisionTypeHelper.h
13+
/// \file CollisionTypeHelper.cxx
1414
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
1515
/// \brief Utility to handle the collision type from the GRP information
1616
///
@@ -34,17 +34,26 @@ std::string o2::common::core::CollisionSystemType::getCollisionSystemName(collTy
3434
return "XeXe";
3535
case kCollSyspPb:
3636
return "pPb";
37+
case kCollSysOO:
38+
return "OO";
39+
case kCollSyspO:
40+
return "pO";
41+
case kCollSysNeNe:
42+
return "NeNe";
43+
case kCollSysUndef:
44+
return "Undefined";
3745
default:
46+
LOG(warning) << "Undefined collision system type: " << collSys;
3847
return "Undefined";
3948
}
4049
}
4150

4251
int o2::common::core::CollisionSystemType::getCollisionTypeFromGrp(o2::parameters::GRPLHCIFData* grplhcif)
4352
{
44-
const int ZBeamA = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamA);
45-
const int ZBeamC = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamC);
46-
LOG(debug) << "Collision system: " << ZBeamA << " * " << ZBeamC << " detected";
47-
switch (ZBeamA * ZBeamC) {
53+
const int zBeamA = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamA);
54+
const int zBeamC = grplhcif->getBeamZ(o2::constants::lhc::BeamDirection::BeamC);
55+
LOG(debug) << "Collision system Z: " << zBeamA << " * " << zBeamC << " detected = " << zBeamA * zBeamC;
56+
switch (zBeamA * zBeamC) {
4857
case 1: // pp 1*1
4958
return kCollSyspp;
5059
case 6724: // Pb-Pb 82*82
@@ -53,8 +62,14 @@ int o2::common::core::CollisionSystemType::getCollisionTypeFromGrp(o2::parameter
5362
return kCollSysXeXe;
5463
case 82: // p-Pb 82*1
5564
return kCollSyspPb;
65+
case 64: // O-O 8*8
66+
return kCollSysOO;
67+
case 8: // p-O 8*1
68+
return kCollSyspO;
69+
case 100: // Ne-Ne 10*10
70+
return kCollSysNeNe;
5671
default:
57-
LOG(fatal) << "Undefined collision system in getCollisionTypeFromGrp with BeamA = " << ZBeamA << " and BeamC = " << ZBeamC;
72+
LOG(fatal) << "Undefined collision system in getCollisionTypeFromGrp with Z of BeamA = " << zBeamA << " and Z of BeamC = " << zBeamC;
5873
return kCollSysUndef;
5974
}
6075
return kCollSysUndef;

Common/Core/CollisionTypeHelper.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ struct CollisionSystemType {
3434
static constexpr collType kCollSysPbPb = 1; // PbPb
3535
static constexpr collType kCollSysXeXe = 2; // XeXe
3636
static constexpr collType kCollSyspPb = 3; // pPb
37-
static constexpr collType kNCollSys = 4; // Number of collision systems
37+
static constexpr collType kCollSysOO = 4; // OO (Oxygen-Oxygen)
38+
static constexpr collType kCollSyspO = 5; // pO (proton-Oxygen)
39+
static constexpr collType kCollSysNeNe = 6; // NeNe (Neon-Neon)
40+
static constexpr collType kNCollSys = 7; // Number of collision systems
3841

3942
static std::string getCollisionSystemName(collType collSys);
4043

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
/// \file testCollisionTypeHelper.C
13+
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
14+
/// \brief Test the CollisionTypeHelper functionality
15+
16+
#include "Common/Core/CollisionTypeHelper.h"
17+
18+
#include "CCDB/BasicCCDBManager.h"
19+
#include "DataFormatsParameters/GRPLHCIFData.h"
20+
21+
void testCollisionTypeHelper(int runNumber = 544124)
22+
{
23+
24+
auto& ccdb = o2::ccdb::BasicCCDBManager::instance();
25+
ccdb.setURL("http://alice-ccdb.cern.ch");
26+
o2::parameters::GRPLHCIFData* grpo = ccdb.getSpecificForRun<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF",
27+
runNumber);
28+
grpo->print();
29+
int collsys = o2::common::core::CollisionSystemType::getCollisionTypeFromGrp(grpo);
30+
}

Common/DataModel/PIDResponseITS.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ struct ITSResponse {
9393
template <o2::track::PID::ID id, typename T>
9494
static float nSigmaITS(const T& track)
9595
{
96-
return nSigmaITS<id>(track.itsClusterSizes(), track.p(), track.eta());
96+
unsigned int charge = (id == o2::track::PID::Helium3 || id == o2::track::PID::Alpha) ? 2 : 1;
97+
return nSigmaITS<id>(track.itsClusterSizes(), charge * track.p(), track.eta());
9798
}
9899

99100
static void setParameters(float p0, float p1, float p2,

Common/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ o2physics_add_dpl_workflow(qvectors-correction
8181

8282
o2physics_add_dpl_workflow(centrality-study
8383
SOURCES centralityStudy.cxx
84-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
84+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB
8585
COMPONENT_NAME Analysis)
8686

8787
o2physics_add_dpl_workflow(flow-test

Common/Tasks/centralityStudy.cxx

Lines changed: 65 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,24 @@
1313
// Run 3 Pb-Pb centrality selections in 2023 data. It is compatible with
1414
// derived data.
1515

16-
#include "Framework/runDataProcessing.h"
17-
#include "Framework/AnalysisTask.h"
18-
#include "Framework/AnalysisDataModel.h"
19-
#include "Common/DataModel/McCollisionExtra.h"
20-
#include "Common/DataModel/Multiplicity.h"
16+
#include "Common/CCDB/ctpRateFetcher.h"
2117
#include "Common/DataModel/Centrality.h"
2218
#include "Common/DataModel/EventSelection.h"
19+
#include "Common/DataModel/McCollisionExtra.h"
20+
#include "Common/DataModel/Multiplicity.h"
21+
22+
#include "CCDB/BasicCCDBManager.h"
23+
#include "DataFormatsParameters/GRPECSObject.h"
24+
#include "Framework/AnalysisDataModel.h"
25+
#include "Framework/AnalysisTask.h"
2326
#include "Framework/O2DatabasePDGPlugin.h"
27+
#include "Framework/runDataProcessing.h"
28+
2429
#include "TH1F.h"
2530
#include "TH2F.h"
31+
#include "TProfile.h"
32+
33+
#include <string>
2634

2735
using namespace o2;
2836
using namespace o2::framework;
@@ -32,13 +40,16 @@ using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3Match
3240
struct centralityStudy {
3341
// Raw multiplicities
3442
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
43+
Service<o2::ccdb::BasicCCDBManager> ccdb;
44+
ctpRateFetcher mRateFetcher;
3545

3646
// Configurables
3747
Configurable<bool> do2DPlots{"do2DPlots", true, "0 - no, 1 - yes"};
3848
Configurable<bool> doOccupancyStudyVsCentrality2d{"doOccupancyStudyVsCentrality2d", true, "0 - no, 1 - yes"};
3949
Configurable<bool> doOccupancyStudyVsRawValues2d{"doOccupancyStudyVsRawValues2d", true, "0 - no, 1 - yes"};
4050
Configurable<bool> doOccupancyStudyVsCentrality3d{"doOccupancyStudyVsCentrality3d", false, "0 - no, 1 - yes"};
4151
Configurable<bool> doOccupancyStudyVsRawValues3d{"doOccupancyStudyVsRawValues3d", false, "0 - no, 1 - yes"};
52+
Configurable<bool> doTimeStudies{"doTimeStudies", true, "0 - no, 1 - yes"};
4253
Configurable<bool> doNGlobalTracksVsRawSignals{"doNGlobalTracksVsRawSignals", true, "0 - no, 1 - yes"};
4354
Configurable<bool> applySel8{"applySel8", true, "0 - no, 1 - yes"};
4455
Configurable<bool> applyVtxZ{"applyVtxZ", true, "0 - no, 1 - yes"};
@@ -70,6 +81,11 @@ struct centralityStudy {
7081
Configurable<float> scaleSignalFT0M{"scaleSignalFT0M", 1.00f, "scale FT0M signal for convenience"};
7182
Configurable<float> scaleSignalFV0A{"scaleSignalFV0A", 1.00f, "scale FV0A signal for convenience"};
7283

84+
Configurable<std::string> ccdbURL{"ccdbURL", "http://alice-ccdb.cern.ch", "ccdb url"};
85+
Configurable<std::string> pathGRPECSObject{"pathGRPECSObject", "GLO/Config/GRPECS", "Path to GRPECS object"};
86+
Configurable<std::string> irSource{"irSource", "ZNC hadronic", "Source of the interaction rate: (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"};
87+
Configurable<bool> irCrashOnNull{"irCrashOnNull", false, "Flag to avoid CTP RateFetcher crash."};
88+
7389
// _______________________________________
7490
// upc rejection criteria
7591
// reject low zna/c
@@ -113,10 +129,11 @@ struct centralityStudy {
113129
ConfigurableAxis axisCentrality{"axisCentrality", {100, 0, 100}, "FT0C percentile"};
114130
ConfigurableAxis axisPVChi2{"axisPVChi2", {300, 0, 30}, "FT0C percentile"};
115131
ConfigurableAxis axisDeltaTime{"axisDeltaTime", {300, 0, 300}, "#Delta time"};
132+
ConfigurableAxis axisDeltaTimestamp{"axisDeltaTimestamp", {1440, 0, 24}, "#Delta timestamp - sor (hours)"};
133+
ConfigurableAxis axisInteractionRate{"axisInteractionRate", {500, 0, 100}, "Binning for the interaction rate (kHz)"};
116134

117135
// For profile Z
118136
ConfigurableAxis axisPVz{"axisPVz", {400, -20.0f, +20.0f}, "PVz (cm)"};
119-
120137
ConfigurableAxis axisZN{"axisZN", {1100, -50.0f, +500.0f}, "ZN"};
121138

122139
void init(InitContext&)
@@ -227,13 +244,30 @@ struct centralityStudy {
227244
histos.add("hFT0COccupancyVsNGlobalTracksVsCentrality", "hFT0COccupancyVsNGlobalTracksVsCentrality", kTH3F, {axisFT0COccupancy, axisMultGlobalTracks, axisCentrality});
228245
}
229246
}
247+
248+
if (doTimeStudies) {
249+
ccdb->setURL(ccdbURL);
250+
ccdb->setCaching(true);
251+
ccdb->setLocalObjectValidityChecking();
252+
ccdb->setFatalWhenNull(false);
253+
254+
histos.add("hFT0AvsTime", "hFT0AvsTime", kTH2F, {axisDeltaTimestamp, axisMultFT0A});
255+
histos.add("hFT0CvsTime", "hFT0CvsTime", kTH2F, {axisDeltaTimestamp, axisMultFT0C});
256+
histos.add("hFT0MvsTime", "hFT0MvsTime", kTH2F, {axisDeltaTimestamp, axisMultFT0M});
257+
histos.add("hFV0AvsTime", "hFV0AvsTime", kTH2F, {axisDeltaTimestamp, axisMultFV0A});
258+
histos.add("hMFTTracksvsTime", "hMFTTracksvsTime", kTH2F, {axisDeltaTimestamp, axisMultMFTTracks});
259+
histos.add("hNGlobalVsTime", "hNGlobalVsTime", kTH2F, {axisDeltaTimestamp, axisMultGlobalTracks});
260+
histos.add("hNTPVContributorsvsTime", "hNTPVContributorsvsTime", kTH2F, {axisDeltaTimestamp, axisMultPVContributors});
261+
histos.add("hIRProfileVsTime", "hIRProfileVsTime", kTProfile, {axisDeltaTimestamp});
262+
histos.add("hPVzProfileCoVsTime", "hPVzProfileCoVsTime", kTProfile, {axisDeltaTimestamp});
263+
histos.add("hPVzProfileBcVsTime", "hPVzProfileBcVsTime", kTProfile, {axisDeltaTimestamp});
264+
}
230265
}
231266

232267
template <typename TCollision>
233268
void genericProcessCollision(TCollision collision)
234269
// process this collisions
235270
{
236-
237271
histos.fill(HIST("hCollisionSelection"), 0); // all collisions
238272
if (applySel8 && !collision.multSel8())
239273
return;
@@ -403,19 +437,40 @@ struct centralityStudy {
403437
histos.fill(HIST("hFT0COccupancyVsNGlobalTracksVsCentrality"), collision.ft0cOccupancyInTimeRange(), collision.multNTracksGlobal(), collision.centFT0C());
404438
}
405439
}
440+
441+
if (doTimeStudies && collision.has_multBC()) {
442+
auto multbc = collision.template multBC_as<aod::MultBCs>();
443+
uint64_t bcTimestamp = multbc.timestamp();
444+
o2::parameters::GRPECSObject* grpo = ccdb->getForTimeStamp<o2::parameters::GRPECSObject>(pathGRPECSObject, bcTimestamp);
445+
uint64_t startOfRunTimestamp = grpo->getTimeStart();
446+
447+
float hoursAfterStartOfRun = static_cast<float>(bcTimestamp - startOfRunTimestamp) / 3600000.0;
448+
float interactionRate = mRateFetcher.fetch(ccdb.service, bcTimestamp, collision.multRunNumber(), irSource.value, irCrashOnNull) / 1000.; // kHz
449+
450+
histos.fill(HIST("hFT0AvsTime"), hoursAfterStartOfRun, collision.multFT0A());
451+
histos.fill(HIST("hFT0CvsTime"), hoursAfterStartOfRun, collision.multFT0C());
452+
histos.fill(HIST("hFT0MvsTime"), hoursAfterStartOfRun, collision.multFT0M());
453+
histos.fill(HIST("hFV0AvsTime"), hoursAfterStartOfRun, collision.multFV0A());
454+
histos.fill(HIST("hMFTTracksvsTime"), hoursAfterStartOfRun, collision.mftNtracks());
455+
histos.fill(HIST("hNGlobalVsTime"), hoursAfterStartOfRun, collision.multNTracksGlobal());
456+
histos.fill(HIST("hNTPVContributorsvsTime"), hoursAfterStartOfRun, collision.multPVTotalContributors());
457+
histos.fill(HIST("hPVzProfileCoVsTime"), hoursAfterStartOfRun, collision.multPVz());
458+
histos.fill(HIST("hPVzProfileBcVsTime"), hoursAfterStartOfRun, multbc.multFT0PosZ());
459+
histos.fill(HIST("hIRProfileVsTime"), hoursAfterStartOfRun, interactionRate);
460+
}
406461
}
407462

408-
void processCollisions(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections>::iterator const& collision)
463+
void processCollisions(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC>::iterator const& collision, aod::MultBCs const&)
409464
{
410465
genericProcessCollision(collision);
411466
}
412467

413-
void processCollisionsWithCentrality(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal>::iterator const& collision)
468+
void processCollisionsWithCentrality(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::Mults2BC>::iterator const& collision, aod::MultBCs const&)
414469
{
415470
genericProcessCollision(collision);
416471
}
417472

418-
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs>::iterator const& collision)
473+
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&)
419474
{
420475
genericProcessCollision(collision);
421476
}

0 commit comments

Comments
 (0)