]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDclusterizer.cxx
Taking into account that the default value of the beamType in the DAQ logbook
[u/mrichter/AliRoot.git] / TRD / AliTRDclusterizer.cxx
index 21d121a48ce52099a6e6f3e0a51efd6c2e1d28ce..b2e20a44891b365e8ab678796c8d49be5eb0a6cc 100644 (file)
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-#include <TF1.h>
-#include <TTree.h>
-#include <TH1.h>
-#include <TFile.h>
 #include <TClonesArray.h>
 #include <TObjArray.h>
 
 #include "AliRunLoader.h"
 #include "AliLoader.h"
-#include "AliRawReader.h"
-#include "AliLog.h"
 #include "AliAlignObj.h"
 
 #include "AliTRDclusterizer.h"
@@ -43,8 +37,6 @@
 #include "AliTRDdigitsManager.h"
 #include "AliTRDrawData.h"
 #include "AliTRDcalibDB.h"
-#include "AliTRDrecoParam.h"
-#include "AliTRDCommonParam.h"
 #include "AliTRDtransform.h"
 #include "AliTRDSignalIndex.h"
 #include "AliTRDrawStreamBase.h"
@@ -74,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)
@@ -132,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)
@@ -185,7 +175,6 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c)
   ,fTransform(NULL)
   ,fDigits(NULL)
   ,fIndexes(NULL)
-  ,fADCthresh(0)
   ,fMaxThresh(0)
   ,fSigThresh(0)
   ,fMinMaxCutSigma(0)
@@ -280,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;
@@ -348,7 +336,7 @@ Bool_t AliTRDclusterizer::OpenOutput()
 }
 
 //_____________________________________________________________________________
-Bool_t AliTRDclusterizer::OpenOutput(TTree *clusterTree)
+Bool_t AliTRDclusterizer::OpenOutput(TTree *const clusterTree)
 {
   //
   // Connect the output tree
@@ -647,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()));
   
@@ -705,7 +695,7 @@ UChar_t AliTRDclusterizer::GetStatus(Short_t &signal)
 }
 
 //_____________________________________________________________________________
-void AliTRDclusterizer::SetPadStatus(const UChar_t status, UChar_t &out){
+void AliTRDclusterizer::SetPadStatus(const UChar_t status, UChar_t &out) const {
   //
   // Set the pad status into out
   // First three bits are needed for the position encoding
@@ -756,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();
@@ -812,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;
 
@@ -845,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
@@ -1028,7 +1015,7 @@ void AliTRDclusterizer::CalcAdditionalInfo(const MaxStruct &Max, Short_t *const
 }
 
 //_____________________________________________________________________________
-void AliTRDclusterizer::AddClusterToArray(AliTRDcluster *cluster)
+void AliTRDclusterizer::AddClusterToArray(AliTRDclustercluster)
 {
   //
   // Add a cluster to the array
@@ -1129,7 +1116,7 @@ Bool_t AliTRDclusterizer::AddLabels()
 }
 
 //_____________________________________________________________________________
-Float_t AliTRDclusterizer::Unfold(Double_t eps, Int_t layer, Double_t *padSignal) const
+Float_t AliTRDclusterizer::Unfold(Double_t eps, Int_t layer, const Double_t *const padSignal) const
 {
   //
   // Method to unfold neighbouring maxima.
@@ -1239,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);
@@ -1366,7 +1353,7 @@ TClonesArray *AliTRDclusterizer::TrackletsArray()
   //
 
   if (!fTracklets && fReconstructor->IsProcessingTracklets()) {
-    fTracklets = new TClonesArray("AliTRDcluster", 2*MAX_TRACKLETS_PERHC);
+    fTracklets = new TClonesArray("AliTRDcluster", 2*MAXTRACKLETSPERHC);
     //SetClustersOwner(kTRUE);
     //AliTRDReconstructor::SetTracklets(0x0);
   }