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
18 changes: 9 additions & 9 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

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//

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

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

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

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

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

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
// ========================
//
// This code will create data table for inputs to machine learning for electrons.
Expand Down Expand Up @@ -85,7 +85,7 @@
{"V0/hMassK0Short", "V0 mass K0S", {HistType::kTH1F, {{200, 0.4, 0.6}}}},
{"V0/hMassLambda", "V0 mass Lambda", {HistType::kTH1F, {{100, 1.05, 1.15}}}},
{"V0/hMassAntiLambda", "V0 mass AntiLambda", {HistType::kTH1F, {{100, 1.05, 1.15}}}},
{"hMvsPhiV", "mee vs. phiv", {HistType::kTH2F, {{72, 0, M_PI}, {100, 0, 0.1}}}},

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.

{"V0/hTPCdEdx_P_El", "TPC dEdx vs. p;p^{ITS-TPC} (GeV/c);TPC dE/dx", {HistType::kTH2F, {{500, 0, 5}, {200, 0, 200}}}},
{"V0/hTPCdEdx_P_Mu", "TPC dEdx vs. p;p^{ITS-TPC} (GeV/c);TPC dE/dx", {HistType::kTH2F, {{500, 0, 5}, {200, 0, 200}}}},
Expand Down Expand Up @@ -143,10 +143,10 @@
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 146 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
Configurable<int> useMatCorrType{"useMatCorrType", 0, "0: none, 1: TGeo, 2: LUT"};

Configurable<float> downscaling_electron_primary{"downscaling_electron_primary", 1.1, "down scaling factor to store primary electron for validation"};

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
Configurable<float> downscaling_electron{"downscaling_electron", 0.005, "down scaling factor to store electron"};
Configurable<float> downscaling_pion{"downscaling_pion", 0.001, "down scaling factor to store pion"};
Configurable<float> downscaling_kaon{"downscaling_kaon", 1.1, "down scaling factor to store kaon"};
Expand Down Expand Up @@ -293,7 +293,7 @@
ccdb->get<TGeoManager>(geoPath);
}
}
if (useMatCorrType == 2) {

Check failure on line 296 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 All @@ -318,7 +318,7 @@
}

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

