]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Apply pad by pad noise fluctution in the digits simulation (Marian)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 24 Nov 2007 13:17:38 +0000 (13:17 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 24 Nov 2007 13:17:38 +0000 (13:17 +0000)
TPC/AliTPCDigitizer.cxx
TPC/AliTPCcalibDB.cxx

index da806e16859c30ea1aee309a436fd6a719e511b6..41ac5aa2f394d2770eff2636f9c863fa5c7d1d7b 100644 (file)
@@ -185,6 +185,7 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
 
   Int_t zerosup = param->GetZeroSup(); 
   AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetPadGainFactor(); 
+  AliTPCCalPad * noiseTPC = AliTPCcalibDB::Instance()->GetPadNoise(); 
   //
   //Loop over segments of the TPC
     
@@ -197,6 +198,7 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
       continue;
      }
     AliTPCCalROC * gainROC = gainTPC->GetCalROC(sec);  // pad gains per given sector
+    AliTPCCalROC * noiseROC = noiseTPC->GetCalROC(sec);  // noise per given sector
     digrow->SetID(segmentID);
 
     Int_t nrows = 0;
@@ -273,9 +275,10 @@ void AliTPCDigitizer::ExecFast(Option_t* option)
          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;
+        q+=noise*noisePad;
         q=TMath::Nint(q);
         if (q > zerosup)
          { 
@@ -385,6 +388,7 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
   //Loop over segments of the TPC
     
   AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetPadGainFactor();
+  AliTPCCalPad * noiseTPC = AliTPCcalibDB::Instance()->GetPadNoise();
   for (Int_t n=0; n<nentries; n++) {
     rl = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(0));
     gime = rl->GetLoader("TPCLoader");
@@ -413,6 +417,7 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
     }
 
     AliTPCCalROC * gainROC = gainTPC->GetCalROC(sec);  // pad gains per given sector
+    AliTPCCalROC * noiseROC = noiseTPC->GetCalROC(sec);  // noise per given sector
     digrow->SetID(digarr[0]->GetID());
 
     Int_t nrows = digarr[0]->GetNRows();
@@ -452,8 +457,10 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
        //       Float_t noise  = gRandom->Gaus(0,param->GetNoise()*param->GetNoiseNormFac());  
        Float_t gain = gainROC->GetValue(row,col);
        q*= gain;
+       Float_t noisePad = noiseROC->GetValue(row, col);
+
        Float_t noise  = pTPC->GetNoise();
-       q+=noise;
+       q+=noise*noisePad;
         q=TMath::Nint(q);
         if (q > zerosup){ 
          
index 14acce22eb4f02174fbf50eb161e58834a9df0e8..91aa8b9609f5c46c8b88b2d3ac50fc2ccd8d2dee 100644 (file)
 //                                                                           //
 // Request an instance with AliTPCcalibDB::Instance()                        //
 // If a new event is processed set the event number with SetRun              //
-// Then request the calibration data                                         // 
-//                                                                           //
+// Then request the calibration data                                         ////
+// Calibration data:
+// 1.)  pad by pad calibration -  AliTPCCalPad
+//      a.) fPadGainFactor
+//          Simulation: AliTPCDigitizer::ExecFast - Multiply by gain
+//          Reconstruction : AliTPCclustererMI::Digits2Clusters - Divide by gain  
+//      b.) fPadNoise -
+//          Simulation:        AliTPCDigitizer::ExecFast
+//          Reconstruction:    AliTPCclustererMI::FindClusters(AliTPCCalROC * noiseROC)
+//                             Noise depending cut on clusters (n sigma)
+//          
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <iostream>