Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Core/SingleTrackQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ struct SingleTrackQC {
// fRegistry.add("Track/positive/hTOFNsigmaKa", "TOF n sigma ka;p_{pv} (GeV/c);n #sigma_{K}^{TOF}", kTH2F, {{1000, 0, 10}, {100, -5, +5}}, false);
// fRegistry.add("Track/positive/hTOFNsigmaPr", "TOF n sigma pr;p_{pv} (GeV/c);n #sigma_{p}^{TOF}", kTH2F, {{1000, 0, 10}, {100, -5, +5}}, false);

fRegistry.add("Track/positive/hPIDForTracking", "PID for trackng", kTH1F, {{9, -0.5, 8.5}}, false); // see numbering in O2/DataFormats/Reconstruction/include/ReconstructionDataFormats/PID.h
fRegistry.add("Track/positive/hProbElBDT", "probability to be e from BDT;p_{in} (GeV/c);BDT score;", kTH2F, {{1000, 0, 10}, {100, 0, 1}}, false);
fRegistry.add("Track/positive/hMeanClusterSizeITS", "mean cluster size ITS;p_{pv} (GeV/c);<cluster size> on ITS #times cos(#lambda);", kTH2F, {{1000, 0.f, 10.f}, {150, 0, 15}}, false);
fRegistry.add("Track/positive/hMeanClusterSizeITSib", "mean cluster size ITS inner barrel;p_{pv} (GeV/c);<cluster size> on ITS #times cos(#lambda);", kTH2F, {{1000, 0.f, 10.f}, {150, 0, 15}}, false);
Expand Down Expand Up @@ -582,6 +583,7 @@ struct SingleTrackQC {

fRegistry.fill(HIST("Track/positive/hTPCdEdx"), track.tpcInnerParam(), track.tpcSignal());
fRegistry.fill(HIST("Track/positive/hTOFbeta"), track.p(), track.beta());
fRegistry.fill(HIST("Track/positive/hPIDForTracking"), track.pidForTracking());
fRegistry.fill(HIST("Track/positive/hProbElBDT"), track.tpcInnerParam(), track.probElBDT());
fRegistry.fill(HIST("Track/positive/hMeanClusterSizeITS"), track.p(), track.meanClusterSizeITS() * std::cos(std::atan(track.tgl())));
fRegistry.fill(HIST("Track/positive/hMeanClusterSizeITSib"), track.p(), track.meanClusterSizeITSib() * std::cos(std::atan(track.tgl())));
Expand Down Expand Up @@ -621,6 +623,7 @@ struct SingleTrackQC {

fRegistry.fill(HIST("Track/negative/hTPCdEdx"), track.tpcInnerParam(), track.tpcSignal());
fRegistry.fill(HIST("Track/negative/hTOFbeta"), track.p(), track.beta());
fRegistry.fill(HIST("Track/negative/hPIDForTracking"), track.pidForTracking());
fRegistry.fill(HIST("Track/negative/hProbElBDT"), track.tpcInnerParam(), track.probElBDT());
fRegistry.fill(HIST("Track/negative/hMeanClusterSizeITS"), track.p(), track.meanClusterSizeITS() * std::cos(std::atan(track.tgl())));
fRegistry.fill(HIST("Track/negative/hMeanClusterSizeITSib"), track.p(), track.meanClusterSizeITSib() * std::cos(std::atan(track.tgl())));
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Core/SingleTrackQCMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ struct SingleTrackQCMC {
fRegistry.add("Track/PromptLF/positive/hDeltaPin", "p_{in} vs. p_{pv};p_{in} (GeV/c);(p_{pv} - p_{in})/p_{in}", kTH2F, {{1000, 0, 10}, {200, -1, +1}}, false);
fRegistry.add("Track/PromptLF/positive/hChi2TOF", "TOF Chi2;p_{pv} (GeV/c);chi2", kTH2F, {{1000, 0, 10}, {100, 0, 10}}, false);
fRegistry.add("Track/PromptLF/positive/hITSClusterMap", "ITS cluster map", kTH1F, {{128, -0.5, 127.5}}, false);
fRegistry.add("Track/PromptLF/positive/hPIDForTracking", "PID for trackng", kTH1F, {{9, -0.5, 8.5}}, false); // see numbering in O2/DataFormats/Reconstruction/include/ReconstructionDataFormats/PID.h
fRegistry.add("Track/PromptLF/positive/hPtGen_DeltaPtOverPtGen", "electron p_{T} resolution;p_{T}^{gen} (GeV/c);(p_{T}^{rec} - p_{T}^{gen})/p_{T}^{gen}", kTH2F, {{200, 0, 10}, {200, -1.0f, 1.0f}}, true);
fRegistry.add("Track/PromptLF/positive/hPtGen_DeltaEta", "electron #eta resolution;p_{T}^{gen} (GeV/c);#eta^{rec} - #eta^{gen}", kTH2F, {{200, 0, 10}, {100, -0.05f, 0.05f}}, true);
fRegistry.add("Track/PromptLF/positive/hPtGen_DeltaPhi", "electron #varphi resolution;p_{T}^{gen} (GeV/c);#varphi^{rec} - #varphi^{gen} (rad.)", kTH2F, {{200, 0, 10}, {100, -0.05f, 0.05f}}, true);
Expand Down Expand Up @@ -676,6 +677,7 @@ struct SingleTrackQCMC {
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hDeltaPin"), track.tpcInnerParam(), (track.p() - track.tpcInnerParam()) / track.tpcInnerParam());
}
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hITSClusterMap"), track.itsClusterMap());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hPIDForTracking"), track.pidForTracking());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hPtGen_DeltaPtOverPtGen"), mctrack.pt(), (track.pt() - mctrack.pt()) / mctrack.pt());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hPtGen_DeltaEta"), mctrack.pt(), track.eta() - mctrack.eta());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hPtGen_DeltaPhi"), mctrack.pt(), track.phi() - mctrack.phi());
Expand Down Expand Up @@ -721,6 +723,7 @@ struct SingleTrackQCMC {
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hDeltaPin"), track.tpcInnerParam(), (track.p() - track.tpcInnerParam()) / track.tpcInnerParam());
}
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hITSClusterMap"), track.itsClusterMap());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hPIDForTracking"), track.pidForTracking());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hPtGen_DeltaPtOverPtGen"), mctrack.pt(), (track.pt() - mctrack.pt()) / mctrack.pt());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hPtGen_DeltaEta"), mctrack.pt(), track.eta() - mctrack.eta());
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hPtGen_DeltaPhi"), mctrack.pt(), track.phi() - mctrack.phi());
Expand Down
37 changes: 36 additions & 1 deletion PWGEM/Dilepton/DataModel/dileptonTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,42 @@ DECLARE_SOA_TABLE_VERSIONED(EMPrimaryElectrons_005, "AOD", "EMPRIMARYEL", 5, //!
emprimaryelectron::MeanClusterSizeITSib<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSob<track::ITSClusterSizes>);

