}\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
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
#include "AliTRDarrayDictionary.h"
#include "AliTRDarrayADC.h"
#include "AliTRDdigitsManager.h"
+#include "AliTRDdigitsParam.h"
#include "AliTRDrawData.h"
#include "AliTRDcalibDB.h"
#include "AliTRDtransform.h"
// 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){
// 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!");