From 6b0d4ad5288c5698b74986c4c3f11f92a773d8df Mon Sep 17 00:00:00 2001 From: cblume Date: Thu, 10 Sep 2009 07:36:02 +0000 Subject: [PATCH] Don't use shared pads in HLT and some code clean-up --- TRD/AliTRDclusterizer.cxx | 17 ++++++----------- TRD/AliTRDclusterizer.h | 6 ++---- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/TRD/AliTRDclusterizer.cxx b/TRD/AliTRDclusterizer.cxx index 3638edff0a0..b2e20a44891 100644 --- a/TRD/AliTRDclusterizer.cxx +++ b/TRD/AliTRDclusterizer.cxx @@ -66,7 +66,6 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDReconstructor *const rec) ,fTransform(new AliTRDtransform(0)) ,fDigits(NULL) ,fIndexes(NULL) - ,fADCthresh(0) ,fMaxThresh(0) ,fSigThresh(0) ,fMinMaxCutSigma(0) @@ -124,7 +123,6 @@ AliTRDclusterizer::AliTRDclusterizer(const Text_t *name, const Text_t *title, co ,fTransform(new AliTRDtransform(0)) ,fDigits(NULL) ,fIndexes(NULL) - ,fADCthresh(0) ,fMaxThresh(0) ,fSigThresh(0) ,fMinMaxCutSigma(0) @@ -177,7 +175,6 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c) ,fTransform(NULL) ,fDigits(NULL) ,fIndexes(NULL) - ,fADCthresh(0) ,fMaxThresh(0) ,fSigThresh(0) ,fMinMaxCutSigma(0) @@ -272,7 +269,6 @@ void AliTRDclusterizer::Copy(TObject &c) const ((AliTRDclusterizer &) c).fTransform = NULL; ((AliTRDclusterizer &) c).fDigits = NULL; ((AliTRDclusterizer &) c).fIndexes = NULL; - ((AliTRDclusterizer &) c).fADCthresh = 0; ((AliTRDclusterizer &) c).fMaxThresh = 0; ((AliTRDclusterizer &) c).fSigThresh = 0; ((AliTRDclusterizer &) c).fMinMaxCutSigma= 0; @@ -639,6 +635,8 @@ Bool_t AliTRDclusterizer::Raw2ClustersChamber(AliRawReader *rawReader) } AliTRDrawStreamBase *input = AliTRDrawStreamBase::GetRawStream(rawReader); + if(fReconstructor->IsHLT()) + input->SetSharedPadReadout(kFALSE); AliInfo(Form("Stream version: %s", input->IsA()->GetName())); @@ -748,15 +746,11 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det) return kFALSE; } - fADCthresh = 0; - if (!fReconstructor){ AliError("Reconstructor not set\n"); return kFALSE; } - TTreeSRedirector *fDebugStream = fReconstructor->GetDebugStream(AliTRDReconstructor::kClusterizer); - fMaxThresh = fReconstructor->GetRecoParam()->GetClusMaxThresh(); fSigThresh = fReconstructor->GetRecoParam()->GetClusSigThresh(); fMinMaxCutSigma = fReconstructor->GetRecoParam()->GetMinMaxCutSigma(); @@ -804,11 +798,11 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det) // Calibration object with the pad status fCalPadStatusROC = calibration->GetPadStatusROC(fDet); - + SetBit(kLUT, fReconstructor->UseLUT()); SetBit(kGAUS, fReconstructor->UseGAUS()); SetBit(kHLT, fReconstructor->IsHLT()); - + firstClusterROC = -1; fClusterROC = 0; @@ -837,6 +831,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det) if(last.Row>-1) CreateCluster(last); if(fReconstructor->GetStreamLevel(AliTRDReconstructor::kClusterizer) > 2){ + TTreeSRedirector* fDebugStream = fReconstructor->GetDebugStream(AliTRDReconstructor::kClusterizer); (*fDebugStream) << "MakeClusters" << "Detector=" << det << "NMaxima=" << nMaximas @@ -1231,7 +1226,7 @@ void AliTRDclusterizer::TailCancelation() for(iTime = 0; iTime < fTimeTotal; iTime++)//while (fIndexes->NextTbinIndex(iTime)) { // Store the amplitude of the digit if above threshold - if (outADC[iTime] > fADCthresh) + if (outADC[iTime] > 0) fDigits->SetData(iRow,iCol,iTime,TMath::Nint(outADC[iTime])); else fDigits->SetData(iRow,iCol,iTime,0); diff --git a/TRD/AliTRDclusterizer.h b/TRD/AliTRDclusterizer.h index c6206f1980a..4e1bf41e8a4 100644 --- a/TRD/AliTRDclusterizer.h +++ b/TRD/AliTRDclusterizer.h @@ -52,14 +52,13 @@ class AliTRDclusterizer : public TNamed Int_t Row; Int_t Col; Int_t Time; - UChar_t padStatus; Short_t Signals[3]; + UChar_t padStatus; Bool_t FivePad; MaxStruct():Row(-1),Col(0),Time(0),padStatus(0),FivePad(kFALSE) {memset(Signals, 0, 3*sizeof(Short_t));} MaxStruct &operator=(const MaxStruct &a) - {Row=a.Row; Col=a.Col; Time=a.Time; padStatus=a.padStatus; FivePad=a.FivePad; - memcpy(Signals, a.Signals, 3*sizeof(Short_t)); return *this;} + {memcpy(this, &a, sizeof(MaxStruct)); return *this;} }; AliTRDclusterizer(const AliTRDReconstructor *const rec = 0x0); @@ -140,7 +139,6 @@ protected: AliTRDarrayADC *fDigits; // Array holding the digits AliTRDSignalIndex *fIndexes; // Array holding the indexes to the digits - Float_t fADCthresh; // ADC thresholds: There is no ADC threshold anymore, and simParam should not be used in clusterizer. KO Float_t fMaxThresh; // Threshold value for the maximum Float_t fSigThresh; // Threshold value for the digit signal Float_t fMinMaxCutSigma; // Threshold value for the maximum (cut noise) -- 2.39.3