You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PWGCF/Tasks/correlations.cxx
+30-15Lines changed: 30 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@
26
26
#include<CCDB/BasicCCDBManager.h>
27
27
#include<CommonConstants/MathConstants.h>
28
28
#include<CommonConstants/PhysicsConstants.h>
29
+
#include<DataFormatsParameters/GRPMagField.h>
29
30
#include<DataFormatsParameters/GRPObject.h>
30
31
#include<Framework/AnalysisDataModel.h>
31
32
#include<Framework/AnalysisHelpers.h>
@@ -114,6 +115,7 @@ struct CorrelationTask {
114
115
115
116
O2_DEFINE_CONFIGURABLE(cfgEfficiencyTrigger, std::string, "", "CCDB path to efficiency object for trigger particles")
116
117
O2_DEFINE_CONFIGURABLE(cfgEfficiencyAssociated, std::string, "", "CCDB path to efficiency object for associated particles")
118
+
O2_DEFINE_CONFIGURABLE(cfgUseRun3MagField, bool, false, "false: Run 2 GRPObject; true: Run 3 GRPMagField")
117
119
118
120
O2_DEFINE_CONFIGURABLE(cfgNoMixedEvents, int, 5, "Number of mixed events per event")
119
121
O2_DEFINE_CONFIGURABLE(cfgRejectMixedPhiProngEvents, bool, true, "Reject associated hadrons from either mixed-phi prong event")
@@ -186,6 +188,8 @@ struct CorrelationTask {
186
188
PairCuts mPairCuts;
187
189
188
190
Service<o2::ccdb::BasicCCDBManager> ccdb;
191
+
intmCachedRunNumber{-1}; // cached run number for magnetic field -- to avoid re-fetching the magnetic field for the same run, assuming that the magnetic field remains the same for the same run
192
+
intmCachedMagField{0}; // cached magnetic field --reduces number of calls to the CCDB
189
193
190
194
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2V0Ms>>;
191
195
using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection>>;
@@ -331,21 +335,32 @@ struct CorrelationTask {
331
335
ccdb->setCreatedNotAfter(now); // TODO must become global parameter from the train creation time
0 commit comments