@@ -1784,7 +1784,6 @@ struct strangenesstofpid {
17841784 v0TofInfo v0tof = calculateTofInfoV0 (collisions, V0 .collisionId (), V0 , pTof, nTof);
17851785
17861786 if (doNSigmas) {
1787- LOG (info) << collisionV0.bcId () << " " << collisionV0.globalIndex () << " " << collisionV0.posX () << " " << collisionV0.posY () << " " << collisionV0.posZ () << " ; TOF K0s pos: " << v0tof.nSigmaPositiveK0ShortPi << " = " << v0tof.deltaTimePositiveK0ShortPi << " - " << hMeanPosK0Pi->Interpolate (V0 .p ()) << " / " << hSigmaPosK0Pi->Interpolate (V0 .p ()) << " ; TOF K0s neg: " << v0tof.nSigmaNegativeK0ShortPi << " = " << v0tof.deltaTimeNegativeK0ShortPi << " - " << hMeanNegK0Pi->Interpolate (V0 .p ()) << " / " << hSigmaNegK0Pi->Interpolate (V0 .p ()) << " ; " << pTof.tofSignal << " - " << pTof.tofEvTime << " - " << v0tof.timeK0Short << " + " << v0tof.timePositivePi ;
17881787 v0tofnsigmas (
17891788 v0tof.nSigmaPositiveLambdaPr , v0tof.nSigmaNegativeLambdaPi ,
17901789 v0tof.nSigmaNegativeLambdaPr , v0tof.nSigmaPositiveLambdaPi ,
@@ -1993,24 +1992,19 @@ struct strangenesstofpid {
19931992 pTof.tpcNSigmaPr = pTra.tpcNSigmaPr ();
19941993 if (tofIndices[V0 .posTrackExtraId ()] >= 0 && collision.eventTime () > -1e+5 ) {
19951994 auto pTofExt = dauTrackTOFPIDs.rawIteratorAt (tofIndices[V0 .posTrackExtraId ()]);
1996-
1997- // if (pTofExt.straCollisionId() >= 0) {
1998- // extract BC for BC time shift
1999- // auto collisionTrack = collisions.rawIteratorAt(pTofExt.straCollisionId());
2000- const int64_t deltaBc = pTofExt.globalBC () - collision.globalBC ();
2001- const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2002- histos.fill (HIST (" hV0PositiveBCShift" ), deltaTimeBc);
2003- deltaTimeBcPos = deltaTimeBc;
2004-
2005- // assign variables
2006- // pTof.collisionId = pTofExt.straCollisionId();
2007- pTof.tofExpMom = pTofExt.tofExpMom ();
2008- pTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : pTofExt.tofEvTime ();
2009- pTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : pTofExt.tofEvTimeErr ();
2010- // pTof.tofEvTimeErr = pTofExt.tofEvTimeErr();
2011- pTof.tofSignal = pTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2012- pTof.length = pTofExt.length ();
2013- // }
1995+ // extract BC for BC time shift
1996+ const int64_t deltaBc = pTofExt.globalBC () - collision.globalBC ();
1997+ const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
1998+ histos.fill (HIST (" hV0PositiveBCShift" ), deltaTimeBc);
1999+ deltaTimeBcPos = deltaTimeBc;
2000+
2001+ // assign variables
2002+ pTof.tofExpMom = pTofExt.tofExpMom ();
2003+ pTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : pTofExt.tofEvTime ();
2004+ pTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : pTofExt.tofEvTimeErr ();
2005+ // pTof.tofEvTimeErr = pTofExt.tofEvTimeErr();
2006+ pTof.tofSignal = pTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2007+ pTof.length = pTofExt.length ();
20142008 }
20152009
20162010 nTof.hasITS = nTra.hasITS ();
@@ -2020,24 +2014,19 @@ struct strangenesstofpid {
20202014 nTof.tpcNSigmaPr = nTra.tpcNSigmaPr ();
20212015 if (tofIndices[V0 .negTrackExtraId ()] >= 0 && collision.eventTime () > -1e+5 ) {
20222016 auto nTofExt = dauTrackTOFPIDs.rawIteratorAt (tofIndices[V0 .negTrackExtraId ()]);
2023-
2024- // if (nTofExt.straCollisionId() >= 0) {
2025- // extract BC for BC time shift
2026- // auto collisionTrack = collisions.rawIteratorAt(nTofExt.straCollisionId());
2027- const int64_t deltaBc = nTofExt.globalBC () - collision.globalBC ();
2028- const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2029- histos.fill (HIST (" hV0NegativeBCShift" ), deltaTimeBc);
2030- deltaTimeBcNeg = deltaTimeBc;
2031-
2032- // assign variables
2033- // nTof.collisionId = nTofExt.straCollisionId();
2034- nTof.tofExpMom = nTofExt.tofExpMom ();
2035- nTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : nTofExt.tofEvTime ();
2036- nTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : nTofExt.tofEvTimeErr ();
2037- // nTof.tofEvTimeErr = nTofExt.tofEvTimeErr();
2038- nTof.tofSignal = nTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2039- nTof.length = nTofExt.length ();
2040- // }
2017+ // extract BC for BC time shift
2018+ const int64_t deltaBc = nTofExt.globalBC () - collision.globalBC ();
2019+ const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2020+ histos.fill (HIST (" hV0NegativeBCShift" ), deltaTimeBc);
2021+ deltaTimeBcNeg = deltaTimeBc;
2022+
2023+ // assign variables
2024+ nTof.tofExpMom = nTofExt.tofExpMom ();
2025+ nTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : nTofExt.tofEvTime ();
2026+ nTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : nTofExt.tofEvTimeErr ();
2027+ // nTof.tofEvTimeErr = nTofExt.tofEvTimeErr();
2028+ nTof.tofSignal = nTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2029+ nTof.length = nTofExt.length ();
20412030 }
20422031 if (pTof.hasTOF ) {
20432032 histos.fill (HIST (" hTOFSignalPositive" ), pTof.tofSignal );
@@ -2052,7 +2041,6 @@ struct strangenesstofpid {
20522041 v0TofInfo v0tof = calculateTofInfoV0 (collisions, V0 .straCollisionId (), V0 , pTof, nTof);
20532042
20542043 if (doNSigmas) {
2055- LOG (info) << collision.eventTime () << " " << collision.globalIndex () << " " << collision.posX () << " " << collision.posY () << " " << collision.posZ () << " ; TOF K0s pos: " << v0tof.nSigmaPositiveK0ShortPi << " = " << v0tof.deltaTimePositiveK0ShortPi << " - " << hMeanPosK0Pi->Interpolate (V0 .p ()) << " / " << hSigmaPosK0Pi->Interpolate (V0 .p ()) << " ; TOF K0s neg: " << v0tof.nSigmaNegativeK0ShortPi << " = " << v0tof.deltaTimeNegativeK0ShortPi << " - " << hMeanNegK0Pi->Interpolate (V0 .p ()) << " / " << hSigmaNegK0Pi->Interpolate (V0 .p ()) << " ; " << pTof.tofSignal << " ( " << (pTof.collisionId >= 0 ? (dauTrackTOFPIDs.rawIteratorAt (tofIndices[V0 .posTrackExtraId ()]).tofSignal ()) : 0 ) << " + " << deltaTimeBcPos << " " << pTof.collisionId << " " << (pTof.collisionId >= 0 ? collisions.rawIteratorAt (pTof.collisionId ).globalBC () : -1 ) << " - " << collision.globalBC ()<< " " << V0 .posTrackExtraId () << " ) " << " - " << pTof.tofEvTime << " - " << v0tof.timeK0Short << " + " << v0tof.timePositivePi ;
20562044 v0tofnsigmas (
20572045 v0tof.nSigmaPositiveLambdaPr , v0tof.nSigmaNegativeLambdaPi ,
20582046 v0tof.nSigmaNegativeLambdaPr , v0tof.nSigmaPositiveLambdaPi ,
@@ -2091,23 +2079,18 @@ struct strangenesstofpid {
20912079 pTof.tpcNSigmaPr = pTra.tpcNSigmaPr ();
20922080 if (tofIndices[cascade.posTrackExtraId ()] >= 0 && collision.eventTime () > -1e+5 ) {
20932081 auto pTofExt = dauTrackTOFPIDs.rawIteratorAt (tofIndices[cascade.posTrackExtraId ()]);
2094-
2095- // if (pTofExt.straCollisionId() >= 0) {
2096- // extract BC for BC time shift
2097- // auto collisionTrack = collisions.rawIteratorAt(pTofExt.straCollisionId());
2098- const int64_t deltaBc = pTofExt.globalBC () - collision.globalBC ();
2099- const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2100- histos.fill (HIST (" hCascadePositiveBCShift" ), deltaTimeBc);
2101- histos.fill (HIST (" h2dTOFSignalCascadePositive" ), pTof.tofSignal , deltaTimeBc);
2102-
2103- // pTof.collisionId = pTofExt.straCollisionId();
2104- pTof.tofExpMom = pTofExt.tofExpMom ();
2105- pTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : pTofExt.tofEvTime ();
2106- pTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : pTofExt.tofEvTimeErr ();
2107- // pTof.tofEvTimeErr = pTofExt.tofEvTimeErr();
2108- pTof.tofSignal = pTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2109- pTof.length = pTofExt.length ();
2110- // }
2082+ // extract BC for BC time shift
2083+ const int64_t deltaBc = pTofExt.globalBC () - collision.globalBC ();
2084+ const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2085+ histos.fill (HIST (" hCascadePositiveBCShift" ), deltaTimeBc);
2086+ histos.fill (HIST (" h2dTOFSignalCascadePositive" ), pTof.tofSignal , deltaTimeBc);
2087+
2088+ pTof.tofExpMom = pTofExt.tofExpMom ();
2089+ pTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : pTofExt.tofEvTime ();
2090+ pTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : pTofExt.tofEvTimeErr ();
2091+ // pTof.tofEvTimeErr = pTofExt.tofEvTimeErr();
2092+ pTof.tofSignal = pTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2093+ pTof.length = pTofExt.length ();
21112094 }
21122095
21132096 nTof.hasITS = nTra.hasITS ();
@@ -2117,23 +2100,18 @@ struct strangenesstofpid {
21172100 nTof.tpcNSigmaPr = nTra.tpcNSigmaPr ();
21182101 if (tofIndices[cascade.negTrackExtraId ()] >= 0 && collision.eventTime () > -1e+5 ) {
21192102 auto nTofExt = dauTrackTOFPIDs.rawIteratorAt (tofIndices[cascade.negTrackExtraId ()]);
2120-
2121- // if (nTofExt.straCollisionId() >= 0) {
2122- // extract BC for BC time shift
2123- // auto collisionTrack = collisions.rawIteratorAt(nTofExt.straCollisionId());
2124- const int64_t deltaBc = nTofExt.globalBC () - collision.globalBC ();
2125- const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2126- histos.fill (HIST (" hCascadeNegativeBCShift" ), deltaTimeBc);
2127- histos.fill (HIST (" h2dTOFSignalCascadeNegative" ), nTof.tofSignal , deltaTimeBc);
2128-
2129- // nTof.collisionId = nTofExt.straCollisionId();
2130- nTof.tofExpMom = nTofExt.tofExpMom ();
2131- nTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : nTofExt.tofEvTime ();
2132- nTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTime () : nTofExt.tofEvTimeErr ();
2133- // nTof.tofEvTimeErr = nTofExt.tofEvTimeErr();
2134- nTof.tofSignal = nTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2135- nTof.length = nTofExt.length ();
2136- // }
2103+ // extract BC for BC time shift
2104+ const int64_t deltaBc = nTofExt.globalBC () - collision.globalBC ();
2105+ const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2106+ histos.fill (HIST (" hCascadeNegativeBCShift" ), deltaTimeBc);
2107+ histos.fill (HIST (" h2dTOFSignalCascadeNegative" ), nTof.tofSignal , deltaTimeBc);
2108+
2109+ nTof.tofExpMom = nTofExt.tofExpMom ();
2110+ nTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : nTofExt.tofEvTime ();
2111+ nTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTime () : nTofExt.tofEvTimeErr ();
2112+ // nTof.tofEvTimeErr = nTofExt.tofEvTimeErr();
2113+ nTof.tofSignal = nTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2114+ nTof.length = nTofExt.length ();
21372115 }
21382116
21392117 bTof.hasITS = bTra.hasITS ();
@@ -2143,23 +2121,18 @@ struct strangenesstofpid {
21432121 bTof.tpcNSigmaKa = bTra.tpcNSigmaKa ();
21442122 if (tofIndices[cascade.bachTrackExtraId ()] >= 0 && collision.eventTime () > -1e+5 ) {
21452123 auto bTofExt = dauTrackTOFPIDs.rawIteratorAt (tofIndices[cascade.bachTrackExtraId ()]);
2146-
2147- // if (bTofExt.straCollisionId() >= 0) {
2148- // extract BC for BC time shift
2149- // auto collisionTrack = collisions.rawIteratorAt(bTofExt.straCollisionId());
2150- const int64_t deltaBc = bTofExt.globalBC () - collision.globalBC ();
2151- const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2152- histos.fill (HIST (" hCascadeBachelorBCShift" ), deltaTimeBc);
2153- histos.fill (HIST (" h2dTOFSignalCascadeBachelor" ), bTof.tofSignal , deltaTimeBc);
2154-
2155- // bTof.collisionId = bTofExt.straCollisionId();
2156- bTof.tofExpMom = bTofExt.tofExpMom ();
2157- bTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : bTofExt.tofEvTime ();
2158- bTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : bTofExt.tofEvTimeErr ();
2159- // bTof.tofEvTimeErr = bTofExt.tofEvTimeErr();
2160- bTof.tofSignal = bTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2161- bTof.length = bTofExt.length ();
2162- // }
2124+ // extract BC for BC time shift
2125+ const int64_t deltaBc = bTofExt.globalBC () - collision.globalBC ();
2126+ const double deltaTimeBc = o2::constants::lhc::LHCBunchSpacingNS * deltaBc * 1000 .0f ;
2127+ histos.fill (HIST (" hCascadeBachelorBCShift" ), deltaTimeBc);
2128+ histos.fill (HIST (" h2dTOFSignalCascadeBachelor" ), bTof.tofSignal , deltaTimeBc);
2129+
2130+ bTof.tofExpMom = bTofExt.tofExpMom ();
2131+ bTof.tofEvTime = reassociateTracks.value ? collision.eventTime () : bTofExt.tofEvTime ();
2132+ bTof.tofEvTimeErr = reassociateTracks.value ? collision.eventTimeErr () : bTofExt.tofEvTimeErr ();
2133+ // bTof.tofEvTimeErr = bTofExt.tofEvTimeErr();
2134+ bTof.tofSignal = bTofExt.tofSignal () + (doBCshift.value ? deltaTimeBc : 0 .0f );
2135+ bTof.length = bTofExt.length ();
21632136 }
21642137
21652138 cascTofInfo casctof = calculateTofInfoCascade (collisions, cascade.straCollisionId (), cascade, pTof, nTof, bTof);
0 commit comments