Skip to content

Commit af0c166

Browse files
committed
[PWGEM,Photon] move remaining CCDB fetches to CCDB columns
Replace per-task BasicCCDBManager queries with declarative CCDB columns, and drop CCDB-manager leftovers from tasks that already read columns. Migrations: - calibTaskEmc: BadChannelMap from aod::EmEmcalObjects - pairQcTask, dalitzEEQC, dalitzEEQCMC: GRPMagField from aod::EmMagFields; drop the GRPObject path, skipGRPOquery, grpPath, grpmagPath, ccdb-url - CheckMCV0: GRPMagField + MatLUT from aod::PcmObjects and the shared aod::GeomCCDBObjects; the LUT pointer is set for every collision, the magnetic field is still installed once per run - photonhbt: GRPMagField from aod::EmMagFields, TPC VDrift from a new aod::EmTpcObjects table (EventTables.h, reusing ccdbTpc::VDriftTgl) Cleanup (no behaviour change): remove the unused CCDB manager, its setup and the now-unused ccdb-url/skipGRPOquery/grpmagPath options from Pi0EtaToGammaGamma(MC).h, TaggingPi0(MC).h, pcmQC, photonResoTask, prefilterPhoton and skimmerPrimaryElectronFromDalitzEE (the skimmer keeps the manager for the TOF response). ccdb-url is kept where it feeds the V0 ML models. Behaviour changes in photonhbt: - VDrift is now taken at each event's timestamp instead of mid-run (getForRun), so it follows changes within a run - a missing VDrift object is now fatal instead of a warning Not migrated: SP resolution (taskPhotonFlow, taskPi0FlowEMC) and nonLinProducer (optional objects from user paths set per wagon), photonconversionbuilder (LUT/geometry loaded once in init), Legacy/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Also add asymmetric-energy-cut to `taskPi0FlowEMC .cxx` for EMCal EMCal cluster pairings.
1 parent 3103678 commit af0c166

16 files changed

Lines changed: 161 additions & 307 deletions

‎PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include "Common/DataModel/Centrality.h"
3737
#include "Common/DataModel/EventSelection.h"
3838

