Reverse the pad column ordering
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Jul 2008 08:31:00 +0000 (08:31 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Jul 2008 08:31:00 +0000 (08:31 +0000)
TRD/AliTRDcalibDB.cxx
TRD/AliTRDclusterizer.cxx
TRD/AliTRDgeometry.cxx
TRD/AliTRDpadPlane.cxx
TRD/AliTRDpadPlane.h
TRD/AliTRDtransform.cxx

index aca1e45..99a8b97 100644 (file)
@@ -1174,7 +1174,7 @@ Int_t AliTRDcalibDB::PadResponse(Double_t signal, Double_t dist
   // something dependent on calibration values
   //
 
-  Int_t iBin  = ((Int_t) (( - dist - fPRFlo) / fPRFwid));
+  Int_t iBin  = ((Int_t) ((dist - fPRFlo) / fPRFwid));
   Int_t iOff  = layer * fPRFbin;
 
   Int_t iBin0 = iBin - fPRFpad + iOff;
index 8c497be..46fcc52 100644 (file)
@@ -1,4 +1,3 @@
-
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -93,6 +92,7 @@ AliTRDclusterizer::AliTRDclusterizer()
     }
     AliTRDReconstructor::SetRecoParam(rec);
   }
+
 }
 
 //_____________________________________________________________________________
@@ -134,6 +134,7 @@ AliTRDclusterizer::AliTRDclusterizer(const Text_t *name, const Text_t *title)
   fRawVersion = AliTRDfeeParam::Instance()->GetRAWversion();
 
   FillLUT();
+
 }
 
 //_____________________________________________________________________________
@@ -612,8 +613,12 @@ Bool_t AliTRDclusterizer::Raw2ClustersChamber(AliRawReader *rawReader)
 //_____________________________________________________________________________
 UChar_t AliTRDclusterizer::GetStatus(Short_t &signal)
 {
+  //
+  // Check if a pad is masked
+  //
+
        UChar_t status = 0;
-       // check if pad is masked
+
        if(signal>0 && TESTBIT(signal, 10)){
                CLRBIT(signal, 10);
                for(int ibit=0; ibit<4; ibit++){
@@ -738,13 +743,13 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
 
   // Apply the gain and the tail cancelation via digital filter
   TailCancelation(digitsIn
-                ,digitsOut  
-                ,indexesIn
-                ,fIndexesOut
-                ,nTimeTotal
-                ,adcThreshold
-                ,calGainFactorROC
-                ,calGainFactorDetValue);       
+                 ,digitsOut  
+                 ,indexesIn
+                 ,fIndexesOut
+                 ,nTimeTotal
+                 ,adcThreshold
+                 ,calGainFactorROC
+                 ,calGainFactorDetValue);      
        
   Int_t row  = 0;
   Int_t col  = 0;
@@ -754,6 +759,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
   UChar_t status[3]={0, 0, 0}, ipos = 0;
   fIndexesOut->ResetCounters();
   while (fIndexesOut->NextRCTbinIndex(row, col, time)){
+
     Float_t signalM = TMath::Abs(digitsOut->GetDataUnchecked(row,col,time));
     status[1] = digitsIn->GetPadStatus(row,col,time);
     if(status[1]) SETBIT(ipos, AliTRDcluster::kMaskedCenter);
@@ -798,8 +804,8 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
        } else if(status[2] && signalL <= signalM && signalL >= sigThresh){
          digitsOut->SetDataUnchecked(row,col,time,-signalM);
          digitsOut->SetDataUnchecked(row, col, time-1, 0.);
-              fIndexesMaxima->AddIndexTBin(row,col,time);
-              padStatus.SetDataUnchecked(row, col, time, ipos);
+          fIndexesMaxima->AddIndexTBin(row,col,time);
+          padStatus.SetDataUnchecked(row, col, time, ipos);
        }
       }
     } else { // wrong maximum pad
@@ -823,6 +829,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
 
       // Maximum found ?             
       if (digitsOut->GetDataUnchecked(row,col,time) < 0.0) {
+
         for (iPad = 0; iPad < kNclus; iPad++) {
           Int_t iPadCol = col - 1 + iPad;
           clusterSignal[iPad] = TMath::Abs(digitsOut->GetDataUnchecked(row,iPadCol,time));
@@ -831,14 +838,14 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
         // Count the number of pads in the cluster
         Int_t nPadCount = 0;
         Int_t ii;
-        // Look to the left
+        // Look to the right
         ii = 0;
         while (TMath::Abs(digitsOut->GetDataUnchecked(row,col-ii  ,time)) >= sigThresh) {
           nPadCount++;
           ii++;
           if (col-ii   <        0) break;
         }
-        // Look to the right
+        // Look to the left
         ii = 0;
         while (TMath::Abs(digitsOut->GetDataUnchecked(row,col+ii+1,time)) >= sigThresh){
           nPadCount++;
@@ -877,8 +884,8 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
         if (fivePadCluster){
           for (iPad = 0; iPad < kNsig; iPad++) {
             padSignal[iPad] = TMath::Abs(digitsOut->GetDataUnchecked(row
-                      ,col-1+iPad
-                      ,time));
+                                                                    ,col-1+iPad
+                                                                    ,time));
           }
           // Unfold the two maxima and set the signal on 
           // the overlapping pad to the ratio
@@ -893,26 +900,26 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
         if (AliTRDReconstructor::RecoParam()->IsLUT()) {
           // Calculate the position of the cluster by using the
           // lookup table method
-          clusterPosCol = LUTposition(ilayer,clusterSignal[0]
-              ,clusterSignal[1]
-              ,clusterSignal[2]);
-        } else {
+          clusterPosCol = LUTposition(ilayer,clusterSignal[2]
+                                            ,clusterSignal[1]
+                                            ,clusterSignal[0]);
+        } 
+        else {
           // Calculate the position of the cluster by using the
           // center of gravity method
           for (Int_t i = 0; i < kNsig; i++) {
             padSignal[i] = 0.0;
           }
           padSignal[2] = TMath::Abs(digitsOut->GetDataUnchecked(row,col  ,time)); // Central pad
-          padSignal[1] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-1,time)); // Left    pad
-          padSignal[3] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+1,time)); // Right   pad
-
+          padSignal[1] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+1,time)); // Left    pad
+          padSignal[3] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-1,time)); // Right   pad
           if ((col >           2) && 
               (TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time)) < padSignal[1])) {
-              padSignal[0] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
+              padSignal[4] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
           }
           if ((col < nColMax - 3) &&
               (TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time)) < padSignal[3])){
-              padSignal[4] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time));
+              padSignal[0] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time));
           }
           clusterPosCol = GetCOG(padSignal);
         }
