]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFSDigit.cxx
- Updated with modified AliMUONSegFactory constructor
[u/mrichter/AliRoot.git] / TOF / AliTOFSDigit.cxx
index ece39a8b5675eaa780e20bcec361b81c0b352271..a9cc26e6be5b6c6b3714d28dc9c97fbadad0c285 100644 (file)
@@ -33,6 +33,7 @@
 #include "TArrayF.h"
 #include "TArrayI.h"
 
+#include "AliLog.h"
 #include "AliRun.h"
 #include "AliTOF.h"
 #include "AliTOFGeometry.h"
@@ -161,9 +162,8 @@ void AliTOFSDigit::Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track)
       }
       // write warning about many tracks going to this pad
       if (iTrack == kMAXDIGITS) {
-       cerr<<"WARNING: AliTOFSDigit::Update  Many hits in the padhit"<<endl;
-       cerr<<"         ";
-       //      PrintPad();
+       AliWarning("Many hits in the padhit");
+       //      ToAliWarning(PrintPad());
       }
     }
   } else {
@@ -194,7 +194,7 @@ void AliTOFSDigit::Update(AliTOFSDigit* sdig)
   Int_t nlocations=sdig->GetNDigits();
 
   for (Int_t j = 0; j < nlocations; j++) {
-    Float_t tdcbin=50.; // [ps] hardwired for the time being
+    Float_t tdcbin = AliTOFGeometry::TdcBinWidth();// [ps] hardwired for the time being
     Int_t tdc=(Int_t)sdig->GetTdc(j);
     Int_t adc=(Int_t)sdig->GetAdc(j);
     // getting here only the first track number
@@ -221,9 +221,8 @@ void AliTOFSDigit::Update(AliTOFSDigit* sdig)
        }
        // write warning about many tracks going to this pad
        if (iTrack == kMAXDIGITS) {
-         cerr<<"WARNING: AliTOFSDigit::Update  Many hits in the padhit"<<endl;
-         cerr<<"         ";
-         //    PrintPad();
+         AliWarning("Many hits in the padhit");
+         //    ToAliWarning(PrintPad());
        }
       }
     } else {
@@ -255,7 +254,7 @@ AliTOFSDigit::~AliTOFSDigit()
 
 ////////////////////////////////////////////////////////////////////////
 
-Int_t AliTOFSDigit::GetTotPad() const
+Int_t AliTOFSDigit::GetTotPad(AliTOFGeometry *tofGeom) const
 {
   //
   // Get the "total" index of the pad inside a Sector
@@ -271,16 +270,16 @@ Int_t AliTOFSDigit::GetTotPad() const
     //before = 0;
     break;
   case 1:
-    before = AliTOFGeometry::NStripC();
+    before = tofGeom->NStripC();
     break;
   case 2:
-    before = AliTOFGeometry::NStripB() +   AliTOFGeometry::NStripC();
+    before = AliTOFGeometry::NStripB() +   tofGeom->NStripC();
     break;
   case 3:
-    before = AliTOFGeometry::NStripA() +   AliTOFGeometry::NStripB() + AliTOFGeometry::NStripC();
+    before = AliTOFGeometry::NStripA() +   AliTOFGeometry::NStripB() + tofGeom->NStripC();
     break;
   case 4:
-    before = AliTOFGeometry::NStripA() + 2*AliTOFGeometry::NStripB() + AliTOFGeometry::NStripC();
+    before = AliTOFGeometry::NStripA() + 2*AliTOFGeometry::NStripB() + tofGeom->NStripC();
     break;
   }
   
@@ -288,4 +287,3 @@ Int_t AliTOFSDigit::GetTotPad() const
   Int_t padTot = AliTOFGeometry::NpadXStrip()*strip + pad;
   return padTot;
 }
-