@@ -133,9 +133,9 @@ void TPCTrackStudySpec::process(o2::globaltracking::RecoContainer& recoData)
133133{
134134 static long counter = -1 ;
135135 counter++;
136- if (mUseMC ) { // extract MC tracks
137- auto prop = o2::base::Propagator::Instance ();
136+ auto prop = o2::base::Propagator::Instance ();
138137
138+ if (mUseMC ) { // extract MC tracks
139139 const o2::steer::DigitizationContext* digCont = nullptr ;
140140 if (!mcReader.initFromDigitContext (" collisioncontext.root" )) {
141141 throw std::invalid_argument (" initialization of MCKinematicsReader failed" );
@@ -155,6 +155,8 @@ void TPCTrackStudySpec::process(o2::globaltracking::RecoContainer& recoData)
155155 float tpcTBBias = mTPCVDriftHelper .getVDriftObject ().getTimeOffset () / (8 * o2::constants::lhc::LHCBunchSpacingMUS);
156156 float RRef2 = mRRef * mRRef ;
157157 const o2::MCTrack* mcTrack = nullptr ;
158+ std::vector<short > clSector, clRow;
159+ std::vector<float > clIniX, clIniY, clIniZ, clMovX, clMovY, clMovZ;
158160 for (size_t itr = 0 ; itr < mTPCTracksArray .size (); itr++) {
159161 auto tr = mTPCTracksArray [itr]; // create track copy
160162
@@ -241,13 +243,50 @@ void TPCTrackStudySpec::process(o2::globaltracking::RecoContainer& recoData)
241243 } else if (tr.hasBothSidesClusters ()) {
242244 dz = 0 ; // CE crossing tracks should not be shifted
243245 }
246+ // extract cluster info
247+ clSector.clear ();
248+ clRow.clear ();
249+ clIniX.clear ();
250+ clIniY.clear ();
251+ clIniZ.clear ();
252+ clMovX.clear ();
253+ clMovY.clear ();
254+ clMovZ.clear ();
255+ int count = tr.getNClusters ();
256+ const auto * corrMap = mTPCCorrMapsLoader .getCorrMap ();
257+ const o2::tpc::ClusterNative* cl = nullptr ;
258+ for (int ic = count; ic--;) {
259+ uint8_t sector, row;
260+ cl = &tr.getCluster (mTPCTrackClusIdx , ic, *mTPCClusterIdxStruct , sector, row);
261+ clSector.push_back (sector);
262+ clRow.push_back (row);
263+ float x, y, z;
264+ corrMap->Transform (sector, row, cl->getPad (), cl->getTime (), x, y, z, tr.getTime0 ()); // nominal time of the track
265+ clIniX.push_back (x);
266+ clIniY.push_back (y);
267+ clIniZ.push_back (z);
268+ corrMap->Transform (sector, row, cl->getPad (), cl->getTime (), x, y, z, bcTB); // shifted time of the track
269+ clMovX.push_back (x);
270+ clMovY.push_back (y);
271+ clMovZ.push_back (z);
272+ }
273+
244274 // store results
245275 (*mDBGOut ) << " tpc"
246276 << " iniTrack=" << tr
247- << " intTrackRef =" << trf
277+ << " iniTrackRef =" << trf
248278 << " movTrackRef=" << trackRefit
249279 << " mcTrack=" << mctrO2
250- << " imposedTB=" << bcTB << " dz=" << dz << " \n " ;
280+ << " imposedTB=" << bcTB << " dz=" << dz
281+ << " clSector=" << clSector
282+ << " clRow=" << clRow
283+ << " clIniX=" << clIniX
284+ << " clIniY=" << clIniY
285+ << " clIniZ=" << clIniZ
286+ << " clMovX=" << clMovX
287+ << " clMovY=" << clMovY
288+ << " clMovZ=" << clMovZ
289+ << " \n " ;
251290 }
252291 }
253292}
0 commit comments