]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Move to new baseline subtraction scheme in the clusterizer
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Sep 2009 16:15:00 +0000 (16:15 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Sep 2009 16:15:00 +0000 (16:15 +0000)
TRD/AliTRDarrayADC.cxx
TRD/AliTRDarrayADC.h
TRD/AliTRDclusterizer.cxx

index 54ecdad804ecd23d2ca0c301fd4b222a087ded45..5aaf9e285049d4e0dead1d5920bdb2b14049f72a 100644 (file)
@@ -622,3 +622,19 @@ void AliTRDarrayADC::CreateLut()
        }\r
     }\r
 }\r
+//________________________________________________________________________________\r
+void AliTRDarrayADC::SubtractBaseline(Short_t baseline)\r
+{\r
+  //\r
+  // Subtracts the baseline to all the adc array\r
+  // if the value is equal or greater than baseline\r
+  //\r
+\r
+  for(Int_t b=0; b<fNAdim; b++)\r
+    {\r
+      //if(fADC[b]>=baseline)\r
+      //{\r
+         fADC[b]=fADC[b]-baseline;\r
+      //}\r
+    }\r
+}\r
index b7249bc39158c8c8dd3d4940caa6c8f8f1ab57c7..e7c6e7cbf9662d34de6c9f77931da2eb007ba3b5 100644 (file)
@@ -47,6 +47,7 @@ class AliTRDarrayADC: public TObject
   Short_t GetData(Int_t nrow, Int_t ncol, Int_t ntime) const;\r
   void    SetData(Int_t nrow, Int_t ncol, Int_t ntime, Short_t value);\r
   static  void    CreateLut(); \r
+  void    SubtractBaseline(Short_t baseline);\r
 \r
  protected:\r
 \r
index 3abb0a910fe23c13be8446d6dbc631c61dfb6f21..defdcbc461deef77edb54d9786ff2c15bae89bbf 100644 (file)
@@ -35,6 +35,7 @@
 #include "AliTRDarrayDictionary.h"
 #include "AliTRDarrayADC.h"
 #include "AliTRDdigitsManager.h"
+#include "AliTRDdigitsParam.h"
 #include "AliTRDrawData.h"
 #include "AliTRDcalibDB.h"
 #include "AliTRDtransform.h"
@@ -561,6 +562,9 @@ Bool_t AliTRDclusterizer::MakeClusters()
     // This is to take care of switched off super modules
     if (!digitsIn->HasData()) continue;
     digitsIn->Expand();
+    // Subtract the ADC baseline
+    printf("----> baseline = %d\n",fDigitsManager->GetDigitsParam()->GetADCbaseline());
+    digitsIn->SubtractBaseline(fDigitsManager->GetDigitsParam()->GetADCbaseline());
     digitsIn->DeleteNegatives();  // Restore digits array to >=0 values
     AliTRDSignalIndex* indexes = fDigitsManager->GetIndexes(i);
     if (indexes->IsAllocated() == kFALSE){
@@ -735,6 +739,10 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
   // This is to take care of switched off super modules
   if (!fDigits->HasData()) return kFALSE;
 
+  // Subtract the ADC baseline
+  printf("----> baseline = %d\n",fDigitsManager->GetDigitsParam()->GetADCbaseline());
+  fDigits->SubtractBaseline(fDigitsManager->GetDigitsParam()->GetADCbaseline());
+
   fIndexes = fDigitsManager->GetIndexes(det);
   if (fIndexes->IsAllocated() == kFALSE) {
     AliError("Indexes do not exist!");