]> 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 b302981fc2a21bf87ef80892582147934ce951e5..8734d7cef504a6dcacc90383362719ba578407fc 100644 (file)
 //                                                                         //
 //_________________________________________________________________________//
 
-#include <Riostream.h>
+#include "Riostream.h"
 
-#include <TFile.h>
-#include <TH1F.h>
-#include <TTree.h>
-#include <TRandom.h>
+#include "TFile.h"
+#include "TH1F.h"
+#include "TTree.h"
+#include "TRandom.h"
 
 #include "AliLoader.h"
 #include "AliLog.h"
 #include "AliTOFSDigit.h"
 #include "AliTOF.h"
 
+extern TDirectory *gDirectory;
+extern TFile *gFile;
+extern TRandom *gRandom;
+
+extern AliRun *gAlice;
+
+
 ClassImp(AliTOFDigitizer)
 
 //___________________________________________
@@ -248,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("----------------------------------------------------");
     }
     // ------------------------------------------------------
     
@@ -458,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;
@@ -472,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);