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
22 changes: 22 additions & 0 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 <string>
#include <map>
Expand Down Expand Up @@ -94,7 +94,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 97 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 @@ -138,8 +138,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 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/hEtaPhi_MatchedMCHMID", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{180, 0, 2 * M_PI}, {60, -5.f, -2.f}}, false);

Check failure on line 142 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 142 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 Down Expand Up @@ -240,7 +240,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 243 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 @@ -257,12 +257,12 @@

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 260 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();
o2::math_utils::bringTo02Pi(phiMatchedMCHMID);
o2::dataformats::GlobalFwdTrack propmuonAtDCA_Matched = propagateMuon(mchtrack, collision, propagationPoint::kToDCA);

Check failure on line 265 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 dcaX_Matched = propmuonAtDCA_Matched.getX() - collision.posX();
float dcaY_Matched = propmuonAtDCA_Matched.getY() - collision.posY();
float dcaXY_Matched = std::sqrt(dcaX_Matched * dcaX_Matched + dcaY_Matched * dcaY_Matched);
Expand Down Expand Up @@ -393,6 +393,10 @@
const auto& bc = collision.template bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);

if (!collision.isSelected()) {
continue;
}

const auto& fwdtracks_per_coll = fwdtracks.sliceBy(perCollision, collision.globalIndex());
for (const auto& fwdtrack : fwdtracks_per_coll) {
if (fwdtrack.trackType() != o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack && fwdtrack.trackType() != o2::aod::fwdtrack::ForwardTrackTypeEnum::MuonStandaloneTrack) {
Expand All @@ -417,6 +421,10 @@
const auto& bc = collision.template bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);

if (!collision.isSelected()) {
continue;
}

const auto& fwdtrackIdsThisCollision = fwdtrackIndices.sliceBy(fwdtrackIndicesPerCollision, collision.globalIndex());
for (const auto& fwdtrackId : fwdtrackIdsThisCollision) {
const auto& fwdtrack = fwdtrackId.template fwdtrack_as<MyFwdTracks>();
Expand All @@ -435,6 +443,11 @@
for (const auto& collision : collisions) {
const auto& bc = collision.template bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);

if (!collision.isSelected()) {
continue;
}

if (collision.swtaliastmp_raw() == 0) {
continue;
}
Expand Down Expand Up @@ -462,6 +475,9 @@
for (const auto& collision : collisions) {
const auto& bc = collision.template bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);
if (!collision.isSelected()) {
continue;
}
if (collision.swtaliastmp_raw() == 0) {
continue;
}
Expand All @@ -484,6 +500,9 @@
for (const auto& collision : collisions) {
const auto& bc = collision.template bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);
if (!collision.isSelected()) {
continue;
}
if (!collision.has_mcCollision()) {
continue;
}
Expand Down Expand Up @@ -514,6 +533,9 @@
for (const auto& collision : collisions) {
const auto& bc = collision.template bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);
if (!collision.isSelected()) {
continue;
}
if (!collision.has_mcCollision()) {
continue;
}
Expand Down
Loading