39-
#include <CCDB/BasicCCDBManager.h>
4039
#include <CCDB/CcdbApi.h>
4140
#include <CommonConstants/MathConstants.h>
4241
#include <CommonConstants/PhysicsConstants.h>
@@ -296,7 +295,6 @@ struct Pi0EtaToGammaGamma {
296295
std::vector<float> occ_bin_edges;
297296

298297
o2::ccdb::CcdbApi ccdbApi;
299-
o2::framework::Service<o2::ccdb::BasicCCDBManager> ccdb{};
300298
int mRunNumber = -1;
301299
float d_bz = 0;
302300
o2::emcal::Geometry* emcalGeom = nullptr;
@@ -445,11 +443,6 @@ struct Pi0EtaToGammaGamma {
445443

446444
mRunNumber = 0;
447445
d_bz = 0;
448-
449-
ccdb->setURL(ccdburl);
450-
ccdb->setCaching(true);
451-
ccdb->setLocalObjectValidityChecking();
452-
ccdb->setFatalWhenNull(false);
453446
}
454447

455448
template <o2::soa::is_iterator TCollision>

‎PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include "Common/DataModel/Centrality.h"
3737
#include "Common/DataModel/EventSelection.h"
3838

39-
#include <CCDB/BasicCCDBManager.h>
4039
#include <CCDB/CcdbApi.h>
4140
#include <CommonConstants/PhysicsConstants.h>
4241
#include <DataFormatsParameters/GRPMagField.h>
@@ -268,7 +267,6 @@ struct Pi0EtaToGammaGammaMC {
268267
static constexpr std::array<std::string_view, 2> kParnames = {"Pi0/", "Eta/"};
269268

270269
o2::ccdb::CcdbApi ccdbApi;
271-
o2::framework::Service<o2::ccdb::BasicCCDBManager> ccdb{};
272270
int mRunNumber = 0;
273271
float d_bz = 0;
274272

@@ -300,11 +298,6 @@ struct Pi0EtaToGammaGammaMC {
300298

301299
mRunNumber = 0;
302300
d_bz = 0;
303-
304-
ccdb->setURL(ccdburl);
305-
ccdb->setCaching(true);
306-
ccdb->setLocalObjectValidityChecking();
307-
ccdb->setFatalWhenNull(false);
308301
}
309302

310303
template <o2::soa::is_iterator TCollision>

‎PWGEM/PhotonMeson/Core/TaggingPi0.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "Common/DataModel/EventSelection.h"
3333
#include "Common/DataModel/PIDResponseTPC.h"
3434

35-
#include <CCDB/BasicCCDBManager.h>
3635
#include <CCDB/CcdbApi.h>
3736
#include <CommonConstants/MathConstants.h>
3837
#include <CommonConstants/PhysicsConstants.h>
@@ -87,7 +86,6 @@ using MyEMCCluster = MyEMCClusters::iterator;
8786

8887
template <o2::aod::pwgem::photonmeson::photonpair::PairType pairtype, typename... Types>
8988
struct TaggingPi0 {
90-
o2::framework::Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
9189
o2::framework::Configurable<float> d_bz_input{"d_bz_input", -999, "bz field in kG, -999 is automatic"};
9290
o2::framework::Configurable<uint64_t> ndiff_bc_mix{"ndiff_bc_mix", 594, "difference in global BC required in mixed events"};
9391

@@ -222,7 +220,6 @@ struct TaggingPi0 {
222220
std::vector<float> occ_bin_edges;
223221

224222
o2::ccdb::CcdbApi ccdbApi;
225-
o2::framework::Service<o2::ccdb::BasicCCDBManager> ccdb{};
226223
int mRunNumber = 0;
227224
float d_bz = 0;
228225

@@ -255,11 +252,6 @@ struct TaggingPi0 {
255252

256253
mRunNumber = 0;
257254
d_bz = 0;
258-
259-
ccdb->setURL(ccdburl);
260-
ccdb->setCaching(true);
261-
ccdb->setLocalObjectValidityChecking();
262-
ccdb->setFatalWhenNull(false);
263255
}
264256

265257
template <o2::soa::is_iterator TCollision>

‎PWGEM/PhotonMeson/Core/TaggingPi0MC.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include "Common/DataModel/EventSelection.h"
3434
#include "Common/DataModel/PIDResponseTPC.h"
3535

36-
#include <CCDB/BasicCCDBManager.h>
3736
#include <CCDB/CcdbApi.h>
3837
#include <CommonConstants/MathConstants.h>
3938
#include <CommonConstants/PhysicsConstants.h>
@@ -91,7 +90,6 @@ using MyMCElectron = MyMCElectrons::iterator;
9190

9291
template <o2::aod::pwgem::photonmeson::photonpair::PairType pairtype, typename... Types>
9392
struct TaggingPi0MC {
94-
o2::framework::Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
9593
o2::framework::Configurable<float> d_bz_input{"d_bz_input", -999, "bz field in kG, -999 is automatic"};
9694

9795
o2::framework::Configurable<int> cfgQvecEstimator{"cfgQvecEstimator", 0, "FT0M:0, FT0A:1, FT0C:2"};
@@ -214,7 +212,6 @@ struct TaggingPi0MC {
214212
static constexpr std::array<std::string_view, 2> parnames = {"Pi0/", "Eta/"};
215213

216214
o2::ccdb::CcdbApi ccdbApi;
217-
o2::framework::Service<o2::ccdb::BasicCCDBManager> ccdb{};
218215
int mRunNumber = 0;
219216
float d_bz = 0;
220217
TF1* f1fd_k0s_to_pi0 = nullptr;
@@ -232,11 +229,6 @@ struct TaggingPi0MC {
232229
mRunNumber = 0;
233230
d_bz = 0;
234231
f1fd_k0s_to_pi0 = new TF1("f1fd_k0s_to_pi0", TString(fd_k0s_to_pi0), 0.f, 100.f);
235-
236-
ccdb->setURL(ccdburl);
237-
ccdb->setCaching(true);
238-
ccdb->setLocalObjectValidityChecking();
239-
ccdb->setFatalWhenNull(false);
240232
}
241233

242234
template <o2::soa::is_iterator TCollision>

‎PWGEM/PhotonMeson/DataModel/EventTables.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "Common/CCDB/EventSelectionParams.h"
2020
#include "Common/DataModel/EventSelection.h"
21+
#include "Common/DataModel/TpcCCDBObjects.h"
2122

2223
#include <DataFormatsParameters/GRPMagField.h>
2324
#include <EMCALCalib/BadChannelMap.h>
@@ -118,6 +119,11 @@ DECLARE_SOA_CCDB_COLUMN(BadChannelMap, badChannelMap, o2::emcal::BadChannelMap,
118119
DECLARE_SOA_TIMESTAMPED_TABLE(EmEmcalObjects, aod::PMEvents, o2::aod::timestamp::Timestamp, 0, "EMEMCALOBJECTS", //!
119120
em::ccdbEmcal::BadChannelMap);
120121

122+
/// TPC drift velocity for EmEvents. Reuses the shared column (same label and path).
123+
/// Timestamp-uniform since the drift velocity changes within a run.
124+
DECLARE_SOA_TIMESTAMPED_TABLE(EmTpcObjects, aod::PMEvents, o2::aod::timestamp::Timestamp, 0, "EMTPCOBJECTS", //!
125+
ccdbTpc::VDriftTgl);
126+
121127
} // namespace o2::aod
122128

123129
#endif // PWGEM_PHOTONMESON_DATAMODEL_EVENTTABLES_H_

0 commit comments

Comments
 (0)