Skip to content
Closed
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
7 changes: 6 additions & 1 deletion PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@
#include <cmath>
#include <complex>
#include <cstdint>
#include <iostream>

Check failure on line 68 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <map>
#include <utility>
#include <vector>

using std::complex;

Check failure on line 73 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[import-std-name]

Do not import names from the std namespace in headers.
using std::cout;

Check failure on line 74 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[import-std-name]

Do not import names from the std namespace in headers.
using std::endl;

Check failure on line 75 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[import-std-name]

Do not import names from the std namespace in headers.

using SMatrix55 = ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepSym<double, 5>>;
using SMatrix5 = ROOT::Math::SVector<double, 5>;
Expand Down Expand Up @@ -136,7 +136,8 @@
ReducedMuonCollInfo = BIT(25), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo
MuonRealign = BIT(26),
MuonCovRealign = BIT(27),
MFTCov = BIT(28)
MFTCov = BIT(28),
MCTPCtuneOnData = BIT(29)
};

enum PairCandidateType {
Expand Down Expand Up @@ -1498,9 +1499,9 @@
}
if constexpr ((fillMap & MuonCov) > 0 || (fillMap & ReducedMuonCov) > 0) {
o2::dataformats::GlobalFwdTrack propmuon = PropagateMuon(muontrack, collision);
double px = propmuon.getP() * sin(M_PI / 2 - atan(mfttrack.tgl())) * cos(mfttrack.phi());

Check failure on line 1502 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double py = propmuon.getP() * sin(M_PI / 2 - atan(mfttrack.tgl())) * sin(mfttrack.phi());

Check failure on line 1503 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double pz = propmuon.getP() * cos(M_PI / 2 - atan(mfttrack.tgl()));

Check failure on line 1504 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double pt = std::sqrt(std::pow(px, 2) + std::pow(py, 2));
values[kX] = mfttrack.x();
values[kY] = mfttrack.y();
Expand Down Expand Up @@ -2041,7 +2042,7 @@
trackPar.propagateParamToDCA({collision.posX(), collision.posY(), collision.posZ()}, fgMagField, &dca);

// if it is a displaced track longitudinally, add it to the track vector
if (abs(dca[0]) < 3.0 && abs(dca[1]) > 4.0) {

Check failure on line 2045 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (track.tgl() > 0.1) {
tracksP.push_back(track.z());
}
Expand Down Expand Up @@ -2389,6 +2390,10 @@
values[kTRDPattern] = track.trdPattern();

values[kTPCsignal] = track.tpcSignal();
if constexpr ((fillMap & MCTPCtuneOnData) > 0) {
// TPC signal without the gain correction for MC TPC tune on data
values[kTPCsignal] = track.mcTunedTPCSignal();
}
values[kTRDsignal] = track.trdSignal();

values[kDetectorMap] = track.detectorMap();
Expand Down Expand Up @@ -3886,10 +3891,10 @@
values[kVertexingLxyErr] = (KFPV.GetCovariance(0) + KFGeoTwoProng.GetCovariance(0)) * dxPair2PV * dxPair2PV + (KFPV.GetCovariance(2) + KFGeoTwoProng.GetCovariance(2)) * dyPair2PV * dyPair2PV + 2 * ((KFPV.GetCovariance(1) + KFGeoTwoProng.GetCovariance(1)) * dxPair2PV * dyPair2PV);
values[kVertexingLzErr] = (KFPV.GetCovariance(5) + KFGeoTwoProng.GetCovariance(5)) * dzPair2PV * dzPair2PV;
values[kVertexingLxyzErr] = (KFPV.GetCovariance(0) + KFGeoTwoProng.GetCovariance(0)) * dxPair2PV * dxPair2PV + (KFPV.GetCovariance(2) + KFGeoTwoProng.GetCovariance(2)) * dyPair2PV * dyPair2PV + (KFPV.GetCovariance(5) + KFGeoTwoProng.GetCovariance(5)) * dzPair2PV * dzPair2PV + 2 * ((KFPV.GetCovariance(1) + KFGeoTwoProng.GetCovariance(1)) * dxPair2PV * dyPair2PV + (KFPV.GetCovariance(3) + KFGeoTwoProng.GetCovariance(3)) * dxPair2PV * dzPair2PV + (KFPV.GetCovariance(4) + KFGeoTwoProng.GetCovariance(4)) * dyPair2PV * dzPair2PV);
if (fabs(values[kVertexingLxy]) < 1.e-8f)

Check failure on line 3894 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
values[kVertexingLxy] = 1.e-8f;
values[kVertexingLxyErr] = values[kVertexingLxyErr] < 0. ? 1.e8f : std::sqrt(values[kVertexingLxyErr]) / values[kVertexingLxy];
if (fabs(values[kVertexingLz]) < 1.e-8f)

Check failure on line 3897 in PWGDQ/Core/VarManager.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
values[kVertexingLz] = 1.e-8f;
values[kVertexingLzErr] = values[kVertexingLzErr] < 0. ? 1.e8f : std::sqrt(values[kVertexingLzErr]) / values[kVertexingLz];
if (fabs(values[kVertexingLxyz]) < 1.e-8f)
Expand Down
43 changes: 42 additions & 1 deletion PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ using MyBarrelTracksWithCov = soa::Join<aod::Tracks, aod::TracksExtra, aod::Trac
aod::pidTOFFullEl, aod::pidTOFFullMu, aod::pidTOFFullPi,
aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFbeta,
aod::McTrackLabels>;
using MyBarrelTracksTunedWithCov = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksCov, aod::TracksDCA, aod::TrackSelection,
aod::pidTPCFullEl, aod::pidTPCFullMu, aod::pidTPCFullPi,
aod::pidTPCFullKa, aod::pidTPCFullPr, aod::mcTPCTuneOnData,
aod::pidTOFFullEl, aod::pidTOFFullMu, aod::pidTOFFullPi,
aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFbeta,
aod::McTrackLabels>;
using MyMuons = soa::Join<aod::FwdTracks, aod::McFwdTrackLabels, aod::FwdTracksDCA>;
using MyMuonsWithCov = soa::Join<aod::FwdTracks, aod::FwdTracksCov, aod::McFwdTrackLabels, aod::FwdTracksDCA>;
using MyMuonsRealignWithCov = soa::Join<aod::FwdTracksReAlign, aod::FwdTrksCovReAlign, aod::McFwdTrackLabels, aod::FwdTracksDCA>;
Expand All @@ -111,6 +117,7 @@ constexpr static uint32_t gkEventMcFillMap = VarManager::ObjTypes::CollisionMC;
constexpr static uint32_t gkEventMcFillMapWithCent = VarManager::ObjTypes::CollisionMC | VarManager::ObjTypes::CollisionCent;
// constexpr static uint32_t gkTrackFillMap = VarManager::ObjTypes::Track | VarManager::ObjTypes::TrackExtra | VarManager::ObjTypes::TrackDCA | VarManager::ObjTypes::TrackSelection | VarManager::ObjTypes::TrackPID;
constexpr static uint32_t gkTrackFillMapWithCov = VarManager::ObjTypes::Track | VarManager::ObjTypes::TrackExtra | VarManager::ObjTypes::TrackDCA | VarManager::ObjTypes::TrackSelection | VarManager::ObjTypes::TrackCov | VarManager::ObjTypes::TrackPID;
constexpr static uint32_t gkTrackFillMapTunedWithCov = VarManager::ObjTypes::Track | VarManager::ObjTypes::TrackExtra | VarManager::ObjTypes::TrackDCA | VarManager::ObjTypes::TrackSelection | VarManager::ObjTypes::TrackCov | VarManager::ObjTypes::TrackPID | VarManager::ObjTypes::MCTPCtuneOnData;
// constexpr static uint32_t gkTrackFillMapWithDalitzBits = gkTrackFillMap | VarManager::ObjTypes::DalitzBits;
// constexpr static uint32_t gkMuonFillMap = VarManager::ObjTypes::Muon;
constexpr static uint32_t gkMuonFillMapWithCov = VarManager::ObjTypes::Muon | VarManager::ObjTypes::MuonCov;
Expand Down Expand Up @@ -263,7 +270,7 @@ struct TableMakerMC {
{
// Check whether barrel or muon are enabled
bool isProcessBCenabled = context.mOptions.get<bool>("processPP");
bool isBarrelEnabled = (context.mOptions.get<bool>("processPP") || context.mOptions.get<bool>("processPPBarrelOnly") || context.mOptions.get<bool>("processPbPbBarrelOnly") || context.mOptions.get<bool>("processPbPbWithFilterBarrelOnly"));
bool isBarrelEnabled = (context.mOptions.get<bool>("processPP") || context.mOptions.get<bool>("processPPBarrelOnly") || context.mOptions.get<bool>("processPPBarrelOnlyMcTuned") || context.mOptions.get<bool>("processPbPbBarrelOnly") || context.mOptions.get<bool>("processPbPbWithFilterBarrelOnly"));
bool isMuonEnabled = (context.mOptions.get<bool>("processPP") || context.mOptions.get<bool>("processPPMuonOnlyBasic") || context.mOptions.get<bool>("processPPMuonOnly") || context.mOptions.get<bool>("processPPRealignedMuonOnly") || context.mOptions.get<bool>("processPbPbMuonOnly") || context.mOptions.get<bool>("processPbPbRealignedMuonOnly")) || context.mOptions.get<bool>("processPPMuonRefit");
// Make sure at least one process function is enabled
if (!(isProcessBCenabled || isBarrelEnabled || isMuonEnabled)) {
Expand Down Expand Up @@ -1456,13 +1463,28 @@ struct TableMakerMC {
fullSkimming<gkEventFillMapWithMults, gkTrackFillMapWithCov, gkMuonFillMapWithCov, gkMFTFillMap, gkEventMcFillMap>(collisions, bcs, tracksBarrel, tracksMuon, mftTracks, trackAssocs, fwdTrackAssocs, mftAssocs, mcCollisions, mcParticles, nullptr);
}

void processPPMcTuned(MyEventsWithMults const& collisions, aod::BCsWithTimestamps const& bcs,
MyBarrelTracksTunedWithCov const& tracksBarrel, MyMuonsWithCov const& tracksMuon, MFTTrackLabeled const& mftTracks,
aod::TrackAssoc const& trackAssocs, aod::FwdTrackAssoc const& fwdTrackAssocs, aod::MFTTrackAssoc const& mftAssocs,
MyEventsMcWithMults const& mcCollisions, aod::McParticles const& mcParticles)
{
fullSkimming<gkEventFillMapWithMults, gkTrackFillMapTunedWithCov, gkMuonFillMapWithCov, gkMFTFillMap, gkEventMcFillMap>(collisions, bcs, tracksBarrel, tracksMuon, mftTracks, trackAssocs, fwdTrackAssocs, mftAssocs, mcCollisions, mcParticles, nullptr);
}

void processPPBarrelOnly(MyEventsWithMults const& collisions, aod::BCsWithTimestamps const& bcs,
MyBarrelTracksWithCov const& tracksBarrel, aod::TrackAssoc const& trackAssocs,
MyEventsMcWithMults const& mcCollisions, aod::McParticles const& mcParticles)
{
fullSkimming<gkEventFillMapWithMults, gkTrackFillMapWithCov, 0u, 0u, gkEventMcFillMap>(collisions, bcs, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, mcCollisions, mcParticles, nullptr);
}

void processPPBarrelOnlyMcTuned(MyEventsWithMults const& collisions, aod::BCsWithTimestamps const& bcs,
MyBarrelTracksTunedWithCov const& tracksBarrel, aod::TrackAssoc const& trackAssocs,
MyEventsMcWithMults const& mcCollisions, aod::McParticles const& mcParticles)
{
fullSkimming<gkEventFillMapWithMults, gkTrackFillMapTunedWithCov, 0u, 0u, gkEventMcFillMap>(collisions, bcs, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, mcCollisions, mcParticles, nullptr);
}

void processPPMuonOnlyBasic(MyEvents const& collisions, aod::BCsWithTimestamps const& bcs,
MyMuonsWithCov const& tracksMuon, MFTTrackLabeled const& mftTracks,
aod::FwdTrackAssoc const& fwdTrackAssocs, aod::MFTTrackAssoc const& mftAssocs,
Expand Down Expand Up @@ -1503,13 +1525,28 @@ struct TableMakerMC {
fullSkimming<gkEventFillMapWithCentAndMults, gkTrackFillMapWithCov, gkMuonFillMapWithCov, gkMFTFillMap, gkEventMcFillMapWithCent>(collisions, bcs, tracksBarrel, tracksMuon, mftTracks, trackAssocs, fwdTrackAssocs, mftAssocs, mcCollisions, mcParticles, nullptr);
}

void processPbPbMcTuned(MyEventsWithCentAndMults const& collisions, aod::BCsWithTimestamps const& bcs,
MyBarrelTracksTunedWithCov const& tracksBarrel, MyMuonsWithCov const& tracksMuon, MFTTrackLabeled const& mftTracks,
aod::TrackAssoc const& trackAssocs, aod::FwdTrackAssoc const& fwdTrackAssocs, aod::MFTTrackAssoc const& mftAssocs,
MyEventsMcWithMults const& mcCollisions, aod::McParticles const& mcParticles)
{
fullSkimming<gkEventFillMapWithCentAndMults, gkTrackFillMapTunedWithCov, gkMuonFillMapWithCov, gkMFTFillMap, gkEventMcFillMapWithCent>(collisions, bcs, tracksBarrel, tracksMuon, mftTracks, trackAssocs, fwdTrackAssocs, mftAssocs, mcCollisions, mcParticles, nullptr);
}

void processPbPbBarrelOnly(MyEventsWithCentAndMults const& collisions, aod::BCsWithTimestamps const& bcs,
MyBarrelTracksWithCov const& tracksBarrel, aod::TrackAssoc const& trackAssocs,
MyEventsMcWithMults const& mcCollisions, aod::McParticles const& mcParticles)
{
fullSkimming<gkEventFillMapWithCentAndMults, gkTrackFillMapWithCov, 0u, 0u, gkEventMcFillMapWithCent>(collisions, bcs, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, mcCollisions, mcParticles, nullptr);
}

void processPbPbBarrelOnlyMcTuned(MyEventsWithCentAndMults const& collisions, aod::BCsWithTimestamps const& bcs,
MyBarrelTracksTunedWithCov const& tracksBarrel, aod::TrackAssoc const& trackAssocs,
MyEventsMcWithMults const& mcCollisions, aod::McParticles const& mcParticles)
{
fullSkimming<gkEventFillMapWithCentAndMults, gkTrackFillMapTunedWithCov, 0u, 0u, gkEventMcFillMapWithCent>(collisions, bcs, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, mcCollisions, mcParticles, nullptr);
}

void processPbPbWithFilterBarrelOnly(MyEventsWithMultsAndRapidityGapFilter const& collisions, aod::BCsWithTimestamps const& bcs,
MyBarrelTracksWithCov const& tracksBarrel, aod::TrackAssoc const& trackAssocs,
MyEventsMcWithMults const& mcCollisions, aod::McParticles const& mcParticles)
Expand Down Expand Up @@ -1561,13 +1598,17 @@ struct TableMakerMC {
}

PROCESS_SWITCH(TableMakerMC, processPP, "Produce both barrel and muon skims, pp settings", false);
PROCESS_SWITCH(TableMakerMC, processPPMcTuned, "Produce both barrel and muon skims, pp settings, with MC-tuned dEdx", false);
PROCESS_SWITCH(TableMakerMC, processPPBarrelOnly, "Produce only barrel skims, pp settings ", false);
PROCESS_SWITCH(TableMakerMC, processPPBarrelOnlyMcTuned, "Produce only barrel skims, pp settings, with MC-tuned dEdx", false);
PROCESS_SWITCH(TableMakerMC, processPPMuonOnlyBasic, "Produce only muon skims, pp settings, no multiplicity", false);
PROCESS_SWITCH(TableMakerMC, processPPMuonOnly, "Produce only muon skims, pp settings", false);
PROCESS_SWITCH(TableMakerMC, processPPMuonRefit, "Produce only muon skims, pp settings", false);
PROCESS_SWITCH(TableMakerMC, processPPRealignedMuonOnly, "Build realigned muon only DQ skimmed data model typically for pp/p-Pb and UPC Pb-Pb", false);
PROCESS_SWITCH(TableMakerMC, processPbPb, "Produce both barrel and muon skims, PbPb settings", false);
PROCESS_SWITCH(TableMakerMC, processPbPbMcTuned, "Produce both barrel and muon skims, PbPb settings, with MC-tuned dEdx", false);
PROCESS_SWITCH(TableMakerMC, processPbPbBarrelOnly, "Produce only barrel skims, PbPb settings", false);
PROCESS_SWITCH(TableMakerMC, processPbPbBarrelOnlyMcTuned, "Produce only barrel skims, PbPb settings, with MC-tuned dEdx", false);
PROCESS_SWITCH(TableMakerMC, processPbPbWithFilterBarrelOnly, "Produce only barrel skims, pp settings with rapidity gap filter ", false);
PROCESS_SWITCH(TableMakerMC, processPbPbMuonOnly, "Produce only muon skims, PbPb settings", false);
PROCESS_SWITCH(TableMakerMC, processPbPbRealignedMuonOnly, "Build realigned muon only DQ skimmed data model typically for Pb-Pb, w/o event filtering", false);
Expand Down
Loading