Skip to content

Commit 0b92bd9

Browse files
authored
[PWGEM/PhotonMeson] add a column for v0leg moved by vdrifter (#9103)
1 parent bd6c1b4 commit 0b92bd9

File tree

5 files changed

+40
-19
lines changed

5 files changed

+40
-19
lines changed

PWGEM/Dilepton/Tasks/createResolutionMap.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ struct CreateResolutionMap {
6565
using SMatrix55 = ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepSym<double, 5>>;
6666
using SMatrix5 = ROOT::Math::SVector<double, 5>;
6767

68-
Configurable<bool> applyEveSel_at_skimming{"applyEveSel_at_skimming", false, "flag to apply minimal event selection at the skimming level"};
6968
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
7069
Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
7170
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
@@ -75,12 +74,12 @@ struct CreateResolutionMap {
7574
ConfigurableAxis ConfPtGenBins{"ConfPtGenBins", {VARIABLE_WIDTH, 0.00, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.50, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.60, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.70, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.90, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.10, 2.20, 2.30, 2.40, 2.50, 2.60, 2.70, 2.80, 2.90, 3.00, 3.10, 3.20, 3.30, 3.40, 3.50, 3.60, 3.70, 3.80, 3.90, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50, 4.60, 4.70, 4.80, 4.90, 5.00, 5.50, 6.00, 6.50, 7.00, 7.50, 8.00, 8.50, 9.00, 9.50, 10.00, 11.00, 12.00, 13.00, 14.00, 15.00, 16.00, 17.00, 18.00, 19.00, 20.00}, "gen. pT bins for output histograms"};
7675

7776
ConfigurableAxis ConfEtaCBGenBins{"ConfEtaCBGenBins", {30, -1.5, +1.5}, "gen. eta bins at midrapidity for output histograms"};
78-
ConfigurableAxis ConfEtaFWDGenBins{"ConfEtaFWDGenBins", {30, -5, -2.0}, "gen. eta bins at forward rapidity for output histograms"};
79-
ConfigurableAxis ConfPhiGenBins{"ConfPhiGenBins", {90, 0, 2.f * M_PI}, "gen. eta bins at forward rapidity for output histograms"};
77+
ConfigurableAxis ConfEtaFWDGenBins{"ConfEtaFWDGenBins", {40, -5.5, -1.5}, "gen. eta bins at forward rapidity for output histograms"};
78+
ConfigurableAxis ConfPhiGenBins{"ConfPhiGenBins", {72, 0, 2.f * M_PI}, "gen. eta bins at forward rapidity for output histograms"};
8079

8180
ConfigurableAxis ConfRelDeltaPtBins{"ConfRelDeltaPtBins", {200, -1.f, +1.f}, "rel. dpt for output histograms"};
82-
ConfigurableAxis ConfDeltaEtaBins{"ConfDeltaEtaBins", {200, -0.1f, +0.1f}, "deta bins for output histograms"};
83-
ConfigurableAxis ConfDeltaPhiBins{"ConfDeltaPhiBins", {200, -0.1f, +0.1f}, "dphi bins for output histograms"};
81+
ConfigurableAxis ConfDeltaEtaBins{"ConfDeltaEtaBins", {100, -0.1f, +0.1f}, "deta bins for output histograms"};
82+
ConfigurableAxis ConfDeltaPhiBins{"ConfDeltaPhiBins", {100, -0.1f, +0.1f}, "dphi bins for output histograms"};
8483

8584
struct : ConfigurableGroup {
8685
std::string prefix = "electroncut_group";

PWGEM/Dilepton/Tasks/eventQC.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ struct eventQC {
251251
fRegistry.add("Track/hNclsITS", "number of ITS clusters", kTH1F, {{8, -0.5, 7.5}}, false);
252252
fRegistry.add("Track/hChi2ITS", "chi2/number of ITS clusters", kTH1F, {{100, 0, 10}}, false);
253253
fRegistry.add("Track/hITSClusterMap", "ITS cluster map", kTH1F, {{128, -0.5, 127.5}}, false);
254-
fRegistry.add("Track/hChi2TOF", "chi2 of TOF", kTH1F, {{100, 0, 10}}, false);
254+
fRegistry.add("Track/hChi2TOF", "chi2 of TOF", kTH2F, {{1000, 0, 10}, {100, 0, 10}}, false);
255255

256256
if (cfgFillPID) {
257257
fRegistry.add("Track/hTPCdEdx", "TPC dE/dx;p_{pv} (GeV/c);TPC dE/dx (a.u.)", kTH2F, {{1000, 0, 10}, {200, 0, 200}}, false);
@@ -290,7 +290,7 @@ struct eventQC {
290290
fRegistry.fill(HIST("Track/hDeltaPin"), track.p(), (track.tpcInnerParam() - track.p()) / track.p());
291291
fRegistry.fill(HIST("Track/hChi2ITS"), track.itsChi2NCl());
292292
fRegistry.fill(HIST("Track/hITSClusterMap"), track.itsClusterMap());
293-
fRegistry.fill(HIST("Track/hChi2TOF"), track.tofChi2());
293+
fRegistry.fill(HIST("Track/hChi2TOF"), track.p(), track.tofChi2());
294294

295295
if (cfgFillPID) {
296296
int nsize = 0;

PWGEM/PhotonMeson/DataModel/gammaTables.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ namespace v0leg
113113
DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //!
114114
DECLARE_SOA_COLUMN(TrackId, trackId, int); //!
115115
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //!
116+
DECLARE_SOA_COLUMN(IsMoved, isMoved, bool); //! moved by drift manager. relevant to TPConly tracks
116117
DECLARE_SOA_COLUMN(Px, px, float); //! Px at SV
117118
DECLARE_SOA_COLUMN(Py, py, float); //! Py at SV
118119
DECLARE_SOA_COLUMN(Pz, pz, float); //! Pz at SV
@@ -167,7 +168,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSob, meanClusterSizeITSob, [](uint32
167168
});
168169
} // namespace v0leg
169170
DECLARE_SOA_TABLE(V0Legs, "AOD", "V0LEG", //!
170-
o2::soa::Index<>, v0leg::CollisionId, v0leg::TrackId, v0leg::Sign,
171+
o2::soa::Index<>, v0leg::CollisionId, v0leg::TrackId, v0leg::Sign, v0leg::IsMoved,
171172
v0leg::Px, v0leg::Py, v0leg::Pz,
172173
track::DcaXY, track::DcaZ,
173174
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,

PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
#include <map>
2222
#include <iterator>
2323
#include <utility>
24+
#include <string>
25+
#include <set>
26+
#include <algorithm>
27+
#include <vector>
28+
#include <unordered_map>
2429

2530
#include "Math/Vector4D.h"
2631

@@ -367,9 +372,9 @@ struct PhotonConversionBuilder {
367372
}
368373

369374
template <typename TTrack, typename TShiftedTrack, typename TKFParticle>
370-
void fillTrackTable(TTrack const& track, TShiftedTrack const& shiftedtrack, TKFParticle const& kfp, float dcaXY, float dcaZ)
375+
void fillTrackTable(TTrack const& track, TShiftedTrack const& shiftedtrack, TKFParticle const& kfp, float dcaXY, float dcaZ, bool isMoved)
371376
{
372-
v0legs(track.collisionId(), track.globalIndex(), track.sign(),
377+
v0legs(track.collisionId(), track.globalIndex(), track.sign(), isMoved,
373378
kfp.GetPx(), kfp.GetPy(), kfp.GetPz(), dcaXY, dcaZ,
374379
track.tpcNClsFindable(), track.tpcNClsFindableMinusFound(), track.tpcNClsFindableMinusCrossedRows(), track.tpcNClsShared(),
375380
track.tpcChi2NCl(), track.tpcInnerParam(), track.tpcSignal(),
@@ -415,10 +420,17 @@ struct PhotonConversionBuilder {
415420
// Calculate DCA with respect to the collision associated to the v0, not individual tracks
416421
gpu::gpustd::array<float, 2> dcaInfo;
417422

423+
bool is_pos_moved = false;
424+
bool is_ele_moved = false;
425+
418426
auto pTrack = getTrackParCov(pos);
419-
if (moveTPCTracks && isTPConlyTrack(pos) && !mVDriftMgr.moveTPCTrack<TBCs, TCollisions>(collision, pos, pTrack)) {
420-
LOGP(error, "failed correction for positive tpc track");
421-
return;
427+
if (moveTPCTracks && isTPConlyTrack(pos)) {
428+
if (mVDriftMgr.moveTPCTrack<TBCs, TCollisions>(collision, pos, pTrack)) {
429+
is_pos_moved = true;
430+
} else {
431+
LOGP(error, "failed correction for positive tpc track");
432+
return;
433+
}
422434
}
423435
auto pTrackC = pTrack;
424436
pTrackC.setPID(o2::track::PID::Electron);
@@ -427,9 +439,13 @@ struct PhotonConversionBuilder {
427439
auto posdcaZ = dcaInfo[1];
428440

429441
auto nTrack = getTrackParCov(ele);
430-
if (moveTPCTracks && isTPConlyTrack(ele) && !mVDriftMgr.moveTPCTrack<TBCs, TCollisions>(collision, ele, nTrack)) {
431-
LOGP(error, "failed correction for negative tpc track");
432-
return;
442+
if (moveTPCTracks && isTPConlyTrack(ele)) {
443+
if (mVDriftMgr.moveTPCTrack<TBCs, TCollisions>(collision, ele, nTrack)) {
444+
is_ele_moved = true;
445+
} else {
446+
LOGP(error, "failed correction for negative tpc track");
447+
return;
448+
}
433449
}
434450
auto nTrackC = nTrack;
435451
nTrackC.setPID(o2::track::PID::Electron);
@@ -669,8 +685,8 @@ struct PhotonConversionBuilder {
669685

670686
v0photonskfcov(gammaKF_PV.GetCovariance(9), gammaKF_PV.GetCovariance(14), gammaKF_PV.GetCovariance(20), gammaKF_PV.GetCovariance(13), gammaKF_PV.GetCovariance(19), gammaKF_PV.GetCovariance(18));
671687

672-
fillTrackTable(pos, pTrack, kfp_pos_DecayVtx, posdcaXY, posdcaZ); // positive leg first
673-
fillTrackTable(ele, nTrack, kfp_ele_DecayVtx, eledcaXY, eledcaZ); // negative leg second
688+
fillTrackTable(pos, pTrack, kfp_pos_DecayVtx, posdcaXY, posdcaZ, is_pos_moved); // positive leg first
689+
fillTrackTable(ele, nTrack, kfp_ele_DecayVtx, eledcaXY, eledcaZ, is_ele_moved); // negative leg second
674690
} // end of fill table
675691
}
676692

PWGEM/PhotonMeson/TableProducer/skimmerGammaConversion.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323

2424
// runme like: o2-analysis-trackselection -b --aod-file ${sourceFile} --aod-writer-json ${writerFile} | o2-analysis-timestamp -b | o2-analysis-trackextension -b | o2-analysis-lf-lambdakzerobuilder -b | o2-analysis-pid-tpc -b | o2-analysis-em-skimmermc -b
2525

26+
#include <memory>
27+
#include <map>
28+
#include <string>
29+
#include <vector>
30+
2631
// todo: remove reduantant information in GammaConversionsInfoTrue
2732
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
2833
#include "PWGEM/PhotonMeson/Utils/gammaConvDefinitions.h"
@@ -179,7 +184,7 @@ struct skimmerGammaConversion {
179184
void fillTrackTable(TTRACK const& theTrack, TKFP const& kfp)
180185
{
181186
v0legs(theTrack.collisionId(),
182-
theTrack.globalIndex(), theTrack.sign(),
187+
theTrack.globalIndex(), theTrack.sign(), false,
183188
kfp.GetPx(), kfp.GetPy(), kfp.GetPz(), theTrack.dcaXY(), theTrack.dcaZ(),
184189
theTrack.tpcNClsFindable(), theTrack.tpcNClsFindableMinusFound(), theTrack.tpcNClsFindableMinusCrossedRows(), theTrack.tpcNClsShared(),
185190
theTrack.tpcChi2NCl(), theTrack.tpcInnerParam(), theTrack.tpcSignal(),

0 commit comments

Comments
 (0)