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
46 changes: 21 additions & 25 deletions PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
if (fillQAHistogram) {
fRegistry.add("Track/hPt", "pT;p_{T} (GeV/c)", kTH1F, {{1000, 0.0f, 10}}, false);
fRegistry.add("Track/hQoverPt", "q/pT;q/p_{T} (GeV/c)^{-1}", kTH1F, {{4000, -20, 20}}, false);
fRegistry.add("Track/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{180, 0, 2 * M_PI}, {20, -1.0f, 1.0f}}, false);

Check failure on line 146 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check failure on line 146 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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.
fRegistry.add("Track/hDCAxyz", "DCA xy vs. z;DCA_{xy} (cm);DCA_{z} (cm)", kTH2F, {{200, -1.0f, 1.0f}, {200, -1.0f, 1.0f}}, false);
fRegistry.add("Track/hDCAxyzSigma", "DCA xy vs. z;DCA_{xy} (#sigma);DCA_{z} (#sigma)", kTH2F, {{200, -10.0f, 10.0f}, {200, -10.0f, 10.0f}}, false);
fRegistry.add("Track/hDCAxyRes_Pt", "DCA_{xy} resolution vs. pT;p_{T} (GeV/c);DCA_{xy} resolution (#mum)", kTH2F, {{1000, 0, 10}, {500, 0., 500}}, false);
Expand Down Expand Up @@ -218,10 +218,10 @@
}

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

Check failure on line 221 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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 224 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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 @@ -269,7 +269,7 @@
}
if (storeOnlyTrueElectronMC) {
const auto& mcParticle = track.template mcParticle_as<aod::McParticles>();
if (std::abs(mcParticle.pdgCode()) != 11) {

Check failure on line 272 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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.

Check failure on line 272 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
return false;
}
}
Expand Down Expand Up @@ -353,19 +353,17 @@
return false;
}

if (track.hasITS() && !track.hasTPC() && !track.hasTRD() && !track.hasTOF()) {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl++;
}
total_cluster_size += cluster_size_per_layer;
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 357 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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.
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl++;
}
total_cluster_size += cluster_size_per_layer;
}

if (maxMeanITSClusterSize < static_cast<float>(total_cluster_size) / static_cast<float>(nl) * std::cos(std::atan(trackParCov.getTgl()))) {
return false;
}
if (maxMeanITSClusterSize < static_cast<float>(total_cluster_size) / static_cast<float>(nl) * std::cos(std::atan(trackParCov.getTgl()))) {
return false;
}

return true;
Expand Down Expand Up @@ -823,16 +821,16 @@
Configurable<double> d_bz_input{"d_bz", -999, "bz field, -999 is automatic"};

Configurable<bool> fillQAHistogram{"fillQAHistogram", false, "flag to fill QA histograms"};
Configurable<float> max_dcaxy{"max_dcaxy", 0.3, "DCAxy To PV for loose track sample"};
Configurable<float> max_dcaz{"max_dcaz", 0.3, "DCAz To PV for loose track sample"};
Configurable<float> max_dcaxy{"max_dcaxy", 1.0, "DCAxy To PV for loose track sample"};
Configurable<float> max_dcaz{"max_dcaz", 1.0, "DCAz To PV for loose track sample"};
Configurable<float> minpt{"minpt", 0.1, "min pt for ITS-TPC track"};
Configurable<float> maxeta{"maxeta", 1.2, "eta acceptance for loose track sample"};
Configurable<int> min_ncluster_tpc{"min_ncluster_tpc", 0, "min ncluster tpc"};
Configurable<int> mincrossedrows{"mincrossedrows", 70, "min crossed rows"};
Configurable<float> max_frac_shared_clusters_tpc{"max_frac_shared_clusters_tpc", 999.f, "max fraction of shared clusters in TPC"};
Configurable<float> min_tpc_cr_findable_ratio{"min_tpc_cr_findable_ratio", 0.8, "min. TPC Ncr/Nf ratio"};
Configurable<float> maxchi2tpc{"maxchi2tpc", 5.0, "max chi2/NclsTPC"};
Configurable<float> maxchi2its{"maxchi2its", 6.0, "max chi2/NclsITS"};
Configurable<float> maxchi2its{"maxchi2its", 36.0, "max chi2/NclsITS"};
Configurable<int> min_ncluster_its{"min_ncluster_its", 4, "min ncluster its"};
Configurable<int> min_ncluster_itsib{"min_ncluster_itsib", 1, "min ncluster itsib"};
Configurable<float> minTPCNsigmaEl{"minTPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"};
Expand Down Expand Up @@ -873,10 +871,10 @@
void addHistograms()
{
fRegistry.add("Track/hPt", "pT;p_{T} (GeV/c)", kTH1F, {{1000, 0.0f, 10}}, false);
fRegistry.add("Track/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {80, -2.0f, 2.0f}}, false);

Check failure on line 874 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check failure on line 874 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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.
fRegistry.add("Track/hTPCNsigmaEl", "loose track TPC PID", kTH2F, {{1000, 0.f, 10}, {100, -5, +5}});
fRegistry.add("Pair/before/uls/hMvsPt", "mass vs. pT;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c)", kTH2F, {{500, 0, 0.5}, {100, 0, 1}});
fRegistry.add("Pair/before/uls/hMvsPhiV", "mass vs. phiv;#varphi_{V} (rad.);m_{ee} (GeV/c^{2})", kTH2F, {{90, 0.f, M_PI}, {100, 0, 1.0}});

Check failure on line 877 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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.
fRegistry.addClone("Pair/before/uls/", "Pair/before/lspp/");
fRegistry.addClone("Pair/before/uls/", "Pair/before/lsmm/");
fRegistry.addClone("Pair/before/", "Pair/after/");
Expand Down Expand Up @@ -998,19 +996,17 @@
return false;
}

if (track.hasITS() && !track.hasTPC() && !track.hasTOF() && !track.hasTRD()) {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl++;
}
total_cluster_size += cluster_size_per_layer;
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl++;
}
total_cluster_size += cluster_size_per_layer;
}

if (maxMeanITSClusterSize < static_cast<float>(total_cluster_size) / static_cast<float>(nl) * std::cos(std::atan(trackParCov.getTgl()))) {
return false;
}
if (maxMeanITSClusterSize < static_cast<float>(total_cluster_size) / static_cast<float>(nl) * std::cos(std::atan(trackParCov.getTgl()))) {
return false;
}

return true;
Expand Down
Loading