Check failure on line 321 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) {
Expand Down Expand Up @@ -573,7 +573,7 @@
Filter cascadeFilter = o2::aod::cascdata::dcacascdaughters < cascadecuts.cfg_max_dcadau.value && nabs(o2::aod::cascdata::dcanegtopv) > cascadecuts.cfg_min_dcaxy_v0leg&& nabs(o2::aod::cascdata::dcanegtopv) > cascadecuts.cfg_min_dcaxy_v0leg&& nabs(o2::aod::cascdata::dcabachtopv) > cascadecuts.cfg_min_dcaxy_bachelor;
using filteredCascades = soa::Filtered<aod::CascDatas>;

Filter collisionFilter_common = nabs(o2::aod::collision::posZ) < 10.f && o2::aod::evsel::sel8 == true;

Check failure on line 576 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.
using filteredMyCollisions = soa::Filtered<MyCollisions>;

Preslice<aod::V0Datas> perCollision_v0 = o2::aod::v0data::collisionId;
Expand Down Expand Up @@ -629,18 +629,18 @@
registry.fill(HIST("V0/hTOFbeta_P_Pi"), neg.p(), neg.beta());
registry.fill(HIST("V0/hTPCdEdx_P_Pi"), pos.p(), pos.tpcSignal());
registry.fill(HIST("V0/hTOFbeta_P_Pi"), pos.p(), pos.beta());
if (dist01(engine) < downscaling_pion && pos.tpcInnerParam() < max_pin_for_downscaling_pion) {
if (dist01(engine) < downscaling_pion || pos.tpcInnerParam() < max_pin_for_downscaling_pion) {
fillTrackTable(collision, pos, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kPion), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kSecondary), false);
}
if (dist01(engine) < downscaling_pion && neg.tpcInnerParam() < max_pin_for_downscaling_pion) {
if (dist01(engine) < downscaling_pion || neg.tpcInnerParam() < max_pin_for_downscaling_pion) {
fillTrackTable(collision, neg, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kPion), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kSecondary), false);
}
}
}
if (isProton(pos) && isPionTight(neg)) {
registry.fill(HIST("V0/hMassLambda"), v0.mLambda());
if (v0cuts.cfg_min_mass_lambda < v0.mLambda() && v0.mLambda() < v0cuts.cfg_max_mass_lambda) {
if (dist01(engine) < downscaling_proton && pos.tpcInnerParam() < max_pin_for_downscaling_proton) {
if (dist01(engine) < downscaling_proton || pos.tpcInnerParam() < max_pin_for_downscaling_proton) {
fillTrackTable(collision, pos, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kProton), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kSecondary), false);
}
registry.fill(HIST("V0/hTPCdEdx_P_Pr"), pos.p(), pos.tpcSignal());
Expand All @@ -650,7 +650,7 @@
if (isPionTight(pos) && isProton(neg)) {
registry.fill(HIST("V0/hMassAntiLambda"), v0.mAntiLambda());
if (v0cuts.cfg_min_mass_lambda < v0.mAntiLambda() && v0.mAntiLambda() < v0cuts.cfg_max_mass_lambda) {
if (dist01(engine) < downscaling_proton && neg.tpcInnerParam() < max_pin_for_downscaling_proton) {
if (dist01(engine) < downscaling_proton || neg.tpcInnerParam() < max_pin_for_downscaling_proton) {
fillTrackTable(collision, neg, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kProton), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kSecondary), false);
}
registry.fill(HIST("V0/hTPCdEdx_P_Pr"), neg.p(), neg.tpcSignal());
Expand All @@ -662,10 +662,10 @@
registry.fill(HIST("V0/hMassGamma_Rxy"), v0.v0radius(), v0.mGamma());
if (isElectron(pos) && isElectron(neg)) {
if ((v0cuts.cfg_min_mass_photon < v0.mGamma() && v0.mGamma() < v0cuts.cfg_max_mass_photon)) {
if (dist01(engine) < downscaling_electron && pos.tpcInnerParam() < max_pin_for_downscaling_electron) {
if (dist01(engine) < downscaling_electron || pos.tpcInnerParam() < max_pin_for_downscaling_electron) {
fillTrackTable(collision, pos, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kElectron), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kSecondary), false);
}
if (dist01(engine) < downscaling_electron && neg.tpcInnerParam() < max_pin_for_downscaling_electron) {
if (dist01(engine) < downscaling_electron || neg.tpcInnerParam() < max_pin_for_downscaling_electron) {
fillTrackTable(collision, neg, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kElectron), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kSecondary), false);
}
registry.fill(HIST("V0/hTPCdEdx_P_El"), neg.p(), neg.tpcSignal());
Expand Down Expand Up @@ -756,7 +756,7 @@
if (cascadecuts.cfg_min_mass_Omega < cascade.mOmega() && cascade.mOmega() < cascadecuts.cfg_max_mass_Omega) { // select Omega candidates
registry.fill(HIST("V0/hTPCdEdx_P_Ka"), bachelor.p(), bachelor.tpcSignal());
registry.fill(HIST("V0/hTOFbeta_P_Ka"), bachelor.p(), bachelor.beta());
if (dist01(engine) < downscaling_kaon && bachelor.tpcInnerParam() < max_pin_for_downscaling_kaon) {
if (dist01(engine) < downscaling_kaon || bachelor.tpcInnerParam() < max_pin_for_downscaling_kaon) {
fillTrackTable(collision, bachelor, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kKaon), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kPrimary), false);
}
}
Expand All @@ -782,12 +782,12 @@

if ((dalitzcuts.cfg_min_mass_ee < v12.M() && v12.M() < dalitzcuts.cfg_max_mass_ee) && (dalitzcuts.cfg_min_phiv_ee < phiv && phiv < dalitzcuts.cfg_max_phiv_ee)) { // ee from pi0 dalitz decay is found.
if (isElectronTight(pos) && isElectron(neg)) {
if (dist01(engine) < downscaling_electron_primary && neg.tpcInnerParam() < max_pin_for_downscaling_electron_primary) {
if (dist01(engine) < downscaling_electron_primary || neg.tpcInnerParam() < max_pin_for_downscaling_electron_primary) {
fillTrackTable(collision, neg, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kElectron), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kPrimary), true); // primary electron candidates
}
}
if (isElectron(pos) && isElectronTight(neg)) {
if (dist01(engine) < downscaling_electron_primary && pos.tpcInnerParam() < max_pin_for_downscaling_electron_primary) {
if (dist01(engine) < downscaling_electron_primary || pos.tpcInnerParam() < max_pin_for_downscaling_electron_primary) {
fillTrackTable(collision, pos, static_cast<int>(o2::aod::pwgem::dilepton::PID_Label::kElectron), static_cast<int>(o2::aod::pwgem::dilepton::Track_Type::kPrimary), true); // primary electron candidates
}
}
Expand Down
Loading