]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCDigitizer.cxx
Updates for the TPC calibration using laser:
[u/mrichter/AliRoot.git] / TPC / AliTPCDigitizer.cxx
index 41ac5aa2f394d2770eff2636f9c863fa5c7d1d7b..ebbf2d9afd82b90748fd1f191884a4d1014d1342 100644 (file)
 
 /* $Id$ */
 
+/*
+  Class for creating of the sumable digits and digits from MC data
+  //
+  The input :  ideal signals (Hits->Diffusion->Attachment -Ideal signal)
+  The output:  raw digits
+
+  Effect implemented:
+  1. Pad by pad gain map
+  2. Noise map
+  3. The dead channels identified  - zerro noise for corresponding pads
+     In this case the outpu equal zerro
+*/
+
+
+
+
 #include <stdlib.h>
 #include <TTree.h> 
 #include <TObjArray.h>
@@ -89,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;
   }
@@ -184,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
@@ -271,9 +288,9 @@ 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());  
@@ -294,7 +311,11 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
         pdig1++;
         ptr1++;
      }
-    
+    //
+    //  glitch filter
+    //
+    digrow->GlitchFilter();
+    //
     digrow->CompresBuffer(1,zerosup);
     digrow->CompresTrackBuffer(1);
     tree->Fill();
@@ -327,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;
   }
@@ -387,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));
@@ -461,6 +482,7 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
 
        Float_t noise  = pTPC->GetNoise();
        q+=noise*noisePad;
+
         q=TMath::Nint(q);
         if (q > zerosup){