@@ -362,11 +362,28 @@ struct ITSTPC_Matching {
362362};
363363
364364struct TimeSeriesITSTPC {
365- TimeSeries mTSTPC ; // /< TPC standalone DCAs
366- TimeSeries mTSITSTPC ; // /< ITS-TPC standalone DCAs
367- ITSTPC_Matching mITSTPCAll ; // /< ITS-TPC matching efficiency for ITS standalone + afterburner
368- ITSTPC_Matching mITSTPCStandalone ; // /< ITS-TPC matching efficiency for ITS standalone
369- ITSTPC_Matching mITSTPCAfterburner ; // /< ITS-TPC matchin efficiency fir ITS afterburner
365+ TimeSeries mTSTPC ; // /< TPC standalone DCAs
366+ TimeSeries mTSITSTPC ; // /< ITS-TPC standalone DCAs
367+ ITSTPC_Matching mITSTPCAll ; // /< ITS-TPC matching efficiency for ITS standalone + afterburner
368+ ITSTPC_Matching mITSTPCStandalone ; // /< ITS-TPC matching efficiency for ITS standalone
369+ ITSTPC_Matching mITSTPCAfterburner ; // /< ITS-TPC matchin efficiency fir ITS afterburner
370+ std::vector<float > nPrimVertices; // /< number of primary vertices
371+ std::vector<float > nVertexContributors_Median; // /< number of primary vertices
372+ std::vector<float > nVertexContributors_RMS; // /< number of primary vertices
373+ std::vector<float > vertexX_Median; // /< vertex x position
374+ std::vector<float > vertexY_Median; // /< vertex y position
375+ std::vector<float > vertexZ_Median; // /< vertex z position
376+ std::vector<float > vertexX_RMS; // /< vertex x RMS
377+ std::vector<float > vertexY_RMS; // /< vertex y RMS
378+ std::vector<float > vertexZ_RMS; // /< vertex z RMS
379+ std::vector<float > mDCAr_comb_A_Median ; // /< DCAr for ITS-TPC track - A-side
380+ std::vector<float > mDCAz_comb_A_Median ; // /< DCAz for ITS-TPC track - A-side
381+ std::vector<float > mDCAr_comb_A_RMS ; // /< DCAr RMS for ITS-TPC track - A-side
382+ std::vector<float > mDCAz_comb_A_RMS ; // /< DCAz RMS for ITS-TPC track - A-side
383+ std::vector<float > mDCAr_comb_C_Median ; // /< DCAr for ITS-TPC track - C-side
384+ std::vector<float > mDCAz_comb_C_Median ; // /< DCAz for ITS-TPC track - C-side
385+ std::vector<float > mDCAr_comb_C_RMS ; // /< DCAr RMS for ITS-TPC track - C-side
386+ std::vector<float > mDCAz_comb_C_RMS ; // /< DCAz RMS for ITS-TPC track - C-side
370387
371388 // dump this object to a tree
372389 void dumpToTree (const char * outFileName, const int nHBFPerTF = 32 );
@@ -390,6 +407,8 @@ struct TimeSeriesITSTPC {
390407 bool areSameSize () const { return (mTSTPC .areSameSize () && mTSITSTPC .areSameSize ()); } // /< check if stored currents have same number of entries
391408 bool isEmpty () const { return mTSTPC .isEmpty (); } // /< check if values are empty
392409 size_t getEntries () const { return mTSTPC .getEntries (); } // /< \return returns number of values stored
410+ void fill (const std::vector<float >& vecFrom, std::vector<float >& vecTo, const unsigned int posIndex) { std::copy (vecFrom.begin (), vecFrom.end (), vecTo.begin () + posIndex); }
411+ void insert (std::vector<float >& vec, const std::vector<float >& vecTmp) { vec.insert (vec.begin (), vecTmp.begin (), vecTmp.end ()); }
393412
394413 // / acummulate integrated currents at given index
395414 // / \param posIndex index where data will be copied to
@@ -401,6 +420,25 @@ struct TimeSeriesITSTPC {
401420 mITSTPCAll .fill (posIndex, data.mITSTPCAll );
402421 mITSTPCStandalone .fill (posIndex, data.mITSTPCStandalone );
403422 mITSTPCAfterburner .fill (posIndex, data.mITSTPCAfterburner );
423+ fill (data.mDCAr_comb_A_Median , mDCAr_comb_A_Median , posIndex);
424+ fill (data.mDCAz_comb_A_Median , mDCAz_comb_A_Median , posIndex);
425+ fill (data.mDCAr_comb_A_RMS , mDCAr_comb_A_RMS , posIndex);
426+ fill (data.mDCAz_comb_A_RMS , mDCAz_comb_A_RMS , posIndex);
427+ fill (data.mDCAr_comb_C_Median , mDCAr_comb_C_Median , posIndex);
428+ fill (data.mDCAz_comb_C_Median , mDCAz_comb_C_Median , posIndex);
429+ fill (data.mDCAr_comb_C_RMS , mDCAr_comb_C_RMS , posIndex);
430+ fill (data.mDCAz_comb_C_RMS , mDCAz_comb_C_RMS , posIndex);
431+
432+ const int iTF = posIndex / mTSTPC .getNBins ();
433+ nPrimVertices[iTF] = data.nPrimVertices .front ();
434+ nVertexContributors_Median[iTF] = data.nVertexContributors_Median .front ();
435+ nVertexContributors_RMS[iTF] = data.nVertexContributors_RMS .front ();
436+ vertexX_Median[iTF] = data.vertexX_Median .front ();
437+ vertexY_Median[iTF] = data.vertexY_Median .front ();
438+ vertexZ_Median[iTF] = data.vertexZ_Median .front ();
439+ vertexX_RMS[iTF] = data.vertexX_RMS .front ();
440+ vertexY_RMS[iTF] = data.vertexY_RMS .front ();
441+ vertexZ_RMS[iTF] = data.vertexZ_RMS .front ();
404442 }
405443
406444 // / \param nDummyValues number of empty values which are inserted at the beginning of the accumulated integrated currents
@@ -411,6 +449,27 @@ struct TimeSeriesITSTPC {
411449 mITSTPCAll .insert (nDummyValues);
412450 mITSTPCStandalone .insert (nDummyValues);
413451 mITSTPCAfterburner .insert (nDummyValues);
452+ std::vector<float > vecTmp (nDummyValues, 0 );
453+ insert (mDCAr_comb_A_Median , vecTmp);
454+ insert (mDCAz_comb_A_Median , vecTmp);
455+ insert (mDCAr_comb_A_RMS , vecTmp);
456+ insert (mDCAz_comb_A_RMS , vecTmp);
457+ insert (mDCAr_comb_C_Median , vecTmp);
458+ insert (mDCAz_comb_C_Median , vecTmp);
459+ insert (mDCAr_comb_C_RMS , vecTmp);
460+ insert (mDCAz_comb_C_RMS , vecTmp);
461+
462+ const int nDummyValuesVtx = nDummyValues / mTSTPC .getNBins ();
463+ std::vector<float > vecTmpVtx (nDummyValuesVtx, 0 );
464+ insert (nPrimVertices, vecTmp);
465+ insert (nVertexContributors_Median, vecTmp);
466+ insert (nVertexContributors_RMS, vecTmp);
467+ insert (vertexX_Median, vecTmp);
468+ insert (vertexY_Median, vecTmp);
469+ insert (vertexZ_Median, vecTmp);
470+ insert (vertexX_RMS, vecTmp);
471+ insert (vertexY_RMS, vecTmp);
472+ insert (vertexZ_RMS, vecTmp);
414473 }
415474
416475 // / resize buffer for accumulated currents
@@ -421,9 +480,28 @@ struct TimeSeriesITSTPC {
421480 mITSTPCAll .resize (nTotal);
422481 mITSTPCStandalone .resize (nTotal);
423482 mITSTPCAfterburner .resize (nTotal);
424- }
425-
426- ClassDefNV (TimeSeriesITSTPC, 1 );
483+ mDCAr_comb_A_Median .resize (nTotal);
484+ mDCAz_comb_A_Median .resize (nTotal);
485+ mDCAr_comb_A_RMS .resize (nTotal);
486+ mDCAz_comb_A_RMS .resize (nTotal);
487+ mDCAr_comb_C_Median .resize (nTotal);
488+ mDCAz_comb_C_Median .resize (nTotal);
489+ mDCAr_comb_C_RMS .resize (nTotal);
490+ mDCAz_comb_C_RMS .resize (nTotal);
491+
492+ const int nTotalVtx = nTotal / mTSTPC .getNBins ();
493+ nPrimVertices.resize (nTotalVtx);
494+ nVertexContributors_Median.resize (nTotalVtx);
495+ nVertexContributors_RMS.resize (nTotalVtx);
496+ vertexX_Median.resize (nTotalVtx);
497+ vertexY_Median.resize (nTotalVtx);
498+ vertexZ_Median.resize (nTotalVtx);
499+ vertexX_RMS.resize (nTotalVtx);
500+ vertexY_RMS.resize (nTotalVtx);
501+ vertexZ_RMS.resize (nTotalVtx);
502+ }
503+
504+ ClassDefNV (TimeSeriesITSTPC, 2 );
427505};
428506
429507} // end namespace tpc
0 commit comments