Don't use shared pads in HLT and some code clean-up
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Sep 2009 07:36:02 +0000 (07:36 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Sep 2009 07:36:02 +0000 (07:36 +0000)
TRD/AliTRDclusterizer.cxx
TRD/AliTRDclusterizer.h

index 3638edf..b2e20a4 100644 (file)
@@ -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);
index c6206f1..4e1bf41 100644 (file)
@@ -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)