]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCDigitizer.cxx
Modifiing macros to extract OCDB.
[u/mrichter/AliRoot.git] / TPC / AliTPCDigitizer.cxx
index 44193bbdf9762d494315a60463ba4347805e5cb5..ebbf2d9afd82b90748fd1f191884a4d1014d1342 100644 (file)
@@ -106,7 +106,7 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
   char s[100]; 
   char ss[100];
   TString optionString = option;
-  if (optionString.Data() == "deb") {
+  if (!strcmp(optionString.Data(),"deb")) {
     cout<<"AliTPCDigitizer::Exec: called with option deb "<<endl;
     fDebug = 3;
   }
@@ -201,7 +201,7 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
   param->SetZeroSup(2);
 
   Int_t zerosup = param->GetZeroSup(); 
-  AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetPadGainFactor(); 
+  AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetDedxGainFactor(); 
   AliTPCCalPad * noiseTPC = AliTPCcalibDB::Instance()->GetPadNoise(); 
   //
   //Loop over segments of the TPC
@@ -288,15 +288,14 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
          }
         q/=16.;  //conversion factor
        Float_t gain = gainROC->GetValue(row,elem/nrows);  // get gain for given - pad-row pad
-       if (gain<0.5){
-         printf("problem\n");
-       }
+       //if (gain<0.5){
+         //printf("problem\n");
+       //}
        q*= gain;
        Float_t noisePad = noiseROC->GetValue(row,elem/nrows);
         //       Float_t noise  = gRandom->Gaus(0,param->GetNoise()*param->GetNoiseNormFac());  
         Float_t noise  = pTPC->GetNoise();
         q+=noise*noisePad;
-       if (noisePad<0.001) q=0;   // dead channels identified - 0 noise
         q=TMath::Nint(q);
         if (q > zerosup)
          { 
@@ -312,7 +311,11 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
         pdig1++;
         ptr1++;
      }
-    
+    //
+    //  glitch filter
+    //
+    digrow->GlitchFilter();
+    //
     digrow->CompresBuffer(1,zerosup);
     digrow->CompresTrackBuffer(1);
     tree->Fill();
@@ -345,7 +348,7 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
   //output stored in TreeTPCD
 
   TString optionString = option;
-  if (optionString.Data() == "deb") {
+  if (!strcmp(optionString.Data(),"deb")) {
     cout<<"AliTPCDigitizer::Exec: called with option deb "<<endl;
     fDebug = 3;
   }
@@ -405,7 +408,7 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
   Int_t zerosup = param->GetZeroSup();
   //Loop over segments of the TPC
     
-  AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetPadGainFactor();
+  AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetDedxGainFactor();
   AliTPCCalPad * noiseTPC = AliTPCcalibDB::Instance()->GetPadNoise();
   for (Int_t n=0; n<nentries; n++) {
     rl = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(0));
@@ -479,7 +482,6 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
 
        Float_t noise  = pTPC->GetNoise();
        q+=noise*noisePad;
-       if (noisePad<0.00001) q=0;   // dead channels identified - 0 noise  
 
         q=TMath::Nint(q);
         if (q > zerosup){