]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bug fix for column value.
authornilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Mar 2004 22:15:51 +0000 (22:15 +0000)
committernilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Mar 2004 22:15:51 +0000 (22:15 +0000)
ITS/AliITSspdTestBeam.cxx
ITS/AliITSspdTestBeam.h

index 667aa903be7f20692ede70910df6823d9f139ff0..9d37947ef6497e765af07496dd90d974c35cafdb 100644 (file)
@@ -484,6 +484,34 @@ Int_t AliITSspdTestBeam::DecodeModule(Int_t pilot,Int_t chip){
     return -1;
 }
 //----------------------------------------------------------------------
+Int_t AliITSspdTestBeam::DecodeColumn(Int_t pilot,Int_t chip,Int_t colm){
+    // Determines the Column number based on the pilot, chip, and column 
+    // valules and the fVersion of the simulation.
+    // Inputs:
+    //    Int_t   pilot   Pilot number
+    //    Int_t   chip    chip number
+    //    Int_t   colm    Column number
+    // Outputs:
+    //    none.
+    // Return:
+    //    The Column number (see simulations geometry).
+    const Int_t colmperchip = 160/5; // Should be gotten from AliITSsegmentationSPD
+
+    switch (fVersion) {
+    case 2002:
+        if(pilot==0) return colm;
+        if(pilot==1) return colm+chip*colmperchip;
+        if(pilot==2) return colm;
+        break;
+    default:
+        if(pilot==0) return colm;
+        if(pilot==1) return colm+chip*colmperchip;
+        if(pilot==2) return colm;
+        break;
+    } // end switch
+    return -1;
+}
+//----------------------------------------------------------------------
 void AliITSspdTestBeam::Digitize(Int_t evnt){
     // Write out ITS SPD Digits.
     // Inputs:
@@ -511,7 +539,7 @@ void AliITSspdTestBeam::Digitize(Int_t evnt){
             chip = fData[p][evnt]->Chip(i);
             module = DecodeModule(p,chip);
             row  = fData[p][evnt]->Row(i);
-            colm = fData[p][evnt]->Colm(i);
+            colm = DecodeColumn(p,chip,fData[p][evnt]->Colm(i));
             digit[0] = row; digit[1] = colm, digit[2] = 1;
             fITS->AddRealDigit(0,digit);
             if(module!=oldmodule) { // New Module
index dd668225350c9d49d58e740a4f5939b697461899..72e3bf0c9441db29891b8ffea44a3132d7916545 100644 (file)
@@ -246,6 +246,7 @@ class AliITSspdTestBeam : public TTask{
     virtual Int_t Read(Int_t i=0);
     virtual Int_t Decode();
     virtual Int_t DecodeModule(Int_t pilot,Int_t Chip);
+    virtual Int_t DecodeColumn(Int_t pilot,Int_t Chip,Int_t Colm);
     virtual void Digitize(Int_t evnt);
     virtual void SetLoader(AliLoader *loader) {fLoader = loader;}
     virtual void SetITS(AliITS *its) {fITS = its;}