@@ -745,10 +745,15 @@ struct OnTheFlyRichPid {
745745 }
746746
747747 for (const auto & track : tracks) {
748+
749+ float nSigmaBarrelRich[5 ] = {error_value, error_value, error_value, error_value, error_value};
750+
748751 // first step: find precise arrival time (if any)
749752 // --- convert track into perfect track
750- if (!track.has_mcParticle ()) // should always be OK but check please
753+ if (!track.has_mcParticle ()) { // should always be OK but check please
754+ upgradeRich (nSigmaBarrelRich[0 ], nSigmaBarrelRich[1 ], nSigmaBarrelRich[2 ], nSigmaBarrelRich[3 ], nSigmaBarrelRich[4 ]);
751755 continue ;
756+ }
752757
753758 auto mcParticle = track.mcParticle ();
754759 o2::track::TrackParCov o2track = o2::upgrade::convertMCParticleToO2Track (mcParticle, pdg);
@@ -761,12 +766,14 @@ struct OnTheFlyRichPid {
761766 // get particle to calculate Cherenkov angle and resolution
762767 auto pdgInfo = pdg->GetParticle (mcParticle.pdgCode ());
763768 if (pdgInfo == nullptr ) {
769+ upgradeRich (nSigmaBarrelRich[0 ], nSigmaBarrelRich[1 ], nSigmaBarrelRich[2 ], nSigmaBarrelRich[3 ], nSigmaBarrelRich[4 ]);
764770 continue ;
765771 }
766772
767773 // find track bRICH sector
768774 int i_sector = findSector (o2track.getEta ());
769775 if (i_sector < 0 ) {
776+ upgradeRich (nSigmaBarrelRich[0 ], nSigmaBarrelRich[1 ], nSigmaBarrelRich[2 ], nSigmaBarrelRich[3 ], nSigmaBarrelRich[4 ]);
770777 continue ;
771778 }
772779
@@ -794,12 +801,12 @@ struct OnTheFlyRichPid {
794801 }
795802
796803 // Straight to Nsigma
797- float deltaThetaBarrelRich[5 ], nSigmaBarrelRich[5 ];
804+ float deltaThetaBarrelRich[5 ]; // , nSigmaBarrelRich[5];
798805 int lpdg_array[5 ] = {kElectron , kMuonMinus , kPiPlus , kKPlus , kProton };
799806 float masses[5 ];
800807
801808 for (int ii = 0 ; ii < 5 ; ii++) {
802- nSigmaBarrelRich[ii] = error_value;
809+ // nSigmaBarrelRich[ii] = error_value;
803810
804811 auto pdgInfoThis = pdg->GetParticle (lpdg_array[ii]);
805812 masses[ii] = pdgInfoThis->Mass ();
0 commit comments