using EMPrimaryElectrons = EMPrimaryElectrons_005;
DECLARE_SOA_TABLE_VERSIONED(EMPrimaryElectrons_006, "AOD", "EMPRIMARYEL", 6, //!
o2::soa::Index<>, emprimaryelectron::CollisionId,
emprimaryelectron::TrackId, emprimaryelectron::Sign,
track::Pt, track::Eta, track::Phi,
track::DcaXY, track::DcaZ, aod::track::CYY, aod::track::CZY, aod::track::CZZ,
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusPID, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
track::TPCChi2NCl, track::TPCInnerParam,
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaPi, pidtpc::TPCNSigmaKa, pidtpc::TPCNSigmaPr,
pidtofbeta::Beta, pidtof::TOFNSigmaEl, /*pidtof::TOFNSigmaPi, pidtof::TOFNSigmaKa, pidtof::TOFNSigmaPr,*/
track::ITSClusterSizes, track::ITSChi2NCl, track::TOFChi2, track::DetectorMap, /*track::Tgl,*/
emprimaryelectron::IsAssociatedToMPC, emprimaryelectron::IsAmbiguous, emprimaryelectron::ProbElBDT, track::Flags,
mcpidtpc::DeDxTunedMc,

// dynamic column
track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCNClsPID<track::TPCNClsFindable, track::TPCNClsFindableMinusPID>,
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::v001::ITSClusterMap<track::ITSClusterSizes>, track::v001::ITSNCls<track::ITSClusterSizes>, track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
track::HasITS<track::DetectorMap>, track::HasTPC<track::DetectorMap>, track::HasTRD<track::DetectorMap>, track::HasTOF<track::DetectorMap>,
track::PIDForTracking<track::Flags>, // see numbering in O2/DataFormats/Reconstruction/include/ReconstructionDataFormats/PID.h
track::IsPVContributor<track::Flags>,

emprimaryelectron::Signed1Pt<track::Pt, emprimaryelectron::Sign>,
emprimaryelectron::P<track::Pt, track::Eta>,
emprimaryelectron::Px<track::Pt, track::Phi>,
emprimaryelectron::Py<track::Pt, track::Phi>,
emprimaryelectron::Pz<track::Pt, track::Eta>,
emprimaryelectron::Tgl<track::Eta>,
emprimaryelectron::MeanClusterSizeITS<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSib<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSob<track::ITSClusterSizes>);

