From b3e812edc3c351e9a5b2a5108e4a3b1196d5bc0a Mon Sep 17 00:00:00 2001 From: masera Date: Sun, 15 Aug 2010 10:22:21 +0000 Subject: [PATCH] protection against the mixing of tracklet-->track refs. for shared clusters (Ruben) --- ITS/AliITSMultReconstructor.cxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ITS/AliITSMultReconstructor.cxx b/ITS/AliITSMultReconstructor.cxx index e4fd5846215..b05ee436d4d 100644 --- a/ITS/AliITSMultReconstructor.cxx +++ b/ITS/AliITSMultReconstructor.cxx @@ -1025,8 +1025,10 @@ void AliITSMultReconstructor::FlagTrackClusters(Int_t id) { // RS: flag the SPD clusters of the track if it is useful for the multiplicity estimation // - const UShort_t kMaxTrID = 0xffff - 1; // max possible track id - if (id>kMaxTrID) return; + const UInt_t kMaskL = 0x0000ffff; + const UInt_t kMaskH = 0xffff0000; + const UInt_t kMaxTrID = kMaskL - 1; // max possible track id + if (UInt_t(id)>kMaxTrID) return; const AliESDtrack* track = fESDEvent->GetTrack(id); Int_t idx[12]; if ( track->GetITSclusters(idx)<3 ) return; // at least 3 clusters must be used in the fit @@ -1041,6 +1043,17 @@ void AliITSMultReconstructor::FlagTrackClusters(Int_t id) int layID= (idx[i] & 0xf0000000) >> 28; if (layID>1) continue; // SPD only int clID = (idx[i] & 0x0fffffff); + // + if ( track->IsOn(AliESDtrack::kITSpureSA) ) { + if (uClus[layID][clID]&kMaskH) { + AliWarning(Form("Tracks %5d and %5d share cluster %6d of lr%d",id,int(uClus[layID][clID]>>16)-1,clID,layID)); + uClus[layID][clID] &= kMaskL; + } + } + else if (uClus[layID][clID]&kMaskL) { + AliWarning(Form("Tracks %5d and %5d share cluster %6d of lr%d",id,int(uClus[layID][clID]&kMaskL)-1,clID,layID)); + uClus[layID][clID] &= kMaskH; + } uClus[layID][clID] |= mark; } // -- 2.39.3