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
20 changes: 13 additions & 7 deletions PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -134,7 +134,7 @@
};

// CCDB options
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 137 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
Configurable<std::string> lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"};
Expand All @@ -142,34 +142,36 @@
Configurable<std::string> mVtxPath{"mVtxPath", "GLO/Calib/MeanVertex", "Path of the mean vertex file"};
Configurable<bool> skipGRPOquery{"skipGRPOquery", true, "skip grpo query"};
// Operation and minimisation criteria
Configurable<double> d_bz_input{"d_bz_input", -999, "bz field, -999 is automatic"};

Check failure on line 145 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<int> useMatCorrType{"useMatCorrType", 2, "0: none, 1: TGeo, 2: LUT"};
Configurable<bool> cfgApplyBCShiftTOF{"cfgApplyBCShiftTOF", true, "apply bc shift for TOF n sigma of track from v0 or cascade"};

// for zorro
Configurable<std::string> cfg_swt_names{"cfg_swt_names", "fHighTrackMult,fHighFt0cFv0Mult", "comma-separated software trigger names"};

Check failure on line 150 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
o2::framework::Configurable<std::string> ccdbPathSoftwareTrigger{"ccdbPathSoftwareTrigger", "EventFiltering/Zorro/", "ccdb path for ZORRO objects"};
Configurable<uint64_t> bcMarginForSoftwareTrigger{"bcMarginForSoftwareTrigger", 100, "Number of BCs of margin for software triggers"};
Configurable<bool> cfgUseZorro{"cfgUseZorro", false, "flag to analyze software-triggered data"};

Configurable<float> downscaling_electron_highP{"downscaling_electron_highP", 1.1, "down scaling factor to store electron at high p"};

Check failure on line 155 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> downscaling_pion_highP{"downscaling_pion_highP", 1.1, "down scaling factor to store pion at high p"};
Configurable<float> downscaling_kaon_highP{"downscaling_kaon_highP", 1.1, "down scaling factor to store kaon at high p"};
Configurable<float> downscaling_proton_highP{"downscaling_proton_highP", 1.1, "down scaling factor to store proton at high p"};

Configurable<float> downscaling_electron_midP{"downscaling_electron_midP", 0.1, "down scaling factor to store electron at intermediate p"};
Configurable<float> downscaling_electron_midP{"downscaling_electron_midP", 0.05, "down scaling factor to store electron at intermediate p"};
Configurable<float> downscaling_pion_midP{"downscaling_pion_midP", 0.1, "down scaling factor to store pion at intermediate p"};

Configurable<float> downscaling_electron_lowP{"downscaling_electron_lowP", 0.01, "down scaling factor to store electron at low p"};
Configurable<float> downscaling_electron_lowP{"downscaling_electron_lowP", 0.005, "down scaling factor to store electron at low p"};
Configurable<float> downscaling_pion_lowP{"downscaling_pion_lowP", 0.01, "down scaling factor to store pion at low p"};
Configurable<float> downscaling_kaon_lowP{"downscaling_kaon_lowP", 1.1, "down scaling factor to store kaon at low p"};
Configurable<float> downscaling_proton_lowP{"downscaling_proton_lowP", 0.01, "down scaling factor to store proton at low p"};
Configurable<float> downscaling_proton_lowP{"downscaling_proton_lowP", 0.002, "down scaling factor to store proton at low p"};

Configurable<float> mid_p_for_downscaling_electron{"mid_p_for_downscaling_electron", 0.8, "intermediate p to apply down scaling factor to store electron"};
Configurable<float> mid_p_for_downscaling_pion{"mid_p_for_downscaling_pion", 0.25, "intermediate p to apply down scaling factor to store pion"};

