o2sim_Kine.root and o2sim_HitsFCT.root show mismatch

Hi all,

I am running an analysis code I wrote myself to analyze tracks based on o2sim_Kine.root and o2sim_FCTHits.root. The code looks like this

for(int event = 0; event < nFCTEvents; event++){ 
        hitsChain->GetEvent(event);
        kineChain->GetEvent(event);
        int nFCTHits = hitFCT->size();
        // std::cout << "Number of hits " << nFCTHits << std::endl;
        // std::cout << "Event number " << event << std::endl;
        for(Int_t iHit = 0; iHit < nFCTHits; iHit++){
            // std::cout << "Finding matching truth track" << std::endl;
            Hit* thisHit = &(*hitFCT)[iHit];

            Int_t thisTrackID = thisHit->GetTrackID();
            MCTrackT<float>* thisTrack = &(*mcTr).at(thisTrackID);
            int thisPID = thisTrack->GetPdgCode();
            // Do some checks and save some stuff
        }
   }

hitsChain and kineChain are TChains of trees of the hits and kine files.

I get the following error

Error in <TRint::HandleTermInput()>: std::out_of_range caught: vector::_M_range_check: __n (which is 171) >= this->size() (which is 166)

This error seems to occur at either the line

Hit* thisHit = &(*hitFCT)[iHit];`

or

MCTrackT<float>* thisTrack = &(*mcTr).at(thisTrackID);`

I ran this code with a simulation I did last week and the error came up. I then ran it with simulation files I made around a month ago and this worked and gave no errors. I was wondering whether you have seen this too or heard anything about this.

I updated O2 this morning and checked again. The error still persists

Cheers,
Cas

Issue is fixed here:
AliceO2Group/AliceO2#11481