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
15 changes: 11 additions & 4 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

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)

Check failure on line 1 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.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 @@ -63,11 +63,11 @@
using MFTTracksMC = soa::Join<o2::aod::MFTTracks, aod::McMFTTrackLabels>;
using MFTTrackMC = MFTTracksMC::iterator;

Produces<aod::EMPrimaryMuons_001> emprimarymuons;
Produces<aod::EMPrimaryMuons> emprimarymuons;
Produces<aod::EMPrimaryMuonsCov> emprimarymuonscov;

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

Check failure on line 70 in PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.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> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
Configurable<std::string> geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
Configurable<bool> fillQAHistograms{"fillQAHistograms", false, "flag to fill QA histograms"};
Expand All @@ -90,6 +90,8 @@
Configurable<bool> refitGlobalMuon{"refitGlobalMuon", true, "flag to refit global muon"};
Configurable<float> matchingZ{"matchingZ", -77.5, "z position where matching is performed"};
Configurable<int> minNmuon{"minNmuon", 0, "min number of muon candidates per collision"};
Configurable<float> maxDEta{"maxDEta", 1e+10f, "max. deta between MFT-MCH-MID and MCH-MID"};
Configurable<float> maxDPhi{"maxDPhi", 1e+10f, "max. dphi between MFT-MCH-MID and MCH-MID"};

o2::ccdb::CcdbApi ccdbApi;
Service<o2::ccdb::BasicCCDBManager> ccdb;
Expand Down Expand Up @@ -391,11 +393,16 @@
return false;
}

float deta = etaMatchedMCHMID - eta;
float dphi = phiMatchedMCHMID - phi;
o2::math_utils::bringToPMPi(dphi);

if (std::sqrt(std::pow(deta / maxDEta, 2) + std::pow(dphi / maxDPhi, 2)) > 1.f) {
return false;
}

if constexpr (fillTable) {
float dpt = (ptMatchedMCHMID - pt) / pt;
float deta = etaMatchedMCHMID - eta;
float dphi = phiMatchedMCHMID - phi;
o2::math_utils::bringToPMPi(dphi);

float detaMP = etaMatchedMCHMIDatMP - etaMatchedMFTatMP;
float dphiMP = phiMatchedMCHMIDatMP - phiMatchedMFTatMP;
Expand Down Expand Up @@ -1264,7 +1271,7 @@
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<skimmerPrimaryMuon>(cfgc, TaskName{"skimmer-primary-muon"}),

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name skimmer-primary-muon and the struct name skimmerPrimaryMuon produce the same device name skimmer-primary-muon. TaskName is redundant.
adaptAnalysisTask<associateAmbiguousMuon>(cfgc, TaskName{"associate-ambiguous-muon"}),

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name associate-ambiguous-muon and the struct name associateAmbiguousMuon produce the same device name associate-ambiguous-muon. TaskName is redundant.
adaptAnalysisTask<associateSameMFT>(cfgc, TaskName{"associate-same-mft"})};

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Device names associate-same-mft and associate-same-m-f-t generated from the specified task name associate-same-mft and from the struct name associateSameMFT, respectively, differ in hyphenation. Consider fixing capitalisation of the struct name to AssociateSameMft and removing TaskName.
}
Loading