@@ -933,9 +940,9 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
         // Here the calibration for T0, Vdrift and ExB is applied as well.
         Double_t clusterXYZ[6];
         clusterXYZ[0] = clusterPosCol;
-        clusterXYZ[1] = clusterSignal[0];
+        clusterXYZ[1] = clusterSignal[2];
         clusterXYZ[2] = clusterSignal[1];
-        clusterXYZ[3] = clusterSignal[2];
+        clusterXYZ[3] = clusterSignal[0];
         clusterXYZ[4] = 0.0;
         clusterXYZ[5] = 0.0;
         Int_t    clusterRCT[3];
@@ -958,26 +965,32 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
         Double_t clusterCharge  = clusterXYZ[3];
         Char_t   clusterTimeBin = ((Char_t) clusterRCT[2]);
         AliTRDcluster *cluster = new AliTRDcluster(idet
-                    ,clusterCharge
-                    ,clusterPos
-                    ,clusterSig
-                    ,0x0
-                    ,((Char_t) nPadCount)
-                    ,signals
-                    ,((UChar_t) col)
-                    ,((UChar_t) row)
-                    ,((UChar_t) time)
-                    ,clusterTimeBin
-                    ,clusterPosCol
-                    ,volid);
+                                                  ,clusterCharge
+                                                  ,clusterPos
+                                                  ,clusterSig
+                                                  ,0x0
+                                                  ,((Char_t) nPadCount)
+                                                  ,signals
+                                                  ,((UChar_t) col)
+                                                  ,((UChar_t) row)
+                                                  ,((UChar_t) time)
+                                                  ,clusterTimeBin
+                                                  ,clusterPosCol
+                                                  ,volid);
         cluster->SetInChamber(!out);
+
         UChar_t maskPosition = padStatus.GetDataUnchecked(row, col, time);
