Skip to content
Merged
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.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/skimmerPrimaryMuon.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 @@ -10,7 +10,7 @@
// or submit itself to any jurisdiction.

/// \brief write relevant information for muons.
/// \author daiki.sekihata@cern.ch

Check failure on line 13 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include "PWGEM/Dilepton/DataModel/dileptonTables.h"

Expand Down Expand Up @@ -93,7 +93,7 @@
int mRunNumber;

HistogramRegistry fRegistry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false};
static constexpr std::string_view muon_types[5] = {"MFTMCHMID/", "MFTMCHMIDOtherMatch/", "MFTMCH/", "MCHMID/", "MCH/"};

Check failure on line 96 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

void init(InitContext&)
{
Expand Down Expand Up @@ -137,8 +137,8 @@
hMuonType->GetXaxis()->SetBinLabel(5, "MCH standalone");

fRegistry.add("MFTMCHMID/hPt", "pT;p_{T} (GeV/c)", kTH1F, {{100, 0.0f, 10}}, false);
fRegistry.add("MFTMCHMID/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{180, 0, 2 * M_PI}, {60, -5.f, -2.f}}, false);

Check failure on line 140 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.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 140 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.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("MFTMCHMID/hEtaPhi_MatchedMCHMID", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{180, 0, 2 * M_PI}, {60, -5.f, -2.f}}, false);

Check failure on line 141 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.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 141 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.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("MFTMCHMID/hDeltaPt_Pt", "#Deltap_{T}/p_{T} vs. p_{T};p_{T}^{gl} (GeV/c);(p_{T}^{sa} - p_{T}^{gl})/p_{T}^{gl}", kTH2F, {{100, 0, 10}, {200, -0.5, +0.5}}, false);
fRegistry.add("MFTMCHMID/hDeltaEta_Pt", "#Delta#eta vs. p_{T};p_{T}^{gl} (GeV/c);#Delta#eta", kTH2F, {{100, 0, 10}, {200, -0.5, +0.5}}, false);
fRegistry.add("MFTMCHMID/hDeltaPhi_Pt", "#Delta#varphi vs. p_{T};p_{T}^{gl} (GeV/c);#Delta#varphi (rad.)", kTH2F, {{100, 0, 10}, {200, -0.5, +0.5}}, false);
Expand All @@ -164,7 +164,7 @@
fRegistry.add("MCHMID/hDCAxyResolutionvsPt", "DCA_{xy} vs. p_{T};p_{T} (GeV/c);DCA_{y} resolution (#mum);", kTH2F, {{100, 0, 10.f}, {500, 0, 5e+5}}, false);
}

bool isSelected(const float pt, const float eta, const float rAtAbsorberEnd, const float pDCA, const float chi2, const uint8_t trackType, const float dcaXY)
bool isSelected(const float pt, const float eta, const float rAtAbsorberEnd, const float pDCA, const float chi2_per_ndf, const uint8_t trackType, const float dcaXY)
{
if (pt < minPt || maxPt < pt) {
return false;
Expand All @@ -183,7 +183,7 @@
if (maxDCAxy < dcaXY) {
return false;
}
if (chi2 < 0.f || maxChi2GL < chi2) {
if (chi2_per_ndf < 0.f || maxChi2GL < chi2_per_ndf) {
return false;
}
if (rAtAbsorberEnd < minRabsGL || maxRabs < rAtAbsorberEnd) {
Expand All @@ -193,7 +193,7 @@
if (eta < minEtaSA || maxEtaSA < eta) {
return false;
}
if (chi2 < 0.f || maxChi2SA < chi2) {
if (chi2_per_ndf < 0.f || maxChi2SA < chi2_per_ndf) {
return false;
}
} else {
Expand Down Expand Up @@ -238,7 +238,7 @@
} else {
dcaXYinSigma = std::sqrt(std::fabs((dcaX * dcaX * cYYatDCA + dcaY * dcaY * cXXatDCA - 2.f * dcaX * dcaY * cXYatDCA) / det / 2.f)); // dca xy in sigma
}
float sigma_dcaXY = dcaXY / dcaXYinSigma;

Check failure on line 241 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

float pDCA = fwdtrack.p() * dcaXY;
int nClustersMFT = 0;
Expand All @@ -252,11 +252,11 @@
// float tgl = fwdtrack.tgl();
float chi2mft = 0.f;
uint64_t mftClusterSizesAndTrackFlags = 0;
int ndf_mchmft = 999;
int ndf_mchmft = 1;

Check failure on line 255 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

if (fwdtrack.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack) {
const auto& mchtrack = fwdtrack.template matchMCHTrack_as<TFwdTracks>(); // MCH-MID
o2::dataformats::GlobalFwdTrack propmuonAtPV_Matched = propagateMuon(mchtrack, collision, propagationPoint::kToVertex);

Check failure on line 259 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
ptMatchedMCHMID = propmuonAtPV_Matched.getPt();
etaMatchedMCHMID = propmuonAtPV_Matched.getEta();
phiMatchedMCHMID = propmuonAtPV_Matched.getPhi();
Expand Down Expand Up @@ -293,7 +293,7 @@
return;
}

if (!isSelected(pt, eta, rAtAbsorberEnd, pDCA, fwdtrack.chi2(), fwdtrack.trackType(), dcaXY)) {
if (!isSelected(pt, eta, rAtAbsorberEnd, pDCA, fwdtrack.chi2() / ndf_mchmft, fwdtrack.trackType(), dcaXY)) {
return;
}

Expand Down
Loading