@@ -164,9 +164,10 @@ void EveWorkflowHelper::selectTracks(const CalibObjectsConst* calib,
164164 t0 *= this ->mTPCBin2MUS ;
165165 terr *= this ->mTPCBin2MUS ;
166166 } else if constexpr (isITSTrack<decltype (_tr)>()) {
167- t0 += 0 .5f * this ->mITSROFrameLengthMUS ; // ITS time is supplied in \mus as beginning of ROF
168- terr *= this ->mITSROFrameLengthMUS ; // error is supplied as a half-ROF duration, convert to \mus
169- } else if constexpr (isMFTTrack<decltype (_tr)>()) { // Same for MFT
167+ t0 += 0 .5f * this ->mITSROFrameLengthMUS ; // ITS time is supplied in \mus as beginning of ROF
168+ terr *= this ->mITSROFrameLengthMUS ; // error is supplied as a half-ROF duration, convert to \mus
169+ } else if constexpr (isMFTTrack<decltype (_tr)>()) {
170+ // Same for MFT
170171 t0 += 0 .5f * this ->mMFTROFrameLengthMUS ;
171172 terr *= this ->mMFTROFrameLengthMUS ;
172173 } else if constexpr (!(isMCHTrack<decltype (_tr)>() || isMIDTrack<decltype (_tr)>() ||
@@ -264,7 +265,8 @@ void EveWorkflowHelper::selectTracks(const CalibObjectsConst* calib,
264265 if (gid.getSource () == o2::dataformats::GlobalTrackID::TPC && checkTPCDCA) {
265266 const auto & tpcTr = mRecoCont ->getTPCTrack (gid);
266267 o2::track::TrackPar trc{tpcTr};
267- if (!tpcTr.hasBothSidesClusters ()) { // need to correct track Z with this vertex time
268+ if (!tpcTr.hasBothSidesClusters ()) {
269+ // need to correct track Z with this vertex time
268270 float dz = (tpcTr.getTime0 () * mTPCTimeBins2MUS -
269271 (pv.getTimeStamp ().getTimeStamp () + mTPCVDrift ->getTimeOffset ())) *
270272 mTPCVDrift ->getVDrift ();
@@ -427,10 +429,12 @@ void EveWorkflowHelper::draw(std::size_t primaryVertexIdx, bool sortTracks)
427429 break ;
428430 case GID::TPC: {
429431 float dz = 0 .f ;
430- if (conf.PVMode ) { // for TPC the nominal time (center of the bracket) is stored but in the PVMode we correct it by the PV time
432+ if (conf.PVMode ) {
433+ // for TPC the nominal time (center of the bracket) is stored but in the PVMode we correct it by the PV time
431434 tim = pvTime;
432435 const auto & tpcTr = mRecoCont ->getTPCTrack (gid);
433- if (!tpcTr.hasBothSidesClusters ()) { // need to correct track Z with this vertex time
436+ if (!tpcTr.hasBothSidesClusters ()) {
437+ // need to correct track Z with this vertex time
434438 float dz = (tpcTr.getTime0 () * mTPCTimeBins2MUS - (pvTime + mTPCVDrift ->getTimeOffset ())) *
435439 mTPCVDrift ->getVDrift ();
436440 if (tpcTr.hasCSideClustersOnly ()) {
@@ -513,7 +517,7 @@ void EveWorkflowHelper::draw(std::size_t primaryVertexIdx, bool sortTracks)
513517}
514518
515519void EveWorkflowHelper::save (const std::string& jsonPath, const std::string& ext, int numberOfFiles,
516- const std::string& receiverHostname, int receiverPort, bool useOnlyFiles,
520+ const std::string& receiverHostname, int receiverPort, int receiverTimeout, bool useOnlyFiles,
517521 bool useOnlySockets)
518522{
519523 mEvent .setEveVersion (o2_eve_version);
@@ -522,6 +526,7 @@ void EveWorkflowHelper::save(const std::string& jsonPath, const std::string& ext
522526
523527 VisualisationEventSerializer::getInstance (ext)->toFile (mEvent , Location ({.fileName = producer.newFileName (),
524528 .port = receiverPort,
529+ .timeout = receiverTimeout,
525530 .host = receiverHostname,
526531 .toFile = !useOnlySockets,
527532 .toSocket = !useOnlyFiles}));
@@ -550,7 +555,8 @@ std::vector<PNT>
550555 auto tp = trc;
551556 float dxmin = std::abs (xMin - tp.getX ()), dxmax = std::abs (xMax - tp.getX ());
552557
553- if (dxmin > dxmax) { // start from closest end
558+ if (dxmin > dxmax) {
559+ // start from closest end
554560 std::swap (xMin, xMax);
555561 dx = -dx;
556562 }
@@ -763,7 +769,7 @@ void EveWorkflowHelper::drawTPCTRD(GID gid, float trackTime, GID::Source source)
763769 const auto & tpcTrdTrack = mRecoCont ->getTPCTRDTrack <o2::trd::TrackTRD>(gid);
764770 addTrackToEvent (tpcTrdTrack, gid, trackTime, 0 ., source);
765771 drawTPCClusters (tpcTrdTrack.getRefGlobalTrackId (), trackTime * mMUS2TPCTimeBins );
766- drawTRDClusters (tpcTrdTrack); // tracktime
772+ drawTRDClusters (tpcTrdTrack); // tracktime
767773}
768774
769775void EveWorkflowHelper::drawITSTPCTRD (GID gid, float trackTime, GID::Source source)
@@ -799,7 +805,7 @@ void EveWorkflowHelper::drawTPCTOF(GID gid, float trackTime)
799805 const auto & match = mRecoCont ->getTPCTOFMatch (gid.getIndex ());
800806 addTrackToEvent (trTPCTOF, gid, trackTime, 0 );
801807 drawTPCClusters (match.getTrackRef (), trackTime * mMUS2TPCTimeBins );
802- drawTOFClusters (gid); // trackTime
808+ drawTOFClusters (gid); // trackTime
803809}
804810
805811void EveWorkflowHelper::drawMFTMCH (GID gid, float trackTime)
@@ -978,7 +984,8 @@ void EveWorkflowHelper::drawTOFClusters(GID gid)
978984
979985void EveWorkflowHelper::drawITSClusters (GID gid) // float trackTime
980986{
981- if (gid.getSource () == GID::ITS) { // this is for for full standalone tracks
987+ if (gid.getSource () == GID::ITS) {
988+ // this is for for full standalone tracks
982989 const auto & trc = mRecoCont ->getITSTrack (gid);
983990 auto refs = mRecoCont ->getITSTracksClusterRefs ();
984991 int ncl = trc.getNumberOfClusters ();
@@ -989,7 +996,8 @@ void EveWorkflowHelper::drawITSClusters(GID gid) // float trackTime
989996 float xyz[] = {glo.X (), glo.Y (), glo.Z ()};
990997 drawPoint (xyz); // trackTime;
991998 }
992- } else if (gid.getSource () == GID::ITSAB) { // this is for ITS tracklets from ITS-TPC afterburner
999+ } else if (gid.getSource () == GID::ITSAB) {
1000+ // this is for ITS tracklets from ITS-TPC afterburner
9931001 const auto & trc = mRecoCont ->getITSABRef (gid);
9941002 const auto & refs = mRecoCont ->getITSABClusterRefs ();
9951003 int ncl = trc.getNClusters ();
@@ -1049,9 +1057,10 @@ void EveWorkflowHelper::drawTPC(GID gid, float trackTime, float dz)
10491057 }
10501058
10511059 addTrackToEvent (tr, gid, trackTime, dz, GID::TPC);
1052- float clTime0 = EveConfParam::Instance ().PVMode ? trackTime * mMUS2TPCTimeBins
1053- : -2e9 ; // in PVMode use supplied real time converted to TB, otherwise pass dummy time to use tpcTrack.getTime0
1054- drawTPCClusters (gid, clTime0); // trackTime
1060+ float clTime0 = EveConfParam::Instance ().PVMode
1061+ ? trackTime * mMUS2TPCTimeBins
1062+ : -2e9 ; // in PVMode use supplied real time converted to TB, otherwise pass dummy time to use tpcTrack.getTime0
1063+ drawTPCClusters (gid, clTime0); // trackTime
10551064}
10561065
10571066void EveWorkflowHelper::drawITS (GID gid, float trackTime)
@@ -1198,16 +1207,18 @@ EveWorkflowHelper::EveWorkflowHelper()
11981207 mTPCBin2MUS = elParams.ZbinWidth ;
11991208 const auto grp = o2::base::GRPGeomHelper::instance ().getGRPECS ();
12001209 const auto & alpParamsITS = o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>::Instance ();
1201- mITSROFrameLengthMUS = grp->isDetContinuousReadOut (o2::detectors::DetID::ITS) ? alpParamsITS.roFrameLengthInBC *
1202- o2::constants::lhc::LHCBunchSpacingMUS
1203- : alpParamsITS.roFrameLengthTrig *
1204- 1 .e -3 ;
1210+ mITSROFrameLengthMUS = grp->isDetContinuousReadOut (o2::detectors::DetID::ITS)
1211+ ? alpParamsITS.roFrameLengthInBC *
1212+ o2::constants::lhc::LHCBunchSpacingMUS
1213+ : alpParamsITS.roFrameLengthTrig *
1214+ 1 .e -3 ;
12051215
12061216 const auto & alpParamsMFT = o2::itsmft::DPLAlpideParam<o2::detectors::DetID::MFT>::Instance ();
1207- mMFTROFrameLengthMUS = grp->isDetContinuousReadOut (o2::detectors::DetID::MFT) ? alpParamsMFT.roFrameLengthInBC *
1208- o2::constants::lhc::LHCBunchSpacingMUS
1209- : alpParamsMFT.roFrameLengthTrig *
1210- 1 .e -3 ;
1217+ mMFTROFrameLengthMUS = grp->isDetContinuousReadOut (o2::detectors::DetID::MFT)
1218+ ? alpParamsMFT.roFrameLengthInBC *
1219+ o2::constants::lhc::LHCBunchSpacingMUS
1220+ : alpParamsMFT.roFrameLengthTrig *
1221+ 1 .e -3 ;
12111222
12121223 mPVParams = &o2::vertexing::PVertexerParams::Instance ();
12131224
0 commit comments