-        if(maskPosition){ 
+        if (maskPosition) { 
           cluster->SetPadMaskedPosition(maskPosition);
-
-          if(maskPosition & AliTRDcluster::kMaskedLeft) cluster->SetPadMaskedStatus(status[0]);
-          else if(maskPosition & AliTRDcluster::kMaskedCenter) cluster->SetPadMaskedStatus(status[1]);
-          else cluster->SetPadMaskedStatus(status[2]);
+          if       (maskPosition & AliTRDcluster::kMaskedLeft) {
+            cluster->SetPadMaskedStatus(status[0]);
+         }
+          else if  (maskPosition & AliTRDcluster::kMaskedCenter) {
+            cluster->SetPadMaskedStatus(status[1]);
+         }
+          else {
+            cluster->SetPadMaskedStatus(status[2]);
+         }
         }
 
         // Temporarily store the row, column and time bin of the center pad
@@ -1094,6 +1107,7 @@ Double_t AliTRDclusterizer::GetCOG(Double_t signal[5]) const
                + signal[3]
                + signal[4];
 
+  // ???????????? CBL
   Double_t res = (0.0 * (-signal[0] + signal[4])
                       + (-signal[1] + signal[3])) / sum;
 
index c044798..fd1efea 100644 (file)
@@ -21,7 +21,6 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-
 #include <TGeoManager.h>
 #include <TGeoPhysicalNode.h>
 #include <TGeoMatrix.h>
@@ -36,6 +35,7 @@
 #include "AliTRDcalibDB.h"
 #include "AliTRDgeometry.h"
 #include "AliTRDpadPlane.h"
+#include "AliTRDSimParam.h"
 
 ClassImp(AliTRDgeometry)
 
@@ -336,7 +336,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.515);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.635);
-      padPlane->SetTiltingAngle(-2.0);
+      padPlane->SetTiltingAngle(2.0);
     }
     else {
       // L0C1 type
@@ -347,7 +347,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.515);
       padPlane->SetLengthIPad(7.5);
       padPlane->SetWidthIPad(0.635);
-      padPlane->SetTiltingAngle(-2.0);
+      padPlane->SetTiltingAngle(2.0);
     }
     break;
   case 1:
@@ -360,7 +360,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.585);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.665);
-      padPlane->SetTiltingAngle(2.0);
+      padPlane->SetTiltingAngle(-2.0);
     }
     else {
       // L1C1 type
@@ -371,7 +371,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.585);
       padPlane->SetLengthIPad(7.5);
       padPlane->SetWidthIPad(0.665);
-      padPlane->SetTiltingAngle(2.0);
+      padPlane->SetTiltingAngle(-2.0);
     }
     break;
   case 2:
@@ -384,7 +384,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.705);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.695);
-      padPlane->SetTiltingAngle(-2.0);
+      padPlane->SetTiltingAngle(2.0);
     }
     else {
       // L2C1 type
@@ -395,7 +395,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.705);
       padPlane->SetLengthIPad(8.0);
       padPlane->SetWidthIPad(0.695);
-      padPlane->SetTiltingAngle(-2.0);
+      padPlane->SetTiltingAngle(2.0);
     }
     break;
   case 3:
@@ -408,7 +408,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.775);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.725);
-      padPlane->SetTiltingAngle(2.0);
+      padPlane->SetTiltingAngle(-2.0);
     }
     else {
       // L3C1 type
@@ -419,7 +419,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.775);
       padPlane->SetLengthIPad(8.5);
       padPlane->SetWidthIPad(0.725);
-      padPlane->SetTiltingAngle(2.0);
+      padPlane->SetTiltingAngle(-2.0);
     }
     break;
   case 4:
@@ -432,7 +432,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.845);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.755);
-      padPlane->SetTiltingAngle(-2.0);
+      padPlane->SetTiltingAngle(2.0);
     }
     else {
       // L4C1 type
@@ -443,7 +443,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.845);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.755);
-      padPlane->SetTiltingAngle(-2.0);
+      padPlane->SetTiltingAngle(2.0);
     }
     break;
   case 5:
@@ -456,7 +456,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.965);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.785);
-      padPlane->SetTiltingAngle(2.0);
+      padPlane->SetTiltingAngle(-2.0);
     }
     else {
       // L5C1 type
@@ -467,7 +467,7 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
       padPlane->SetWidthOPad(0.965);
       padPlane->SetLengthIPad(9.0);
       padPlane->SetWidthIPad(0.785);
-      padPlane->SetTiltingAngle(2.0);
+      padPlane->SetTiltingAngle(-2.0);
     }
     break;
   };
