Skip to content
Merged
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include <vector>

#ifndef HomogeneousField
#define HomogeneousField

Check failure on line 56 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/macro]

Use SCREAMING_SNAKE_CASE for names of macros. Leading and double underscores are not allowed.
#endif

// includes KFParticle
Expand Down Expand Up @@ -236,7 +236,7 @@

// CCDB and magnetic field
int mRunNumber;
float d_bz;

Check failure on line 239 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
Service<o2::ccdb::BasicCCDBManager> ccdb;
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE;
std::unordered_map<int, float> ccdbCache; // Maps runNumber -> d_bz
Expand Down Expand Up @@ -298,7 +298,7 @@
}
matCorr = o2::base::Propagator::MatCorrType::USEMatCorrTGeo;
}
if (useMatCorrType == 2) {

Check failure on line 301 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOGF(info, "LUT correction requested, loading LUT");
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>(ccdbConfigurations.lutPath));
matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
Expand Down Expand Up @@ -501,13 +501,14 @@

auto timestamp = bc.timestamp();
o2::parameters::GRPMagField* grpmag = 0x0;
grpmag = ccdb->getForTimeStamp<o2::parameters::GRPMagField>(ccdbConfigurations.grpmagPath, timestamp);
ccdb->clearCache(ccdbConfigurations.grpmagPath);
grpmag = ccdb->getSpecific<o2::parameters::GRPMagField>(ccdbConfigurations.grpmagPath, timestamp);
if (!grpmag) {
LOG(fatal) << "Got nullptr from CCDB for path " << ccdbConfigurations.grpmagPath << " of object GRPMagField for timestamp " << timestamp;
}
o2::base::Propagator::initFieldFromGRP(grpmag);
// Fetch magnetic field from ccdb for current collision
auto d_bz = o2::base::Propagator::Instance()->getNominalBz();

Check failure on line 511 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
LOG(info) << "Retrieved GRP for timestamp " << timestamp << " with magnetic field of " << d_bz << " kG";

// set magnetic field value for DCA fitter
Expand All @@ -518,7 +519,7 @@
KFParticle::SetField(d_bz);
#endif

if (useMatCorrType == 2) {

Check failure on line 522 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
// setMatLUT only after magfield has been initalized
// (setMatLUT has implicit and problematic init field call if not)
LOG(info) << "Loading material look-up table for timestamp: " << timestamp;
Expand Down Expand Up @@ -578,7 +579,7 @@
helper.fitterV0.setBz(magField);
helper.fitter3body.setBz(magField);

if (useMatCorrType == 2) {

Check failure on line 582 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
// setMatLUT only after magfield has been initalized (setMatLUT has implicit and problematic init field call if not)
o2::base::Propagator::Instance()->setMatLUT(lut);
}
Expand Down Expand Up @@ -632,7 +633,7 @@
continue;
}
registry.fill(HIST("Counters/hEventCounter"), 1.5);
if (doPosZselection && (collision.posZ() >= 10.0f || collision.posZ() <= -10.0f)) {

Check failure on line 636 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
registry.fill(HIST("Counters/hEventCounter"), 2.5);
Expand Down Expand Up @@ -696,7 +697,7 @@
continue;
}
}
if (doPosZselection && (collision.posZ() >= 10.0f || collision.posZ() <= -10.0f)) {

Check failure on line 700 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}

Expand Down Expand Up @@ -1019,7 +1020,7 @@
doMixing(collision1, trackProton0, trackPion1, trackDeuteron1, magFieldCol1);
}
// mix pion
if (mixingOpts.mixingType == 2) {

Check failure on line 1023 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
doMixing(collision0, trackProton0, trackPion1, trackDeuteron0, magFieldCol0);
doMixing(collision1, trackProton1, trackPion0, trackDeuteron1, magFieldCol1);
}
Expand Down Expand Up @@ -1268,7 +1269,7 @@
auto yAxis = registry.get<TH2>(HIST("Mixing/hDecay3BodyRadiusPhi"))->GetYaxis();

for (const auto& decay3body : decay3bodys) {
int bin_Radius, bin_Phi;

Check failure on line 1272 in PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
if (decay3bodyBuilderOpts.useKFParticle) {
bin_Radius = xAxis->FindBin(decay3body.radiusKF());
bin_Phi = yAxis->FindBin(decay3body.phiKF());
Expand Down
Loading