using EMPrimaryElectrons = EMPrimaryElectrons_006;
// iterators
using EMPrimaryElectron = EMPrimaryElectrons::iterator;

Expand Down
5 changes: 5 additions & 0 deletions PWGEM/Dilepton/TableProducer/Converters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ o2physics_add_dpl_workflow(electron-converter5
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(electron-converter6
SOURCES electronConverter6.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(track-converter1
SOURCES trackConverter1.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
Expand Down
76 changes: 76 additions & 0 deletions PWGEM/Dilepton/TableProducer/Converters/electronConverter6.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// 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.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//
// ========================
//
// This code runs loop over ULS ee pars for virtual photon QC.
// Please write to: daiki.sekihata@cern.ch

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

#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
Comment on lines +19 to +21
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong format


using namespace o2;
using namespace o2::aod;
using namespace o2::framework;
using namespace o2::framework::expressions;
using namespace o2::soa;

struct electronConverter6 {
Produces<aod::EMPrimaryElectrons_006> track_006;

void process(aod::EMPrimaryElectrons_005 const& tracks)
{
for (const auto& track : tracks) {
track_006(track.collisionId(),
track.trackId(),
track.sign(),
track.pt(),
track.eta(),
track.phi(),
track.dcaXY(),
track.dcaZ(),
track.cYY(),
track.cZY(),
track.cZZ(),
track.tpcNClsFindable(),
track.tpcNClsFindableMinusFound(),
track.tpcNClsFindableMinusPID(),
track.tpcNClsFindableMinusCrossedRows(),
track.tpcNClsShared(),
track.tpcChi2NCl(),
track.tpcInnerParam(),
track.tpcSignal(),
track.tpcNSigmaEl(),
track.tpcNSigmaPi(),
track.tpcNSigmaKa(),
track.tpcNSigmaPr(),
track.beta(),
track.tofNSigmaEl(),
track.itsClusterSizes(),
track.itsChi2NCl(),
track.tofChi2(),
track.detectorMap(),
track.isAssociatedToMPC(),
track.isAmbiguous(),
track.probElBDT(),
0,
track.mcTunedTPCSignal());
} // end of track loop
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<electronConverter6>(cfgc, TaskName{"electron-converter6"})};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use TaskName?

}
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ struct skimmerPrimaryElectron {
beta, tofNSigmaEl,
track.itsClusterSizes(),
track.itsChi2NCl(), track.tofChi2(), track.detectorMap(),
isAssociatedToMPC, false, probaEl, mcTunedTPCSignal);
isAssociatedToMPC, false, probaEl, track.flags(), mcTunedTPCSignal);

emprimaryelectronscov(
trackParCov.getX(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ struct skimmerPrimaryElectronQC {
track.itsClusterSizes(),
track.itsChi2NCl(), track.tofChi2(), track.detectorMap(),
// trackParCov.getTgl(),
isAssociatedToMPC, false, probaEl, mcTunedTPCSignal);
isAssociatedToMPC, false, probaEl, track.flags(), mcTunedTPCSignal);

emprimaryelectronscov(
trackParCov.getX(),
Expand Down
Loading