From 1023528dabeef4788c2eab12ef0136ebe1328154 Mon Sep 17 00:00:00 2001 From: nilsen Date: Thu, 4 Mar 2004 22:15:51 +0000 Subject: [PATCH] Bug fix for column value. --- ITS/AliITSspdTestBeam.cxx | 30 +++++++++++++++++++++++++++++- ITS/AliITSspdTestBeam.h | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ITS/AliITSspdTestBeam.cxx b/ITS/AliITSspdTestBeam.cxx index 667aa903be7..9d37947ef64 100644 --- a/ITS/AliITSspdTestBeam.cxx +++ b/ITS/AliITSspdTestBeam.cxx @@ -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 diff --git a/ITS/AliITSspdTestBeam.h b/ITS/AliITSspdTestBeam.h index dd668225350..72e3bf0c944 100644 --- a/ITS/AliITSspdTestBeam.h +++ b/ITS/AliITSspdTestBeam.h @@ -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;} -- 2.43.0