@@ -493,17 +493,17 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
   //
   // Column direction
   //
-  Double_t col = fCwidth[ilayer] / 2.0
-               + fgkCroW
-               - padPlane->GetWidthRim();
+  Double_t col = - fCwidth[ilayer] / 2.0
+                 - fgkCroW
+                 + padPlane->GetWidthRim();
   for (Int_t ic = 0; ic < padPlane->GetNcols(); ic++) {
     padPlane->SetPadCol(ic,col);
-    col -= padPlane->GetColSpacing();
+    col += padPlane->GetColSpacing();
     if (ic == 0) {
-      col -= padPlane->GetWidthOPad();
+      col += padPlane->GetWidthOPad();
     }
     else {
-      col -= padPlane->GetWidthIPad();
+      col += padPlane->GetWidthIPad();
     }
   }
   // Calculate the offset to translate from the local ROC system into
@@ -578,6 +578,8 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed)
   Char_t  cTagV[6];
   Char_t  cTagM[5];
 
+  AliTRDSimParam *simParam = AliTRDSimParam::Instance();
+
   // There are three TRD volumes for the supermodules in order to accomodate
   // the different arrangements in front of PHOS
   // UTR1: Default supermodule
@@ -2198,22 +2200,23 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed)
       Int_t   iDet    = GetDetectorSec(ilayer,istack);
       Int_t   iCopy   = GetDetector(ilayer,istack,0) * 1000;
       Int_t   nMCMrow = GetRowMax(ilayer,istack,0);
-      Float_t ySize   = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) 
+      Float_t ySize   = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
                       / ((Float_t) nMCMrow);
       Int_t   nMCMcol = 8;
       Float_t xSize   = (GetChamberWidth(ilayer)         - 2.0*fgkCpadW)
-                     / ((Float_t) nMCMcol);
+                      / ((Float_t) nMCMcol + 6);             // Introduce 6 gaps
+      Int_t   iMCM[8] = {  1,  2,  3,  5,  8,  9, 10, 12 };  // 0..7 MCM + 6 gap structure
       sprintf(cTagV,"UU%02d",iDet);
       for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
         for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
-          xpos      = (0.5 + iMCMcol) * xSize + 1.0 
+          xpos      = (0.5 + iMCM[iMCMcol]) * xSize + 1.0
                     - fCwidth[ilayer]/2.0;
-          ypos      = (0.5 + iMCMrow) * ySize + 1.0 
+          ypos      = (0.5 + iMCMrow) * ySize + 1.0
                     - fClength[ilayer][istack]/2.0 + fgkHspace/2.0;
           zpos      = -0.4 + 0.742/2.0;
           gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
                            ,xpos,ypos,zpos,0,"ONLY");
-       }
+        }
       }
 
     }