Configurable<float> max_p_for_downscaling_electron{"max_p_for_downscaling_electron", 2.0, "max p to apply down scaling factor to store electron"};
Configurable<float> max_p_for_downscaling_pion{"max_p_for_downscaling_pion", 2.0, "max p to apply down scaling factor to store pion"};
Configurable<float> max_p_for_downscaling_pion{"max_p_for_downscaling_pion", 0.4, "max p to apply down scaling factor to store pion"};
Configurable<float> max_p_for_downscaling_kaon{"max_p_for_downscaling_kaon", 0.0, "max p to apply down scaling factor to store kaon"};
Configurable<float> max_p_for_downscaling_proton{"max_p_for_downscaling_proton", 2.0, "max p to apply down scaling factor to store proton"};
Configurable<float> max_p_for_downscaling_proton{"max_p_for_downscaling_proton", 1e+10, "max p to apply down scaling factor to store proton"};
Configurable<bool> store_ele_band_only{"store_ele_band_only", true, "flag to store tracks around electron band only to reduce output size"};
Configurable<bool> reject_v0leg_with_itsib{"reject_v0leg_with_itsib", true, "flag to reject v0 leg with ITSib hits"};

Expand All @@ -180,7 +182,7 @@
Configurable<bool> cfgRequireSel8{"cfgRequireSel8", false, "require sel8 in event cut"};
Configurable<bool> cfgRequireFT0AND{"cfgRequireFT0AND", true, "require FT0AND in event cut"};
Configurable<bool> cfgRequireNoTFB{"cfgRequireNoTFB", true, "require No time frame border in event cut"};
Configurable<bool> cfgRequireNoITSROFB{"cfgRequireNoITSROFB", true, "require no ITS readout frame border in event cut"};
Configurable<bool> cfgRequireNoITSROFB{"cfgRequireNoITSROFB", false, "require no ITS readout frame border in event cut"};
Configurable<bool> cfgRequireVertexITSTPC{"cfgRequireVertexITSTPC", false, "require Vertex ITSTPC in event cut"}; // ITS-TPC matched track contributes PV.
Configurable<bool> cfgRequireVertexTOFmatched{"cfgRequireVertexTOFmatched", false, "require Vertex TOFmatched in event cut"}; // ITS-TPC-TOF matched track contributes PV.
Configurable<bool> cfgRequireNoSameBunchPileup{"cfgRequireNoSameBunchPileup", false, "require no same bunch pileup in event cut"};
Expand Down Expand Up @@ -347,7 +349,7 @@
ccdb->get<TGeoManager>(geoPath);
}
}
if (useMatCorrType == 2) {

Check failure on line 352 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.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>(lutPath));
}
Expand Down Expand Up @@ -380,10 +382,10 @@
}

// In case override, don't proceed, please - no CCDB access required
if (d_bz_input > -990) {

Check failure on line 385 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.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.
d_bz = d_bz_input;
o2::parameters::GRPMagField grpmag;
if (std::fabs(d_bz) > 1e-5) {

Check failure on line 388 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.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.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
o2::base::Propagator::initFieldFromGRP(&grpmag);
Expand Down Expand Up @@ -675,10 +677,14 @@
}
}
} else if (pidlabel == static_cast<uint8_t>(o2::aod::pwgem::dilepton::ml::PID_Label::kPion)) {
if (track.tpcInnerParam() < max_p_for_downscaling_pion) {
if (track.tpcInnerParam() < mid_p_for_downscaling_pion) {
if (dist01(engine) > downscaling_pion_lowP) {
return;
}
} else if (track.tpcInnerParam() < max_p_for_downscaling_pion) {
if (dist01(engine) > downscaling_pion_midP) {
return;
}
} else {
if (dist01(engine) > downscaling_pion_highP) {
return;
Expand Down Expand Up @@ -1487,6 +1493,6 @@
{
o2::pid::tof::TOFResponseImpl::metadataInfo.initMetadata(cfgc);
return WorkflowSpec{
adaptAnalysisTask<TreeCreatorElectronMLDDA>(cfgc, TaskName{"tree-creator-ele-ml-dda"}),

Check failure on line 1496 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name tree-creator-ele-ml-dda produces device name tree-creator-ele-ml-dda which does not match the device name tree-creator-electron-m-l-d-d-a from the struct name TreeCreatorElectronMLDDA. (Matching struct name TreeCreatorEleMlDda)
adaptAnalysisTask<MLTrackQC>(cfgc, TaskName{"ml-track-qc"})};

Check failure on line 1497 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Device names ml-track-qc and m-l-track-q-c generated from the specified task name ml-track-qc and from the struct name MLTrackQC, respectively, differ in hyphenation. Consider fixing capitalisation of the struct name to MlTrackQc and removing TaskName.
}
Loading