@@ -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