From 5e6bf340c036896701cd702dd3940afdeac1aa27 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Wed, 26 Apr 2023 17:44:25 +0200 Subject: [PATCH 01/14] fixed error filling secd histos and added pt configurable for ITS tracks --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 1240 +++++++++++++++++++---------- 1 file changed, 826 insertions(+), 414 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 2c10fccdead..9211f004fb6 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -20,8 +20,8 @@ #include "Common/DataModel/TrackSelectionTables.h" #include "CommonConstants/MathConstants.h" #include "Framework/AnalysisTask.h" -#include "Framework/runDataProcessing.h" #include "Framework/RunningWorkflowInfo.h" +#include "Framework/runDataProcessing.h" // // base namespaces @@ -33,30 +33,56 @@ using std::array; struct qaMatchEff { // // histogram registry - HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry histos{ + "Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; // // Track selections - Configurable b_useTrackSelections{"b_useTrackSelections", false, "Boolean to switch the track selections on/off."}; + Configurable b_useTrackSelections{ + "b_useTrackSelections", false, + "Boolean to switch the track selections on/off."}; // kinematics - Configurable ptMinCutInnerWallTPC{"ptMinCutInnerWallTPC", 0.1f, "Minimum transverse momentum calculated at the inner wall of TPC (GeV/c)"}; - Configurable ptMinCut{"ptMinCut", 0.1f, "Minimum transverse momentum (GeV/c)"}; - Configurable ptMaxCut{"ptMaxCut", 100.f, "Maximum transverse momentum (GeV/c)"}; + Configurable ptMinCutInnerWallTPC{ + "ptMinCutInnerWallTPC", 0.1f, + "Minimum transverse momentum calculated at the inner wall of TPC " + "(GeV/c)"}; + Configurable ptMinCut{"ptMinCut", 0.1f, + "Minimum transverse momentum (GeV/c)"}; + Configurable ptMaxCut{"ptMaxCut", 100.f, + "Maximum transverse momentum (GeV/c)"}; Configurable etaMinCut{"etaMinCut", -2.0f, "Minimum pseudorapidity"}; Configurable etaMaxCut{"etaMaxCut", 2.0f, "Maximum pseudorapidity"}; - Configurable dcaXYMaxCut{"dcaXYMaxCut", 1000000.0f, "Maximum dcaXY (cm)"}; - Configurable b_useTPCinnerWallPt{"b_useTPCinnerWallPt", false, "Boolean to switch the usage of pt calculated at the inner wall of TPC son/off."}; + Configurable dcaXYMaxCut{"dcaXYMaxCut", 1000000.0f, + "Maximum dcaXY (cm)"}; + Configurable b_useTPCinnerWallPt{ + "b_useTPCinnerWallPt", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off."}; + Configurable b_useTPCinnerWallPtForITS{ + "b_useTPCinnerWallPtForITS", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off just for ITS-tagged (not TPC tagged) histos."}; // TPC - Configurable tpcNClusterMin{"tpcNClusterMin", 0, "Minimum number of clusters in TPC"}; - Configurable tpcNCrossedRowsMin{"tpcNCrossedRowsMin", 70, "Minimum number of crossed rows in TPC"}; - Configurable tpcNCrossedRowsOverFindableClstMin{"tpcNCrossedRowsOverFindableClstMin", 0.8f, "Minimum fracion of crossed rows over findable custers in TPC"}; + Configurable tpcNClusterMin{"tpcNClusterMin", 0, + "Minimum number of clusters in TPC"}; + Configurable tpcNCrossedRowsMin{"tpcNCrossedRowsMin", 70, + "Minimum number of crossed rows in TPC"}; + Configurable tpcNCrossedRowsOverFindableClstMin{ + "tpcNCrossedRowsOverFindableClstMin", 0.8f, + "Minimum fracion of crossed rows over findable custers in TPC"}; Configurable tpcChi2Max{"tpcChi2Max", 4.0f, "Maximum chi2 in TPC"}; // ITS Configurable itsChi2Max{"itsChi2Max", 36.0f, "Maximum chi2 in ITS"}; - Configurable customITShitmap{"customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; - Configurable customMinITShits{"customMinITShits", 1, "Minimum number of layers crossed by a track among those in \"customITShitmap\""}; + Configurable customITShitmap{ + "customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; + Configurable customMinITShits{ + "customMinITShits", 1, + "Minimum number of layers crossed by a track among those in " + "\"customITShitmap\""}; // Other track settings // TRD presence - Configurable isTRDThere{"isTRDThere", 2, "Integer to turn the presence of TRD off, on, don't care (0,1,anything else)"}; + Configurable isTRDThere{"isTRDThere", 2, + "Integer to turn the presence of TRD off, on, " + "don't care (0,1,anything else)"}; // Configurable isitMC{"isitMC", false, "Reading MC files, data if false"}; Configurable doDebug{"doDebug", false, "Flag of debug information"}; @@ -91,25 +117,34 @@ struct qaMatchEff { AxisSpec axisDPh{phiBins, -PI, PI, "D#it{#varphi} (rad)"}; // // pdg codes vector - std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, 321, 411, 521, 2212, 1114, 2214}; + std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, + 321, 411, 521, 2212, 1114, 2214}; // // configuration for THnSparse's // Configurable makethn{"makethn", false, "choose if produce thnsparse"}; - ConfigurableAxis thnd0{"thnd0", {600, -3.0f, 3.0f}, "impact parameter in xy [cm]"}; + ConfigurableAxis thnd0{ + "thnd0", {600, -3.0f, 3.0f}, "impact parameter in xy [cm]"}; ConfigurableAxis thnPt{"thnPt", {30, 0.0f, 15.0f}, "pt [GeV/c]"}; ConfigurableAxis thnPhi{"thnPhi", {18, 0.0f, TMath::TwoPi()}, "phi"}; ConfigurableAxis thnEta{"thnEta", {20, -2.0f, 2.0f}, "eta"}; - ConfigurableAxis thnType{"thnType", {3, -0.5f, 2.5f}, "0: primary, 1: physical secondary, 2: sec. from material"}; - ConfigurableAxis thnLabelSign{"thnLabelSign", {3, -1.5f, 1.5f}, "-1/+1 antip./particle"}; - ConfigurableAxis thnSpec{"thnSpec", {5, 0.5f, 5.5f}, "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; + ConfigurableAxis thnType{ + "thnType", + {3, -0.5f, 2.5f}, + "0: primary, 1: physical secondary, 2: sec. from material"}; + ConfigurableAxis thnLabelSign{ + "thnLabelSign", {3, -1.5f, 1.5f}, "-1/+1 antip./particle"}; + ConfigurableAxis thnSpec{"thnSpec", + {5, 0.5f, 5.5f}, + "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; AxisSpec thnd0Axis{thnd0, "#it{d}_{r#it{#varphi}} [cm]"}; AxisSpec thnPtAxis{thnPt, "#it{p}_{T}^{reco} [GeV/#it{c}]"}; AxisSpec thnPhiAxis{thnPhi, "#varphi"}; AxisSpec thnEtaAxis{thnEta, "#it{#eta}"}; AxisSpec thnTypeAxis{thnType, "0:prim-1:sec-2:matsec"}; AxisSpec thnLabelSignAxis{thnLabelSign, "+/- 1 for part./antipart."}; - AxisSpec thnSpecAxis{thnSpec, "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; + AxisSpec thnSpecAxis{thnSpec, + "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; // // // Tracks selection object @@ -119,10 +154,11 @@ struct qaMatchEff { float trackPtInParamTPC = -1.; // Init function // - void init(o2::framework::InitContext&) - { + void init(o2::framework::InitContext &) { if (doDebug) - LOG(info) << "===========================================>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> is it MC? = " << isitMC; + LOG(info) << "===========================================>>>>>>>>>>>>>>>>" + ">>>>>>>>>>>>>>>>> is it MC? = " + << isitMC; // // let's know if it's MC or data if (isitMC) @@ -132,14 +168,12 @@ struct qaMatchEff { if ((!isitMC && (doprocessMC || doprocessMCNoColl || doprocessTrkIUMC)) || (isitMC && (doprocessData && doprocessDataNoColl && doprocessTrkIUMC))) - LOGF(fatal, - "Initialization set for MC and processData function flagged " - "(or viceversa)! Fix the configuration."); + LOGF(fatal, "Initialization set for MC and processData function flagged " + "(or viceversa)! Fix the configuration."); if ((doprocessMC && doprocessMCNoColl && doprocessTrkIUMC) || (doprocessData && doprocessDataNoColl && doprocessTrkIUData)) - LOGF(fatal, - "Cannot process for both without collision tag and with " - "collision tag at the same time! Fix the configuration."); + LOGF(fatal, "Cannot process for both without collision tag and with " + "collision tag at the same time! Fix the configuration."); if (doprocessTrkIUMC && makethn) { LOGF(fatal, "No DCA for IU tracks. Put makethn = false."); } @@ -152,12 +186,13 @@ struct qaMatchEff { // kinematics cutObject.SetEtaRange(etaMinCut, etaMaxCut); cutObject.SetPtRange(ptMinCut, ptMaxCut); - cutObject.SetMaxDcaXY(dcaXYMaxCut); /// max for dca implementend by hand in isTrackSelectedKineCuts + cutObject.SetMaxDcaXY(dcaXYMaxCut); /// max for dca implementend by hand + /// in isTrackSelectedKineCuts // TPC cutObject.SetMinNClustersTPC(tpcNClusterMin); cutObject.SetMinNCrossedRowsTPC(tpcNCrossedRowsMin); cutObject.SetMinNCrossedRowsOverFindableClustersTPC( - tpcNCrossedRowsOverFindableClstMin); + tpcNCrossedRowsOverFindableClstMin); cutObject.SetMaxChi2PerClusterTPC(tpcChi2Max); // ITS cutObject.SetMaxChi2PerClusterITS(itsChi2Max); @@ -170,95 +205,163 @@ struct qaMatchEff { } LOG(info) << "### customITShitmap: " << customITShitmap; LOG(info) << "### customMinITShits: " << customMinITShits; - LOG(info) << "### set_customITShitmap.size(): " << set_customITShitmap.size(); + LOG(info) << "### set_customITShitmap.size(): " + << set_customITShitmap.size(); LOG(info) << "### Custom ITS hitmap checked: "; - for (std::set::iterator it = set_customITShitmap.begin(); it != set_customITShitmap.end(); it++) { + for (std::set::iterator it = set_customITShitmap.begin(); + it != set_customITShitmap.end(); it++) { LOG(info) << "Layer " << static_cast(*it) << " "; } LOG(info) << "############"; - cutObject.SetRequireHitsInITSLayers(customMinITShits, set_customITShitmap); + cutObject.SetRequireHitsInITSLayers(customMinITShits, + set_customITShitmap); } } // end Init function // // // Init Data function - define data histograms - void initData() - { + void initData() { if (doDebug) - LOGF(info, "*********************************************************** DATA ***************************************************"); + LOGF(info, "*********************************************************** " + "DATA ***************************************************"); // // data histos // // thnsparse for fractions - only if selected if (makethn) - histos.add("data/thnsforfrac", "Sparse histo for imp. par. fraction analysis - data", kTHnSparseF, {thnd0Axis, thnPtAxis, thnPhiAxis, thnEtaAxis, thnTypeAxis, thnLabelSignAxis, thnSpecAxis}); + histos.add("data/thnsforfrac", + "Sparse histo for imp. par. fraction analysis - data", + kTHnSparseF, + {thnd0Axis, thnPtAxis, thnPhiAxis, thnEtaAxis, thnTypeAxis, + thnLabelSignAxis, thnSpecAxis}); /// control plots - histos.add("data/itsHitsMatched", "No. of hits vs ITS layer for ITS-TPC matched tracks;layer ITS", kTH2D, {{8, -1.5, 6.5}, {8, -0.5, 7.5, "No. of hits"}}); + histos.add("data/itsHitsMatched", + "No. of hits vs ITS layer for ITS-TPC matched tracks;layer ITS", + kTH2D, {{8, -1.5, 6.5}, {8, -0.5, 7.5, "No. of hits"}}); // // tpc, its and tpc+its request for all, positive and negative charges vs // Q/pt - histos.add("data/qopthist_tpc", "Q/#it{p}_{T} distribution - data TPC tag", kTH1D, {axisQoPt}, true); - histos.add("data/qopthist_its", "Q/#it{p}_{T} distribution - data ITS tag", kTH1D, {axisQoPt}, true); - histos.add("data/qopthist_tpcits", "Q/#it{p}_{T} distribution - data TPC+ITS tag", kTH1D, {axisQoPt}, true); + histos.add("data/qopthist_tpc", "Q/#it{p}_{T} distribution - data TPC tag", + kTH1D, {axisQoPt}, true); + histos.add("data/qopthist_its", "Q/#it{p}_{T} distribution - data ITS tag", + kTH1D, {axisQoPt}, true); + histos.add("data/qopthist_tpcits", + "Q/#it{p}_{T} distribution - data TPC+ITS tag", kTH1D, + {axisQoPt}, true); // pt, phi, eta (18 histos tot) - histos.add("data/pthist_tpc", "#it{p}_{T} distribution - data TPC tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpc", "#eta distribution - data TPC tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpc", "#phi distribution - data TPC tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_its", "#it{p}_{T} distribution - data ITS tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_its", "#eta distribution - data ITS tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_its", "#phi distribution - data ITS tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_tpcits", "#it{p}_{T} distribution - data TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpcits", "#eta distribution - data TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpcits", "#phi distribution - data TPC+ITS tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_tpc_pos", "#it{p}_{T} distribution - data q>0 TPC tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpc_pos", "#eta distribution - data q>0 TPC tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpc_pos", "#phi distribution - data q>0 TPC tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_its_pos", "#it{p}_{T} distribution - data q>0 ITS tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_its_pos", "#eta distribution - data q>0 ITS tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_its_pos", "#phi distribution - data q>0 ITS tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_tpcits_pos", "#it{p}_{T} distribution - data q>0 TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpcits_pos", "#eta distribution - data q>0 TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpcits_pos", "#phi distribution - data q>0 TPC+ITS tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_tpc_neg", "#it{p}_{T} distribution - data q<0 TPC tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpc_neg", "#eta distribution - data q<0 TPC tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpc_neg", "#phi distribution - data q<0 TPC tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_its_neg", "#it{p}_{T} distribution - data q<0 ITS tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_its_neg", "#eta distribution - data q<0 ITS tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_its_neg", "#phi distribution - data q<0 ITS tag", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_tpcits_neg", "#it{p}_{T} distribution - data q<0 TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpcits_neg", "#eta distribution - data q<0 TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpcits_neg", "#phi distribution - data q<0 TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("data/pthist_tpc", "#it{p}_{T} distribution - data TPC tag", + kTH1D, {axisPt}, true); + histos.add("data/etahist_tpc", "#eta distribution - data TPC tag", kTH1D, + {axisEta}, true); + histos.add("data/phihist_tpc", "#phi distribution - data TPC tag", kTH1D, + {axisPhi}, true); + + histos.add("data/pthist_its", "#it{p}_{T} distribution - data ITS tag", + kTH1D, {axisPt}, true); + histos.add("data/etahist_its", "#eta distribution - data ITS tag", kTH1D, + {axisEta}, true); + histos.add("data/phihist_its", "#phi distribution - data ITS tag", kTH1D, + {axisPhi}, true); + + histos.add("data/pthist_tpcits", + "#it{p}_{T} distribution - data TPC+ITS tag", kTH1D, {axisPt}, + true); + histos.add("data/etahist_tpcits", "#eta distribution - data TPC+ITS tag", + kTH1D, {axisEta}, true); + histos.add("data/phihist_tpcits", "#phi distribution - data TPC+ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("data/pthist_tpc_pos", + "#it{p}_{T} distribution - data q>0 TPC tag", kTH1D, {axisPt}, + true); + histos.add("data/etahist_tpc_pos", "#eta distribution - data q>0 TPC tag", + kTH1D, {axisEta}, true); + histos.add("data/phihist_tpc_pos", "#phi distribution - data q>0 TPC tag", + kTH1D, {axisPhi}, true); + + histos.add("data/pthist_its_pos", + "#it{p}_{T} distribution - data q>0 ITS tag", kTH1D, {axisPt}, + true); + histos.add("data/etahist_its_pos", "#eta distribution - data q>0 ITS tag", + kTH1D, {axisEta}, true); + histos.add("data/phihist_its_pos", "#phi distribution - data q>0 ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("data/pthist_tpcits_pos", + "#it{p}_{T} distribution - data q>0 TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("data/etahist_tpcits_pos", + "#eta distribution - data q>0 TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("data/phihist_tpcits_pos", + "#phi distribution - data q>0 TPC+ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("data/pthist_tpc_neg", + "#it{p}_{T} distribution - data q<0 TPC tag", kTH1D, {axisPt}, + true); + histos.add("data/etahist_tpc_neg", "#eta distribution - data q<0 TPC tag", + kTH1D, {axisEta}, true); + histos.add("data/phihist_tpc_neg", "#phi distribution - data q<0 TPC tag", + kTH1D, {axisPhi}, true); + + histos.add("data/pthist_its_neg", + "#it{p}_{T} distribution - data q<0 ITS tag", kTH1D, {axisPt}, + true); + histos.add("data/etahist_its_neg", "#eta distribution - data q<0 ITS tag", + kTH1D, {axisEta}, true); + histos.add("data/phihist_its_neg", "#phi distribution - data q<0 ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("data/pthist_tpcits_neg", + "#it{p}_{T} distribution - data q<0 TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("data/etahist_tpcits_neg", + "#eta distribution - data q<0 TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("data/phihist_tpcits_neg", + "#phi distribution - data q<0 TPC+ITS tag", kTH1D, {axisPhi}, + true); // // pt>0.5 GeV/c threshold - histos.add("data/pthist_tpc_05", "#it{p}_{T} distribution - data TPC tag, #it{p}_{T}>0.5", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpc_05", "#eta distribution - data TPC tag, #it{p}_{T}>0.5", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpc_05", "#phi distribution - data TPC tag, #it{p}_{T}>0.5", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_its_05", "#it{p}_{T} distribution - data ITS tag, #it{p}_{T}>0.5", kTH1D, {axisPt}, true); - histos.add("data/etahist_its_05", "#eta distribution - data ITS tag, #it{p}_{T}>0.5", kTH1D, {axisEta}, true); - histos.add("data/phihist_its_05", "#phi distribution - data ITS tag, #it{p}_{T}>0.5", kTH1D, {axisPhi}, true); - - histos.add("data/pthist_tpcits_05", "#it{p}_{T} distribution - data TPC+ITS tag #it{p}_{T}>0.5", kTH1D, {axisPt}, true); - histos.add("data/etahist_tpcits_05", "#eta distribution - data TPC+ITS tag #it{p}_{T}>0.5", kTH1D, {axisEta}, true); - histos.add("data/phihist_tpcits_05", "#phi distribution - data TPC+ITS tag #it{p}_{T}>0.5", kTH1D, {axisPhi}, true); + histos.add("data/pthist_tpc_05", + "#it{p}_{T} distribution - data TPC tag, #it{p}_{T}>0.5", kTH1D, + {axisPt}, true); + histos.add("data/etahist_tpc_05", + "#eta distribution - data TPC tag, #it{p}_{T}>0.5", kTH1D, + {axisEta}, true); + histos.add("data/phihist_tpc_05", + "#phi distribution - data TPC tag, #it{p}_{T}>0.5", kTH1D, + {axisPhi}, true); + + histos.add("data/pthist_its_05", + "#it{p}_{T} distribution - data ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisPt}, true); + histos.add("data/etahist_its_05", + "#eta distribution - data ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisEta}, true); + histos.add("data/phihist_its_05", + "#phi distribution - data ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisPhi}, true); + + histos.add("data/pthist_tpcits_05", + "#it{p}_{T} distribution - data TPC+ITS tag #it{p}_{T}>0.5", + kTH1D, {axisPt}, true); + histos.add("data/etahist_tpcits_05", + "#eta distribution - data TPC+ITS tag #it{p}_{T}>0.5", kTH1D, + {axisEta}, true); + histos.add("data/phihist_tpcits_05", + "#phi distribution - data TPC+ITS tag #it{p}_{T}>0.5", kTH1D, + {axisPhi}, true); } // // Init MC function - void initMC() - { + void initMC() { if (doDebug) LOGF(info, " +++++++++++++++++++++++ MC ++++++++++++++++++++++++"); @@ -272,246 +375,496 @@ struct qaMatchEff { // // thnsparse for fractions if (makethn) - histos.add("MC/thnsforfrac", "Sparse histo for imp. par. fraction analysis - MC", kTHnSparseF, {thnd0Axis, thnPtAxis, thnPhiAxis, thnEtaAxis, thnTypeAxis, thnLabelSignAxis, thnSpecAxis}); + histos.add("MC/thnsforfrac", + "Sparse histo for imp. par. fraction analysis - MC", + kTHnSparseF, + {thnd0Axis, thnPtAxis, thnPhiAxis, thnEtaAxis, thnTypeAxis, + thnLabelSignAxis, thnSpecAxis}); /// control plots - histos.add("MC/itsHitsMatched", "No. of hits vs ITS layer for ITS-TPC matched tracks;layer ITS", kTH2D, {{8, -1.5, 6.5}, {8, -0.5, 7.5, "No. of hits"}}); + histos.add("MC/itsHitsMatched", + "No. of hits vs ITS layer for ITS-TPC matched tracks;layer ITS", + kTH2D, {{8, -1.5, 6.5}, {8, -0.5, 7.5, "No. of hits"}}); // // all, positive, negative // Q/pt - histos.add("MC/qopthist_tpc", "Q/#it{p}_{T} distribution - MC TPC tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_its", "Q/#it{p}_{T} distribution - MC ITS tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_tpcits", "Q/#it{p}_{T} distribution - MC TPC+ITS tag", kTH1D, {axisQoPt}, true); - - histos.add("MC/pthist_tpc", "#it{p}_{T} distribution - MC TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc", "#eta distribution - MC TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc", "#phi distribution - MC TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its", "#it{p}_{T} distribution - MC ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its", "#eta distribution - MC ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its", "#phi distribution - MC ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits", "#it{p}_{T} distribution - MC TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits", "#eta distribution - MC TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits", "#phi distribution - MC TPC+ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpc_pos", "#it{p}_{T} distribution - MC q>0 TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_pos", "#eta distribution - MC q>0 TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_pos", "#phi distribution - MC q>0 TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_pos", "#it{p}_{T} distribution - MC q>0 ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_pos", "#eta distribution - MC q>0 ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_pos", "#phi distribution - MC q>0 ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_pos", "#it{p}_{T} distribution - MC q>0 TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_pos", "#eta distribution - MC q>0 TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_pos", "#phi distribution - MC q>0 TPC+ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpc_neg", "#it{p}_{T} distribution - MC q<0 TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_neg", "#eta distribution - MC q<0 TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_neg", "#phi distribution - MC q<0 TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_neg", "#it{p}_{T} distribution - MC q<0 ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_neg", "#eta distribution - MC q<0 ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_neg", "#phi distribution - MC q<0 ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_neg", "#it{p}_{T} distribution - MC q<0 TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_neg", "#eta distribution - MC q<0 TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_neg", "#phi distribution - MC q<0 TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/qopthist_tpc", "Q/#it{p}_{T} distribution - MC TPC tag", + kTH1D, {axisQoPt}, true); + histos.add("MC/qopthist_its", "Q/#it{p}_{T} distribution - MC ITS tag", + kTH1D, {axisQoPt}, true); + histos.add("MC/qopthist_tpcits", + "Q/#it{p}_{T} distribution - MC TPC+ITS tag", kTH1D, {axisQoPt}, + true); + + histos.add("MC/pthist_tpc", "#it{p}_{T} distribution - MC TPC tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc", "#eta distribution - MC TPC tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpc", "#phi distribution - MC TPC tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_its", "#it{p}_{T} distribution - MC ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its", "#eta distribution - MC ITS tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_its", "#phi distribution - MC ITS tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_tpcits", "#it{p}_{T} distribution - MC TPC+ITS tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpcits", "#eta distribution - MC TPC+ITS tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpcits", "#phi distribution - MC TPC+ITS tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_tpc_pos", "#it{p}_{T} distribution - MC q>0 TPC tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpc_pos", "#eta distribution - MC q>0 TPC tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_tpc_pos", "#phi distribution - MC q>0 TPC tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_its_pos", "#it{p}_{T} distribution - MC q>0 ITS tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_its_pos", "#eta distribution - MC q>0 ITS tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_its_pos", "#phi distribution - MC q>0 ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_tpcits_pos", + "#it{p}_{T} distribution - MC q>0 TPC+ITS tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_tpcits_pos", + "#eta distribution - MC q>0 TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_pos", + "#phi distribution - MC q>0 TPC+ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_tpc_neg", "#it{p}_{T} distribution - MC q<0 TPC tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpc_neg", "#eta distribution - MC q<0 TPC tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_tpc_neg", "#phi distribution - MC q<0 TPC tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_its_neg", "#it{p}_{T} distribution - MC q<0 ITS tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_its_neg", "#eta distribution - MC q<0 ITS tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_its_neg", "#phi distribution - MC q<0 ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_tpcits_neg", + "#it{p}_{T} distribution - MC q<0 TPC+ITS tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_tpcits_neg", + "#eta distribution - MC q<0 TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_neg", + "#phi distribution - MC q<0 TPC+ITS tag", kTH1D, {axisPhi}, + true); // // primaries, secondaries // Q/pt - histos.add("MC/qopthist_tpc_prim", "Q/#it{p}_{T} distribution - MC prim TPC tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_its_prim", "Q/#it{p}_{T} distribution - MC prim ITS tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_tpcits_prim", "Q/#it{p}_{T} distribution - MC prim TPC+ITS tag", kTH1D, {axisQoPt}, true); - - histos.add("MC/pthist_tpc_prim", "#it{p}_{T} distribution - MC prim TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_prim", "#eta distribution - MC prim TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_prim", "#phi distribution - MC prim TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_prim", "#it{p}_{T} distribution - MC prim ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_prim", "#eta distribution - MC prim ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_prim", "#phi distribution - MC prim ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_prim", "#it{p}_{T} distribution - MC prim TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_prim", "#eta distribution - MC prim TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_prim", "#phi distribution - MC prim TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/qopthist_tpc_prim", + "Q/#it{p}_{T} distribution - MC prim TPC tag", kTH1D, {axisQoPt}, + true); + histos.add("MC/qopthist_its_prim", + "Q/#it{p}_{T} distribution - MC prim ITS tag", kTH1D, {axisQoPt}, + true); + histos.add("MC/qopthist_tpcits_prim", + "Q/#it{p}_{T} distribution - MC prim TPC+ITS tag", kTH1D, + {axisQoPt}, true); + + histos.add("MC/pthist_tpc_prim", + "#it{p}_{T} distribution - MC prim TPC tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_tpc_prim", "#eta distribution - MC prim TPC tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_tpc_prim", "#phi distribution - MC prim TPC tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_its_prim", + "#it{p}_{T} distribution - MC prim ITS tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_its_prim", "#eta distribution - MC prim ITS tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_its_prim", "#phi distribution - MC prim ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_tpcits_prim", + "#it{p}_{T} distribution - MC prim TPC+ITS tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_tpcits_prim", + "#eta distribution - MC prim TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_prim", + "#phi distribution - MC prim TPC+ITS tag", kTH1D, {axisPhi}, + true); // Q/pt - histos.add("MC/qopthist_tpc_secd", "Q/#it{p}_{T} distribution - MC dec. sec. TPC tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_its_secd", "Q/#it{p}_{T} distribution - MC dec. sec. ITS tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_tpcits_secd", "Q/#it{p}_{T} distribution - MC dec. sec. TPC+ITS tag", kTH1D, {axisQoPt}, true); - - histos.add("MC/pthist_tpc_secd", "#it{p}_{T} distribution - MC dec. sec. TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_secd", "#eta distribution - MC dec. sec. TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_secd", "#phi distribution - MC dec. sec. TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_secd", "#it{p}_{T} distribution - MC dec. sec. ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_secd", "#eta distribution - MC dec. sec. ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_secd", "#phi distribution - MC dec. sec. ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_secd", "#it{p}_{T} distribution - MC dec.sec. TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_secd", "#eta distribution - MC dec. sec. TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_secd", "#phi distribution - MC dec. sec. TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/qopthist_tpc_secd", + "Q/#it{p}_{T} distribution - MC dec. sec. TPC tag", kTH1D, + {axisQoPt}, true); + histos.add("MC/qopthist_its_secd", + "Q/#it{p}_{T} distribution - MC dec. sec. ITS tag", kTH1D, + {axisQoPt}, true); + histos.add("MC/qopthist_tpcits_secd", + "Q/#it{p}_{T} distribution - MC dec. sec. TPC+ITS tag", kTH1D, + {axisQoPt}, true); + + histos.add("MC/pthist_tpc_secd", + "#it{p}_{T} distribution - MC dec. sec. TPC tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc_secd", + "#eta distribution - MC dec. sec. TPC tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpc_secd", + "#phi distribution - MC dec. sec. TPC tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_its_secd", + "#it{p}_{T} distribution - MC dec. sec. ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its_secd", + "#eta distribution - MC dec. sec. ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_its_secd", + "#phi distribution - MC dec. sec. ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_tpcits_secd", + "#it{p}_{T} distribution - MC dec.sec. TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpcits_secd", + "#eta distribution - MC dec. sec. TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_secd", + "#phi distribution - MC dec. sec. TPC+ITS tag", kTH1D, {axisPhi}, + true); // Q/pt - histos.add("MC/qopthist_tpc_secm", "Q/#it{p}_{T} distribution - MC mat. sec. TPC tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_its_secm", "Q/#it{p}_{T} distribution - MC mat. sec. ITS tag", kTH1D, {axisQoPt}, true); - histos.add("MC/qopthist_tpcits_secm", "Q/#it{p}_{T} distribution - MC mat. sec. TPC+ITS tag", kTH1D, {axisQoPt}, true); - - histos.add("MC/pthist_tpc_secm", "#it{p}_{T} distribution - MC mat. sec. TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_secm", "#eta distribution - MC mat. sec. TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_secm", "#phi distribution - MC mat. sec. TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_secm", "#it{p}_{T} distribution - MC mat. sec. ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_secm", "#eta distribution - MC mat. sec. ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_secm", "#phi distribution - MC mat. sec. ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_secm", "#it{p}_{T} distribution - MC mat.sec. TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_secm", "#eta distribution - MC mat. sec. TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_secm", "#phi distribution - MC mat. sec. TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/qopthist_tpc_secm", + "Q/#it{p}_{T} distribution - MC mat. sec. TPC tag", kTH1D, + {axisQoPt}, true); + histos.add("MC/qopthist_its_secm", + "Q/#it{p}_{T} distribution - MC mat. sec. ITS tag", kTH1D, + {axisQoPt}, true); + histos.add("MC/qopthist_tpcits_secm", + "Q/#it{p}_{T} distribution - MC mat. sec. TPC+ITS tag", kTH1D, + {axisQoPt}, true); + + histos.add("MC/pthist_tpc_secm", + "#it{p}_{T} distribution - MC mat. sec. TPC tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc_secm", + "#eta distribution - MC mat. sec. TPC tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpc_secm", + "#phi distribution - MC mat. sec. TPC tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_its_secm", + "#it{p}_{T} distribution - MC mat. sec. ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its_secm", + "#eta distribution - MC mat. sec. ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_its_secm", + "#phi distribution - MC mat. sec. ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_tpcits_secm", + "#it{p}_{T} distribution - MC mat.sec. TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpcits_secm", + "#eta distribution - MC mat. sec. TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_secm", + "#phi distribution - MC mat. sec. TPC+ITS tag", kTH1D, {axisPhi}, + true); // // pions only // all - histos.add("MC/pthist_tpc_pi", "#it{p}_{T} distribution - #pi MC TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_pi", "#eta distribution - #pi MC TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_pi", "#phi distribution - #pi MC TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_pi", "#it{p}_{T} distribution - #pi MC ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_pi", "#eta distribution - #pi MC ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_pi", "#phi distribution - #pi MC ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_pi", "#it{p}_{T} distribution - #pi MC TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_pi", "#eta distribution - #pi MC TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_pi", "#phi distribution - #pi MC TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/pthist_tpc_pi", "#it{p}_{T} distribution - #pi MC TPC tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpc_pi", "#eta distribution - #pi MC TPC tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpc_pi", "#phi distribution - #pi MC TPC tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_its_pi", "#it{p}_{T} distribution - #pi MC ITS tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_its_pi", "#eta distribution - #pi MC ITS tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_its_pi", "#phi distribution - #pi MC ITS tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_tpcits_pi", + "#it{p}_{T} distribution - #pi MC TPC+ITS tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_tpcits_pi", "#eta distribution - #pi MC TPC+ITS tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_tpcits_pi", "#phi distribution - #pi MC TPC+ITS tag", + kTH1D, {axisPhi}, true); // pions only // split in prim secd secm - histos.add("MC/pthist_tpc_pi_prim", "#it{p}_{T} distribution - #pi MC prim TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_pi_prim", "#eta distribution - #pi MC prim TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_pi_prim", "#phi distribution - #pi MC prim TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_pi_prim", "#it{p}_{T} distribution - #pi MC prim ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_pi_prim", "#eta distribution - #pi MC prim ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_pi_prim", "#phi distribution - #pi MC prim ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_pi_prim", "#it{p}_{T} distribution - #pi MC prim TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_pi_prim", "#eta distribution - #pi MC prim TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_pi_prim", "#phi distribution - #pi MC prim TPC+ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpc_pi_secd", "#it{p}_{T} distribution - #pi MC dec. sec. TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_pi_secd", "#eta distribution - #pi MC dec. sec. TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_pi_secd", "#phi distribution - #pi MC dec. sec. TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_pi_secd", "#it{p}_{T} distribution - #pi MC dec. sec. ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_pi_secd", "#eta distribution - #pi MC dec. sec. ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_pi_secd", "#phi distribution - #pi MC dec. sec. ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_pi_secd", "#it{p}_{T} distribution - #pi MC dec.sec. TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_pi_secd", "#eta distribution - #pi MC dec. sec. TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_pi_secd", "#phi distribution - #pi MC dec. sec. TPC+ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpc_pi_secm", "#it{p}_{T} distribution - #pi MC mat. sec. TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_pi_secm", "#eta distribution - #pi MC mat. sec. TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_pi_secm", "#phi distribution - #pi MC mat. sec. TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_pi_secm", "#it{p}_{T} distribution - #pi MC mat. sec. ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_pi_secm", "#eta distribution - #pi MC mat. sec. ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_pi_secm", "#phi distribution - #pi MC mat. sec. ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_pi_secm", "#it{p}_{T} distribution - #pi MC mat.sec. TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_pi_secm", "#eta distribution - #pi MC mat. sec. TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_pi_secm", "#phi distribution - #pi MC mat. sec. TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/pthist_tpc_pi_prim", + "#it{p}_{T} distribution - #pi MC prim TPC tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_tpc_pi_prim", + "#eta distribution - #pi MC prim TPC tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpc_pi_prim", + "#phi distribution - #pi MC prim TPC tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_its_pi_prim", + "#it{p}_{T} distribution - #pi MC prim ITS tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_its_pi_prim", + "#eta distribution - #pi MC prim ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_its_pi_prim", + "#phi distribution - #pi MC prim ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_tpcits_pi_prim", + "#it{p}_{T} distribution - #pi MC prim TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpcits_pi_prim", + "#eta distribution - #pi MC prim TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_pi_prim", + "#phi distribution - #pi MC prim TPC+ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_tpc_pi_secd", + "#it{p}_{T} distribution - #pi MC dec. sec. TPC tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc_pi_secd", + "#eta distribution - #pi MC dec. sec. TPC tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpc_pi_secd", + "#phi distribution - #pi MC dec. sec. TPC tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_its_pi_secd", + "#it{p}_{T} distribution - #pi MC dec. sec. ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its_pi_secd", + "#eta distribution - #pi MC dec. sec. ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_its_pi_secd", + "#phi distribution - #pi MC dec. sec. ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_tpcits_pi_secd", + "#it{p}_{T} distribution - #pi MC dec.sec. TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpcits_pi_secd", + "#eta distribution - #pi MC dec. sec. TPC+ITS tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpcits_pi_secd", + "#phi distribution - #pi MC dec. sec. TPC+ITS tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_tpc_pi_secm", + "#it{p}_{T} distribution - #pi MC mat. sec. TPC tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc_pi_secm", + "#eta distribution - #pi MC mat. sec. TPC tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpc_pi_secm", + "#phi distribution - #pi MC mat. sec. TPC tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_its_pi_secm", + "#it{p}_{T} distribution - #pi MC mat. sec. ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its_pi_secm", + "#eta distribution - #pi MC mat. sec. ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_its_pi_secm", + "#phi distribution - #pi MC mat. sec. ITS tag", kTH1D, {axisPhi}, + true); + + histos.add("MC/pthist_tpcits_pi_secm", + "#it{p}_{T} distribution - #pi MC mat.sec. TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpcits_pi_secm", + "#eta distribution - #pi MC mat. sec. TPC+ITS tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpcits_pi_secm", + "#phi distribution - #pi MC mat. sec. TPC+ITS tag", kTH1D, + {axisPhi}, true); // protons only // all - histos.add("MC/pthist_tpc_P", "#it{p}_{T} distribution - prot MC TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_P", "#eta distribution - prot MC TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_P", "#phi distribution - prot MC TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_P", "#it{p}_{T} distribution - prot MC ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_P", "#eta distribution - prot MC ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_P", "#phi distribution - prot MC ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_P", "#it{p}_{T} distribution - prot MC TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_P", "#eta distribution - prot MC TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_P", "#phi distribution - prot MC TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/pthist_tpc_P", "#it{p}_{T} distribution - prot MC TPC tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpc_P", "#eta distribution - prot MC TPC tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpc_P", "#phi distribution - prot MC TPC tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_its_P", "#it{p}_{T} distribution - prot MC ITS tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_its_P", "#eta distribution - prot MC ITS tag", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_its_P", "#phi distribution - prot MC ITS tag", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_tpcits_P", + "#it{p}_{T} distribution - prot MC TPC+ITS tag", kTH1D, {axisPt}, + true); + histos.add("MC/etahist_tpcits_P", "#eta distribution - prot MC TPC+ITS tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_tpcits_P", "#phi distribution - prot MC TPC+ITS tag", + kTH1D, {axisPhi}, true); // kaons only // all - histos.add("MC/pthist_tpc_K", "#it{p}_{T} distribution - kaons MC TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_K", "#eta distribution - kaons MC TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_K", "#phi distribution - kaons MC TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_K", "#it{p}_{T} distribution - kaons MC ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_K", "#eta distribution - kaons MC ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_K", "#phi distribution - kaons MC ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_K", "#it{p}_{T} distribution - kaons MC TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_K", "#eta distribution - kaons MC TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_K", "#phi distribution - kaons MC TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/pthist_tpc_K", "#it{p}_{T} distribution - kaons MC TPC tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpc_K", "#eta distribution - kaons MC TPC tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_tpc_K", "#phi distribution - kaons MC TPC tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_its_K", "#it{p}_{T} distribution - kaons MC ITS tag", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_its_K", "#eta distribution - kaons MC ITS tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_its_K", "#phi distribution - kaons MC ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_tpcits_K", + "#it{p}_{T} distribution - kaons MC TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpcits_K", + "#eta distribution - kaons MC TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_K", + "#phi distribution - kaons MC TPC+ITS tag", kTH1D, {axisPhi}, + true); // pions+kaons // all - histos.add("MC/pthist_tpc_piK", "#it{p}_{T} distribution - #pi+kaons MC TPC tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_piK", "#eta distribution - #pi+kaons MC TPC tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_piK", "#phi distribution - #pi+kaons MC TPC tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_piK", "#it{p}_{T} distribution - #pi+kaons MC ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_piK", "#eta distribution - #pi+kaons MC ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_piK", "#phi distribution - #pi+kaons MC ITS tag", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_piK", "#it{p}_{T} distribution - #pi+kaons MC TPC+ITS tag", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_piK", "#eta distribution - #pi+kaons MC TPC+ITS tag", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_piK", "#phi distribution - #pi+kaons MC TPC+ITS tag", kTH1D, {axisPhi}, true); + histos.add("MC/pthist_tpc_piK", + "#it{p}_{T} distribution - #pi+kaons MC TPC tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc_piK", "#eta distribution - #pi+kaons MC TPC tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_tpc_piK", "#phi distribution - #pi+kaons MC TPC tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_its_piK", + "#it{p}_{T} distribution - #pi+kaons MC ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its_piK", "#eta distribution - #pi+kaons MC ITS tag", + kTH1D, {axisEta}, true); + histos.add("MC/phihist_its_piK", "#phi distribution - #pi+kaons MC ITS tag", + kTH1D, {axisPhi}, true); + + histos.add("MC/pthist_tpcits_piK", + "#it{p}_{T} distribution - #pi+kaons MC TPC+ITS tag", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpcits_piK", + "#eta distribution - #pi+kaons MC TPC+ITS tag", kTH1D, {axisEta}, + true); + histos.add("MC/phihist_tpcits_piK", + "#phi distribution - #pi+kaons MC TPC+ITS tag", kTH1D, {axisPhi}, + true); // pions+kaons // pt>0.5 GeV/c threshold - histos.add("MC/pthist_tpc_05", "#it{p}_{T} distribution - MC TPC tag, #it{p}_{T}>0.5", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_05", "#eta distribution - MC TPC tag, #it{p}_{T}>0.5", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_05", "#phi distribution - MC TPC tag, #it{p}_{T}>0.5", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_05", "#it{p}_{T} distribution - MC ITS tag, #it{p}_{T}>0.5", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_05", "#eta distribution - MC ITS tag, #it{p}_{T}>0.5", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_05", "#phi distribution - MC ITS tag, #it{p}_{T}>0.5", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_05", "#it{p}_{T} distribution - MC TPC+ITS tag, #it{p}_{T}>0.5", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_05", "#eta distribution - MC TPC+ITS tag, #it{p}_{T}>0.5", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_05", "#phi distribution - MC TPC+ITS tag, #it{p}_{T}>0.5", kTH1D, {axisPhi}, true); + histos.add("MC/pthist_tpc_05", + "#it{p}_{T} distribution - MC TPC tag, #it{p}_{T}>0.5", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc_05", + "#eta distribution - MC TPC tag, #it{p}_{T}>0.5", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpc_05", + "#phi distribution - MC TPC tag, #it{p}_{T}>0.5", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_its_05", + "#it{p}_{T} distribution - MC ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its_05", + "#eta distribution - MC ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_its_05", + "#phi distribution - MC ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_tpcits_05", + "#it{p}_{T} distribution - MC TPC+ITS tag, #it{p}_{T}>0.5", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpcits_05", + "#eta distribution - MC TPC+ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpcits_05", + "#phi distribution - MC TPC+ITS tag, #it{p}_{T}>0.5", kTH1D, + {axisPhi}, true); // // all but primary/secondary pions - histos.add("MC/pthist_tpc_nopi", "#it{p}_{T} distribution - MC TPC tag ! prim/secd #pi", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpc_nopi", "#eta distribution - MC TPC tag ! prim/secd #pi", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpc_nopi", "#phi distribution - MC TPC tag ! prim/secd #pi", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_its_nopi", "#it{p}_{T} distribution - MC ITS tag ! prim/secd #pi", kTH1D, {axisPt}, true); - histos.add("MC/etahist_its_nopi", "#eta distribution - MC ITS tag ! prim/secd #pi", kTH1D, {axisEta}, true); - histos.add("MC/phihist_its_nopi", "#phi distribution - MC ITS tag ! prim/secd #pi", kTH1D, {axisPhi}, true); - - histos.add("MC/pthist_tpcits_nopi", "#it{p}_{T} distribution - MC TPC+ITS tag ! prim/secd #pi", kTH1D, {axisPt}, true); - histos.add("MC/etahist_tpcits_nopi", "#eta distribution - MC TPC+ITS tag ! prim/secd #pi", kTH1D, {axisEta}, true); - histos.add("MC/phihist_tpcits_nopi", "#phi distribution - MC TPC+ITS tag ! prim/secd #pi", kTH1D, {axisPhi}, true); + histos.add("MC/pthist_tpc_nopi", + "#it{p}_{T} distribution - MC TPC tag ! prim/secd #pi", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_tpc_nopi", + "#eta distribution - MC TPC tag ! prim/secd #pi", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpc_nopi", + "#phi distribution - MC TPC tag ! prim/secd #pi", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_its_nopi", + "#it{p}_{T} distribution - MC ITS tag ! prim/secd #pi", kTH1D, + {axisPt}, true); + histos.add("MC/etahist_its_nopi", + "#eta distribution - MC ITS tag ! prim/secd #pi", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_its_nopi", + "#phi distribution - MC ITS tag ! prim/secd #pi", kTH1D, + {axisPhi}, true); + + histos.add("MC/pthist_tpcits_nopi", + "#it{p}_{T} distribution - MC TPC+ITS tag ! prim/secd #pi", + kTH1D, {axisPt}, true); + histos.add("MC/etahist_tpcits_nopi", + "#eta distribution - MC TPC+ITS tag ! prim/secd #pi", kTH1D, + {axisEta}, true); + histos.add("MC/phihist_tpcits_nopi", + "#phi distribution - MC TPC+ITS tag ! prim/secd #pi", kTH1D, + {axisPhi}, true); // // extras: difference between reconstructed and MC truth for eta, phi - histos.add("MC/etahist_diff", "#eta difference track-MC ", kTH1D, {axisDEta}, true); - histos.add("MC/phihist_diff", "#phi difference track-MC", kTH1D, {axisDPh}, true); + histos.add("MC/etahist_diff", "#eta difference track-MC ", kTH1D, + {axisDEta}, true); + histos.add("MC/phihist_diff", "#phi difference track-MC", kTH1D, {axisDPh}, + true); // // hist sorting out PDG codes in wide bins - histos.add("MC/pdghist_num", "PDG code - when non primary #pi TPC+ITS tag", kTH1D, {axisPDG}, true); - histos.add("MC/pdghist_den", "PDG code - when non primary #pi TPC tag", kTH1D, {axisPDG}, true); - histos.add("MC/pdghist_denits", "PDG code - when non primary #pi ITS tag", kTH1D, {axisPDG}, true); + histos.add("MC/pdghist_num", "PDG code - when non primary #pi TPC+ITS tag", + kTH1D, {axisPDG}, true); + histos.add("MC/pdghist_den", "PDG code - when non primary #pi TPC tag", + kTH1D, {axisPDG}, true); + histos.add("MC/pdghist_denits", "PDG code - when non primary #pi ITS tag", + kTH1D, {axisPDG}, true); } // end initMC /// Function calculatind the pt at inner wall of TPC - template - float computePtInParamTPC(T& track) - { + template float computePtInParamTPC(T &track) { /// Using pt calculated at the inner wall of TPC /// Caveat: tgl still from tracking: this is not the value of tgl at the /// inner wall of TPC @@ -519,15 +872,15 @@ struct qaMatchEff { } /// Function applying the kinematic selections - template - bool isTrackSelectedKineCuts(T& track) - { + template bool isTrackSelectedKineCuts(T &track) { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kPtRange)) return false; - if (b_useTPCinnerWallPt && computePtInParamTPC(track) < ptMinCutInnerWallTPC) { - return false; // pt selection active only if the required pt is that calculated at the inner wall of TPC + if (b_useTPCinnerWallPt && + computePtInParamTPC(track) < ptMinCutInnerWallTPC) { + return false; // pt selection active only if the required pt is that + // calculated at the inner wall of TPC } if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kEtaRange)) return false; @@ -540,25 +893,23 @@ struct qaMatchEff { return true; } /// Function applying the TPC selections - template - bool isTrackSelectedTPCCuts(T& track) - { + template bool isTrackSelectedTPCCuts(T &track) { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCNCls)) return false; - if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCCrossedRows)) + if (!cutObject.IsSelected(track, + TrackSelection::TrackCuts::kTPCCrossedRows)) return false; - if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) + if (!cutObject.IsSelected( + track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) return false; if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCChi2NDF)) return false; return true; } /// Function applying the ITS selections - template - bool isTrackSelectedITSCuts(T& track) - { + template bool isTrackSelectedITSCuts(T &track) { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kITSChi2NDF)) @@ -581,12 +932,11 @@ struct qaMatchEff { /// Template function to perform the analysis /// ///////////////////////////////////////////////////// template - void fillHistograms(T& tracks, P& mcParticles) - { + void fillHistograms(T &tracks, P &mcParticles) { // // - for (auto& track : tracks) { + for (auto &track : tracks) { // choose if we keep the track according to the TRD presence requirement if ((isTRDThere == 1) && !track.hasTRD()) continue; @@ -597,7 +947,8 @@ struct qaMatchEff { if (!track.has_mcParticle()) { countNoMC++; if (doDebug) - LOGF(warning, " N. %d track without MC particle, skipping...", countNoMC); + LOGF(warning, " N. %d track without MC particle, skipping...", + countNoMC); continue; } } @@ -611,6 +962,14 @@ struct qaMatchEff { /// inner wall of TPC trackPt = computePtInParamTPC(track); } + // special case for ITS tracks + float ITStrackPt = track.pt(); + if (b_useTPCinnerWallPtForITS) { + /// Using pt calculated at the inner wall of TPC + /// Caveat: tgl still from tracking: this is not the value of tgl at the + /// inner wall of TPC + ITStrackPt = computePtInParamTPC(track); + } // kinematic track seletions for all tracks if (!isTrackSelectedKineCuts(track)) @@ -624,7 +983,8 @@ struct qaMatchEff { siPDGCode = mcpart.pdgCode(); tpPDGCode = TMath::Abs(siPDGCode); if (mcpart.isPhysicalPrimary()) { - histos.get(HIST("MC/etahist_diff"))->Fill(mcpart.eta() - track.eta()); + histos.get(HIST("MC/etahist_diff")) + ->Fill(mcpart.eta() - track.eta()); auto delta = mcpart.phi() - track.phi(); if (delta > PI) { delta -= TwoPI; @@ -646,20 +1006,20 @@ struct qaMatchEff { sayPrim = 2; signPDGCode = siPDGCode / tpPDGCode; switch (tpPDGCode) { - case 11: - specind = 1; - break; - case 211: - specind = 2; - break; - case 321: - specind = 3; - break; - case 2212: - specind = 4; - break; - default: - specind = 5; + case 11: + specind = 1; + break; + case 211: + specind = 2; + break; + case 321: + specind = 3; + break; + case 2212: + specind = 4; + break; + default: + specind = 5; } } // @@ -667,9 +1027,11 @@ struct qaMatchEff { // fill thnsparse for fraction analysis if (makethn) { if constexpr (IS_MC) { - histos.fill(HIST("MC/thnsforfrac"), track.dcaXY(), trackPt, track.phi(), track.eta(), sayPrim, signPDGCode, specind); + histos.fill(HIST("MC/thnsforfrac"), track.dcaXY(), trackPt, + track.phi(), track.eta(), sayPrim, signPDGCode, specind); } else { - histos.fill(HIST("data/thnsforfrac"), track.dcaXY(), trackPt, track.phi(), track.eta(), sayPrim, signPDGCode, specind); + histos.fill(HIST("data/thnsforfrac"), track.dcaXY(), trackPt, + track.phi(), track.eta(), sayPrim, signPDGCode, specind); } } // @@ -677,12 +1039,12 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { histos.get(HIST("MC/qopthist_its"))->Fill(track.signed1Pt()); - histos.get(HIST("MC/pthist_its"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its"))->Fill(track.eta()); } else { histos.get(HIST("data/qopthist_its"))->Fill(track.signed1Pt()); - histos.get(HIST("data/pthist_its"))->Fill(trackPt); + histos.get(HIST("data/pthist_its"))->Fill(ITStrackPt); histos.get(HIST("data/phihist_its"))->Fill(track.phi()); histos.get(HIST("data/etahist_its"))->Fill(track.eta()); } @@ -701,12 +1063,14 @@ struct qaMatchEff { } if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { - histos.get(HIST("MC/qopthist_tpcits"))->Fill(track.signed1Pt()); + histos.get(HIST("MC/qopthist_tpcits")) + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits"))->Fill(track.eta()); } else { - histos.get(HIST("data/qopthist_tpcits"))->Fill(track.signed1Pt()); + histos.get(HIST("data/qopthist_tpcits")) + ->Fill(track.signed1Pt()); histos.get(HIST("data/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits"))->Fill(track.eta()); @@ -743,11 +1107,11 @@ struct qaMatchEff { if (trackPt > 0.5) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { - histos.get(HIST("MC/pthist_its_05"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_05"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_05"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_05"))->Fill(track.eta()); } else { - histos.get(HIST("data/pthist_its_05"))->Fill(trackPt); + histos.get(HIST("data/pthist_its_05"))->Fill(ITStrackPt); histos.get(HIST("data/phihist_its_05"))->Fill(track.phi()); histos.get(HIST("data/etahist_its_05"))->Fill(track.eta()); } @@ -769,8 +1133,10 @@ struct qaMatchEff { histos.get(HIST("MC/etahist_tpcits_05"))->Fill(track.eta()); } else { histos.get(HIST("data/pthist_tpcits_05"))->Fill(trackPt); - histos.get(HIST("data/phihist_tpcits_05"))->Fill(track.phi()); - histos.get(HIST("data/etahist_tpcits_05"))->Fill(track.eta()); + histos.get(HIST("data/phihist_tpcits_05")) + ->Fill(track.phi()); + histos.get(HIST("data/etahist_tpcits_05")) + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -780,11 +1146,11 @@ struct qaMatchEff { if (track.signed1Pt() > 0) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { - histos.get(HIST("MC/pthist_its_pos"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_pos"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pos"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pos"))->Fill(track.eta()); } else { - histos.get(HIST("data/pthist_its_pos"))->Fill(trackPt); + histos.get(HIST("data/pthist_its_pos"))->Fill(ITStrackPt); histos.get(HIST("data/phihist_its_pos"))->Fill(track.phi()); histos.get(HIST("data/etahist_its_pos"))->Fill(track.eta()); } @@ -806,8 +1172,10 @@ struct qaMatchEff { histos.get(HIST("MC/etahist_tpcits_pos"))->Fill(track.eta()); } else { histos.get(HIST("data/pthist_tpcits_pos"))->Fill(trackPt); - histos.get(HIST("data/phihist_tpcits_pos"))->Fill(track.phi()); - histos.get(HIST("data/etahist_tpcits_pos"))->Fill(track.eta()); + histos.get(HIST("data/phihist_tpcits_pos")) + ->Fill(track.phi()); + histos.get(HIST("data/etahist_tpcits_pos")) + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -818,11 +1186,11 @@ struct qaMatchEff { if (track.signed1Pt() < 0) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { - histos.get(HIST("MC/pthist_its_neg"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_neg"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_neg"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_neg"))->Fill(track.eta()); } else { - histos.get(HIST("data/pthist_its_neg"))->Fill(trackPt); + histos.get(HIST("data/pthist_its_neg"))->Fill(ITStrackPt); histos.get(HIST("data/phihist_its_neg"))->Fill(track.phi()); histos.get(HIST("data/etahist_its_neg"))->Fill(track.eta()); } @@ -844,8 +1212,10 @@ struct qaMatchEff { histos.get(HIST("MC/etahist_tpcits_neg"))->Fill(track.eta()); } else { histos.get(HIST("data/pthist_tpcits_neg"))->Fill(trackPt); - histos.get(HIST("data/phihist_tpcits_neg"))->Fill(track.phi()); - histos.get(HIST("data/etahist_tpcits_neg"))->Fill(track.eta()); + histos.get(HIST("data/phihist_tpcits_neg")) + ->Fill(track.phi()); + histos.get(HIST("data/etahist_tpcits_neg")) + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -858,21 +1228,26 @@ struct qaMatchEff { // only primaries if (mcpart.isPhysicalPrimary()) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/qopthist_its_prim"))->Fill(track.signed1Pt()); - histos.get(HIST("MC/pthist_its_prim"))->Fill(trackPt); + histos.get(HIST("MC/qopthist_its_prim")) + ->Fill(track.signed1Pt()); + histos.get(HIST("MC/pthist_its_prim"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_prim"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { - histos.get(HIST("MC/qopthist_tpc_prim"))->Fill(track.signed1Pt()); + histos.get(HIST("MC/qopthist_tpc_prim")) + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_prim"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/qopthist_tpcits_prim"))->Fill(track.signed1Pt()); + histos.get(HIST("MC/qopthist_tpcits_prim")) + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_prim"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpcits_prim"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpcits_prim"))->Fill(track.eta()); + histos.get(HIST("MC/phihist_tpcits_prim")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpcits_prim")) + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -880,21 +1255,26 @@ struct qaMatchEff { // // only secondaries from decay if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/qopthist_its_secd"))->Fill(track.signed1Pt()); - histos.get(HIST("MC/pthist_its_secd"))->Fill(trackPt); + histos.get(HIST("MC/qopthist_its_secd")) + ->Fill(track.signed1Pt()); + histos.get(HIST("MC/pthist_its_secd"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secd"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { - histos.get(HIST("MC/qopthist_tpc_secd"))->Fill(track.signed1Pt()); + histos.get(HIST("MC/qopthist_tpc_secd")) + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secd"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/qopthist_tpcits_secd"))->Fill(track.signed1Pt()); + histos.get(HIST("MC/qopthist_tpcits_secd")) + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secd"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpcits_secd"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpcits_secd"))->Fill(track.eta()); + histos.get(HIST("MC/phihist_tpcits_secd")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpcits_secd")) + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -902,21 +1282,26 @@ struct qaMatchEff { // // only secondaries from material if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/qopthist_its_secm"))->Fill(track.signed1Pt()); - histos.get(HIST("MC/pthist_its_secm"))->Fill(trackPt); + histos.get(HIST("MC/qopthist_its_secm")) + ->Fill(track.signed1Pt()); + histos.get(HIST("MC/pthist_its_secm"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secm"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { - histos.get(HIST("MC/qopthist_tpc_secm"))->Fill(track.signed1Pt()); + histos.get(HIST("MC/qopthist_tpc_secm")) + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secm"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/qopthist_tpcits_secm"))->Fill(track.signed1Pt()); + histos.get(HIST("MC/qopthist_tpcits_secm")) + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secm"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpcits_secm"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpcits_secm"))->Fill(track.eta()); + histos.get(HIST("MC/phihist_tpcits_secm")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpcits_secm")) + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -924,7 +1309,7 @@ struct qaMatchEff { // protons only if (tpPDGCode == 2212) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_P"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_P"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_P"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_P"))->Fill(track.eta()); } // end if ITS @@ -945,7 +1330,7 @@ struct qaMatchEff { // // all tracks if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_pi"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_pi"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi"))->Fill(track.eta()); } // end if ITS @@ -963,18 +1348,25 @@ struct qaMatchEff { // only primary pions if (mcpart.isPhysicalPrimary()) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_pi_prim"))->Fill(trackPt); - histos.get(HIST("MC/phihist_its_pi_prim"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_its_pi_prim"))->Fill(track.eta()); + histos.get(HIST("MC/pthist_its_pi_prim"))->Fill(ITStrackPt); + histos.get(HIST("MC/phihist_its_pi_prim")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_its_pi_prim")) + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_prim"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpc_pi_prim"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpc_pi_prim"))->Fill(track.eta()); + histos.get(HIST("MC/phihist_tpc_pi_prim")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpc_pi_prim")) + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_tpcits_pi_prim"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpcits_pi_prim"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpcits_pi_prim"))->Fill(track.eta()); + histos.get(HIST("MC/pthist_tpcits_pi_prim")) + ->Fill(trackPt); + histos.get(HIST("MC/phihist_tpcits_pi_prim")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpcits_pi_prim")) + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -982,18 +1374,25 @@ struct qaMatchEff { // // only secondary pions from decay if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_pi_secd"))->Fill(trackPt); - histos.get(HIST("MC/phihist_its_pi_secd"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_its_pi_secd"))->Fill(track.eta()); + histos.get(HIST("MC/pthist_its_pi_secd"))->Fill(ITStrackPt); + histos.get(HIST("MC/phihist_its_pi_secd")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_its_pi_secd")) + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secd"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpc_pi_secd"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpc_pi_secd"))->Fill(track.eta()); + histos.get(HIST("MC/phihist_tpc_pi_secd")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpc_pi_secd")) + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_tpcits_pi_secd"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpcits_pi_secd"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpcits_pi_secd"))->Fill(track.eta()); + histos.get(HIST("MC/pthist_tpcits_pi_secd")) + ->Fill(trackPt); + histos.get(HIST("MC/phihist_tpcits_pi_secd")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpcits_pi_secd")) + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -1001,18 +1400,25 @@ struct qaMatchEff { // // only secondary pions from material if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_pi_secd"))->Fill(trackPt); - histos.get(HIST("MC/phihist_its_pi_secd"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_its_pi_secd"))->Fill(track.eta()); + histos.get(HIST("MC/pthist_its_pi_secm"))->Fill(ITStrackPt); + histos.get(HIST("MC/phihist_its_pi_secm")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_its_pi_secm")) + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secm"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpc_pi_secm"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpc_pi_secm"))->Fill(track.eta()); + histos.get(HIST("MC/phihist_tpc_pi_secm")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpc_pi_secm")) + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_tpcits_pi_secd"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpcits_pi_secd"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpcits_pi_secd"))->Fill(track.eta()); + histos.get(HIST("MC/pthist_tpcits_pi_secm")) + ->Fill(trackPt); + histos.get(HIST("MC/phihist_tpcits_pi_secm")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpcits_pi_secm")) + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -1024,14 +1430,16 @@ struct qaMatchEff { // gets the pdg code and finds its index in our vector itr_pdg = std::find(pdgChoice.begin(), pdgChoice.end(), tpPDGCode); if (itr_pdg != pdgChoice.cend()) - // index from zero, so increase by 1 to put in the right bin (and 0.5 - // not needed but just not to sit in the edge) - pdg_fill = static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + 1.5; + // index from zero, so increase by 1 to put in the right bin (and + // 0.5 not needed but just not to sit in the edge) + pdg_fill = + static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + + 1.5; else pdg_fill = -10.0; // if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_nopi"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_nopi"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_nopi"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_nopi"))->Fill(track.eta()); histos.get(HIST("MC/pdghist_denits"))->Fill(pdg_fill); @@ -1043,8 +1451,10 @@ struct qaMatchEff { histos.get(HIST("MC/pdghist_den"))->Fill(pdg_fill); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_nopi"))->Fill(trackPt); - histos.get(HIST("MC/phihist_tpcits_nopi"))->Fill(track.phi()); - histos.get(HIST("MC/etahist_tpcits_nopi"))->Fill(track.eta()); + histos.get(HIST("MC/phihist_tpcits_nopi")) + ->Fill(track.phi()); + histos.get(HIST("MC/etahist_tpcits_nopi")) + ->Fill(track.eta()); histos.get(HIST("MC/pdghist_num"))->Fill(pdg_fill); } // end if ITS } // end if TPC @@ -1053,7 +1463,7 @@ struct qaMatchEff { // kaons only if (tpPDGCode == 321) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_K"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_K"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_K"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_K"))->Fill(track.eta()); } // end if ITS @@ -1072,7 +1482,7 @@ struct qaMatchEff { // pions and kaons together if (tpPDGCode == 211 || tpPDGCode == 321) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { - histos.get(HIST("MC/pthist_its_piK"))->Fill(trackPt); + histos.get(HIST("MC/pthist_its_piK"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_piK"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_piK"))->Fill(track.eta()); } // end if ITS @@ -1095,17 +1505,18 @@ struct qaMatchEff { // if (doDebug) { LOGF(info, "Selected tracks: %d ", countData); - LOGF(info, "Selected tracks with MC: %d, tracks w/o MC: %d ", countData, countNoMC); + LOGF(info, "Selected tracks with MC: %d, tracks w/o MC: %d ", countData, + countNoMC); } } ////////////////////////////////////////////// /// Process MC with collision grouping /// ////////////////////////////////////////////// - void processMC(aod::Collision const& collision, - soa::Join const& tracks, - aod::McParticles const& mcParticles) - { + void processMC(aod::Collision const &collision, + soa::Join const &tracks, + aod::McParticles const &mcParticles) { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processMC, "process MC", false); @@ -1113,10 +1524,10 @@ struct qaMatchEff { //////////////////////////////////////////////////////////// /// Process MC with collision grouping and IU tracks /// //////////////////////////////////////////////////////////// - void processTrkIUMC(aod::Collision const& collision, - soa::Join const& tracks, - aod::McParticles const& mcParticles) - { + void processTrkIUMC(aod::Collision const &collision, + soa::Join const &tracks, + aod::McParticles const &mcParticles) { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processTrkIUMC, "process MC for IU tracks", false); @@ -1124,19 +1535,20 @@ struct qaMatchEff { ///////////////////////////////////////////// /// Process MC w/o collision grouping /// ///////////////////////////////////////////// - void processMCNoColl(soa::Join const& tracks, - aod::McParticles const& mcParticles) - { + void processMCNoColl(soa::Join const &tracks, + aod::McParticles const &mcParticles) { fillHistograms(tracks, mcParticles); } - PROCESS_SWITCH(qaMatchEff, processMCNoColl, "process MC - no collision grouping", false); + PROCESS_SWITCH(qaMatchEff, processMCNoColl, + "process MC - no collision grouping", false); //////////////////////////////////////////////// /// Process data with collision grouping /// //////////////////////////////////////////////// - void processData(aod::Collision const& collision, - soa::Join const& tracks) - { + void processData( + aod::Collision const &collision, + soa::Join const &tracks) { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processData, "process data", true); @@ -1144,9 +1556,9 @@ struct qaMatchEff { ///////////////////////////////////////////////////////////// /// Process data with collision grouping and IU tracks /// ///////////////////////////////////////////////////////////// - void processTrkIUData(aod::Collision const& collision, - soa::Join const& tracks) - { + void processTrkIUData(aod::Collision const &collision, + soa::Join const &tracks) { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processTrkIUData, "process data", false); @@ -1154,16 +1566,16 @@ struct qaMatchEff { /////////////////////////////////////////////// /// Process data w/o collision grouping /// /////////////////////////////////////////////// - void processDataNoColl(soa::Join const& tracks) - { + void processDataNoColl( + soa::Join const &tracks) { fillHistograms(tracks, tracks); // 2nd argument not used in this case } - PROCESS_SWITCH(qaMatchEff, processDataNoColl, "process data - no collision grouping", true); + PROCESS_SWITCH(qaMatchEff, processDataNoColl, + "process data - no collision grouping", true); }; // end of structure -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; + adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; } From efadf47ccebdb927f1f4c3cc81e301a49893f4c3 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Wed, 26 Apr 2023 17:45:56 +0200 Subject: [PATCH 02/14] fixed error filling secd histos and added pt configurable for ITS tracks --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 9211f004fb6..b6be9c33d5c 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -58,7 +58,7 @@ struct qaMatchEff { "Boolean to switch the usage of pt calculated at the inner wall of TPC " "on/off."}; Configurable b_useTPCinnerWallPtForITS{ - "b_useTPCinnerWallPtForITS", false, + "b_useTPCinnerWallPtForITS", true, "Boolean to switch the usage of pt calculated at the inner wall of TPC " "on/off just for ITS-tagged (not TPC tagged) histos."}; // TPC From eaafa5a96576d2c99b21d93283c02de1372a21b6 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Wed, 26 Apr 2023 18:03:42 +0200 Subject: [PATCH 03/14] fixed formatting --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index b6be9c33d5c..9211f004fb6 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -58,7 +58,7 @@ struct qaMatchEff { "Boolean to switch the usage of pt calculated at the inner wall of TPC " "on/off."}; Configurable b_useTPCinnerWallPtForITS{ - "b_useTPCinnerWallPtForITS", true, + "b_useTPCinnerWallPtForITS", false, "Boolean to switch the usage of pt calculated at the inner wall of TPC " "on/off just for ITS-tagged (not TPC tagged) histos."}; // TPC From d3f5b124a1a8e0c3bb5b60fb804e942d091d7930 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Wed, 26 Apr 2023 18:52:56 +0200 Subject: [PATCH 04/14] fix formatting #2 From aff72c9b9a54e48245158802d3a78e309cfcf31e Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 26 Apr 2023 16:53:18 +0000 Subject: [PATCH 05/14] Please consider the following formatting changes --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 266 +++++++++++++++++------------- 1 file changed, 147 insertions(+), 119 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 9211f004fb6..c6bfcb60d9d 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -34,17 +34,19 @@ struct qaMatchEff { // // histogram registry HistogramRegistry histos{ - "Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + "Histos", + {}, + OutputObjHandlingPolicy::AnalysisObject}; // // Track selections Configurable b_useTrackSelections{ - "b_useTrackSelections", false, - "Boolean to switch the track selections on/off."}; + "b_useTrackSelections", false, + "Boolean to switch the track selections on/off."}; // kinematics Configurable ptMinCutInnerWallTPC{ - "ptMinCutInnerWallTPC", 0.1f, - "Minimum transverse momentum calculated at the inner wall of TPC " - "(GeV/c)"}; + "ptMinCutInnerWallTPC", 0.1f, + "Minimum transverse momentum calculated at the inner wall of TPC " + "(GeV/c)"}; Configurable ptMinCut{"ptMinCut", 0.1f, "Minimum transverse momentum (GeV/c)"}; Configurable ptMaxCut{"ptMaxCut", 100.f, @@ -54,30 +56,30 @@ struct qaMatchEff { Configurable dcaXYMaxCut{"dcaXYMaxCut", 1000000.0f, "Maximum dcaXY (cm)"}; Configurable b_useTPCinnerWallPt{ - "b_useTPCinnerWallPt", false, - "Boolean to switch the usage of pt calculated at the inner wall of TPC " - "on/off."}; + "b_useTPCinnerWallPt", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off."}; Configurable b_useTPCinnerWallPtForITS{ - "b_useTPCinnerWallPtForITS", false, - "Boolean to switch the usage of pt calculated at the inner wall of TPC " - "on/off just for ITS-tagged (not TPC tagged) histos."}; + "b_useTPCinnerWallPtForITS", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off just for ITS-tagged (not TPC tagged) histos."}; // TPC Configurable tpcNClusterMin{"tpcNClusterMin", 0, "Minimum number of clusters in TPC"}; Configurable tpcNCrossedRowsMin{"tpcNCrossedRowsMin", 70, "Minimum number of crossed rows in TPC"}; Configurable tpcNCrossedRowsOverFindableClstMin{ - "tpcNCrossedRowsOverFindableClstMin", 0.8f, - "Minimum fracion of crossed rows over findable custers in TPC"}; + "tpcNCrossedRowsOverFindableClstMin", 0.8f, + "Minimum fracion of crossed rows over findable custers in TPC"}; Configurable tpcChi2Max{"tpcChi2Max", 4.0f, "Maximum chi2 in TPC"}; // ITS Configurable itsChi2Max{"itsChi2Max", 36.0f, "Maximum chi2 in ITS"}; Configurable customITShitmap{ - "customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; + "customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; Configurable customMinITShits{ - "customMinITShits", 1, - "Minimum number of layers crossed by a track among those in " - "\"customITShitmap\""}; + "customMinITShits", 1, + "Minimum number of layers crossed by a track among those in " + "\"customITShitmap\""}; // Other track settings // TRD presence Configurable isTRDThere{"isTRDThere", 2, @@ -117,23 +119,27 @@ struct qaMatchEff { AxisSpec axisDPh{phiBins, -PI, PI, "D#it{#varphi} (rad)"}; // // pdg codes vector - std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, + std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, 321, 411, 521, 2212, 1114, 2214}; // // configuration for THnSparse's // Configurable makethn{"makethn", false, "choose if produce thnsparse"}; ConfigurableAxis thnd0{ - "thnd0", {600, -3.0f, 3.0f}, "impact parameter in xy [cm]"}; + "thnd0", + {600, -3.0f, 3.0f}, + "impact parameter in xy [cm]"}; ConfigurableAxis thnPt{"thnPt", {30, 0.0f, 15.0f}, "pt [GeV/c]"}; ConfigurableAxis thnPhi{"thnPhi", {18, 0.0f, TMath::TwoPi()}, "phi"}; ConfigurableAxis thnEta{"thnEta", {20, -2.0f, 2.0f}, "eta"}; ConfigurableAxis thnType{ - "thnType", - {3, -0.5f, 2.5f}, - "0: primary, 1: physical secondary, 2: sec. from material"}; + "thnType", + {3, -0.5f, 2.5f}, + "0: primary, 1: physical secondary, 2: sec. from material"}; ConfigurableAxis thnLabelSign{ - "thnLabelSign", {3, -1.5f, 1.5f}, "-1/+1 antip./particle"}; + "thnLabelSign", + {3, -1.5f, 1.5f}, + "-1/+1 antip./particle"}; ConfigurableAxis thnSpec{"thnSpec", {5, 0.5f, 5.5f}, "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; @@ -154,7 +160,8 @@ struct qaMatchEff { float trackPtInParamTPC = -1.; // Init function // - void init(o2::framework::InitContext &) { + void init(o2::framework::InitContext&) + { if (doDebug) LOG(info) << "===========================================>>>>>>>>>>>>>>>>" ">>>>>>>>>>>>>>>>> is it MC? = " @@ -168,12 +175,14 @@ struct qaMatchEff { if ((!isitMC && (doprocessMC || doprocessMCNoColl || doprocessTrkIUMC)) || (isitMC && (doprocessData && doprocessDataNoColl && doprocessTrkIUMC))) - LOGF(fatal, "Initialization set for MC and processData function flagged " - "(or viceversa)! Fix the configuration."); + LOGF(fatal, + "Initialization set for MC and processData function flagged " + "(or viceversa)! Fix the configuration."); if ((doprocessMC && doprocessMCNoColl && doprocessTrkIUMC) || (doprocessData && doprocessDataNoColl && doprocessTrkIUData)) - LOGF(fatal, "Cannot process for both without collision tag and with " - "collision tag at the same time! Fix the configuration."); + LOGF(fatal, + "Cannot process for both without collision tag and with " + "collision tag at the same time! Fix the configuration."); if (doprocessTrkIUMC && makethn) { LOGF(fatal, "No DCA for IU tracks. Put makethn = false."); } @@ -192,7 +201,7 @@ struct qaMatchEff { cutObject.SetMinNClustersTPC(tpcNClusterMin); cutObject.SetMinNCrossedRowsTPC(tpcNCrossedRowsMin); cutObject.SetMinNCrossedRowsOverFindableClustersTPC( - tpcNCrossedRowsOverFindableClstMin); + tpcNCrossedRowsOverFindableClstMin); cutObject.SetMaxChi2PerClusterTPC(tpcChi2Max); // ITS cutObject.SetMaxChi2PerClusterITS(itsChi2Max); @@ -221,10 +230,12 @@ struct qaMatchEff { // // // Init Data function - define data histograms - void initData() { + void initData() + { if (doDebug) - LOGF(info, "*********************************************************** " - "DATA ***************************************************"); + LOGF(info, + "*********************************************************** " + "DATA ***************************************************"); // // data histos // @@ -361,7 +372,8 @@ struct qaMatchEff { } // // Init MC function - void initMC() { + void initMC() + { if (doDebug) LOGF(info, " +++++++++++++++++++++++ MC ++++++++++++++++++++++++"); @@ -864,7 +876,9 @@ struct qaMatchEff { } // end initMC /// Function calculatind the pt at inner wall of TPC - template float computePtInParamTPC(T &track) { + template + float computePtInParamTPC(T& track) + { /// Using pt calculated at the inner wall of TPC /// Caveat: tgl still from tracking: this is not the value of tgl at the /// inner wall of TPC @@ -872,7 +886,9 @@ struct qaMatchEff { } /// Function applying the kinematic selections - template bool isTrackSelectedKineCuts(T &track) { + template + bool isTrackSelectedKineCuts(T& track) + { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kPtRange)) @@ -893,7 +909,9 @@ struct qaMatchEff { return true; } /// Function applying the TPC selections - template bool isTrackSelectedTPCCuts(T &track) { + template + bool isTrackSelectedTPCCuts(T& track) + { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCNCls)) @@ -902,14 +920,16 @@ struct qaMatchEff { TrackSelection::TrackCuts::kTPCCrossedRows)) return false; if (!cutObject.IsSelected( - track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) + track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) return false; if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCChi2NDF)) return false; return true; } /// Function applying the ITS selections - template bool isTrackSelectedITSCuts(T &track) { + template + bool isTrackSelectedITSCuts(T& track) + { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kITSChi2NDF)) @@ -932,11 +952,12 @@ struct qaMatchEff { /// Template function to perform the analysis /// ///////////////////////////////////////////////////// template - void fillHistograms(T &tracks, P &mcParticles) { + void fillHistograms(T& tracks, P& mcParticles) + { // // - for (auto &track : tracks) { + for (auto& track : tracks) { // choose if we keep the track according to the TRD presence requirement if ((isTRDThere == 1) && !track.hasTRD()) continue; @@ -984,7 +1005,7 @@ struct qaMatchEff { tpPDGCode = TMath::Abs(siPDGCode); if (mcpart.isPhysicalPrimary()) { histos.get(HIST("MC/etahist_diff")) - ->Fill(mcpart.eta() - track.eta()); + ->Fill(mcpart.eta() - track.eta()); auto delta = mcpart.phi() - track.phi(); if (delta > PI) { delta -= TwoPI; @@ -1006,20 +1027,20 @@ struct qaMatchEff { sayPrim = 2; signPDGCode = siPDGCode / tpPDGCode; switch (tpPDGCode) { - case 11: - specind = 1; - break; - case 211: - specind = 2; - break; - case 321: - specind = 3; - break; - case 2212: - specind = 4; - break; - default: - specind = 5; + case 11: + specind = 1; + break; + case 211: + specind = 2; + break; + case 321: + specind = 3; + break; + case 2212: + specind = 4; + break; + default: + specind = 5; } } // @@ -1064,13 +1085,13 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { histos.get(HIST("MC/qopthist_tpcits")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits"))->Fill(track.eta()); } else { histos.get(HIST("data/qopthist_tpcits")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("data/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits"))->Fill(track.eta()); @@ -1134,9 +1155,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_05"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_05")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_05")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1173,9 +1194,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_pos"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_pos")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_pos")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1213,9 +1234,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_neg"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_neg")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_neg")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1229,25 +1250,25 @@ struct qaMatchEff { if (mcpart.isPhysicalPrimary()) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_prim"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_prim"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_prim"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -1256,25 +1277,25 @@ struct qaMatchEff { // only secondaries from decay if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_secd"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secd"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secd"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -1283,25 +1304,25 @@ struct qaMatchEff { // only secondaries from material if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_secm"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secm"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secm"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -1350,23 +1371,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_prim"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_prim")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -1376,23 +1397,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_secd"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_secd")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -1402,23 +1423,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_secm"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_secm")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -1433,8 +1454,8 @@ struct qaMatchEff { // index from zero, so increase by 1 to put in the right bin (and // 0.5 not needed but just not to sit in the edge) pdg_fill = - static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + - 1.5; + static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + + 1.5; else pdg_fill = -10.0; // @@ -1452,9 +1473,9 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_nopi"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_nopi")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_nopi")) - ->Fill(track.eta()); + ->Fill(track.eta()); histos.get(HIST("MC/pdghist_num"))->Fill(pdg_fill); } // end if ITS } // end if TPC @@ -1513,10 +1534,11 @@ struct qaMatchEff { ////////////////////////////////////////////// /// Process MC with collision grouping /// ////////////////////////////////////////////// - void processMC(aod::Collision const &collision, + void processMC(aod::Collision const& collision, soa::Join const &tracks, - aod::McParticles const &mcParticles) { + aod::McTrackLabels> const& tracks, + aod::McParticles const& mcParticles) + { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processMC, "process MC", false); @@ -1524,10 +1546,11 @@ struct qaMatchEff { //////////////////////////////////////////////////////////// /// Process MC with collision grouping and IU tracks /// //////////////////////////////////////////////////////////// - void processTrkIUMC(aod::Collision const &collision, + void processTrkIUMC(aod::Collision const& collision, soa::Join const &tracks, - aod::McParticles const &mcParticles) { + aod::McTrackLabels> const& tracks, + aod::McParticles const& mcParticles) + { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processTrkIUMC, "process MC for IU tracks", false); @@ -1536,8 +1559,9 @@ struct qaMatchEff { /// Process MC w/o collision grouping /// ///////////////////////////////////////////// void processMCNoColl(soa::Join const &tracks, - aod::McParticles const &mcParticles) { + aod::McTrackLabels> const& tracks, + aod::McParticles const& mcParticles) + { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processMCNoColl, @@ -1547,8 +1571,9 @@ struct qaMatchEff { /// Process data with collision grouping /// //////////////////////////////////////////////// void processData( - aod::Collision const &collision, - soa::Join const &tracks) { + aod::Collision const& collision, + soa::Join const& tracks) + { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processData, "process data", true); @@ -1556,9 +1581,10 @@ struct qaMatchEff { ///////////////////////////////////////////////////////////// /// Process data with collision grouping and IU tracks /// ///////////////////////////////////////////////////////////// - void processTrkIUData(aod::Collision const &collision, + void processTrkIUData(aod::Collision const& collision, soa::Join const &tracks) { + aod::TracksDCA> const& tracks) + { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processTrkIUData, "process data", false); @@ -1567,7 +1593,8 @@ struct qaMatchEff { /// Process data w/o collision grouping /// /////////////////////////////////////////////// void processDataNoColl( - soa::Join const &tracks) { + soa::Join const& tracks) + { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processDataNoColl, @@ -1575,7 +1602,8 @@ struct qaMatchEff { }; // end of structure -WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ return WorkflowSpec{ - adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; + adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; } From fd0779e4cced7943ea1610448275c6d1aecec59b Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Wed, 26 Apr 2023 19:03:54 +0200 Subject: [PATCH 06/14] Update qaMatchEff.cxx --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index c6bfcb60d9d..a9e5d69348a 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". From 7f88e785b7fd8cc07feac697420fd34aa8f14a21 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Wed, 26 Apr 2023 19:06:17 +0200 Subject: [PATCH 07/14] format fix #3 --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 268 +++++++++++++----------------- 1 file changed, 120 insertions(+), 148 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index a9e5d69348a..8f289183b16 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -1,5 +1,5 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. // All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public @@ -34,19 +34,17 @@ struct qaMatchEff { // // histogram registry HistogramRegistry histos{ - "Histos", - {}, - OutputObjHandlingPolicy::AnalysisObject}; + "Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; // // Track selections Configurable b_useTrackSelections{ - "b_useTrackSelections", false, - "Boolean to switch the track selections on/off."}; + "b_useTrackSelections", false, + "Boolean to switch the track selections on/off."}; // kinematics Configurable ptMinCutInnerWallTPC{ - "ptMinCutInnerWallTPC", 0.1f, - "Minimum transverse momentum calculated at the inner wall of TPC " - "(GeV/c)"}; + "ptMinCutInnerWallTPC", 0.1f, + "Minimum transverse momentum calculated at the inner wall of TPC " + "(GeV/c)"}; Configurable ptMinCut{"ptMinCut", 0.1f, "Minimum transverse momentum (GeV/c)"}; Configurable ptMaxCut{"ptMaxCut", 100.f, @@ -56,30 +54,30 @@ struct qaMatchEff { Configurable dcaXYMaxCut{"dcaXYMaxCut", 1000000.0f, "Maximum dcaXY (cm)"}; Configurable b_useTPCinnerWallPt{ - "b_useTPCinnerWallPt", false, - "Boolean to switch the usage of pt calculated at the inner wall of TPC " - "on/off."}; + "b_useTPCinnerWallPt", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off."}; Configurable b_useTPCinnerWallPtForITS{ - "b_useTPCinnerWallPtForITS", false, - "Boolean to switch the usage of pt calculated at the inner wall of TPC " - "on/off just for ITS-tagged (not TPC tagged) histos."}; + "b_useTPCinnerWallPtForITS", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off just for ITS-tagged (not TPC tagged) histos."}; // TPC Configurable tpcNClusterMin{"tpcNClusterMin", 0, "Minimum number of clusters in TPC"}; Configurable tpcNCrossedRowsMin{"tpcNCrossedRowsMin", 70, "Minimum number of crossed rows in TPC"}; Configurable tpcNCrossedRowsOverFindableClstMin{ - "tpcNCrossedRowsOverFindableClstMin", 0.8f, - "Minimum fracion of crossed rows over findable custers in TPC"}; + "tpcNCrossedRowsOverFindableClstMin", 0.8f, + "Minimum fracion of crossed rows over findable custers in TPC"}; Configurable tpcChi2Max{"tpcChi2Max", 4.0f, "Maximum chi2 in TPC"}; // ITS Configurable itsChi2Max{"itsChi2Max", 36.0f, "Maximum chi2 in ITS"}; Configurable customITShitmap{ - "customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; + "customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; Configurable customMinITShits{ - "customMinITShits", 1, - "Minimum number of layers crossed by a track among those in " - "\"customITShitmap\""}; + "customMinITShits", 1, + "Minimum number of layers crossed by a track among those in " + "\"customITShitmap\""}; // Other track settings // TRD presence Configurable isTRDThere{"isTRDThere", 2, @@ -119,27 +117,23 @@ struct qaMatchEff { AxisSpec axisDPh{phiBins, -PI, PI, "D#it{#varphi} (rad)"}; // // pdg codes vector - std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, + std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, 321, 411, 521, 2212, 1114, 2214}; // // configuration for THnSparse's // Configurable makethn{"makethn", false, "choose if produce thnsparse"}; ConfigurableAxis thnd0{ - "thnd0", - {600, -3.0f, 3.0f}, - "impact parameter in xy [cm]"}; + "thnd0", {600, -3.0f, 3.0f}, "impact parameter in xy [cm]"}; ConfigurableAxis thnPt{"thnPt", {30, 0.0f, 15.0f}, "pt [GeV/c]"}; ConfigurableAxis thnPhi{"thnPhi", {18, 0.0f, TMath::TwoPi()}, "phi"}; ConfigurableAxis thnEta{"thnEta", {20, -2.0f, 2.0f}, "eta"}; ConfigurableAxis thnType{ - "thnType", - {3, -0.5f, 2.5f}, - "0: primary, 1: physical secondary, 2: sec. from material"}; + "thnType", + {3, -0.5f, 2.5f}, + "0: primary, 1: physical secondary, 2: sec. from material"}; ConfigurableAxis thnLabelSign{ - "thnLabelSign", - {3, -1.5f, 1.5f}, - "-1/+1 antip./particle"}; + "thnLabelSign", {3, -1.5f, 1.5f}, "-1/+1 antip./particle"}; ConfigurableAxis thnSpec{"thnSpec", {5, 0.5f, 5.5f}, "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; @@ -160,8 +154,7 @@ struct qaMatchEff { float trackPtInParamTPC = -1.; // Init function // - void init(o2::framework::InitContext&) - { + void init(o2::framework::InitContext &) { if (doDebug) LOG(info) << "===========================================>>>>>>>>>>>>>>>>" ">>>>>>>>>>>>>>>>> is it MC? = " @@ -175,14 +168,12 @@ struct qaMatchEff { if ((!isitMC && (doprocessMC || doprocessMCNoColl || doprocessTrkIUMC)) || (isitMC && (doprocessData && doprocessDataNoColl && doprocessTrkIUMC))) - LOGF(fatal, - "Initialization set for MC and processData function flagged " - "(or viceversa)! Fix the configuration."); + LOGF(fatal, "Initialization set for MC and processData function flagged " + "(or viceversa)! Fix the configuration."); if ((doprocessMC && doprocessMCNoColl && doprocessTrkIUMC) || (doprocessData && doprocessDataNoColl && doprocessTrkIUData)) - LOGF(fatal, - "Cannot process for both without collision tag and with " - "collision tag at the same time! Fix the configuration."); + LOGF(fatal, "Cannot process for both without collision tag and with " + "collision tag at the same time! Fix the configuration."); if (doprocessTrkIUMC && makethn) { LOGF(fatal, "No DCA for IU tracks. Put makethn = false."); } @@ -201,7 +192,7 @@ struct qaMatchEff { cutObject.SetMinNClustersTPC(tpcNClusterMin); cutObject.SetMinNCrossedRowsTPC(tpcNCrossedRowsMin); cutObject.SetMinNCrossedRowsOverFindableClustersTPC( - tpcNCrossedRowsOverFindableClstMin); + tpcNCrossedRowsOverFindableClstMin); cutObject.SetMaxChi2PerClusterTPC(tpcChi2Max); // ITS cutObject.SetMaxChi2PerClusterITS(itsChi2Max); @@ -230,12 +221,10 @@ struct qaMatchEff { // // // Init Data function - define data histograms - void initData() - { + void initData() { if (doDebug) - LOGF(info, - "*********************************************************** " - "DATA ***************************************************"); + LOGF(info, "*********************************************************** " + "DATA ***************************************************"); // // data histos // @@ -372,8 +361,7 @@ struct qaMatchEff { } // // Init MC function - void initMC() - { + void initMC() { if (doDebug) LOGF(info, " +++++++++++++++++++++++ MC ++++++++++++++++++++++++"); @@ -876,9 +864,7 @@ struct qaMatchEff { } // end initMC /// Function calculatind the pt at inner wall of TPC - template - float computePtInParamTPC(T& track) - { + template float computePtInParamTPC(T &track) { /// Using pt calculated at the inner wall of TPC /// Caveat: tgl still from tracking: this is not the value of tgl at the /// inner wall of TPC @@ -886,9 +872,7 @@ struct qaMatchEff { } /// Function applying the kinematic selections - template - bool isTrackSelectedKineCuts(T& track) - { + template bool isTrackSelectedKineCuts(T &track) { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kPtRange)) @@ -909,9 +893,7 @@ struct qaMatchEff { return true; } /// Function applying the TPC selections - template - bool isTrackSelectedTPCCuts(T& track) - { + template bool isTrackSelectedTPCCuts(T &track) { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCNCls)) @@ -920,16 +902,14 @@ struct qaMatchEff { TrackSelection::TrackCuts::kTPCCrossedRows)) return false; if (!cutObject.IsSelected( - track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) + track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) return false; if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCChi2NDF)) return false; return true; } /// Function applying the ITS selections - template - bool isTrackSelectedITSCuts(T& track) - { + template bool isTrackSelectedITSCuts(T &track) { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kITSChi2NDF)) @@ -952,12 +932,11 @@ struct qaMatchEff { /// Template function to perform the analysis /// ///////////////////////////////////////////////////// template - void fillHistograms(T& tracks, P& mcParticles) - { + void fillHistograms(T &tracks, P &mcParticles) { // // - for (auto& track : tracks) { + for (auto &track : tracks) { // choose if we keep the track according to the TRD presence requirement if ((isTRDThere == 1) && !track.hasTRD()) continue; @@ -1005,7 +984,7 @@ struct qaMatchEff { tpPDGCode = TMath::Abs(siPDGCode); if (mcpart.isPhysicalPrimary()) { histos.get(HIST("MC/etahist_diff")) - ->Fill(mcpart.eta() - track.eta()); + ->Fill(mcpart.eta() - track.eta()); auto delta = mcpart.phi() - track.phi(); if (delta > PI) { delta -= TwoPI; @@ -1027,20 +1006,20 @@ struct qaMatchEff { sayPrim = 2; signPDGCode = siPDGCode / tpPDGCode; switch (tpPDGCode) { - case 11: - specind = 1; - break; - case 211: - specind = 2; - break; - case 321: - specind = 3; - break; - case 2212: - specind = 4; - break; - default: - specind = 5; + case 11: + specind = 1; + break; + case 211: + specind = 2; + break; + case 321: + specind = 3; + break; + case 2212: + specind = 4; + break; + default: + specind = 5; } } // @@ -1085,13 +1064,13 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { histos.get(HIST("MC/qopthist_tpcits")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits"))->Fill(track.eta()); } else { histos.get(HIST("data/qopthist_tpcits")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("data/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits"))->Fill(track.eta()); @@ -1155,9 +1134,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_05"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_05")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_05")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1194,9 +1173,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_pos"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_pos")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_pos")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1234,9 +1213,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_neg"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_neg")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_neg")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1250,25 +1229,25 @@ struct qaMatchEff { if (mcpart.isPhysicalPrimary()) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_prim"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_prim"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_prim"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -1277,25 +1256,25 @@ struct qaMatchEff { // only secondaries from decay if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_secd"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secd"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secd"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -1304,25 +1283,25 @@ struct qaMatchEff { // only secondaries from material if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_secm"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secm"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secm"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -1371,23 +1350,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_prim"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_prim")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -1397,23 +1376,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_secd"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_secd")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -1423,23 +1402,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_secm"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_secm")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -1454,8 +1433,8 @@ struct qaMatchEff { // index from zero, so increase by 1 to put in the right bin (and // 0.5 not needed but just not to sit in the edge) pdg_fill = - static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + - 1.5; + static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + + 1.5; else pdg_fill = -10.0; // @@ -1473,9 +1452,9 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_nopi"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_nopi")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_nopi")) - ->Fill(track.eta()); + ->Fill(track.eta()); histos.get(HIST("MC/pdghist_num"))->Fill(pdg_fill); } // end if ITS } // end if TPC @@ -1534,11 +1513,10 @@ struct qaMatchEff { ////////////////////////////////////////////// /// Process MC with collision grouping /// ////////////////////////////////////////////// - void processMC(aod::Collision const& collision, + void processMC(aod::Collision const &collision, soa::Join const& tracks, - aod::McParticles const& mcParticles) - { + aod::McTrackLabels> const &tracks, + aod::McParticles const &mcParticles) { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processMC, "process MC", false); @@ -1546,11 +1524,10 @@ struct qaMatchEff { //////////////////////////////////////////////////////////// /// Process MC with collision grouping and IU tracks /// //////////////////////////////////////////////////////////// - void processTrkIUMC(aod::Collision const& collision, + void processTrkIUMC(aod::Collision const &collision, soa::Join const& tracks, - aod::McParticles const& mcParticles) - { + aod::McTrackLabels> const &tracks, + aod::McParticles const &mcParticles) { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processTrkIUMC, "process MC for IU tracks", false); @@ -1559,9 +1536,8 @@ struct qaMatchEff { /// Process MC w/o collision grouping /// ///////////////////////////////////////////// void processMCNoColl(soa::Join const& tracks, - aod::McParticles const& mcParticles) - { + aod::McTrackLabels> const &tracks, + aod::McParticles const &mcParticles) { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processMCNoColl, @@ -1571,9 +1547,8 @@ struct qaMatchEff { /// Process data with collision grouping /// //////////////////////////////////////////////// void processData( - aod::Collision const& collision, - soa::Join const& tracks) - { + aod::Collision const &collision, + soa::Join const &tracks) { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processData, "process data", true); @@ -1581,10 +1556,9 @@ struct qaMatchEff { ///////////////////////////////////////////////////////////// /// Process data with collision grouping and IU tracks /// ///////////////////////////////////////////////////////////// - void processTrkIUData(aod::Collision const& collision, + void processTrkIUData(aod::Collision const &collision, soa::Join const& tracks) - { + aod::TracksDCA> const &tracks) { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processTrkIUData, "process data", false); @@ -1593,8 +1567,7 @@ struct qaMatchEff { /// Process data w/o collision grouping /// /////////////////////////////////////////////// void processDataNoColl( - soa::Join const& tracks) - { + soa::Join const &tracks) { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processDataNoColl, @@ -1602,8 +1575,7 @@ struct qaMatchEff { }; // end of structure -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; + adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; } From d8089a85aacf127952f2e8cb64beca2f11f48b5d Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Thu, 27 Apr 2023 08:10:37 +0200 Subject: [PATCH 08/14] format fix #4 :( --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 8f289183b16..9211f004fb6 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". From 1b996776f51a1bf0c64f111508e8c39eaddd85da Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Thu, 27 Apr 2023 08:26:49 +0200 Subject: [PATCH 09/14] no tabs, copyright ok. --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 9211f004fb6..8f289183b16 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". From cff365af42abe1a6cdb5951742fbffa34274b147 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Thu, 27 Apr 2023 09:05:58 +0200 Subject: [PATCH 10/14] fixed formatting, no tabs, copyright ok --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 8f289183b16..65b3fff8435 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -13,7 +13,7 @@ /// \brief ITS-TPC track matching and prim/sec separation checks /// /// \author Rosario Turrisi , INFN-PD -/// \author Mattia Faggin , UniPd & INFN-PD +/// \author Mattia Faggin , UniPd & INFN-TS #include "Common/Core/TrackSelection.h" #include "Common/DataModel/EventSelection.h" From c853f2aaad2feaf186752d33d06a3c236ee01056 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Thu, 27 Apr 2023 09:18:22 +0200 Subject: [PATCH 11/14] holders in new line in copyright --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 65b3fff8435..9211f004fb6 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -13,7 +13,7 @@ /// \brief ITS-TPC track matching and prim/sec separation checks /// /// \author Rosario Turrisi , INFN-PD -/// \author Mattia Faggin , UniPd & INFN-TS +/// \author Mattia Faggin , UniPd & INFN-PD #include "Common/Core/TrackSelection.h" #include "Common/DataModel/EventSelection.h" From 8bd3500e2edfa094fcc10eab6136250bda147c74 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Thu, 27 Apr 2023 19:58:02 +0200 Subject: [PATCH 12/14] added bidim for pt check, checked formatting --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 54 +++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 9211f004fb6..7503d2bda84 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -13,7 +13,7 @@ /// \brief ITS-TPC track matching and prim/sec separation checks /// /// \author Rosario Turrisi , INFN-PD -/// \author Mattia Faggin , UniPd & INFN-PD +/// \author Mattia Faggin , UniTs & INFN-TS #include "Common/Core/TrackSelection.h" #include "Common/DataModel/EventSelection.h" @@ -241,6 +241,11 @@ struct qaMatchEff { "No. of hits vs ITS layer for ITS-TPC matched tracks;layer ITS", kTH2D, {{8, -1.5, 6.5}, {8, -0.5, 7.5, "No. of hits"}}); + /// compare pt's (tracking and innerParamTPC) + histos.add("data/ptptconf", "Tracking pt vs TPC inner point pt", kTH2D, + {{100, 0.0, 10.0, "tracking #it{p}_{T}"}, + {100, 0.0, 10.0, "TPC #it{p}_{T}"}}); + // // tpc, its and tpc+its request for all, positive and negative charges vs @@ -385,6 +390,10 @@ struct qaMatchEff { histos.add("MC/itsHitsMatched", "No. of hits vs ITS layer for ITS-TPC matched tracks;layer ITS", kTH2D, {{8, -1.5, 6.5}, {8, -0.5, 7.5, "No. of hits"}}); + /// compare pt's (tracking and innerParamTPC) + histos.add("MC/ptptconf", "TPC inner point pt vs. tracking pt", kTH2D, + {{100, 0.0, 10.0, "tracking #it{p}_{T}"}, + {100, 0.0, 10.0, "TPC #it{p}_{T}"}}); // // all, positive, negative @@ -933,7 +942,8 @@ struct qaMatchEff { ///////////////////////////////////////////////////// template void fillHistograms(T &tracks, P &mcParticles) { - + // + float trackPt = 0, ITStrackPt = 0; // // for (auto &track : tracks) { @@ -955,21 +965,25 @@ struct qaMatchEff { // // pt from full tracking or from TPCinnerWallPt - float trackPt = track.pt(); - if (b_useTPCinnerWallPt) { - /// Using pt calculated at the inner wall of TPC - /// Caveat: tgl still from tracking: this is not the value of tgl at the - /// inner wall of TPC - trackPt = computePtInParamTPC(track); - } - // special case for ITS tracks - float ITStrackPt = track.pt(); - if (b_useTPCinnerWallPtForITS) { - /// Using pt calculated at the inner wall of TPC - /// Caveat: tgl still from tracking: this is not the value of tgl at the - /// inner wall of TPC - ITStrackPt = computePtInParamTPC(track); - } + float reco_pt = track.pt(); + float tpcinner_pt = computePtInParamTPC(track); + + /// Using pt calculated at the inner wall of TPC + /// Caveat: tgl still from tracking: this is not the value of tgl at the + /// inner wall of TPC + if (b_useTPCinnerWallPt) + trackPt = tpcinner_pt; + else + trackPt = reco_pt; + + /// special case for ITS tracks + /// Using pt calculated at the inner wall of TPC + /// Caveat: tgl still from tracking: this is not the value of tgl at the + /// inner wall of TPC + if (b_useTPCinnerWallPtForITS) + ITStrackPt = tpcinner_pt; + else + ITStrackPt = reco_pt; // kinematic track seletions for all tracks if (!isTrackSelectedKineCuts(track)) @@ -1038,11 +1052,17 @@ struct qaMatchEff { // all tracks, no conditions if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { + // pt comparison plot + histos.fill(HIST("MC/ptptconf"), reco_pt, tpcinner_pt); + // histos.get(HIST("MC/qopthist_its"))->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its"))->Fill(track.eta()); } else { + // pt comparison plot + histos.fill(HIST("data/ptptconf"), reco_pt, tpcinner_pt); + // histos.get(HIST("data/qopthist_its"))->Fill(track.signed1Pt()); histos.get(HIST("data/pthist_its"))->Fill(ITStrackPt); histos.get(HIST("data/phihist_its"))->Fill(track.phi()); From a245ffa146e394bb7c9d76c3b440b5247dc76834 Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Thu, 27 Apr 2023 20:05:41 +0200 Subject: [PATCH 13/14] re-checked formatting --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index 7503d2bda84..c3f1ef926de 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". From f8506b6c98c9a3aae6502d47a510f947f7cd8fff Mon Sep 17 00:00:00 2001 From: Rosario Turrisi Date: Fri, 28 Apr 2023 09:03:13 +0200 Subject: [PATCH 14/14] re-re-re-run clang-format formatting --- DPG/Tasks/AOTTrack/qaMatchEff.cxx | 266 +++++++++++++++++------------- 1 file changed, 147 insertions(+), 119 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaMatchEff.cxx b/DPG/Tasks/AOTTrack/qaMatchEff.cxx index c3f1ef926de..d684d260630 100644 --- a/DPG/Tasks/AOTTrack/qaMatchEff.cxx +++ b/DPG/Tasks/AOTTrack/qaMatchEff.cxx @@ -34,17 +34,19 @@ struct qaMatchEff { // // histogram registry HistogramRegistry histos{ - "Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + "Histos", + {}, + OutputObjHandlingPolicy::AnalysisObject}; // // Track selections Configurable b_useTrackSelections{ - "b_useTrackSelections", false, - "Boolean to switch the track selections on/off."}; + "b_useTrackSelections", false, + "Boolean to switch the track selections on/off."}; // kinematics Configurable ptMinCutInnerWallTPC{ - "ptMinCutInnerWallTPC", 0.1f, - "Minimum transverse momentum calculated at the inner wall of TPC " - "(GeV/c)"}; + "ptMinCutInnerWallTPC", 0.1f, + "Minimum transverse momentum calculated at the inner wall of TPC " + "(GeV/c)"}; Configurable ptMinCut{"ptMinCut", 0.1f, "Minimum transverse momentum (GeV/c)"}; Configurable ptMaxCut{"ptMaxCut", 100.f, @@ -54,30 +56,30 @@ struct qaMatchEff { Configurable dcaXYMaxCut{"dcaXYMaxCut", 1000000.0f, "Maximum dcaXY (cm)"}; Configurable b_useTPCinnerWallPt{ - "b_useTPCinnerWallPt", false, - "Boolean to switch the usage of pt calculated at the inner wall of TPC " - "on/off."}; + "b_useTPCinnerWallPt", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off."}; Configurable b_useTPCinnerWallPtForITS{ - "b_useTPCinnerWallPtForITS", false, - "Boolean to switch the usage of pt calculated at the inner wall of TPC " - "on/off just for ITS-tagged (not TPC tagged) histos."}; + "b_useTPCinnerWallPtForITS", false, + "Boolean to switch the usage of pt calculated at the inner wall of TPC " + "on/off just for ITS-tagged (not TPC tagged) histos."}; // TPC Configurable tpcNClusterMin{"tpcNClusterMin", 0, "Minimum number of clusters in TPC"}; Configurable tpcNCrossedRowsMin{"tpcNCrossedRowsMin", 70, "Minimum number of crossed rows in TPC"}; Configurable tpcNCrossedRowsOverFindableClstMin{ - "tpcNCrossedRowsOverFindableClstMin", 0.8f, - "Minimum fracion of crossed rows over findable custers in TPC"}; + "tpcNCrossedRowsOverFindableClstMin", 0.8f, + "Minimum fracion of crossed rows over findable custers in TPC"}; Configurable tpcChi2Max{"tpcChi2Max", 4.0f, "Maximum chi2 in TPC"}; // ITS Configurable itsChi2Max{"itsChi2Max", 36.0f, "Maximum chi2 in ITS"}; Configurable customITShitmap{ - "customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; + "customITShitmap", 3, "ITS hitmap (think to the binary representation)"}; Configurable customMinITShits{ - "customMinITShits", 1, - "Minimum number of layers crossed by a track among those in " - "\"customITShitmap\""}; + "customMinITShits", 1, + "Minimum number of layers crossed by a track among those in " + "\"customITShitmap\""}; // Other track settings // TRD presence Configurable isTRDThere{"isTRDThere", 2, @@ -117,23 +119,27 @@ struct qaMatchEff { AxisSpec axisDPh{phiBins, -PI, PI, "D#it{#varphi} (rad)"}; // // pdg codes vector - std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, + std::vector pdgChoice = {211, 213, 215, 217, 219, 221, 223, 321, 411, 521, 2212, 1114, 2214}; // // configuration for THnSparse's // Configurable makethn{"makethn", false, "choose if produce thnsparse"}; ConfigurableAxis thnd0{ - "thnd0", {600, -3.0f, 3.0f}, "impact parameter in xy [cm]"}; + "thnd0", + {600, -3.0f, 3.0f}, + "impact parameter in xy [cm]"}; ConfigurableAxis thnPt{"thnPt", {30, 0.0f, 15.0f}, "pt [GeV/c]"}; ConfigurableAxis thnPhi{"thnPhi", {18, 0.0f, TMath::TwoPi()}, "phi"}; ConfigurableAxis thnEta{"thnEta", {20, -2.0f, 2.0f}, "eta"}; ConfigurableAxis thnType{ - "thnType", - {3, -0.5f, 2.5f}, - "0: primary, 1: physical secondary, 2: sec. from material"}; + "thnType", + {3, -0.5f, 2.5f}, + "0: primary, 1: physical secondary, 2: sec. from material"}; ConfigurableAxis thnLabelSign{ - "thnLabelSign", {3, -1.5f, 1.5f}, "-1/+1 antip./particle"}; + "thnLabelSign", + {3, -1.5f, 1.5f}, + "-1/+1 antip./particle"}; ConfigurableAxis thnSpec{"thnSpec", {5, 0.5f, 5.5f}, "particle from MC (1,2,3,4,5 -> e,pi,K,P,other)"}; @@ -154,7 +160,8 @@ struct qaMatchEff { float trackPtInParamTPC = -1.; // Init function // - void init(o2::framework::InitContext &) { + void init(o2::framework::InitContext&) + { if (doDebug) LOG(info) << "===========================================>>>>>>>>>>>>>>>>" ">>>>>>>>>>>>>>>>> is it MC? = " @@ -168,12 +175,14 @@ struct qaMatchEff { if ((!isitMC && (doprocessMC || doprocessMCNoColl || doprocessTrkIUMC)) || (isitMC && (doprocessData && doprocessDataNoColl && doprocessTrkIUMC))) - LOGF(fatal, "Initialization set for MC and processData function flagged " - "(or viceversa)! Fix the configuration."); + LOGF(fatal, + "Initialization set for MC and processData function flagged " + "(or viceversa)! Fix the configuration."); if ((doprocessMC && doprocessMCNoColl && doprocessTrkIUMC) || (doprocessData && doprocessDataNoColl && doprocessTrkIUData)) - LOGF(fatal, "Cannot process for both without collision tag and with " - "collision tag at the same time! Fix the configuration."); + LOGF(fatal, + "Cannot process for both without collision tag and with " + "collision tag at the same time! Fix the configuration."); if (doprocessTrkIUMC && makethn) { LOGF(fatal, "No DCA for IU tracks. Put makethn = false."); } @@ -192,7 +201,7 @@ struct qaMatchEff { cutObject.SetMinNClustersTPC(tpcNClusterMin); cutObject.SetMinNCrossedRowsTPC(tpcNCrossedRowsMin); cutObject.SetMinNCrossedRowsOverFindableClustersTPC( - tpcNCrossedRowsOverFindableClstMin); + tpcNCrossedRowsOverFindableClstMin); cutObject.SetMaxChi2PerClusterTPC(tpcChi2Max); // ITS cutObject.SetMaxChi2PerClusterITS(itsChi2Max); @@ -221,10 +230,12 @@ struct qaMatchEff { // // // Init Data function - define data histograms - void initData() { + void initData() + { if (doDebug) - LOGF(info, "*********************************************************** " - "DATA ***************************************************"); + LOGF(info, + "*********************************************************** " + "DATA ***************************************************"); // // data histos // @@ -366,7 +377,8 @@ struct qaMatchEff { } // // Init MC function - void initMC() { + void initMC() + { if (doDebug) LOGF(info, " +++++++++++++++++++++++ MC ++++++++++++++++++++++++"); @@ -873,7 +885,9 @@ struct qaMatchEff { } // end initMC /// Function calculatind the pt at inner wall of TPC - template float computePtInParamTPC(T &track) { + template + float computePtInParamTPC(T& track) + { /// Using pt calculated at the inner wall of TPC /// Caveat: tgl still from tracking: this is not the value of tgl at the /// inner wall of TPC @@ -881,7 +895,9 @@ struct qaMatchEff { } /// Function applying the kinematic selections - template bool isTrackSelectedKineCuts(T &track) { + template + bool isTrackSelectedKineCuts(T& track) + { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kPtRange)) @@ -902,7 +918,9 @@ struct qaMatchEff { return true; } /// Function applying the TPC selections - template bool isTrackSelectedTPCCuts(T &track) { + template + bool isTrackSelectedTPCCuts(T& track) + { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCNCls)) @@ -911,14 +929,16 @@ struct qaMatchEff { TrackSelection::TrackCuts::kTPCCrossedRows)) return false; if (!cutObject.IsSelected( - track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) + track, TrackSelection::TrackCuts::kTPCCrossedRowsOverNCls)) return false; if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kTPCChi2NDF)) return false; return true; } /// Function applying the ITS selections - template bool isTrackSelectedITSCuts(T &track) { + template + bool isTrackSelectedITSCuts(T& track) + { if (!b_useTrackSelections) return true; // no track selections applied if (!cutObject.IsSelected(track, TrackSelection::TrackCuts::kITSChi2NDF)) @@ -941,12 +961,13 @@ struct qaMatchEff { /// Template function to perform the analysis /// ///////////////////////////////////////////////////// template - void fillHistograms(T &tracks, P &mcParticles) { + void fillHistograms(T& tracks, P& mcParticles) + { // float trackPt = 0, ITStrackPt = 0; // // - for (auto &track : tracks) { + for (auto& track : tracks) { // choose if we keep the track according to the TRD presence requirement if ((isTRDThere == 1) && !track.hasTRD()) continue; @@ -998,7 +1019,7 @@ struct qaMatchEff { tpPDGCode = TMath::Abs(siPDGCode); if (mcpart.isPhysicalPrimary()) { histos.get(HIST("MC/etahist_diff")) - ->Fill(mcpart.eta() - track.eta()); + ->Fill(mcpart.eta() - track.eta()); auto delta = mcpart.phi() - track.phi(); if (delta > PI) { delta -= TwoPI; @@ -1020,20 +1041,20 @@ struct qaMatchEff { sayPrim = 2; signPDGCode = siPDGCode / tpPDGCode; switch (tpPDGCode) { - case 11: - specind = 1; - break; - case 211: - specind = 2; - break; - case 321: - specind = 3; - break; - case 2212: - specind = 4; - break; - default: - specind = 5; + case 11: + specind = 1; + break; + case 211: + specind = 2; + break; + case 321: + specind = 3; + break; + case 2212: + specind = 4; + break; + default: + specind = 5; } } // @@ -1084,13 +1105,13 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { if constexpr (IS_MC) { histos.get(HIST("MC/qopthist_tpcits")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits"))->Fill(track.eta()); } else { histos.get(HIST("data/qopthist_tpcits")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("data/pthist_tpcits"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits"))->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits"))->Fill(track.eta()); @@ -1154,9 +1175,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_05"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_05")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_05")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1193,9 +1214,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_pos"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_pos")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_pos")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1233,9 +1254,9 @@ struct qaMatchEff { } else { histos.get(HIST("data/pthist_tpcits_neg"))->Fill(trackPt); histos.get(HIST("data/phihist_tpcits_neg")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("data/etahist_tpcits_neg")) - ->Fill(track.eta()); + ->Fill(track.eta()); } } // end if ITS } // end if TPC @@ -1249,25 +1270,25 @@ struct qaMatchEff { if (mcpart.isPhysicalPrimary()) { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_prim"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_prim"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_prim"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_prim"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_prim")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -1276,25 +1297,25 @@ struct qaMatchEff { // only secondaries from decay if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_secd"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secd"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secd"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secd"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_secd")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -1303,25 +1324,25 @@ struct qaMatchEff { // only secondaries from material if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_its_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_its_secm"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_its_secm"))->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/qopthist_tpc_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpc_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_secm"))->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_secm"))->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/qopthist_tpcits_secm")) - ->Fill(track.signed1Pt()); + ->Fill(track.signed1Pt()); histos.get(HIST("MC/pthist_tpcits_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -1370,23 +1391,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_prim"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_prim"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_prim")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_prim")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_prim")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if primaries @@ -1396,23 +1417,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_secd"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secd"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_secd")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_secd")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_secd")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC // end if secondaries from decay @@ -1422,23 +1443,23 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_its_pi_secm"))->Fill(ITStrackPt); histos.get(HIST("MC/phihist_its_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_its_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS if (track.hasTPC() && isTrackSelectedTPCCuts(track)) { histos.get(HIST("MC/pthist_tpc_pi_secm"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpc_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpc_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_pi_secm")) - ->Fill(trackPt); + ->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_pi_secm")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_pi_secm")) - ->Fill(track.eta()); + ->Fill(track.eta()); } // end if ITS } // end if TPC } // end if secondaries from material @@ -1453,8 +1474,8 @@ struct qaMatchEff { // index from zero, so increase by 1 to put in the right bin (and // 0.5 not needed but just not to sit in the edge) pdg_fill = - static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + - 1.5; + static_cast(std::distance(pdgChoice.begin(), itr_pdg)) + + 1.5; else pdg_fill = -10.0; // @@ -1472,9 +1493,9 @@ struct qaMatchEff { if (track.hasITS() && isTrackSelectedITSCuts(track)) { histos.get(HIST("MC/pthist_tpcits_nopi"))->Fill(trackPt); histos.get(HIST("MC/phihist_tpcits_nopi")) - ->Fill(track.phi()); + ->Fill(track.phi()); histos.get(HIST("MC/etahist_tpcits_nopi")) - ->Fill(track.eta()); + ->Fill(track.eta()); histos.get(HIST("MC/pdghist_num"))->Fill(pdg_fill); } // end if ITS } // end if TPC @@ -1533,10 +1554,11 @@ struct qaMatchEff { ////////////////////////////////////////////// /// Process MC with collision grouping /// ////////////////////////////////////////////// - void processMC(aod::Collision const &collision, + void processMC(aod::Collision const& collision, soa::Join const &tracks, - aod::McParticles const &mcParticles) { + aod::McTrackLabels> const& tracks, + aod::McParticles const& mcParticles) + { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processMC, "process MC", false); @@ -1544,10 +1566,11 @@ struct qaMatchEff { //////////////////////////////////////////////////////////// /// Process MC with collision grouping and IU tracks /// //////////////////////////////////////////////////////////// - void processTrkIUMC(aod::Collision const &collision, + void processTrkIUMC(aod::Collision const& collision, soa::Join const &tracks, - aod::McParticles const &mcParticles) { + aod::McTrackLabels> const& tracks, + aod::McParticles const& mcParticles) + { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processTrkIUMC, "process MC for IU tracks", false); @@ -1556,8 +1579,9 @@ struct qaMatchEff { /// Process MC w/o collision grouping /// ///////////////////////////////////////////// void processMCNoColl(soa::Join const &tracks, - aod::McParticles const &mcParticles) { + aod::McTrackLabels> const& tracks, + aod::McParticles const& mcParticles) + { fillHistograms(tracks, mcParticles); } PROCESS_SWITCH(qaMatchEff, processMCNoColl, @@ -1567,8 +1591,9 @@ struct qaMatchEff { /// Process data with collision grouping /// //////////////////////////////////////////////// void processData( - aod::Collision const &collision, - soa::Join const &tracks) { + aod::Collision const& collision, + soa::Join const& tracks) + { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processData, "process data", true); @@ -1576,9 +1601,10 @@ struct qaMatchEff { ///////////////////////////////////////////////////////////// /// Process data with collision grouping and IU tracks /// ///////////////////////////////////////////////////////////// - void processTrkIUData(aod::Collision const &collision, + void processTrkIUData(aod::Collision const& collision, soa::Join const &tracks) { + aod::TracksDCA> const& tracks) + { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processTrkIUData, "process data", false); @@ -1587,7 +1613,8 @@ struct qaMatchEff { /// Process data w/o collision grouping /// /////////////////////////////////////////////// void processDataNoColl( - soa::Join const &tracks) { + soa::Join const& tracks) + { fillHistograms(tracks, tracks); // 2nd argument not used in this case } PROCESS_SWITCH(qaMatchEff, processDataNoColl, @@ -1595,7 +1622,8 @@ struct qaMatchEff { }; // end of structure -WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ return WorkflowSpec{ - adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; + adaptAnalysisTask(cfgc, TaskName{"qa-match-eff"})}; }