index a34d0aa..5c776e9 100644 (file)
@@ -326,7 +326,7 @@ Int_t AliTRDpadPlane::GetPadRowNumberROC(Double_t z) const
 Int_t AliTRDpadPlane::GetPadColNumber(Double_t rphi) const
 {
   //
-  // Finds the pad column number for a given global rphi-position
+  // Finds the pad column number for a given rphi-position
   //
 
   Int_t col    = 0;
@@ -334,29 +334,29 @@ Int_t AliTRDpadPlane::GetPadColNumber(Double_t rphi) const
   Int_t nbelow = 0;
   Int_t middle = 0;
 
-  if ((rphi > GetCol0()  ) || 
-      (rphi < GetColEnd())) {
+  if ((rphi < GetCol0()  ) || 
+      (rphi > GetColEnd())) {
 
     col = -1;
 
   }
   else {
 
-    nabove = fNcols + 1;
+    nabove = fNcols;
     nbelow = 0;
     while (nabove - nbelow > 1) {
       middle = (nabove + nbelow) / 2;
-      if (rphi == fPadCol[middle-1]) {
+      if (rphi == fPadCol[middle]) {
         col    = middle;
       }
-      if (rphi  > fPadCol[middle-1]) {
-        nabove = middle;
+      if (rphi  > fPadCol[middle]) {
+        nbelow = middle;
       }
       else {
-        nbelow = middle;
+        nabove = middle;
       }
     }
-    col = nbelow - 1;
+    col = nbelow;
 
   }
 
index 302d2ba..4010554 100644 (file)
@@ -5,20 +5,19 @@
 
 /* $Id$ */
 
-//////////////////////////////////////////////////
-//                                              //
-//  TRD pad plane class                         //
-//                                              //
-//  Contains the information on pad postions,   //
-//  pad dimensions, tilting angle, etc.         //
-//  It also provides methods to identify the    //
-//  current pad number from global coordinates. //
-//                                              //
-//////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+//                                                                        //
+//  TRD pad plane class                                                   //
+//                                                                        //
+//  Contains the information on ideal pad positions, pad dimensions,      //
+//  tilting angle, etc.                                                   //
+//  It also provides methods to identify the current pad number from      //
+//  local tracking coordinates.                                           //
+//                                                                        //
+////////////////////////////////////////////////////////////////////////////
 
 #include <TObject.h>
 
-
 //_____________________________________________________________________________
 class AliTRDpadPlane : public TObject {
 
@@ -64,7 +63,7 @@ class AliTRDpadPlane : public TObject {
   Double_t GetPadRowOffset(Int_t row, Double_t z) const
                                              { if ((row < 0) || (row >= fNrows))
                                                  return -1.0;
-                                               else 
+                                                else 
                                                  return fPadRow[row] + fPadRowSMOffset - z;        };
   Double_t GetPadRowOffsetROC(Int_t row, Double_t z) const
                                              { if ((row < 0) || (row >= fNrows))
@@ -76,7 +75,7 @@ class AliTRDpadPlane : public TObject {
                                              { if ((col < 0) || (col >= fNcols))
                                                  return -1.0;
                                                else
-                                                 return fPadCol[col] - rphi; };
+                                                 return rphi - fPadCol[col]; };
 
   Double_t GetTiltingAngle() const           { return fTiltingAngle; };
 
@@ -89,7 +88,7 @@ class AliTRDpadPlane : public TObject {
 
   Double_t GetRowEnd() const                 { return fPadRow[fNrows-1] - fLengthOPad + fPadRowSMOffset; };
   Double_t GetRowEndROC() const              { return fPadRow[fNrows-1] - fLengthOPad; };
-  Double_t GetColEnd() const                 { return fPadCol[fNcols-1] - fWidthOPad;  };
+  Double_t GetColEnd() const                 { return fPadCol[fNcols-1] + fWidthOPad;  };
 
   Double_t GetRowPos(Int_t row) const        { return fPadRow[row] + fPadRowSMOffset;  };
   Double_t GetRowPosROC(Int_t row) const     { return fPadRow[row];  };
index 85d28e8..9bf7ed8 100644 (file)
@@ -277,7 +277,7 @@ Bool_t AliTRDtransform::Transform(Double_t *x, Int_t *i, UInt_t time, Bool_t &ou
     // apply ExB correction to the Y-position
     // and move to the Z-position relative to the middle of the chamber
     posLocal[0] = -xLocal;
-    posLocal[1] =  (fPadPlane->GetColPos(col) - (x[0] + 0.5) * colSize) - driftLength * exbCorr;
+    posLocal[1] =  (fPadPlane->GetColPos(col) + (0.5 - x[0]) * colSize) - driftLength * exbCorr;
     posLocal[2] =  (fPadPlane->GetRowPos(row) -         0.5  * rowSize) - fZShiftIdeal;
 
     // Go to tracking coordinates
@@ -303,8 +303,8 @@ Bool_t AliTRDtransform::Transform(Double_t *x, Int_t *i, UInt_t time, Bool_t &ou
     x[5] = rowSize*rowSize / 12.0;                                       
     i[2] = TMath::Nint(timeT0Cal);
                
-               // A.Bercuci for TRD tracking calibration awareness
-               out = (i[2] < 0 || i[2] > Int_t(3.5*fSamplingFrequency/vdrift)) ? kTRUE : kFALSE; 
+    // For TRD tracking calibration awareness
+    out  = ((i[2] < 0) || (i[2] > Int_t(3.5 * fSamplingFrequency/vdrift))) ? kTRUE : kFALSE; 
 
     return kTRUE;
 
@@ -349,5 +349,6 @@ void AliTRDtransform::Recalibrate(AliTRDcluster *c, Bool_t setDet)
   c->SetY(clusterXYZ[1]);
   c->SetZ(clusterXYZ[2]);
   c->SetLocalTimeBin(((Char_t) clusterRCT[2]));
-       c->SetInChamber(!out);
+  c->SetInChamber(!out);
+
 }