Skip to content

Commit 18eb20c

Browse files
authored
[PWGHF] Remove unnecessary load of material lut in candidate HF creators for 2 and 3 prongs (AliceO2Group#8530)
1 parent a178b6d commit 18eb20c

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#define HomogeneousField
2121
#endif
2222

23+
#include <memory>
24+
#include <string>
25+
#include <vector>
26+
2327
#include <KFParticleBase.h>
2428
#include <KFParticle.h>
2529
#include <KFPTrack.h>
@@ -78,15 +82,12 @@ struct HfCandidateCreator2Prong {
7882
// magnetic field setting from CCDB
7983
Configurable<bool> isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"};
8084
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
81-
Configurable<std::string> ccdbPathLut{"ccdbPathLut", "GLO/Param/MatLUT", "Path for LUT parametrization"};
8285
Configurable<std::string> ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"};
8386
Configurable<std::string> ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"};
8487

8588
HfEventSelection hfEvSel; // event selection and monitoring
8689
o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter
8790
Service<o2::ccdb::BasicCCDBManager> ccdb;
88-
o2::base::MatLayerCylSet* lut;
89-
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
9091

9192
using TracksWCovExtraPidPiKa = soa::Join<aod::TracksWCovExtra, aod::TracksPidPi, aod::PidTpcTofFullPi, aod::TracksPidKa, aod::PidTpcTofFullKa>;
9293

@@ -168,7 +169,6 @@ struct HfCandidateCreator2Prong {
168169
ccdb->setURL(ccdbUrl);
169170
ccdb->setCaching(true);
170171
ccdb->setLocalObjectValidityChecking();
171-
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>(ccdbPathLut));
172172
runNumber = 0;
173173

174174
/// candidate monitoring
@@ -204,7 +204,7 @@ struct HfCandidateCreator2Prong {
204204
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
205205
if (runNumber != bc.runNumber()) {
206206
LOG(info) << ">>>>>>>>>>>> Current run number: " << runNumber;
207-
initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, lut, isRun2);
207+
initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, nullptr, isRun2);
208208
bz = o2::base::Propagator::Instance()->getNominalBz();
209209
LOG(info) << ">>>>>>>>>>>> Magnetic field: " << bz;
210210
// df.setBz(bz); /// put it outside the 'if'! Otherwise we have a difference wrt bz Configurable (< 1 permille) in Run2 conv. data
@@ -349,7 +349,7 @@ struct HfCandidateCreator2Prong {
349349
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
350350
if (runNumber != bc.runNumber()) {
351351
LOG(info) << ">>>>>>>>>>>> Current run number: " << runNumber;
352-
initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, lut, isRun2);
352+
initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, nullptr, isRun2);
353353
bz = o2::base::Propagator::Instance()->getNominalBz();
354354
LOG(info) << ">>>>>>>>>>>> Magnetic field: " << bz;
355355
// df.setBz(bz); /// put it outside the 'if'! Otherwise we have a difference wrt bz Configurable (< 1 permille) in Run2 conv. data

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
///
1616
/// \author Vít Kučera <[email protected]>, CERN
1717

18+
#include <memory>
19+
#include <string>
20+
#include <utility>
21+
#include <vector>
22+
1823
#include <TPDGCode.h>
1924

2025
#include "CommonConstants/PhysicsConstants.h"
@@ -59,7 +64,6 @@ struct HfCandidateCreator3Prong {
5964
// magnetic field setting from CCDB
6065
Configurable<bool> isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"};
6166
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
62-
Configurable<std::string> ccdbPathLut{"ccdbPathLut", "GLO/Param/MatLUT", "Path for LUT parametrization"};
6367
Configurable<std::string> ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"};
6468
Configurable<std::string> ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"};
6569
// flags to enable creation for different particle species separately
@@ -71,8 +75,6 @@ struct HfCandidateCreator3Prong {
7175
HfEventSelection hfEvSel; // event selection and monitoring
7276
o2::vertexing::DCAFitterN<3> df; // 3-prong vertex fitter
7377
Service<o2::ccdb::BasicCCDBManager> ccdb;
74-
o2::base::MatLayerCylSet* lut;
75-
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
7678

7779
int runNumber{0};
7880
float toMicrometers = 10000.; // from cm to µm
@@ -152,7 +154,6 @@ struct HfCandidateCreator3Prong {
152154
ccdb->setURL(ccdbUrl);
153155
ccdb->setCaching(true);
154156
ccdb->setLocalObjectValidityChecking();
155-
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>(ccdbPathLut));
156157
runNumber = 0;
157158

158159
/// candidate monitoring
@@ -190,7 +191,7 @@ struct HfCandidateCreator3Prong {
190191
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
191192
if (runNumber != bc.runNumber()) {
192193
LOG(info) << ">>>>>>>>>>>> Current run number: " << runNumber;
193-
initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, lut, isRun2);
194+
initCCDB(bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, nullptr, isRun2);
194195
bz = o2::base::Propagator::Instance()->getNominalBz();
195196
LOG(info) << ">>>>>>>>>>>> Magnetic field: " << bz;
196197
// df.setBz(bz); /// put it outside the 'if'! Otherwise we have a difference wrt bz Configurable (< 1 permille) in Run2 conv. data

0 commit comments

Comments
 (0)