Skip to content

Commit 173322d

Browse files
committed
Use MeanVertex to apply DCA veto for ITS V0s check
1 parent 285a82e commit 173322d

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

Modules/ITS/include/ITS/ITSTrackTask.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "QualityControl/TaskInterface.h"
2121
#include <DataFormatsITSMFT/TopologyDictionary.h>
22+
#include <DataFormatsCalibration/MeanVertexObject.h>
2223
#include <ITSBase/GeometryTGeo.h>
2324
#include <Framework/TimingInfo.h>
2425
#include <TLine.h>
@@ -125,7 +126,8 @@ class ITSTrackTask : public TaskInterface
125126
double mCoslBins[25]; // y bins for cos(lambda) plot
126127
double ptBins[141]; // pt bins
127128

128-
o2::itsmft::TopologyDictionary* mDict;
129+
o2::itsmft::TopologyDictionary* mDict = nullptr;
130+
o2::dataformats::MeanVertexObject* mMeanVertex = nullptr;
129131

130132
private:
131133
// analysis for its-only residual

Modules/ITS/src/ITSTrackTask.cxx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
112112
{
113113

114114
ILOG(Debug, Devel) << "START DOING QC General" << ENDM;
115-
115+
static std::map<std::string, std::string> metadata;
116116
if (mTimestamp == -1) { // get dict from ccdb
117117
mTimestamp = std::stol(o2::quality_control_modules::common::getFromConfig<std::string>(mCustomParameters, "dicttimestamp", "0"));
118118
long int ts = mTimestamp ? mTimestamp : ctx.services().get<o2::framework::TimingInfo>().creation;
119119
ILOG(Debug, Devel) << "Getting dictionary from ccdb - timestamp: " << ts << ENDM;
120120

121-
std::map<std::string, std::string> metadata;
122121
mDict = TaskInterface::retrieveConditionAny<o2::itsmft::TopologyDictionary>("ITS/Calib/ClusterDictionary", metadata, ts);
123122
ILOG(Debug, Devel) << "Dictionary size: " << mDict->getSize() << ENDM;
124123

@@ -132,6 +131,10 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
132131
ILOG(Debug, Devel) << "Loaded new instance of mGeom (for ITS alignment monitoring)" << ENDM;
133132
}
134133
}
134+
if (mInvMasses) {
135+
long ts = mTimestamp > 0 ? mTimestamp : ctx.services().get<o2::framework::TimingInfo>().creation;
136+
mMeanVertex = TaskInterface::retrieveConditionAny<o2::dataformats::MeanVertexObject>("GLO/Calib/MeanVertex", metadata, ts);
137+
}
135138

136139
auto trackArr = ctx.inputs().get<gsl::span<o2::its::TrackITS>>("tracks");
137140
auto trackRofArr = ctx.inputs().get<gsl::span<o2::itsmft::ROFRecord>>("rofs");
@@ -214,7 +217,6 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
214217
ft.setMinRelChi2Change(0.9);
215218
ft.setMaxChi2(10);
216219
// prepare variables for v0
217-
float vx = 0, vy = 0, vz = 0;
218220
float dca[2]{ 0., 0. };
219221
float bz = 5.0;
220222
// loop on tracks per ROF
@@ -371,15 +373,15 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
371373
if (mInvMasses == 1) {
372374
if (track.getSign() < 0) // choose only positive tracks
373375
continue;
374-
track.getImpactParams(vx, vy, vz, bz, dca);
376+
track.getImpactParams(mMeanVertex->getX(), mMeanVertex->getY(), mMeanVertex->getZ(), bz, dca);
375377
if ((track.getNumberOfClusters() < 6) || (abs(track.getTgl()) > 1.5) || (abs(dca[0]) < 0.06)) // conditions for the track acceptance
376378
continue;
377379

378380
for (int intrack = start; intrack < end; intrack++) { // goes through the tracks one more time
379381
auto& ntrack = trackArr[intrack];
380382
if (ntrack.getSign() > 0) // choose only negative tracks
381383
continue;
382-
ntrack.getImpactParams(vx, vy, vz, bz, dca);
384+
ntrack.getImpactParams(mMeanVertex->getX(), mMeanVertex->getY(), mMeanVertex->getZ(), bz, dca);
383385
if ((ntrack.getNumberOfClusters() < 6) || (abs(ntrack.getTgl()) > 1.5) || (abs(dca[0]) < 0.06)) // conditions for the track acceptance
384386
continue;
385387

0 commit comments

Comments
 (0)