From 49451fe0a47ed41657b988d11114567a0aa3cf54 Mon Sep 17 00:00:00 2001 From: abercuci Date: Mon, 1 Dec 2008 18:10:10 +0000 Subject: [PATCH] fix pad masking settings for clusters (Markus) --- TRD/AliTRDcluster.h | 6 +++--- TRD/AliTRDclusterizer.cxx | 34 +++++++++++++++------------------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/TRD/AliTRDcluster.h b/TRD/AliTRDcluster.h index 062e93fc1b5..dea022363bc 100644 --- a/TRD/AliTRDcluster.h +++ b/TRD/AliTRDcluster.h @@ -21,9 +21,9 @@ class AliTRDcluster : public AliCluster { , kUsed = BIT(15) , kShared = BIT(16) }; - enum { kMaskedLeft = BIT(0) - , kMaskedCenter= BIT(1) - , kMaskedRight = BIT(2) + enum { kMaskedLeft = 0 + , kMaskedCenter= 1 + , kMaskedRight = 2 }; AliTRDcluster(); diff --git a/TRD/AliTRDclusterizer.cxx b/TRD/AliTRDclusterizer.cxx index 94480c3a7d0..a4f2b5fe507 100644 --- a/TRD/AliTRDclusterizer.cxx +++ b/TRD/AliTRDclusterizer.cxx @@ -822,6 +822,8 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det) UChar_t status[3]={0, 0, 0}, ipos = 0; fIndexesOut->ResetCounters(); while (fIndexesOut->NextRCTbinIndex(row, col, time)) { + // reset pad status + ipos = 0; for(Int_t is=3; is--;) status[is] = 0; Float_t signalM = TMath::Abs(digitsOut->GetData(row,col,time)); status[1] = digitsIn->GetPadStatus(row,col,time); @@ -860,8 +862,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det) } } } - } - else { // one of the neighbouring pads are bad + } else { // one of the neighbouring pads are bad if (status[0] && signalR < signalM && signalR >= sigThresh) { digitsOut->SetData(row,col,time,-signalM); digitsOut->SetData(row, col, time+1, 0.); @@ -879,12 +880,11 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det) else { // wrong maximum pad if ((signalL >= sigThresh) || (signalR >= sigThresh)) { // Maximum found, mark the position by a negative signal - digitsOut->SetData(row,col,time,-maxThresh); - fIndexesMaxima->AddIndexTBin(row,col,time); - padStatus.SetData(row, col, time, ipos); + digitsOut->SetData(row,col,time,-maxThresh); + fIndexesMaxima->AddIndexTBin(row,col,time); + padStatus.SetData(row, col, time, ipos); } } - } // The index to the first cluster of a given ROC @@ -1035,19 +1035,15 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det) Char_t clusterTimeBin = ((Char_t) clusterRCT[2]); Int_t n = RecPoints()->GetEntriesFast(); - AliTRDcluster *cluster = new((*RecPoints())[n]) AliTRDcluster(idet - ,clusterCharge - ,clusterPos - ,clusterSig - ,0x0 - ,((Char_t) nPadCount) - ,signals - ,((UChar_t) col) - ,((UChar_t) row) - ,((UChar_t) time) - ,clusterTimeBin - ,clusterPosCol - ,volid); + AliTRDcluster *cluster = new((*RecPoints())[n]) AliTRDcluster( + idet, + clusterCharge, clusterPos, clusterSig, + 0x0, + ((Char_t) nPadCount), + signals, + ((UChar_t) col), ((UChar_t) row), ((UChar_t) time), + clusterTimeBin, clusterPosCol, + volid); cluster->SetInChamber(!out); UChar_t maskPosition = padStatus.GetData(row, col, time); -- 2.43.0