]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFDigitizer.cxx
Conversion of data from surveyors into alignment objects
[u/mrichter/AliRoot.git] / TOF / AliTOFDigitizer.cxx
index 3bd9f41c629fedf1860aea56a8ab436c6274320f..8734d7cef504a6dcacc90383362719ba578407fc 100644 (file)
@@ -30,6 +30,7 @@
 #include "TFile.h"
 #include "TH1F.h"
 #include "TTree.h"
+#include "TRandom.h"
 
 #include "AliLoader.h"
 #include "AliLog.h"
@@ -254,9 +255,9 @@ void AliTOFDigitizer::CreateDigits()
     
     //------------------- Dump section ----------------------
     if(k<ndump){
-      cout << k << "-th | " << "Sector " << sector << " | Plate " << plate << " | Strip " << strip << " | PadZ " << padz << " | PadX " << padx << endl;
-      cout << k << "-th sdigit" << endl;
-      cout << "----------------------------------------------------"<< endl;
+      AliInfo(Form("%2i-th | Sector %2i | Plate %1i | Strip %2i | PadZ %1i | PadX %2i ", k, sector, plate, strip, padz, padx));
+      AliInfo(Form("%2i-th", k));
+      AliInfo("----------------------------------------------------");
     }
     // ------------------------------------------------------
     
@@ -415,7 +416,7 @@ void AliTOFDigitizer::DecalibrateTOFSignal( AliTOFcalib *calib){
 
   AliTOFCal * cal= calib->GetTOFCalSimArray();
 
-  AliInfo(Form("Size of AliTOFCal = %i",cal->NPads()));
+  AliDebug(2,Form("Size of AliTOFCal = %i",cal->NPads()));
   for (Int_t ipad = 0 ; ipad<cal->NPads(); ipad++){
     AliTOFChannel *calChannel = cal->GetChannel(ipad);
     Float_t par[6];
@@ -464,7 +465,7 @@ void AliTOFDigitizer::DecalibrateTOFSignal( AliTOFcalib *calib){
     detId[3] = dig->GetPadz();
     detId[4] = dig->GetPadx();
     // For Data with no Miscalibration, set ToT signal == Adc
-    dig->SetToT(dig->GetAdc());
+    dig->SetToT(dig->GetAdc()/AliTOFGeometry::TdcBinWidth());
     if(hToT->GetEntries()>0){  
       Float_t trix = 0;
       Float_t triy = 0;
@@ -478,7 +479,7 @@ void AliTOFDigitizer::DecalibrateTOFSignal( AliTOFcalib *calib){
        simToT=hToT->GetBinContent(binx);
       }
     // Setting realistic ToT signal (only for Miscalibrated Data)   
-      dig->SetToT(trix);
+      dig->SetToT(trix/AliTOFGeometry::TdcBinWidth());
     }
     Int_t index = calib->GetIndex(detId);     
     AliTOFChannel *calChannel = cal->GetChannel(index);
@@ -504,9 +505,9 @@ void AliTOFDigitizer::DecalibrateTOFSignal( AliTOFcalib *calib){
   }
 
   if(hToT->GetEntries()<=0 || !dbEntry){
-    AliInfo("Standard Production, no miscalibrated digits");   
+    AliDebug(1,"Standard Production, no miscalibrated digits");   
   }else{
-    AliInfo("Miscalibrated digits");   
+    AliDebug(1,"Miscalibrated digits");   
   }
 
   return;