@@ -166,7 +166,7 @@ struct TreeWriterTpcV0 {
166166
167167 o2::aod::rctsel::RCTFlagsChecker rctChecker{};
168168
169- TRandom3* fRndm = new TRandom3(0 );
169+ TRandom3* fRndm = new TRandom3();
170170
171171 using Trks = soa::Join<aod::Tracks, aod::V0Bits, aod::TracksExtra, aod::pidTPCFullEl, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFFullEl, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr, aod::TrackSelection>;
172172 using TrksWithDEdxCorrection = soa::Join<Trks, aod::DEdxsCorrected>;
@@ -420,6 +420,12 @@ struct TreeWriterTpcV0 {
420420 template <bool IsCorrectedDeDx, int ModeId, typename TrksType, typename BCType, typename TrkQAType>
421421 void runV0 (Colls const & collisions, TrksType const & myTracks, V0sWithID const & myV0s, CascsWithID const & myCascs, TrkQAType const & tracksQA)
422422 {
423+ if (collisions.size () != 0 ) {
424+ const auto timestamp = collisions.begin ().bc_as <BCType>().timestamp ();
425+ LOG (info) << " fRndm is seeded with timestamp of the 0-th bunch crossing (" << timestamp << " )" ;
426+ fRndm ->SetSeed (timestamp);
427+ }
428+
423429 constexpr bool IsWithTrackQa = ModeId != ModeStandard;
424430
425431 std::vector<int64_t > labelTrack2TrackQA;
@@ -692,20 +698,20 @@ struct TreeWriterTpcTof {
692698 HistogramRegistry registry{" registry" , {}};
693699
694700 struct TofTrack {
695- bool isApplyHardCutOnly;
696- double maxMomHardCutOnly;
697- double maxMomTPCOnly;
698- double tpcNSigma;
699- double nSigmaTPCOnly;
700- double downsamplingTsalis;
701- double mass;
702- double tofNSigma;
703- double itsNSigma;
704- double tpcExpSignal;
705- o2::track::PID ::ID pid;
706- double dwnSmplFactor;
707- double nSigmaTofTpctof;
708- double nSigmaTpcTpctof;
701+ bool isApplyHardCutOnly{ false } ;
702+ double maxMomHardCutOnly{UndefValueDouble} ;
703+ double maxMomTPCOnly{UndefValueDouble} ;
704+ double tpcNSigma{UndefValueDouble} ;
705+ double nSigmaTPCOnly{UndefValueDouble} ;
706+ double downsamplingTsalis{UndefValueDouble} ;
707+ double mass{UndefValueDouble} ;
708+ double tofNSigma{UndefValueDouble} ;
709+ double itsNSigma{UndefValueDouble} ;
710+ double tpcExpSignal{UndefValueDouble} ;
711+ o2::track::PID ::ID pid{ 0 } ;
712+ double dwnSmplFactor{UndefValueDouble} ;
713+ double nSigmaTofTpctof{UndefValueDouble} ;
714+ double nSigmaTpcTpctof{UndefValueDouble} ;
709715 };
710716
711717 Service<o2::ccdb::BasicCCDBManager> ccdb{};
@@ -714,7 +720,7 @@ struct TreeWriterTpcTof {
714720
715721 o2::aod::rctsel::RCTFlagsChecker rctChecker{};
716722
717- TRandom3* fRndm = new TRandom3(0 );
723+ TRandom3* fRndm = new TRandom3();
718724
719725 using Trks = soa::Join<aod::Tracks, aod::TracksExtra,
720726 aod::pidTPCFullEl, aod::pidTPCFullPi, aod::pidTPCFullKa,
@@ -850,6 +856,12 @@ struct TreeWriterTpcTof {
850856 template <bool IsCorrectedDeDx, int ModeId, typename TrksType, typename BCType, typename TrkQAType, typename TMOType>
851857 void runTof (Colls const & collisions, TrksType const & myTracks, TrkQAType const & tracksQA, Preslice<TrksType> const & perCollisionTracksType, TMOType const & trackMeanOccs)
852858 {
859+ if (collisions.size () != 0 ) {
860+ const auto timestamp = collisions.begin ().bc_as <BCType>().timestamp ();
861+ LOG (info) << " fRndm is seeded with timestamp of the 0-th bunch crossing (" << timestamp << " )" ;
862+ fRndm ->SetSeed (timestamp);
863+ }
864+
853865 constexpr bool IsWithTrackQa = ModeId != ModeStandard;
854866
855867 std::vector<int64_t > labelTrack2TrackQA;
0 commit comments