]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Switching to the TDR naming schema (I cross my fingers)
authorbelikov <Iouri.Belikov@cern.ch>
Wed, 12 Feb 2014 09:26:56 +0000 (10:26 +0100)
committerbelikov <Iouri.Belikov@cern.ch>
Wed, 12 Feb 2014 09:26:56 +0000 (10:26 +0100)
54 files changed:
ITS/UPGRADE/AliITSU.cxx
ITS/UPGRADE/AliITSU.h
ITS/UPGRADE/AliITSUCalibrationPix.cxx
ITS/UPGRADE/AliITSUChip.cxx [moved from ITS/UPGRADE/AliITSUModule.cxx with 81% similarity]
ITS/UPGRADE/AliITSUChip.h [moved from ITS/UPGRADE/AliITSUModule.h with 65% similarity]
ITS/UPGRADE/AliITSUClusterPix.cxx
ITS/UPGRADE/AliITSUClusterizer.h
ITS/UPGRADE/AliITSUDigitizer.cxx
ITS/UPGRADE/AliITSUDigitizer.h
ITS/UPGRADE/AliITSUGeomTGeo.cxx
ITS/UPGRADE/AliITSUGeomTGeo.h
ITS/UPGRADE/AliITSUHit.cxx
ITS/UPGRADE/AliITSUHit.h
ITS/UPGRADE/AliITSULoader.cxx
ITS/UPGRADE/AliITSULoader.h
ITS/UPGRADE/AliITSURecoDet.cxx
ITS/UPGRADE/AliITSURecoLayer.cxx
ITS/UPGRADE/AliITSURecoLayer.h
ITS/UPGRADE/AliITSUReconstructor.cxx
ITS/UPGRADE/AliITSUSDigit.cxx
ITS/UPGRADE/AliITSUSDigit.h
ITS/UPGRADE/AliITSUSegmentationPix.cxx
ITS/UPGRADE/AliITSUSegmentationPix.h
ITS/UPGRADE/AliITSUSimuParam.cxx
ITS/UPGRADE/AliITSUSimuParam.h
ITS/UPGRADE/AliITSUSimulation.cxx
ITS/UPGRADE/AliITSUSimulation.h
ITS/UPGRADE/AliITSUSimulationPix.cxx
ITS/UPGRADE/AliITSUSimulationPix.h
ITS/UPGRADE/AliITSUSuze02.cxx
ITS/UPGRADE/AliITSUSuze02.h
ITS/UPGRADE/AliITSUTrackerGlo.cxx
ITS/UPGRADE/AliITSUv0.cxx
ITS/UPGRADE/AliITSUv0.h
ITS/UPGRADE/AliITSUv0Layer.cxx
ITS/UPGRADE/AliITSUv0Layer.h
ITS/UPGRADE/AliITSUv1.cxx
ITS/UPGRADE/AliITSUv1.h
ITS/UPGRADE/AliITSUv1Layer.cxx
ITS/UPGRADE/AliITSUv1Layer.h
ITS/UPGRADE/CMakelibITSUpgradeSim.pkg
ITS/UPGRADE/ITSUpgradeRecLinkDef.h
ITS/UPGRADE/ITSUpgradeSimLinkDef.h
ITS/UPGRADE/MakeITSUResMisAlignment.C
ITS/UPGRADE/macros/ScanDigitsSuze02_v15.C
ITS/UPGRADE/readDigits.C
ITS/UPGRADE/readHit.C
ITS/UPGRADE/testITSU/CreateITSU.C
ITS/UPGRADE/testITSU/CreateITSU_cdr.C
ITS/UPGRADE/testITSU/CreateITSUsinglesegm.C
ITS/UPGRADE/testITSU/compClusHits.C
ITS/UPGRADE/testITSU/drawLr.C
ITS/UPGRADE/testITSUv1/CreateITSUv0.C
ITS/UPGRADE/testITSUv1/CreateITSUv1.C

index e1296e08a2e96b678e165393b3c50bcc86168755..85e676c18e55532c62de7f1c42517839baa710b1 100644 (file)
@@ -92,7 +92,7 @@ the AliITS class.
 #include "AliRun.h"
 #include "AliLog.h"
 #include "AliITSdigit.h"
-#include "AliITSUModule.h"
+#include "AliITSUChip.h"
 #include "AliITSUDigitPix.h"
 #include "AliITSsegmentation.h"
 #include "AliITSUSegmentationPix.h"
@@ -120,7 +120,7 @@ AliDetector()
   ,fpSDigits(0)
   ,fSDigits(0)
   ,fDetHits(0)
-  ,fModuleHits(0)
+  ,fChipHits(0)
   ,fDetDigits(0)
   ,fSensMap(0)
   ,fSimModelLr(0)
@@ -147,7 +147,7 @@ AliITSU::AliITSU(const Char_t *title, Int_t nlay) :
   ,fpSDigits(0)
   ,fSDigits(0)
   ,fDetHits(0)
-  ,fModuleHits(0)
+  ,fChipHits(0)
   ,fDetDigits(0)
   ,fSensMap(0)
   ,fSimModelLr(0)
@@ -194,9 +194,9 @@ AliITSU::~AliITSU()
   delete[] fLayerName;  // Array of TStrings
   delete[] fIdSens;
   //
-  int nmod = fGeomTGeo ? fGeomTGeo->GetNModules() : 0;
-  if (fModuleHits) fModuleHits->Delete();
-  delete fModuleHits;
+  int nmod = fGeomTGeo ? fGeomTGeo->GetNChips() : 0;
+  if (fChipHits) fChipHits->Delete();
+  delete fChipHits;
   if(fModA){
     for(Int_t j=0; j<nmod; j++){
       fModA[j]->Delete();
@@ -213,7 +213,7 @@ AliITSU::~AliITSU()
 //______________________________________________________________________
 AliDigitizer* AliITSU::CreateDigitizer(AliDigitizationInput* manager) const
 {
-  // Creates the AliITSDigitizer in a standard way for use via AliModule.
+  // Creates the AliITSDigitizer in a standard way for use via AliChip.
   // This function can not be included in the .h file because of problems
   // with the order of inclusion (recursive).
   // Inputs:
@@ -304,10 +304,10 @@ void AliITSU:: MakeBranchInTreeD(TTree* treeD, const char* file)
   Int_t buffersize = 4000;
   if (!fDetDigits) InitArrays();
   //
-  for (Int_t i=0;i<kNDetTypes;i++) {
+  for (Int_t i=0;i<kNChipTypes;i++) {
     ResetDigits(i);
     TClonesArray* darr = (TClonesArray*)fDetDigits->At(i);
-    AliDetector::MakeBranchInTree(treeD,Form("%sDigits%s",GetName(),fGeomTGeo->GetDetTypeName(i)),
+    AliDetector::MakeBranchInTree(treeD,Form("%sDigits%s",GetName(),fGeomTGeo->GetChipTypeName(i)),
                                  &darr,buffersize,file);
   }
   //
@@ -320,15 +320,15 @@ void AliITSU::InitArrays()
   //
   if(!fLoader) MakeLoader(AliConfig::GetDefaultEventFolderName());
   //  
-  fDetDigits = new TObjArray(kNDetTypes);
-  for (Int_t i=0;i<kNDetTypes;i++) fDetDigits->AddAt(new TClonesArray(GetDigitClassName(i),100),i);
+  fDetDigits = new TObjArray(kNChipTypes);
+  for (Int_t i=0;i<kNChipTypes;i++) fDetDigits->AddAt(new TClonesArray(GetDigitClassName(i),100),i);
   //
   fSDigits = new TClonesArray("AliITSUSDigit",100);
   //
   fDetHits = new TClonesArray("AliITSUHit",100);
   //
-  fModuleHits = new TObjArray(fGeomTGeo->GetNModules());
-  for (int i=0;i<fGeomTGeo->GetNModules();i++) fModuleHits->AddLast( new AliITSUModule(i,fGeomTGeo) );
+  fChipHits = new TObjArray(fGeomTGeo->GetNChips());
+  for (int i=0;i<fGeomTGeo->GetNChips();i++) fChipHits->AddLast( new AliITSUChip(i,fGeomTGeo) );
   //
 }
 
@@ -345,8 +345,8 @@ void AliITSU::SetTreeAddress()
   TTree *treeD = fLoader->TreeD();
   if (treeD) {
     if (!fDetDigits) InitArrays();
-    for (int i=0;i<kNDetTypes;i++) {
-      TString brname = Form("%sDigits%s",GetName(),GetDetTypeName(i));
+    for (int i=0;i<kNChipTypes;i++) {
+      TString brname = Form("%sDigits%s",GetName(),GetChipTypeName(i));
       TBranch* br = treeD->GetBranch(brname.Data());
       if (!br) continue;
       TClonesArray* darr = (TClonesArray*)fDetDigits->At(i);
@@ -377,9 +377,9 @@ void AliITSU::AddHit(Int_t track, Int_t *vol, Float_t *hits)
 }
 
 //______________________________________________________________________
-void AliITSU::FillModules(Int_t bgrev, Option_t *option, const char *filename) 
+void AliITSU::FillChips(Int_t bgrev, Option_t *option, const char *filename) 
 {
-  // fill the modules with the sorted by module hits; add hits from
+  // fill the chips with the sorted by chip hits; add hits from
   // background if option=Add.
   //
   static TTree *trH1=0;                 //Tree with background hits
@@ -400,14 +400,14 @@ void AliITSU::FillModules(Int_t bgrev, Option_t *option, const char *filename)
     char treeName[21];
     snprintf(treeName,20,"TreeH%d",bgrev);
     trH1 = (TTree*)gDirectory->Get(treeName);
-    if (!trH1) Error("FillModules","cannot find Hits Tree for event:%d",bgrev);
+    if (!trH1) Error("FillChips","cannot find Hits Tree for event:%d",bgrev);
     // Set branch addresses
   } // end if addBgr
   
-  FillModules(fLoader->TreeH(),0); // fill from this file's tree.
+  FillChips(fLoader->TreeH(),0); // fill from this file's tree.
   //
   if (addBgr ) {
-    FillModules(trH1,10000000); // Default mask 10M.
+    FillChips(trH1,10000000); // Default mask 10M.
     TTree *fAli=fLoader->GetRunLoader()->TreeK();
     TFile *fileAli=0;
     if (fAli) {
@@ -419,24 +419,24 @@ void AliITSU::FillModules(Int_t bgrev, Option_t *option, const char *filename)
 }
 
 //______________________________________________________________________
-void AliITSU::FillModules(TTree *treeH, Int_t /*mask*/)
+void AliITSU::FillChips(TTree *treeH, Int_t /*mask*/)
 {
-  // fill the modules with the sorted by module hits; 
+  // fill the chips with the sorted by chip hits; 
   // can be called many times to do a merging
   // Inputs:
   //      TTree *treeH  The tree containing the hits to be copied into
-  //                    the modules.
+  //                    the chips.
   //      Int_t mask    The track number mask to indecate which file
   //                    this hits came from.
   //  
   if (treeH == 0x0) { AliError("Tree H  is NULL"); return; }
   //
-  Int_t lay,lad,det,index;
+  Int_t lay,sta,ssta,mod,chip,index;
   AliITSUHit *itsHit=0;
   char branchname[21];
   snprintf(branchname,20,"%s",GetName());
   TBranch *branch = treeH->GetBranch(branchname);
-  if (!branch) {Error("FillModules","%s branch in TreeH not found",branchname); return;} // end if !branch
+  if (!branch) {Error("FillChips","%s branch in TreeH not found",branchname); return;} // end if !branch
   //
   branch->SetAddress(&fHits);
   Int_t nTracks =(Int_t) treeH->GetEntries();
@@ -448,11 +448,11 @@ void AliITSU::FillModules(TTree *treeH, Int_t /*mask*/)
     Int_t nHits = fHits->GetEntriesFast();
     for (h=0; h<nHits; h++){
       itsHit = (AliITSUHit *)fHits->UncheckedAt(h);
-      itsHit->GetDetectorID(lay,lad,det);
-      index = fGeomTGeo->GetModuleIndex(lay,lad,det); // !!! AliITSHit counts indices from 1!
+      itsHit->GetChipID(lay,sta,ssta,mod,chip);
+      index = fGeomTGeo->GetChipIndex(lay,sta,ssta,mod,chip); // !!! AliITSHit counts indices from 1!
       itsHit = new( (*fDetHits)[fDetHits->GetEntriesFast()] ) AliITSUHit(*itsHit);
       itsHit->SetUniqueID(h);
-      GetModule(index)->AddHit(itsHit);
+      GetChip(index)->AddHit(itsHit);
       // do we need to add a mask?
       // itsHit->SetTrack(itsHit->GetTrack()+mask);
     } // end loop over hits 
@@ -460,11 +460,11 @@ void AliITSU::FillModules(TTree *treeH, Int_t /*mask*/)
 }
 
 //______________________________________________________________________
-void AliITSU::ClearModules()
+void AliITSU::ClearChips()
 {
   // clear accumulated hits
-  if (!fModuleHits || !fDetHits) AliFatal("Hits accumulation arrays are not defined");
-  for (int i=fGeomTGeo->GetNModules();i--;) GetModule(i)->Clear();
+  if (!fChipHits || !fDetHits) AliFatal("Hits accumulation arrays are not defined");
+  for (int i=fGeomTGeo->GetNChips();i--;) GetChip(i)->Clear();
   fDetHits->Clear();
 }
 
@@ -498,40 +498,40 @@ void AliITSU::Hits2SDigits(Int_t evNumber,Int_t bgrev,Option_t *option,const cha
   // Inputs:
   //      Int_t evnt       Event to be processed.
   //      Int_t bgrev      Background Hit tree number.
-  //      Int_t nmodules   Not used.
+  //      Int_t nchips   Not used.
   //      Option_t *option String indicating if merging hits or not. To
   //                       merge hits set equal to "Add". Otherwise no
   //                       background hits are considered.
   //      Test_t *filename File name containing the background hits..
   //
   if (!IsSimInitDone()) InitSimulation();
-  FillModules(bgrev,option,filename);
+  FillChips(bgrev,option,filename);
   //
-  Int_t nmodules = fGeomTGeo->GetNModules();
+  Int_t nchips = fGeomTGeo->GetNChips();
   int prevLr = -1;
-  float roPhase=0; // synchronysation type between layers/modules
-  Bool_t randomyzeModules = kFALSE; // do we need to randomize layers
+  float roPhase=0; // synchronysation type between layers/chips
+  Bool_t randomyzeChips = kFALSE; // do we need to randomize layers
   //
-  for(int module=0;module<nmodules;module++) {
-    int lr = fGeomTGeo->GetLayer(module);
+  for(int chip=0;chip<nchips;chip++) {
+    int lr = fGeomTGeo->GetLayer(chip);
     AliITSUSimulation* sim = GetSimulationModel(lr);
-    sim->InitSimulationModule(GetModule(module),evNumber/*,gAlice->GetEvNumber()*/,GetSegmentation(lr),GetResponseParam(lr));
+    sim->InitSimulationChip(GetChip(chip),evNumber/*,gAlice->GetEvNumber()*/,GetSegmentation(lr),GetResponseParam(lr));
     //
     if (prevLr!=lr) { // new layer started)
       roPhase = fSimuParam->GetLrROCycleShift(lr);
-      if (Abs(roPhase)<1.) roPhase = roPhase*sim->GetReadOutCycleLength(); // modules synchronized within layer with this offset
-      else                randomyzeModules = kTRUE;                     // modules have random offset
+      if (Abs(roPhase)<1.) roPhase = roPhase*sim->GetReadOutCycleLength(); // chips synchronized within layer with this offset
+      else                randomyzeChips = kTRUE;                     // chips have random offset
     }
-    if (randomyzeModules) sim->GenerateReadOutCycleOffset();
+    if (randomyzeChips) sim->GenerateReadOutCycleOffset();
     else                  sim->SetReadOutCycleOffset(roPhase);
     //
-    sim->SDigitiseModule();
+    sim->SDigitiseChip();
     fLoader->TreeS()->Fill();      // fills all branches - wasted disk space
     ResetSDigits();
     prevLr = lr;
   } 
   //
-  ClearModules();
+  ClearChips();
   //
   fLoader->TreeS()->GetEntries();
   fLoader->TreeS()->AutoSave();
@@ -576,33 +576,33 @@ void AliITSU::Hits2Digits(Int_t evNumber,Int_t bgrev,Option_t *option,const char
   // Outputs:
   //  
   if (!IsSimInitDone()) InitSimulation();
-  FillModules(bgrev,option,filename);
+  FillChips(bgrev,option,filename);
   // 
-  Int_t nmodules = fGeomTGeo->GetNModules();
+  Int_t nchips = fGeomTGeo->GetNChips();
   int prevLr = -1;
-  float roPhase=0; // synchronysation type between layers/modules
-  Bool_t randomyzeModules = kFALSE; // do we need to randomize layers
+  float roPhase=0; // synchronysation type between layers/chips
+  Bool_t randomyzeChips = kFALSE; // do we need to randomize layers
   //
-  for (Int_t module=0;module<nmodules;module++) {
-    int lr = fGeomTGeo->GetLayer(module);
+  for (Int_t chip=0;chip<nchips;chip++) {
+    int lr = fGeomTGeo->GetLayer(chip);
     AliITSUSimulation* sim = GetSimulationModel(lr);
     //
-    sim->InitSimulationModule(GetModule(module),evNumber/*gAlice->GetEvNumber()*/,GetSegmentation(lr),GetResponseParam(lr));
+    sim->InitSimulationChip(GetChip(chip),evNumber/*gAlice->GetEvNumber()*/,GetSegmentation(lr),GetResponseParam(lr));
     if (prevLr!=lr) { // new layer started)
       roPhase = fSimuParam->GetLrROCycleShift(lr);
-      if (Abs(roPhase)<1.) roPhase = roPhase*sim->GenerateReadOutCycleOffset(); // modules synchronized within layer with this offset
-      else                randomyzeModules = kTRUE;                     // modules have random offset
+      if (Abs(roPhase)<1.) roPhase = roPhase*sim->GenerateReadOutCycleOffset(); // chips synchronized within layer with this offset
+      else                randomyzeChips = kTRUE;                     // chips have random offset
     }
-    if (randomyzeModules) sim->GenerateReadOutCycleOffset();
+    if (randomyzeChips) sim->GenerateReadOutCycleOffset();
     else                  sim->SetReadOutCycleOffset(roPhase);
-    sim->DigitiseModule();
+    sim->DigitiseChip();
     // fills all branches - wasted disk space
     fLoader->TreeD()->Fill(); 
     ResetDigits();
     prevLr = lr;
-  } // end for module
+  } // end for chip
   //
-  ClearModules();
+  ClearChips();
   //
   //    WriteFOSignals(); // Add Fast-OR signals to event (only one object per event)
   fLoader->TreeD()->GetEntries();
@@ -619,7 +619,7 @@ void AliITSU::Hits2FastRecPoints(Int_t bgrev,Option_t *opt,const char *flnm)
   // Inputs:
   //      Int_t evnt       Event to be processed.
   //      Int_t bgrev      Background Hit tree number.
-  //      Option_t *opt    Option passed to FillModules. See FillModules.
+  //      Option_t *opt    Option passed to FillChips. See FillChips.
   //      Test_t *flnm     File name containing the background hits..
   // Outputs:
   //      none.
@@ -627,8 +627,8 @@ void AliITSU::Hits2FastRecPoints(Int_t bgrev,Option_t *opt,const char *flnm)
   //      none.
   if (!IsSimInitDone()) InitSimulation();
   AliITSULoader *pITSloader = (AliITSULoader*)fLoader;
-  Int_t nmodules = fGeomTGeo->GetNModules();
-  FillModules(bgrev,opt,flnm);
+  Int_t nchips = fGeomTGeo->GetNChips();
+  FillChips(bgrev,opt,flnm);
   //
   TTree *lTR = pITSloader->TreeR();
   if(!lTR) {
@@ -639,16 +639,16 @@ void AliITSU::Hits2FastRecPoints(Int_t bgrev,Option_t *opt,const char *flnm)
   TClonesArray* ptarray = new TClonesArray("AliITSRecPoint",1000);
   TBranch* branch = (TBranch*)lTR->Branch("ITSRecPointsF",&ptarray);
   branch->SetAddress(&ptarray);
-  for (int module=0;module<nmodules;module++){
-    int id = fGeomTGeo->GetModuleDetTypeID(module);
+  for (int chip=0;chip<nchips;chip++){
+    int id = fGeomTGeo->GetChipChipTypeID(chip);
     AliITSUSimulation* sim = GetSimulationModel(id);
-    if (!sim) AliFatal(Form("The sim.class for module %d of DetTypeID %d is missing",module,id));
-    sim->CreateFastRecPoints( GetModule(module) ,module,gRandom,ptarray);
+    if (!sim) AliFatal(Form("The sim.class for chip %d of ChipTypeID %d is missing",chip,id));
+    sim->CreateFastRecPoints( GetChip(chip) ,chip,gRandom,ptarray);
     lTR->Fill();
     ptarray->Clear();
-  } // end for module
+  } // end for chip
   //
-  ClearModules();
+  ClearChips();
   fLoader->WriteRecPoints("OVERWRITE");
   delete ptarray;
 }
@@ -660,7 +660,7 @@ Int_t AliITSU::Hits2Clusters(TTree */*hTree*/, TTree */*cTree*/)
   // This function creates ITS clusters
   if (!IsSimInitDone()) InitSimulation();
   Int_t mmax = 0;
-  FillModules(hTree,0);
+  FillChips(hTree,0);
   //
   TClonesArray *points = new TClonesArray("AliITSRecPoint",1000);
   TBranch *branch=cTree->GetBranch("ITSRecPoints");
@@ -670,13 +670,13 @@ Int_t AliITSU::Hits2Clusters(TTree */*hTree*/, TTree */*cTree*/)
   AliITSsimulationFastPoints sim;
   Int_t ncl=0;
   for (Int_t m=0; m<mmax; m++) {
-    sim.CreateFastRecPoints(GetModule(m),m,gRandom,points);      
+    sim.CreateFastRecPoints(GetChip(m),m,gRandom,points);      
     ncl+=points->GetEntriesFast();
     cTree->Fill();
     points->Clear();
   }
   //
-  ClearModules();
+  ClearChips();
   //
   AliDebug(1,Form("Number of found fast clusters : %d",ncl));
   //cTree->Write();
@@ -712,7 +712,7 @@ void AliITSU::CheckLabels(Int_t lab[3]) const //RSDONE
 void AliITSU::ResetDigits() //RSDONE?
 {
   // Reset number of digits and the digits array for the ITS detector.
-  if (fDetDigits) for (int i=kNDetTypes;i--;) ResetDigits(i);
+  if (fDetDigits) for (int i=kNChipTypes;i--;) ResetDigits(i);
   //
 }
 
@@ -727,7 +727,7 @@ void AliITSU::ResetDigits(Int_t branch)
 //______________________________________________________________________
 void AliITSU::AddSumDigit(AliITSUSDigit &sdig)
 {
-  // Adds the module summable digits to the summable digits tree.
+  // Adds the chip summable digits to the summable digits tree.
   new( (*fSDigits)[fSDigits->GetEntriesFast()]) AliITSUSDigit(sdig);
   //  
 }
@@ -743,7 +743,7 @@ void AliITSU::AddSimDigit(Int_t branch, AliITSdigit *d)
   TClonesArray &ldigits = *((TClonesArray*)fDetDigits->At(branch));
   int nd = ldigits.GetEntriesFast();
   switch(branch){
-  case AliITSUGeomTGeo::kDetTypePix:
+  case AliITSUGeomTGeo::kChipTypePix:
     new(ldigits[nd]) AliITSUDigitPix(*((AliITSUDigitPix*)d));
     break;
   default:
@@ -765,14 +765,14 @@ void AliITSU::AddSimDigit(Int_t branch,Float_t /*phys*/,Int_t *digits,Int_t *tra
   //                      containing the track numbers that contributed to
   //                      this digit.
   //      Int_t *hits     Integer array [AliITSdigitS?D::GetNTracks()]
-  //                      containing the hit numbers, from AliITSmodule, that
+  //                      containing the hit numbers, from AliITSchip, that
   //                      contributed to this digit.
   //      Float_t *charge Floating point array of the signals contributed
   //                      to this digit by each track.
   TClonesArray &ldigits = *((TClonesArray*)fDetDigits->At(branch));
   int nd = ldigits.GetEntriesFast();
   switch(branch){
-  case AliITSUGeomTGeo::kDetTypePix:
+  case AliITSUGeomTGeo::kChipTypePix:
     new(ldigits[nd]) AliITSUDigitPix(digits,tracks,hits);
     break;
   default:
@@ -810,7 +810,7 @@ Bool_t AliITSU::Raw2SDigits(AliRawReader* /*rawReader*/)
 AliTriggerDetector* AliITSU::CreateTriggerDetector() const 
 {
   // create an AliITSTrigger object (and set trigger conditions as input)
-  return new AliITSTrigger(fDetTypeSim->GetTriggerConditions());
+  return new AliITSTrigger(fChipTypeSim->GetTriggerConditions());
 }
 */
 
@@ -820,7 +820,7 @@ void AliITSU::WriteFOSignals()
   // This method write FO signals in Digits tree both in Hits2Digits
   // or SDigits2Digits
   AliError("Not ready");
-  //  fDetTypeSim->ProcessNoiseForFastOr();
+  //  fChipTypeSim->ProcessNoiseForFastOr();
 }
 
 //_______________________________________________________________________
@@ -833,28 +833,28 @@ void AliITSU::SDigits2Digits()
   if( !(trees && fSDigits) ) AliFatal("Error: No trees or SDigits.");
   TBranch* brchSDigits = trees->GetBranch(GetName());
   //
-  int nmodules = fGeomTGeo->GetNModules();
+  int nchips = fGeomTGeo->GetNChips();
   int prevLr = -1;
-  float roPhase=0; // synchronysation type between layers/modules
-  Bool_t randomyzeModules = kFALSE; // do we need to randomize layers
+  float roPhase=0; // synchronysation type between layers/chips
+  Bool_t randomyzeChips = kFALSE; // do we need to randomize layers
   //
-  for (int module=0;module<nmodules;module++) {
-    int lr = fGeomTGeo->GetLayer(module);
+  for (int chip=0;chip<nchips;chip++) {
+    int lr = fGeomTGeo->GetLayer(chip);
     AliITSUSimulation* sim = GetSimulationModel(lr);
-    sim->InitSimulationModule(GetModule(module),gAlice->GetEvNumber(),GetSegmentation(lr),GetResponseParam(lr));
+    sim->InitSimulationChip(GetChip(chip),gAlice->GetEvNumber(),GetSegmentation(lr),GetResponseParam(lr));
     //
     if (prevLr!=lr) { // new layer started)
       roPhase = fSimuParam->GetLrROCycleShift(lr);
-      if (Abs(roPhase)<1.) roPhase = roPhase*sim->GenerateReadOutCycleOffset(); // modules synchronized within layer with this offset
-      else                randomyzeModules = kTRUE;                     // modules have random offset
+      if (Abs(roPhase)<1.) roPhase = roPhase*sim->GenerateReadOutCycleOffset(); // chips synchronized within layer with this offset
+      else                randomyzeChips = kTRUE;                     // chips have random offset
     }
-    if (randomyzeModules) sim->GenerateReadOutCycleOffset();
+    if (randomyzeChips) sim->GenerateReadOutCycleOffset();
     else                  sim->SetReadOutCycleOffset(roPhase);
     //
     fSDigits->Clear();
-    brchSDigits->GetEvent(module);
-    sim->AddSDigitsToModule(fSDigits,0);
-    sim->FinishSDigitiseModule();
+    brchSDigits->GetEvent(chip);
+    sim->AddSDigitsToChip(fSDigits,0);
+    sim->FinishSDigitiseChip();
     fLoader->TreeD()->Fill();
     ResetDigits();
     prevLr = lr;
@@ -869,7 +869,7 @@ void AliITSU::SDigits2Digits()
 void AliITSU::InitSimulation()
 {
   // Initialize arrays, segmentations ets, needed for simulation
-  // Equivalent of old AliITSDetTypeSim construction
+  // Equivalent of old AliITSChipTypeSim construction
   //
   if (fSimInitDone) {AliInfo("Already done"); return;}
   //
@@ -890,8 +890,8 @@ void AliITSU::InitSimulation()
     fSimModelLr[i] = 0;
     fSegModelLr[i] = 0;
     fResponseLr[i] = 0;
-    int dType = fGeomTGeo->GetLayerDetTypeID(i);           // fine detector type: class + segmentation
-    int sType = dType/AliITSUGeomTGeo::kMaxSegmPerDetType; // detector simulation class
+    int dType = fGeomTGeo->GetLayerChipTypeID(i);           // fine detector type: class + segmentation
+    int sType = dType/AliITSUGeomTGeo::kMaxSegmPerChipType; // detector simulation class
     //
     // check if the simulation of this sType was already created for preceeding layers
     AliITSUSimulation* simUpg = 0;
@@ -904,7 +904,7 @@ void AliITSU::InitSimulation()
     if (!simUpg) { // need to create simulation for detector class sType
       switch (sType) 
        {
-       case AliITSUGeomTGeo::kDetTypePix : 
+       case AliITSUGeomTGeo::kChipTypePix : 
          simUpg = new AliITSUSimulationPix(fSimuParam,fSensMap); 
          break;
        default: AliFatal(Form("No %d detector type is defined",sType));
@@ -913,10 +913,10 @@ void AliITSU::InitSimulation()
     fSimModelLr[i] = simUpg;
     //
     // add segmentations used in the setup
-    if (!(fSegModelLr[i]=(AliITSsegmentation*)arrSeg[dType])) {AliFatal(Form("Segmentation for DetType#%d is not found",dType)); exit(1);}
+    if (!(fSegModelLr[i]=(AliITSsegmentation*)arrSeg[dType])) {AliFatal(Form("Segmentation for ChipType#%d is not found",dType)); exit(1);}
     //
     // add response function for the detectors of this layer
-    if ( !(fResponseLr[i]=(AliITSUParamList*)fSimuParam->FindRespFunParams(dType)) ) {AliFatal(Form("Response for DetType#%d is not found in SimuParams",dType)); exit(1);}
+    if ( !(fResponseLr[i]=(AliITSUParamList*)fSimuParam->FindRespFunParams(dType)) ) {AliFatal(Form("Response for ChipType#%d is not found in SimuParams",dType)); exit(1);}
   }
   // delete non needed segmentations
   for (int i=fNLayers;i--;) arrSeg.Remove(fSegModelLr[i]);
index 664c0a7cdd933d578f28c16f7b9b95ddf057f2c0..94c75490866f8344ed5158ab7da5608075458daa 100644 (file)
 ////////////////////////////////////////////////////////////////////////
 
 
-#include <TObjArray.h> // used in inline function GetModule.
+#include <TObjArray.h> // used in inline function GetChip.
 #include "AliDetector.h"
 #include "AliITSTrigger.h"
-#include "AliITSDetTypeSim.h"
 #include "AliITSUGeomTGeo.h"
 
 class TString;
@@ -21,7 +20,7 @@ class TTree;
 class AliITSUSDigit;
 class AliITSUSimulation;
 class AliITSsegmentation;
-class AliITSUModule;
+class AliITSUChip;
 class AliITSCalibration;
 class AliITSUHit;
 class AliITSdigit;
@@ -35,7 +34,7 @@ class AliITSU : public AliDetector {
  public:
   //
   // number detector types
-  enum {kNDetTypes = AliITSUGeomTGeo::kNDetTypes};
+  enum {kNChipTypes = AliITSUGeomTGeo::kNChipTypes};
   //
   //================= Standard Classes ===============================
   AliITSU();  // Default creator.
@@ -54,11 +53,11 @@ class AliITSU : public AliDetector {
   
   // ITS geometry functions From Simulation
   AliITSUGeomTGeo* GetITSGeomTGeo() const {return fGeomTGeo;}
-  //RS  AliITSgeom* GetITSgeom() const {return fDetTypeSim->GetITSgeom();}
-  //RS  void   SetITSgeom(AliITSgeom *geom) {fDetTypeSim->SetITSgeom(geom);}
-  // return pointer to the array of modules
+  //RS  AliITSgeom* GetITSgeom() const {return fChipTypeSim->GetITSgeom();}
+  //RS  void   SetITSgeom(AliITSgeom *geom) {fChipTypeSim->SetITSgeom(geom);}
+  // return pointer to the array of chips
   
-  AliITSUModule   * GetModule(Int_t index) {return (AliITSUModule*)fModuleHits->UncheckedAt(index);}
+  AliITSUChip   * GetChip(Int_t index) {return (AliITSUChip*)fChipHits->UncheckedAt(index);}
   AliITSUSimuParam* GetSimuParam() const {return fSimuParam;}
     
   //================ Necessary general Classes =======================
@@ -74,10 +73,10 @@ class AliITSU : public AliDetector {
   virtual AliITSUParamList*    GetResponseParam(Int_t lr)     {return (AliITSUParamList*)fResponseLr[lr];}
   //=================== Hits =========================================
   virtual void StepManager() {} // See Step Manager for specific geometry.
-  //------------ sort hits by module for Digitisation ----------------
-  virtual void FillModules(Int_t bgrev, Option_t *opt, const char *filename); 
-  virtual void FillModules(TTree *treeH, Int_t mask = 0);
-  virtual void ClearModules();
+  //------------ sort hits by chip for Digitisation ----------------
+  virtual void FillChips(Int_t bgrev, Option_t *opt, const char *filename); 
+  virtual void FillChips(TTree *treeH, Int_t mask = 0);
+  virtual void ClearChips();
   virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
   void         InitSimulation();
   //
@@ -120,8 +119,8 @@ class AliITSU : public AliDetector {
 
  protected:
   void        InitArrays();
-  const char* GetDigitClassName(Int_t i) {return Form("AliITSUDigit%s",AliITSUGeomTGeo::GetDetTypeName(i));}
-  const char* GetDetTypeName(Int_t i) {return AliITSUGeomTGeo::GetDetTypeName(i);}
+  const char* GetDigitClassName(Int_t i) {return Form("AliITSUDigit%s",AliITSUGeomTGeo::GetChipTypeName(i));}
+  const char* GetChipTypeName(Int_t i) {return AliITSUGeomTGeo::GetChipTypeName(i);}
   
  protected:
   //================== Data Members ==================================
@@ -132,11 +131,11 @@ class AliITSU : public AliDetector {
   Bool_t                fTiming;         // flag to turn on/off timers.
   AliITSUGeomTGeo*      fGeomTGeo;       //  access to geometry details
   AliITSUSimuParam*     fSimuParam;      //!simulation parameters
-  TClonesArray**        fModA;           //! Used by Raw2SDigits (one TC per module)
+  TClonesArray**        fModA;           //! Used by Raw2SDigits (one TC per chip)
   TClonesArray*         fpSDigits;       //! Branch address to build SD from raw data 
   TClonesArray*         fSDigits;        //! Branch address to build SD
   TClonesArray*         fDetHits;        //! array of full detector hits
-  TObjArray*            fModuleHits;     //! module's hits container in (pointers on the fDetHits)
+  TObjArray*            fChipHits;       //! chip's hits container in (pointers on the fDetHits)
   TObjArray*            fDetDigits;      //! AliDetector has TClonesArray fDigits, avoid same name
   AliITSUSensMap*       fSensMap;        //! sensor map for digitization
   //
index cc8016fd9b8b99e586a0096f4b91a30ccc8d3516..a43839766057598d6f898e176d0595d0bd8d27c5 100644 (file)
@@ -203,7 +203,7 @@ void AliITSUCalibrationPix::GetBadPixelSingle(Int_t index, UInt_t &row, UInt_t &
 //___________________________________________________________________________
 Int_t  AliITSUCalibrationPix::GetNrBad() const 
 {
-  // Total number of bad pixels (including bad chips) in a given module
+  // Total number of bad pixels (including bad chips) in a given chip
   Int_t bad=0;
   // single pixels:
   bad += fNrBadSingle;
@@ -244,7 +244,7 @@ Int_t  AliITSUCalibrationPix::GetNrBadInColumn(Int_t col) const
 //______________________________________________________________________
 Bool_t AliITSUCalibrationPix::IsBad() const 
 {
-  // Are all chips of this module bad?
+  // Are all chips of this chip bad?
   for (Int_t chip=fNChips; chip--;) if (!IsChipMarkedBad(chip)) return kFALSE;
   return kTRUE;
 }
similarity index 81%
rename from ITS/UPGRADE/AliITSUModule.cxx
rename to ITS/UPGRADE/AliITSUChip.cxx
index 82ead3fde66b8fbddf3a255a635f01d629ffa1c6..7b248f0640e7f5f6a8e1f7a8921bcf05b6767d8f 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id: AliITSUModule.cxx 53509 2011-12-10 18:55:52Z masera $ */
+/* $Id: AliITSUChip.cxx 53509 2011-12-10 18:55:52Z masera $ */
 
 #include <TArrayI.h>
 
 
 #include "AliRun.h"
 #include "AliITS.h"
-#include "AliITSUModule.h"
+#include "AliITSUChip.h"
 #include "AliITSUGeomTGeo.h"
 using namespace TMath;
 
-ClassImp(AliITSUModule)
+ClassImp(AliITSUChip)
 
 //_______________________________________________________________________
 //
-// Impementation of class AliITSUModule
+// Impementation of class AliITSUChip
 //
-// created by: A. Bouchm, W. Peryt, S. Radomski, P. Skowronski 
-//             R. Barbers, B. Batyunia, B. S. Nilsen
-// ver 1.0     CERN 16.09.1999
 //_______________________________________________________________________
 //________________________________________________________________________
 // 
 // Constructors and deconstructor
 //________________________________________________________________________
 //
-AliITSUModule::AliITSUModule()
+AliITSUChip::AliITSUChip()
 :  fHitsM(0)
   ,fGeomTG(0)
 {
@@ -48,7 +45,7 @@ AliITSUModule::AliITSUModule()
 }
 
 //_________________________________________________________________________
-AliITSUModule::AliITSUModule(Int_t index, AliITSUGeomTGeo* tg)
+AliITSUChip::AliITSUChip(Int_t index, AliITSUGeomTGeo* tg)
   :fHitsM(new TObjArray())
   ,fGeomTG(tg)
 {
@@ -57,16 +54,16 @@ AliITSUModule::AliITSUModule(Int_t index, AliITSUGeomTGeo* tg)
 }
 
 //__________________________________________________________________________
-AliITSUModule::~AliITSUModule() 
+AliITSUChip::~AliITSUChip() 
 {
-  // The destructor for AliITSUModule. Before destoring AliITSUModule
+  // The destructor for AliITSUChip. Before destoring AliITSUChip
   // we must first destroy all of it's members.
   if (fHitsM) fHitsM->Clear();
   delete fHitsM;
 }
 
 //____________________________________________________________________________
-AliITSUModule::AliITSUModule(const AliITSUModule &source)
+AliITSUChip::AliITSUChip(const AliITSUChip &source)
  :TObject(source)
  ,fHitsM(source.fHitsM)
  ,fGeomTG(source.fGeomTG)
@@ -75,18 +72,18 @@ AliITSUModule::AliITSUModule(const AliITSUModule &source)
 }
 
 //_____________________________________________________________________________
-AliITSUModule& AliITSUModule::operator=(const AliITSUModule &source)
+AliITSUChip& AliITSUChip::operator=(const AliITSUChip &source)
 {
   //    Assignment operator 
   if (this!=&source) {
-    this->~AliITSUModule();
-    new(this) AliITSUModule(source);
+    this->~AliITSUChip();
+    new(this) AliITSUChip(source);
   }
   return *this;
 }
 
 //___________________________________________________________________________
-Double_t AliITSUModule::PathLength(const AliITSUHit *itsHit1,const AliITSUHit *itsHit2) 
+Double_t AliITSUChip::PathLength(const AliITSUHit *itsHit1,const AliITSUHit *itsHit2) 
 {
   // path lenght
   Float_t  x1g,y1g,z1g;   
@@ -103,7 +100,7 @@ Double_t AliITSUModule::PathLength(const AliITSUHit *itsHit1,const AliITSUHit *i
 }
 
 //___________________________________________________________________________
-void AliITSUModule::PathLength(Float_t x,Float_t y,Float_t z,Int_t status,Int_t &nseg,Float_t &x1,Float_t &y1,Float_t &z1,
+void AliITSUChip::PathLength(Float_t x,Float_t y,Float_t z,Int_t status,Int_t &nseg,Float_t &x1,Float_t &y1,Float_t &z1,
                              Float_t &dx1,Float_t &dy1,Float_t &dz1,Int_t &flag) const
 {
   // path length
@@ -133,7 +130,7 @@ void AliITSUModule::PathLength(Float_t x,Float_t y,Float_t z,Int_t status,Int_t
 }
 
 //___________________________________________________________________________
-Bool_t AliITSUModule::LineSegmentL(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
+Bool_t AliITSUChip::LineSegmentL(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
                                  Double_t &e,Double_t &f,Double_t &de)
 {
   // line segment
@@ -154,7 +151,7 @@ Bool_t AliITSUModule::LineSegmentL(Int_t hitindex,Double_t &a,Double_t &b,Double
 }
 
 //___________________________________________________________________________
-Bool_t AliITSUModule::LineSegmentG(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
+Bool_t AliITSUChip::LineSegmentG(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
                                  Double_t &e,Double_t &f,Double_t &de)
 {
   // line segment
@@ -174,7 +171,7 @@ Bool_t AliITSUModule::LineSegmentG(Int_t hitindex,Double_t &a,Double_t &b,Double
 }
 
 //___________________________________________________________________________
-Bool_t AliITSUModule::LineSegmentL(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
+Bool_t AliITSUChip::LineSegmentL(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
                                   Double_t &e,Double_t &f,Double_t &de,Double_t &tof, Int_t &track)
 {
   // line segmente
@@ -199,7 +196,7 @@ Bool_t AliITSUModule::LineSegmentL(Int_t hitindex,Double_t &a,Double_t &b,Double
 }
 
 //___________________________________________________________________________
-Bool_t AliITSUModule::LineSegmentG(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
+Bool_t AliITSUChip::LineSegmentG(Int_t hitindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,
                                   Double_t &e,Double_t &f,Double_t &de,Double_t &tof, Int_t &track)
 {
   // line segment
@@ -223,7 +220,7 @@ Bool_t AliITSUModule::LineSegmentG(Int_t hitindex,Double_t &a,Double_t &b,Double
 }
 
 //______________________________________________________________________
-Bool_t AliITSUModule::MedianHitG(AliITSUHit *h1,AliITSUHit *h2,Float_t &x,Float_t &y,Float_t &z)
+Bool_t AliITSUChip::MedianHitG(AliITSUHit *h1,AliITSUHit *h2,Float_t &x,Float_t &y,Float_t &z)
 {
   // Computes the mean hit location for a set of hits that make up a track
   // passing through a volume. Returns kFALSE untill the the track leaves
@@ -248,7 +245,7 @@ Bool_t AliITSUModule::MedianHitG(AliITSUHit *h1,AliITSUHit *h2,Float_t &x,Float_
   l[0] = xMl;
   l[1] = yMl;
   l[2] = zMl;
-  fGeomTG->LocalToGlobal(h1->GetModule(),l,g);
+  fGeomTG->LocalToGlobal(h1->GetChip(),l,g);
   x = g[0];
   y = g[1];
   z = g[2];
@@ -256,7 +253,7 @@ Bool_t AliITSUModule::MedianHitG(AliITSUHit *h1,AliITSUHit *h2,Float_t &x,Float_
 }
 
 //___________________________________________________________________________
-void AliITSUModule::MedianHitG(Int_t index,Float_t hitx1,Float_t hity1,Float_t hitz1,Float_t hitx2,Float_t hity2,Float_t hitz2,
+void AliITSUChip::MedianHitG(Int_t index,Float_t hitx1,Float_t hity1,Float_t hitz1,Float_t hitx2,Float_t hity2,Float_t hitz2,
                                 Float_t &xMg, Float_t &yMg, Float_t &zMg)
 {
   // median hit
@@ -299,7 +296,7 @@ void AliITSUModule::MedianHitG(Int_t index,Float_t hitx1,Float_t hity1,Float_t h
 }
 
 //___________________________________________________________________________
-Bool_t AliITSUModule::MedianHitL( AliITSUHit *itsHit1,AliITSUHit *itsHit2, Float_t &xMl, Float_t &yMl, Float_t &zMl) const
+Bool_t AliITSUChip::MedianHitL( AliITSUHit *itsHit1,AliITSUHit *itsHit2, Float_t &xMl, Float_t &yMl, Float_t &zMl) const
 {
   // median hit
   Float_t x1l,y1l,z1l;
@@ -320,7 +317,7 @@ Bool_t AliITSUModule::MedianHitL( AliITSUHit *itsHit1,AliITSUHit *itsHit2, Float
 }
 
 //___________________________________________________________________________
-void AliITSUModule::MedianHit(Int_t index,Float_t xg,Float_t yg,Float_t zg,Int_t status,
+void AliITSUChip::MedianHit(Int_t index,Float_t xg,Float_t yg,Float_t zg,Int_t status,
                             Float_t &xMg,Float_t &yMg,Float_t &zMg,Int_t &flag)
 {
   // median hit
similarity index 65%
rename from ITS/UPGRADE/AliITSUModule.h
rename to ITS/UPGRADE/AliITSUChip.h
index c48b75eb81e13438bd966ce077b849707e332152..004f578333afdaf962e979f52855222a7522040e 100644 (file)
@@ -1,22 +1,16 @@
-#ifndef ALIITSUMODULE_H
-#define ALIITSUMODULE_H
+#ifndef ALIITSUCHIP_H
+#define ALIITSUCHIP_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id: AliITSUModule.h 53509 2011-12-10 18:55:52Z masera $ */
+/* $Id: AliITSUChip.h 53509 2011-12-10 18:55:52Z masera $ */
 ///////////////////////////////////////////////////////////////////////
 //                                                                   //
-//  Class AliITSUModule                                            //
-//  is a superclass for AliITSUModuleSSD, SPD and SDD.             //
-//  The main function of modules is to simulate DIGITS from          //
+//  Class AliITSUChip                                                //
+//  The main function of chips is to simulate DIGITS from            //
 //  GEANT HITS and produce POINTS from DIGITS                        //
 //  It also make fast simulation without use of DIGITS               //
 //                                                                   //
-//  created by: A.Boucham, W.Peryt, S.Radomski, P.Skowronski         //
-//              R.Barbera, B. Batynia, B. Nilsen                     //
-//  ver. 1.0    CERN, 16.09.1999                                     //
-//  modified for upgrade: ruben.shahoyan@cern.ch                     //
-//                                                                   //
 ///////////////////////////////////////////////////////////////////////
 
 #include <TObject.h>
 #include "AliITSUHit.h"
 class AliITSUGeomTGeo;
 
-class AliITSUModule: public TObject {
+class AliITSUChip: public TObject {
 
  public:
-  AliITSUModule();             // default constructor
-  AliITSUModule(Int_t index, AliITSUGeomTGeo* tg);
-  virtual ~AliITSUModule();
+  AliITSUChip();             // default constructor
+  AliITSUChip(Int_t index, AliITSUGeomTGeo* tg);
+  virtual ~AliITSUChip();
   UInt_t     GetIndex()                                 const {return GetUniqueID();}
   void       SetIndex(UInt_t ind)                             {return SetUniqueID(ind);}
   Int_t      GetNHits()                                 const {return fHitsM->GetEntriesFast();}
   TObjArray *GetHits()                                  const {return fHitsM;}
-  AliITSUHit *GetHit(Int_t i)                         const {return (AliITSUHit*)fHitsM->UncheckedAt(i);}
-  void       AddHit(AliITSUHit *hit)                        {fHitsM->AddLast(hit);}
+  AliITSUHit *GetHit(Int_t i)                           const {return (AliITSUHit*)fHitsM->UncheckedAt(i);}
+  void       AddHit(AliITSUHit *hit)                          {fHitsM->AddLast(hit);}
   void       Clear(Option_t* opt=0);
   //
   Bool_t   MedianHitG(AliITSUHit *h1,AliITSUHit *h2,Float_t &x,Float_t &y,Float_t &z);
@@ -52,15 +46,15 @@ class AliITSUModule: public TObject {
   Bool_t   LineSegmentG(Int_t hindex,Double_t &a,Double_t &b,Double_t &c,Double_t &d,Double_t &e,Double_t &f,Double_t &de, Double_t &tof, Int_t &track);
   //
  protected:
-    AliITSUModule(const AliITSUModule &source); 
-    AliITSUModule& operator=(const AliITSUModule &source); 
-    TObjArray            *fHitsM;     // Pointer to list of hits on this module
+    AliITSUChip(const AliITSUChip &source); 
+    AliITSUChip& operator=(const AliITSUChip &source); 
+    TObjArray           *fHitsM;     // Pointer to list of hits on this chip
     AliITSUGeomTGeo    *fGeomTG;    // pointed to geometry
     //
-    ClassDef(AliITSUModule,1) // Copy the hits into a more useful order
+    ClassDef(AliITSUChip,1) // Copy the hits into a more useful order
 };
 
-inline void AliITSUModule::Clear(Option_t *) {fHitsM->Clear();}
+inline void AliITSUChip::Clear(Option_t *) {fHitsM->Clear();}
 
 #endif
 
index d020a43d534f19dcc6fb11a82c45d54fbc43c9f3..7d86c66f1cd8c4f19895ef725cc93e6d7932fb4e 100644 (file)
@@ -59,7 +59,7 @@ const TGeoHMatrix*  AliITSUClusterPix::GetTracking2LocalMatrix() const
 //______________________________________________________________________________
 TGeoHMatrix* AliITSUClusterPix::GetMatrix(Bool_t ) const
 {
-  // get module matrix (sensor!)
+  // get chip matrix (sensor!)
   return (TGeoHMatrix*)fgGeom->GetMatrixSens(GetVolumeId());
 }
 
index 249b7276dbcbf1c3713a346055dade9ced65465c..768e2c938982d27dce41e5aff83bae71e018f6f3 100644 (file)
@@ -105,7 +105,7 @@ class AliITSUClusterizer : public TObject
   //
  protected:
   //
-  Int_t fVolID;                             // Volume id (module index)
+  Int_t fVolID;                             // Volume id (chip index)
   Bool_t fAllowDiagonalClusterization;      // allow clusters with pixels having common corners only
   const AliITSUSegmentationPix* fSegm;      // Segmentation or local coord calc.
   const AliITSURecoParam*       fRecoParam; // reco params
index 2b30a0aa5e21710fffc103e1b451e23ecebc7af5..bc2c53c8181a0d75b77c42ae9b13f482b7d522b9 100644 (file)
@@ -98,7 +98,7 @@ Bool_t AliITSUDigitizer::Init()
     AliFatal("ITS not found");
   } 
   if (!fITS->IsSimInitDone()) fITS->InitSimulation();
-  int nm = fITS->GetITSGeomTGeo()->GetNModules();
+  int nm = fITS->GetITSGeomTGeo()->GetNChips();
   fModActive = new Bool_t[nm];
   for (Int_t i=nm;i--;) fModActive[i] = kTRUE;
 
@@ -118,7 +118,7 @@ void AliITSUDigitizer::Digitize(Option_t* /*opt*/)
   TString loadname = Form("%sLoader",fITS->GetName());
   //
   AliITSUGeomTGeo* geom = fITS->GetITSGeomTGeo();
-  Int_t nModules  = geom->GetNModules();
+  Int_t nChips  = geom->GetNChips();
   Bool_t lmod;
   Int_t *fl = new Int_t[nfiles];
   fl[0] = fRoiifile;
@@ -151,19 +151,19 @@ void AliITSUDigitizer::Digitize(Option_t* /*opt*/)
     if (ingime->TreeS() == 0x0) ingime->LoadSDigits();
   }
   //
-  for (int module=0; module<nModules; module++ ) {
+  for (int chip=0; chip<nChips; chip++ ) {
     //
-    if (!fRoif && !fModActive[module]) continue;
-    int lr = geom->GetLayer(module);
+    if (!fRoif && !fModActive[chip]) continue;
+    int lr = geom->GetLayer(chip);
     AliITSUSimulation *sim = fITS->GetSimulationModel(lr);
     if (!sim) AliFatal(Form("The simulation model for layer %d is not available",lr));
     //
-    // Fill the module with the sum of SDigits
-    sim->InitSimulationModule(fITS->GetModule(module), event, fITS->GetSegmentation(lr), fITS->GetResponseParam(lr));
+    // Fill the chip with the sum of SDigits
+    sim->InitSimulationChip(fITS->GetChip(chip), event, fITS->GetSegmentation(lr), fITS->GetResponseParam(lr));
     //
     for (int ifiles=0; ifiles<nfiles; ifiles++ ) {
       //
-      if (!fRoif && !fModActive[module]) continue;
+      if (!fRoif && !fModActive[chip]) continue;
       inRL =  AliRunLoader::GetRunLoader(fDigInput->GetInputFolderName(fl[ifiles]));
       ingime = inRL->GetLoader(loadname);
       //
@@ -181,17 +181,17 @@ void AliITSUDigitizer::Digitize(Option_t* /*opt*/)
       //
       sdig->Clear();
       mask = GetDigInput()->GetMask(ifiles);
-      brchSDigits->GetEvent( module );
-      lmod = sim->AddSDigitsToModule(sdig,mask);
-      if(GetRegionOfInterest() && !ifiles) fModActive[module] = lmod;
+      brchSDigits->GetEvent( chip );
+      lmod = sim->AddSDigitsToChip(sdig,mask);
+      if(GetRegionOfInterest() && !ifiles) fModActive[chip] = lmod;
       //
     } 
-    // Digitize current module sum(SDigits)->Digits
-    sim->FinishSDigitiseModule();
+    // Digitize current chip sum(SDigits)->Digits
+    sim->FinishSDigitiseChip();
     //
     outgime->TreeD()->Fill();       // fills all branches - wasted disk space
     fITS->ResetDigits();
-  } // end for module
+  } // end for chip
   //
   //  fITS->WriteFOSignals(); 
   outgime->TreeD()->AutoSave();
@@ -206,7 +206,7 @@ void AliITSUDigitizer::Digitize(Option_t* /*opt*/)
   delete[] fl;
   sdig->Clear();
   delete sdig;
-  for (Int_t i=nModules;i--;) fModActive[i] = kTRUE;
+  for (Int_t i=nChips;i--;) fModActive[i] = kTRUE;
   //
   return;
 }
@@ -214,12 +214,12 @@ void AliITSUDigitizer::Digitize(Option_t* /*opt*/)
 //______________________________________________________________________
 void AliITSUDigitizer::SetByRegionOfInterest(TTree *ts)
 {
-  // Scans through the ITS branch of the SDigits tree, ts, for modules
-  // which have SDigits in them. For these modules, a flag is set to
-  // digitize only these modules. The value of fRoif determines how many
-  // neighboring modules will also be turned on. fRoif=0 will turn on only
-  // those modules with SDigits in them. fRoif=1 will turn on, in addition,
-  // those modules that are +-1 module from the one with the SDigits. And
+  // Scans through the ITS branch of the SDigits tree, ts, for chips
+  // which have SDigits in them. For these chips, a flag is set to
+  // digitize only these chips. The value of fRoif determines how many
+  // neighboring chips will also be turned on. fRoif=0 will turn on only
+  // those chips with SDigits in them. fRoif=1 will turn on, in addition,
+  // those chips that are +-1 chip from the one with the SDigits. And
   // So on. This last feature is not supported yet.
   // Inputs:
   //      TTree *ts  The tree in which the existing SDigits will define the
@@ -232,14 +232,14 @@ void AliITSUDigitizer::SetByRegionOfInterest(TTree *ts)
   if( brchSDigits ) brchSDigits->SetAddress( &sdig );
   else  {AliError("Branch ITS not found in TreeS"); return;}
   //
-  int nm = fITS->GetITSGeomTGeo()->GetNModules();
+  int nm = fITS->GetITSGeomTGeo()->GetNChips();
   for (int m=0;m<nm;m++) {
     fModActive[m] = kFALSE; // Not active by default
     sdig->Clear();
     brchSDigits->GetEvent(m);
     int ndig = sdig->GetEntries();
     for(int i=0;i<ndig;i++) {
-      // activate the necessary modules
+      // activate the necessary chips
       if ( ((AliITSUSDigit*)sdig->At(m))->GetSumSignal()>0.0 ) { // Must have non zero signal.
        fModActive[m] = kTRUE;
        break;
index 3442414e253a6ebb671c7df66ec3cd173025e303..92d8e1d85f050a9562389225cb959d49114bd13a 100644 (file)
@@ -25,8 +25,8 @@ class AliITSUDigitizer : public AliDigitizer {
   virtual ~AliITSUDigitizer();
   virtual Bool_t Init();
   virtual void Digitize(Option_t* opt=0);
-  virtual void SetModuleActive(Int_t i){if(fModActive) fModActive[i] = kTRUE;}
-  virtual void SetModuleInActive(Int_t i){if(fModActive) fModActive[i] = kFALSE;}
+  virtual void SetChipActive(Int_t i){if(fModActive) fModActive[i] = kTRUE;}
+  virtual void SetChipInActive(Int_t i){if(fModActive) fModActive[i] = kFALSE;}
   virtual void SetByRegionOfInterestFlag(Int_t i=0){fRoif = i;}
   virtual void SetByRegionOfFileNumber(Int_t i=-1){fRoiifile = i;}
   virtual void ClearByRegionOfInterestFlag(){fRoif = 0;}
@@ -39,7 +39,7 @@ class AliITSUDigitizer : public AliDigitizer {
   //
  protected:
   AliITSU   *fITS;      //! local pointer to ITS
-  Bool_t    *fModActive;//! flag to indicate which module to digitize.
+  Bool_t    *fModActive;//! flag to indicate which chip to digitize.
   Bool_t     fInit;     //! flag to indecate Initilization when well.
   Int_t      fRoif;     //! Region of interest flag.
   Int_t      fRoiifile; //! The file number with which to determing the region of interest from.
index 16d32899d2cd29fa84db38c33157b816ed7d65d5..1acd64cc7277c11acfade65b0a78fc698d701359 100644 (file)
@@ -45,25 +45,32 @@ using namespace TMath;
 ClassImp(AliITSUGeomTGeo)
 
 UInt_t AliITSUGeomTGeo::fgUIDShift = 16;                // bit shift to go from mod.id to modUUID for TGeo
-const char* AliITSUGeomTGeo::fgkITSVolName = "ITSV";
-const char* AliITSUGeomTGeo::fgkITSLrName  = "ITSULayer";
-const char* AliITSUGeomTGeo::fgkITSLadName = "ITSULadder";
-const char* AliITSUGeomTGeo::fgkITSModName = "ITSUModule";
-const char* AliITSUGeomTGeo::fgkITSSensName ="ITSUSensor";
-const char* AliITSUGeomTGeo::fgkITSWrapVolName = "ITSUWrapVol";
-const char* AliITSUGeomTGeo::fgkITSDetTypeName[AliITSUGeomTGeo::kNDetTypes] = {"Pix"};
+TString AliITSUGeomTGeo::fgITSVolName = "ITSV";
+TString AliITSUGeomTGeo::fgITSLrName  = "ITSULayer";
+TString AliITSUGeomTGeo::fgITSStaveName = "ITSUStave";
+TString AliITSUGeomTGeo::fgITSSubStaveName = "ITSUSubStave";
+TString AliITSUGeomTGeo::fgITSModuleName = "ITSUModuleName"; 
+TString AliITSUGeomTGeo::fgITSChipName = "ITSUChip";
+TString AliITSUGeomTGeo::fgITSSensName = "ITSUSensor";
+TString AliITSUGeomTGeo::fgITSWrapVolName = "ITSUWrapVol";
+TString AliITSUGeomTGeo::fgITSChipTypeName[AliITSUGeomTGeo::kNChipTypes] = {"Pix"};
 //
-TString     AliITSUGeomTGeo::fgITSsegmFileName = "itsSegmentations.root";
+TString AliITSUGeomTGeo::fgITSsegmFileName = "itsSegmentations.root";
 
 //______________________________________________________________________
 AliITSUGeomTGeo::AliITSUGeomTGeo(Bool_t build, Bool_t loadSegm)
   :fVersion(kITSVNA)
   ,fNLayers(0)
+  ,fNChips(0)
+  ,fNStaves(0)
+  ,fNSubStaves(0)
   ,fNModules(0)
-  ,fNLadders(0)
-  ,fLrDetType(0)
-  ,fNDetectors(0)
-  ,fLastModIndex(0)
+  ,fNChipsPerModule(0)
+  ,fNChipsPerSubStave(0)
+  ,fNChipsPerStave(0)
+  ,fNChipsPerLayer(0)
+  ,fLrChipType(0)
+  ,fLastChipIndex(0)
   ,fMatSens(0)
   ,fMatT2L(0)
   ,fSegm(0)
@@ -78,39 +85,53 @@ AliITSUGeomTGeo::AliITSUGeomTGeo(const AliITSUGeomTGeo &src)
   :TObject(src)
   ,fVersion(src.fVersion)
   ,fNLayers(src.fNLayers)
-  ,fNModules(src.fNModules)
-  ,fNLadders(0)
-  ,fLrDetType(0)
-  ,fNDetectors(0)
-  ,fLastModIndex(0)
+  ,fNChips(src.fNChips)
+  ,fNStaves(0)
+  ,fNSubStaves(0)
+  ,fNModules(0)
+  ,fNChipsPerModule(0)
+  ,fNChipsPerSubStave(0)
+  ,fNChipsPerStave(0)
+  ,fNChipsPerLayer(0)
+  ,fLrChipType(0)
+  ,fLastChipIndex(0)
   ,fMatSens(0)
   ,fMatT2L(0)
   ,fSegm(0)
 {
   // copy c-tor
   if (fNLayers) {
-    fNLadders   = new Int_t[fNLayers];
-    fNDetectors = new Int_t[fNLayers];
-    fLrDetType  = new Int_t[fNLayers];
-    fLastModIndex   = new Int_t[fNLayers];
+    fNStaves   = new Int_t[fNLayers];
+    fNChipsPerModule = new Int_t[fNLayers];
+    fLrChipType  = new Int_t[fNLayers];
+    fLastChipIndex   = new Int_t[fNLayers];
+    fNChipsPerSubStave = new Int_t[fNLayers];
+    fNChipsPerStave = new Int_t[fNLayers];
+    fNChipsPerLayer = new Int_t[fNLayers];
+    //
     for (int i=fNLayers;i--;) {
-      fNLadders[i] = src.fNLadders[i];
-      fNDetectors[i] = src.fNDetectors[i];
-      fLrDetType[i]  = src.fLrDetType[i];
-      fLastModIndex[i] = src.fLastModIndex[i];
+      fNStaves[i] = src.fNStaves[i];
+      fNSubStaves[i] = src.fNSubStaves[i];
+      fNModules[i] = src.fNModules[i];
+      fNChipsPerModule[i] = src.fNChipsPerModule[i];
+      fNChipsPerSubStave[i] = src.fNChipsPerSubStave[i];
+      fNChipsPerStave[i] = src.fNChipsPerStave[i];
+      fNChipsPerLayer[i] = src.fNChipsPerLayer[i];
+      fLrChipType[i]  = src.fLrChipType[i];
+      fLastChipIndex[i] = src.fLastChipIndex[i];
     }
     if (src.fMatSens) {
-      fMatSens = new TObjArray(fNModules);
+      fMatSens = new TObjArray(fNChips);
       fMatSens->SetOwner(kTRUE);
-      for (int i=0;i<fNModules;i++) {
+      for (int i=0;i<fNChips;i++) {
        const TGeoHMatrix* mat = (TGeoHMatrix*)src.fMatSens->At(i);
        fMatSens->AddAt(new TGeoHMatrix(*mat),i);
       }
     }
     if (src.fMatT2L) {
-      fMatT2L = new TObjArray(fNModules);
+      fMatT2L = new TObjArray(fNChips);
       fMatT2L->SetOwner(kTRUE);
-      for (int i=0;i<fNModules;i++) {
+      for (int i=0;i<fNChips;i++) {
        const TGeoHMatrix* mat =(TGeoHMatrix*) src.fMatT2L->At(i);
        fMatT2L->AddAt(new TGeoHMatrix(*mat),i);
       }
@@ -133,10 +154,15 @@ AliITSUGeomTGeo::AliITSUGeomTGeo(const AliITSUGeomTGeo &src)
 AliITSUGeomTGeo::~AliITSUGeomTGeo()
 {
   //d-tor
-  delete[] fNLadders;
-  delete[] fLrDetType;
-  delete[] fNDetectors;
-  delete[] fLastModIndex;
+  delete[] fNStaves;
+  delete[] fNSubStaves;
+  delete[] fNModules;
+  delete[] fLrChipType;
+  delete[] fNChipsPerModule;
+  delete[] fNChipsPerSubStave;
+  delete[] fNChipsPerStave;
+  delete[] fNChipsPerLayer;
+  delete[] fLastChipIndex;
   delete fMatT2L;
   delete fMatSens;
   delete fSegm;
@@ -148,28 +174,33 @@ AliITSUGeomTGeo& AliITSUGeomTGeo::operator=(const AliITSUGeomTGeo &src)
 {
   // cp op.
   if (this!=&src) {
-    delete[] fNLadders;
-    delete[] fLrDetType;
-    delete[] fNDetectors;
-    delete[] fLastModIndex;
-    fNLadders = fLrDetType = fNDetectors = fLastModIndex = 0;
+    delete[] fNStaves;
+    delete[] fNSubStaves;
+    delete[] fNModules;
+    delete[] fLrChipType;
+    delete[] fNChipsPerModule;
+    delete[] fNChipsPerSubStave;
+    delete[] fNChipsPerStave;
+    delete[] fNChipsPerLayer;
+    delete[] fLastChipIndex;
+    fNStaves = fNSubStaves = fNModules = fLrChipType = fNChipsPerModule = fLastChipIndex = 0;
     fVersion = src.fVersion;
     fNLayers = src.fNLayers;
-    fNModules = src.fNModules;
+    fNChips = src.fNChips;
     if (src.fMatSens) {
       delete fMatSens; 
-      fMatSens = new TObjArray(fNModules);
+      fMatSens = new TObjArray(fNChips);
       fMatSens->SetOwner(kTRUE);
-      for (int i=0;i<fNModules;i++) {
+      for (int i=0;i<fNChips;i++) {
        const TGeoHMatrix* mat = (TGeoHMatrix*) src.fMatSens->At(i);
        fMatSens->AddAt(new TGeoHMatrix(*mat),i);
       }
     }
     if (src.fMatT2L) {
       delete fMatT2L; 
-      fMatT2L = new TObjArray(fNModules);
+      fMatT2L = new TObjArray(fNChips);
       fMatT2L->SetOwner(kTRUE);
-      for (int i=0;i<fNModules;i++) {
+      for (int i=0;i<fNChips;i++) {
        const TGeoHMatrix* mat = (TGeoHMatrix*) src.fMatT2L->At(i);
        fMatT2L->AddAt(new TGeoHMatrix(*mat),i);
       }
@@ -186,15 +217,25 @@ AliITSUGeomTGeo& AliITSUGeomTGeo::operator=(const AliITSUGeomTGeo &src)
     }
     //
     if (fNLayers) {
-      fNLadders   = new Int_t[fNLayers];
-      fNDetectors = new Int_t[fNLayers];
-      fLrDetType  = new Int_t[fNLayers];
-      fLastModIndex   = new Int_t[fNLayers];
+      fNStaves   = new Int_t[fNLayers];
+      fNSubStaves   = new Int_t[fNLayers];
+      fNModules     = new Int_t[fNLayers];
+      fNChipsPerModule = new Int_t[fNLayers];
+      fNChipsPerSubStave = new Int_t[fNLayers];
+      fNChipsPerStave = new Int_t[fNLayers];
+      fNChipsPerLayer = new Int_t[fNLayers];
+      fLrChipType  = new Int_t[fNLayers];
+      fLastChipIndex   = new Int_t[fNLayers];
       for (int i=fNLayers;i--;) {
-       fNLadders[i] = src.fNLadders[i];
-       fNDetectors[i] = src.fNDetectors[i];
-       fLrDetType[i]  = src.fLrDetType[i];
-       fLastModIndex[i] = src.fLastModIndex[i];
+       fNStaves[i] = src.fNStaves[i];
+       fNSubStaves[i] = src.fNSubStaves[i];
+       fNModules[i]   = src.fNModules[i];
+       fNChipsPerModule[i] = src.fNChipsPerModule[i];
+       fNChipsPerSubStave[i] = src.fNChipsPerSubStave[i];
+       fNChipsPerStave[i] = src.fNChipsPerStave[i];
+       fNChipsPerLayer[i] = src.fNChipsPerLayer[i];
+       fLrChipType[i]  = src.fLrChipType[i];
+       fLastChipIndex[i] = src.fLastChipIndex[i];
       }
     }    
   }
@@ -202,33 +243,65 @@ AliITSUGeomTGeo& AliITSUGeomTGeo::operator=(const AliITSUGeomTGeo &src)
 }
 
 //______________________________________________________________________
-Int_t AliITSUGeomTGeo::GetModuleIndex(Int_t lay,Int_t lad,Int_t det) const
+Int_t AliITSUGeomTGeo::GetChipIndex(Int_t lay,Int_t sta,Int_t chipInStave) const
+{
+  // This routine computes the chip index number from the layer,
+  // stave, and chip number in stave. 
+  // Inputs:
+  //    Int_t lay  The layer number. Starting from 0.
+  //    Int_t sta  The stave number. Starting from 0
+  //    Int_t chipInStave  The chip number in the stave. Starting from 0
+  //
+  return GetFirstChipIndex(lay) + fNChipsPerStave[lay]*sta + chipInStave;
+}
+
+//______________________________________________________________________
+Int_t AliITSUGeomTGeo::GetChipIndex(Int_t lay,Int_t sta, Int_t substa, Int_t chipInSStave) const
+{
+  // This routine computes the chip index number from the layer,
+  // stave, substave and chip number in substave. 
+  // Inputs:
+  //    Int_t lay  The layer number. Starting from 0.
+  //    Int_t sta  The stave number. Starting from 0
+  //    Int_t substa  The substave number. Starting from 0
+  //    Int_t chipInSStave  The chip number in the sub stave. Starting from 0
+  //
+  int n = GetFirstChipIndex(lay) + fNChipsPerStave[lay]*sta + chipInSStave;
+  if (fNSubStaves[lay] && substa>0) n += fNChipsPerSubStave[lay]*substa;
+  return n;
+}
+
+//______________________________________________________________________
+Int_t AliITSUGeomTGeo::GetChipIndex(Int_t lay,Int_t sta, Int_t substa, Int_t md, Int_t chipInMod) const
 {
-  // This routine computes the module index number from the layer,
-  // ladder, and detector numbers. The number of ladders and detectors
-  // per layer is set statically
-  // see above for details.
+  // This routine computes the chip index number from the layer,
+  // stave, substave module and chip number in module. 
   // Inputs:
   //    Int_t lay  The layer number. Starting from 0.
-  //    Int_t lad  The ladder number. Starting from 0
-  //    Int_t det  The detector number in the ladder. Starting from 0
+  //    Int_t sta  The stave number. Starting from 0
+  //    Int_t substa  The substave number. Starting from 0
+  //    Int_t module  The module number ...
+  //    Int_t chipInSStave  The chip number in the module. Starting from 0
   //
-  return GetFirstModIndex(lay) + fNDetectors[lay]*lad + det;
+  int n = GetFirstChipIndex(lay) + fNChipsPerStave[lay]*sta + chipInMod;
+  if (fNSubStaves[lay] && substa>0) n += fNChipsPerSubStave[lay]*substa;
+  if (fNModules[lay] && md>0)       n += fNChipsPerModule[lay]*md;
+  return n;
 }
 
 //______________________________________________________________________
-Bool_t AliITSUGeomTGeo::GetLayer(Int_t index,Int_t &lay,Int_t &index2)  const
+Bool_t AliITSUGeomTGeo::GetLayer(Int_t index,Int_t &lay,Int_t &indexInLr)  const
 {
-  // This routine computes the layer number for a
-  // given the module index. The 
+  // This routine computes the layer number a
+  // given the chip index. The 
   // Inputs:
-  //     Int_t index  The module index number, starting from zero.
+  //     Int_t index  The chip index number, starting from zero.
   // Outputs:
-  //     Int_t index2 The module index inside a layer, starting from zero.
+  //     Int_t indexInLr The chip index inside a layer, starting from zero.
   //     Int_t lay    The layer number. Starting from 0.
   //
   lay = GetLayer(index);
-  index2 = index - GetFirstModIndex(lay);
+  indexInLr = index - GetFirstChipIndex(lay);
   return kTRUE;
   //
 }
@@ -236,64 +309,119 @@ Bool_t AliITSUGeomTGeo::GetLayer(Int_t index,Int_t &lay,Int_t &index2)  const
 //______________________________________________________________________
 Int_t AliITSUGeomTGeo::GetLayer(Int_t index) const
 {
-  // Get module layer, from 0
+  // Get chip layer, from 0
   //
   int lay = 0;
-  while(index>fLastModIndex[lay]) lay++;
+  while(index>fLastChipIndex[lay]) lay++;
   return lay;
 }
 
 //______________________________________________________________________
-Int_t AliITSUGeomTGeo::GetLadder(Int_t index) const
+Int_t AliITSUGeomTGeo::GetStave(Int_t index) const
+{
+  // Get chip stave, from 0
+  //
+  int lay = 0;
+  while(index>fLastChipIndex[lay]) lay++;
+  index -= GetFirstChipIndex(lay);
+  return index/fNChipsPerStave[lay];
+}
+
+//______________________________________________________________________
+Int_t AliITSUGeomTGeo::GetSubStave(Int_t index) const
 {
-  // Get module ladder, from 0
+  // Get chip substave id in stave, from 0
   //
   int lay = 0;
-  while(index>fLastModIndex[lay]) lay++;
-  index -= GetFirstModIndex(lay);
-  return index/fNDetectors[lay];
+  while(index>fLastChipIndex[lay]) lay++;
+  if (fNSubStaves[lay]<0) return -1;
+  index -= GetFirstChipIndex(lay);
+  index %= fNChipsPerStave[lay];
+  return index/fNChipsPerSubStave[lay];
 }
 
 //______________________________________________________________________
-Int_t AliITSUGeomTGeo::GetModIdInLayer(Int_t index) const
+Int_t AliITSUGeomTGeo::GetModule(Int_t index) const
 {
-  // Get module number within layer, from 0
+  // Get chip module id in substave, from 0
   //
   int lay = 0;
-  while(index>fLastModIndex[lay]) lay++;
-  index -= GetFirstModIndex(lay);
+  while(index>fLastChipIndex[lay]) lay++;
+  if (fNModules[lay]<0) return 0;
+  index -= GetFirstChipIndex(lay);
+  index %= fNChipsPerStave[lay];
+  if (fNSubStaves[lay]) index %= fNChipsPerSubStave[lay];
+  return index/fNChipsPerModule[lay];
+}
+
+//______________________________________________________________________
+Int_t AliITSUGeomTGeo::GetChipIdInLayer(Int_t index) const
+{
+  // Get chip number within layer, from 0
+  //
+  int lay = 0;
+  while(index>fLastChipIndex[lay]) lay++;
+  index -= GetFirstChipIndex(lay);
   return index;
 }
 
 //______________________________________________________________________
-Int_t AliITSUGeomTGeo::GetModIdInLadder(Int_t index) const
+Int_t AliITSUGeomTGeo::GetChipIdInStave(Int_t index) const
 {
-  // Get module number within ladder, from 0
+  // Get chip number within stave, from 0
   //
   int lay = 0;
-  while(index>fLastModIndex[lay]) lay++;
-  index -= GetFirstModIndex(lay);
-  return index%fNDetectors[lay];
+  while(index>fLastChipIndex[lay]) lay++;
+  index -= GetFirstChipIndex(lay);
+  return index%fNChipsPerStave[lay];
 }
 
 //______________________________________________________________________
-Bool_t AliITSUGeomTGeo::GetModuleId(Int_t index,Int_t &lay,Int_t &lad,Int_t &det)  const
+Int_t AliITSUGeomTGeo::GetChipIdInSubStave(Int_t index) const
 {
-  // The method is taken from the old AliITSgeom class by Bjorn Nilsen
+  // Get chip number within stave, from 0
   //
-  // This routine computes the layer, ladder and detector number 
-  // given the module index number. 
+  int lay = 0;
+  while(index>fLastChipIndex[lay]) lay++;
+  index -= GetFirstChipIndex(lay);
+  return index%fNChipsPerSubStave[lay];
+}
+
+//______________________________________________________________________
+Int_t AliITSUGeomTGeo::GetChipIdInModule(Int_t index) const
+{
+  // Get chip number within module, from 0
+  //
+  int lay = 0;
+  while(index>fLastChipIndex[lay]) lay++;
+  index -= GetFirstChipIndex(lay);
+  return index%fNChipsPerModule[lay];
+}
+
+//______________________________________________________________________
+Bool_t AliITSUGeomTGeo::GetChipId(Int_t index,Int_t &lay,Int_t &sta,Int_t &ssta, Int_t &mod, Int_t &chip)  const
+{
+  //
+  // This routine computes the layer, stave, substave, module and chip number 
+  // given the chip index number. 
   // Inputs:
-  //     Int_t index  The module index number, starting from zero.
+  //     Int_t index  The chip index number, starting from zero.
   // Outputs:
   //     Int_t lay    The layer number. Starting from 0
-  //     Int_t lad    The ladder number. Starting from 0
-  //     Int_t det    The detector number. Starting from 0
+  //     Int_t sta    The stave number. Starting from 0
+  //     Int_t ssta   The substave number. Starting from 0
+  //     Int_t mod    The module number. Starting from 0
+  //     Int_t chip   The detector number. Starting from 0
   //
   lay  = GetLayer(index);
-  index -= GetFirstModIndex(lay);
-  lad  = index/fNDetectors[lay];
-  det  = index%fNDetectors[lay];
+  index -= GetFirstChipIndex(lay);
+  sta  = index/fNChipsPerStave[lay];
+  index %= fNChipsPerStave[lay];
+  ssta = fNSubStaves[lay]>0 ? index/fNChipsPerSubStave[lay] : -1;
+  index %= fNChipsPerSubStave[lay];
+  mod  = fNModules[lay]>0 ? index/fNChipsPerModule[lay] : -1;
+  chip = index%fNChipsPerModule[lay];
+  //
   return kTRUE;
 }
 
@@ -301,16 +429,16 @@ Bool_t AliITSUGeomTGeo::GetModuleId(Int_t index,Int_t &lay,Int_t &lad,Int_t &det
 const char* AliITSUGeomTGeo::GetSymName(Int_t index)  const
 {
   // Get the TGeoPNEntry symbolic name
-  // for a given module identified by 'index'
+  // for a given chip identified by 'index'
   //
   Int_t lay, index2;
   if (!GetLayer(index,lay,index2)) return NULL;
   // return AliGeomManager::SymName((AliGeomManager::ELayerID)((lay-1)+AliGeomManager::kSPD1),index2);
   // RS: this is not optimal, but we cannod access directly AliGeomManager, since the latter has hardwired layers 
   //  TGeoPNEntry* pne = gGeoManager->GetAlignableEntryByUID( AliGeomManager::LayerToVolUID(lay+1,index2) );
-  TGeoPNEntry* pne = gGeoManager->GetAlignableEntryByUID( ModuleVolUID(index) );
+  TGeoPNEntry* pne = gGeoManager->GetAlignableEntryByUID( ChipVolUID(index) );
   if (!pne) {
-    AliError(Form("Failed to find alignable entry with index %d: (Lr%d Mod:%d) !",index,lay,index2));
+    AliError(Form("Failed to find alignable entry with index %d: (Lr%d Chip:%d) !",index,lay,index2));
     return NULL;
   }
   return pne->GetName();
@@ -331,23 +459,41 @@ const char* AliITSUGeomTGeo::ComposeSymNameLayer(Int_t lr)
 }
 
 //______________________________________________________________________
-const char* AliITSUGeomTGeo::ComposeSymNameLadder(Int_t lr, Int_t ladder)
+const char* AliITSUGeomTGeo::ComposeSymNameStave(Int_t lr, Int_t stave)
+{
+  // sym name of the stave at given layer
+  return Form("%s/%s%d",ComposeSymNameLayer(lr),GetITSStavePattern(),stave);
+}
+
+//______________________________________________________________________
+const char* AliITSUGeomTGeo::ComposeSymNameSubStave(Int_t lr, Int_t stave, Int_t substave)
+{
+  // sym name of the stave at given layer
+  return substave>=0 ? 
+    Form("%s/%s%d",ComposeSymNameStave(lr,stave),GetITSSubStavePattern(),substave) :
+    ComposeSymNameStave(lr,stave);
+}
+
+//______________________________________________________________________
+const char* AliITSUGeomTGeo::ComposeSymNameModule(Int_t lr, Int_t stave, Int_t substave, Int_t mod)
 {
-  // sym name of the ladder at given layer
-  return Form("%s/%s%d",ComposeSymNameLayer(lr),GetITSLadderPattern(),ladder);
+  // sym name of the substave at given layer/stave
+  return mod>=0 ? 
+    Form("%s/%s%d",ComposeSymNameSubStave(lr,stave,substave),GetITSModulePattern(),mod) :
+    ComposeSymNameSubStave(lr,stave,substave);    
 }
 
 //______________________________________________________________________
-const char* AliITSUGeomTGeo::ComposeSymNameModule(Int_t lr, Int_t lad, int det)
+const char* AliITSUGeomTGeo::ComposeSymNameChip(Int_t lr, Int_t sta, Int_t substave, Int_t mod, Int_t chip)
 {
-  // sym name of the module
-  return Form("%s/%s%d",ComposeSymNameLadder(lr,lad),GetITSModulePattern(),det);
+  // sym name of the chip in the given layer/stave/substave/module
+  return Form("%s/%s%d",ComposeSymNameModule(lr,sta,substave,mod),GetITSChipPattern(),chip);
 }
 
 //______________________________________________________________________
 TGeoHMatrix* AliITSUGeomTGeo::GetMatrix(Int_t index)  const
 {
-  // Get the transformation matrix for a given module 'index'
+  // Get the transformation matrix for a given chip 'index'
   // by quering the TGeoManager
   static TGeoHMatrix matTmp;
   TGeoPNEntry *pne = GetPNEntry(index);
@@ -371,7 +517,7 @@ TGeoHMatrix* AliITSUGeomTGeo::GetMatrix(Int_t index)  const
 //______________________________________________________________________
 Bool_t AliITSUGeomTGeo::GetTranslation(Int_t index, Double_t t[3])  const
 {
-  // Get the translation vector for a given module 'index'
+  // Get the translation vector for a given chip 'index'
   // by quering the TGeoManager
   TGeoHMatrix *m = GetMatrix(index);
   if (!m) return kFALSE;
@@ -385,7 +531,7 @@ Bool_t AliITSUGeomTGeo::GetTranslation(Int_t index, Double_t t[3])  const
 //______________________________________________________________________
 Bool_t AliITSUGeomTGeo::GetRotation(Int_t index, Double_t r[9])  const
 {
-  // Get the rotation matrix for a given module 'index'
+  // Get the rotation matrix for a given chip 'index'
   // by quering the TGeoManager
   TGeoHMatrix *m = GetMatrix(index);
   if (!m) return kFALSE;
@@ -400,7 +546,7 @@ Bool_t AliITSUGeomTGeo::GetRotation(Int_t index, Double_t r[9])  const
 Bool_t AliITSUGeomTGeo::GetOrigMatrix(Int_t index, TGeoHMatrix &m) const
 {
   // Get the original (ideal geometry) TGeo matrix for
-  // a given module identified by 'index'.
+  // a given chip identified by 'index'.
   // The method is slow, so it should be used
   // with great care.
   m.Clear();
@@ -415,7 +561,7 @@ Bool_t AliITSUGeomTGeo::GetOrigMatrix(Int_t index, TGeoHMatrix &m) const
 Bool_t AliITSUGeomTGeo::GetOrigTranslation(Int_t index, Double_t t[3])  const
 {
   // Get the original translation vector (ideal geometry)
-  // for a given module 'index' by quering the TGeoManager
+  // for a given chip 'index' by quering the TGeoManager
   TGeoHMatrix m;
   if (!GetOrigMatrix(index,m)) return kFALSE;
 
@@ -429,7 +575,7 @@ Bool_t AliITSUGeomTGeo::GetOrigTranslation(Int_t index, Double_t t[3])  const
 Bool_t AliITSUGeomTGeo::GetOrigRotation(Int_t index, Double_t r[9])  const
 {
   // Get the original rotation matrix (ideal geometry)
-  // for a given module 'index' by quering the TGeoManager
+  // for a given chip 'index' by quering the TGeoManager
   TGeoHMatrix m;
   if (!GetOrigMatrix(index,m)) return kFALSE;
 
@@ -476,22 +622,18 @@ Bool_t AliITSUGeomTGeo::GetTrackingMatrix(Int_t index, TGeoHMatrix &m)
 //______________________________________________________________________
 TGeoHMatrix* AliITSUGeomTGeo::ExtractMatrixSens(Int_t index) const
 {
-  // Get the transformation matrix of the SENSOR (not ncessary the same as the module) 
-  // for a given module 'index' by quering the TGeoManager
-  static TGeoHMatrix matTmp;
-  const TString kPathBase = Form("/ALIC_1/%s_2/",AliITSUGeomTGeo::GetITSVolPattern());
-  const TString kNames = Form("%%s%%s%s%%d_1/%s%%d_%%d/%s%%d_%%d/%s%%d_%%d"
-                             ,AliITSUGeomTGeo::GetITSLayerPattern()
-                             ,AliITSUGeomTGeo::GetITSLadderPattern()
-                             ,AliITSUGeomTGeo::GetITSModulePattern()
-                             ,AliITSUGeomTGeo::GetITSSensorPattern());
-  TString path;
-  Int_t lay,ladd,detInLad;
-  GetModuleId(index,lay,ladd,detInLad);
-  //
+  // Get the transformation matrix of the SENSOR (not ncessary the same as the chip) 
+  // for a given chip 'index' by quering the TGeoManager
+  Int_t lay,stav,sstav,mod,chipInMod;
+  GetChipId(index,lay,stav,sstav,mod,chipInMod);
   int wrID = fLr2Wrapper[lay];
-  path.Form(kNames.Data(),kPathBase.Data(),wrID>=0 ? Form("%s%d_1/",GetITSWrapVolPattern(),wrID) : "",
-           lay,lay,ladd,lay,detInLad,lay,1);
+  TString path = Form("/ALIC_1/%s_2/",AliITSUGeomTGeo::GetITSVolPattern());
+  if (wrID>=0) path += Form("%s%d_1/",GetITSWrapVolPattern(),wrID);
+  path += Form("%s%d_1/%s%d_%d/",AliITSUGeomTGeo::GetITSLayerPattern(),lay,AliITSUGeomTGeo::GetITSStavePattern(),lay,stav);
+  if (fNSubStaves[lay]>0) path += Form("%s%d_%d/",AliITSUGeomTGeo::GetITSSubStavePattern(),lay,sstav);
+  if (fNModules[lay]>0)   path += Form("%s%d_%d/",AliITSUGeomTGeo::GetITSModulePattern(),lay,mod);
+  path += Form("%s%d_%d/%s%d_1",AliITSUGeomTGeo::GetITSChipPattern(),lay,chipInMod,AliITSUGeomTGeo::GetITSSensorPattern(),lay);
+  static TGeoHMatrix matTmp;
   gGeoManager->PushPath();
   if (!gGeoManager->cd(path.Data())) {
     gGeoManager->PopPath();
@@ -500,7 +642,7 @@ TGeoHMatrix* AliITSUGeomTGeo::ExtractMatrixSens(Int_t index) const
   } // end if !gGeoManager
   matTmp = *gGeoManager->GetCurrentMatrix(); // matrix may change after cd
   //RSS
-  //  printf("%d/%d/%d %s\n",lay,ladd,detInLad,path.Data());
+  //  printf("%d/%d/%d %s\n",lay,stav,detInSta,path.Data());
   //  mat->Print();
   // Retstore the modeler state.
   gGeoManager->PopPath();
@@ -511,13 +653,13 @@ TGeoHMatrix* AliITSUGeomTGeo::ExtractMatrixSens(Int_t index) const
 //______________________________________________________________________
 TGeoPNEntry* AliITSUGeomTGeo::GetPNEntry(Int_t index) const
 {
-  // Get a pointer to the TGeoPNEntry of a module
+  // Get a pointer to the TGeoPNEntry of a chip
   // identified by 'index'
   // Returns NULL in case of invalid index,
   // missing TGeoManager or invalid symbolic name
   //
-  if (index >= fNModules) {
-    AliError(Form("Invalid ITS module index: %d (0 -> %d) !",index,fNModules));
+  if (index >= fNChips) {
+    AliError(Form("Invalid ITS chip index: %d (0 -> %d) !",index,fNChips));
     return NULL;
   }
   
@@ -525,7 +667,7 @@ TGeoPNEntry* AliITSUGeomTGeo::GetPNEntry(Int_t index) const
     AliError("Can't get the matrix! gGeoManager doesn't exist or it is still opened!");
     return NULL;
   }
-  TGeoPNEntry* pne = gGeoManager->GetAlignableEntryByUID( ModuleVolUID(index) );
+  TGeoPNEntry* pne = gGeoManager->GetAlignableEntryByUID( ChipVolUID(index) );
   //  TGeoPNEntry* pne = gGeoManager->GetAlignableEntry(GetSymName(index));
   if (!pne) AliError(Form("The index %d does not correspond to a physical entry!",index));
   //
@@ -542,17 +684,27 @@ void AliITSUGeomTGeo::BuildITS(Bool_t loadSegm)
   fNLayers    = ExtractNumberOfLayers();
   if (!fNLayers) return;
   //
-  fNLadders   = new Int_t[fNLayers];
-  fNDetectors = new Int_t[fNLayers];
-  fLrDetType  = new Int_t[fNLayers];
-  fLastModIndex   = new Int_t[fNLayers];
-  fNModules = 0;
+  fNStaves         = new Int_t[fNLayers];
+  fNSubStaves      = new Int_t[fNLayers];
+  fNModules        = new Int_t[fNLayers];
+  fNChipsPerModule = new Int_t[fNLayers];
+  fNChipsPerSubStave = new Int_t[fNLayers];
+  fNChipsPerStave  = new Int_t[fNLayers];
+  fNChipsPerLayer  = new Int_t[fNLayers];
+  fLrChipType      = new Int_t[fNLayers];
+  fLastChipIndex   = new Int_t[fNLayers];
+  fNChips = 0;
   for (int i=0;i<fNLayers;i++) {
-    fNLadders[i]   = ExtractNumberOfLadders(i);
-    fNDetectors[i] = ExtractNumberOfDetectors(i);
-    fLrDetType[i]  = ExtractLayerDetType(i);
-    fNModules     += fNLadders[i]*fNDetectors[i];
-    fLastModIndex[i]   = fNModules-1;
+    fLrChipType[i]      = ExtractLayerChipType(i);
+    fNStaves[i]         = ExtractNumberOfStaves(i);
+    fNSubStaves[i]      = ExtractNumberOfSubStaves(i);
+    fNModules[i]        = ExtractNumberOfModules(i);
+    fNChipsPerModule[i] = ExtractNChipsPerModule(i);
+    fNChipsPerSubStave[i] = fNChipsPerModule[i]*Max(1,fNModules[i]);
+    fNChipsPerStave[i]    = fNChipsPerSubStave[i]*Max(1,fNSubStaves[i]);
+    fNChipsPerLayer[i]    = fNChipsPerStave[i]*fNStaves[i];
+    fNChips              += fNChipsPerLayer[i];
+    fLastChipIndex[i]     = fNChips-1;
   }
   //
   FetchMatrices();
@@ -572,8 +724,8 @@ Int_t AliITSUGeomTGeo::ExtractNumberOfLayers()
   //
   Int_t numberOfLayers = 0;
   //
-  TGeoVolume *itsV = gGeoManager->GetVolume(fgkITSVolName);
-  if (!itsV) AliFatal(Form("ITS volume %s is not in the geometry",fgkITSVolName));
+  TGeoVolume *itsV = gGeoManager->GetVolume(GetITSVolPattern());
+  if (!itsV) AliFatal(Form("ITS volume %s is not in the geometry",GetITSVolPattern()));
   SetUIDShift(itsV->GetUniqueID());
   //
   // Loop on all ITSV nodes, count Layer volumes by checking names
@@ -585,13 +737,13 @@ Int_t AliITSUGeomTGeo::ExtractNumberOfLayers()
   for (Int_t j=0; j<nNodes; j++) {
     TGeoNode* nd = (TGeoNode*)nodes->At(j);
     const char* name = nd->GetName();
-    if      (strstr(name,fgkITSLrName)) numberOfLayers++;
-    else if (strstr(name,fgkITSWrapVolName)) { // this is a wrapper volume, may cointain layers
+    if      (strstr(name,GetITSLayerPattern())) numberOfLayers++;
+    else if (strstr(name,GetITSWrapVolPattern())) { // this is a wrapper volume, may cointain layers
       TObjArray* nodesW = nd->GetNodes();
       int nNodesW = nodesW->GetEntriesFast();
       for (Int_t jw=0; jw<nNodesW; jw++) {
        TGeoNode* ndW = (TGeoNode*)nodesW->At(jw);
-       if (strstr(ndW->GetName(),fgkITSLrName)) fLr2Wrapper[numberOfLayers++] = nWrp;
+       if (strstr(ndW->GetName(),GetITSLayerPattern())) fLr2Wrapper[numberOfLayers++] = nWrp;
       }
       nWrp++;
     }
@@ -601,7 +753,7 @@ Int_t AliITSUGeomTGeo::ExtractNumberOfLayers()
 }
 
 //______________________________________________________________________
-Int_t AliITSUGeomTGeo::ExtractNumberOfLadders(Int_t lay) const
+Int_t AliITSUGeomTGeo::ExtractNumberOfStaves(Int_t lay) const
 {
   // Determines the number of layers in the Upgrade Geometry
   //
@@ -609,44 +761,118 @@ Int_t AliITSUGeomTGeo::ExtractNumberOfLadders(Int_t lay) const
   //   lay: layer number, starting from 0
   //
   // MS
-  Int_t numberOfLadders = 0;
+  Int_t numberOfStaves = 0;
   char laynam[30];
-  snprintf(laynam, 30, "%s%d",fgkITSLrName,lay);
+  snprintf(laynam, 30, "%s%d",GetITSLayerPattern(),lay);
   TGeoVolume* volLr = gGeoManager->GetVolume(laynam);
   if (!volLr) AliFatal(Form("can't find %s volume",laynam));
   //
-  // Loop on all layer nodes, count Ladder volumes by checking names
+  // Loop on all layer nodes, count Stave volumes by checking names
   Int_t nNodes = volLr->GetNodes()->GetEntries();
-  for (Int_t j=0; j<nNodes; j++) if (strstr(volLr->GetNodes()->At(j)->GetName(),fgkITSLadName)) numberOfLadders++;
+  for (Int_t j=0; j<nNodes; j++) {
+    //    AliInfo(Form("L%d %d of %d %s %s -> %d",lay,j,nNodes,volLr->GetNodes()->At(j)->GetName(),GetITSStavePattern(),numberOfStaves));
+    if (strstr(volLr->GetNodes()->At(j)->GetName(),GetITSStavePattern())) numberOfStaves++;
+  }
   //
-  return numberOfLadders;
+  return numberOfStaves;
   //
 }
 
 //______________________________________________________________________
-Int_t AliITSUGeomTGeo::ExtractNumberOfDetectors(Int_t lay)  const
+Int_t AliITSUGeomTGeo::ExtractNumberOfSubStaves(Int_t lay) const
 {
-  // Determines the number of detectors per ladder in the Upgrade Geometry
+  // Determines the number of substaves in the stave of the layer
+  //
+  // Inputs:
+  //   lay: layer number, starting from 0
+  //
+  // MS
+  if (fgITSSubStaveName.IsNull()) return 0; // for the setup w/o substave defined the stave and the substave is the same thing
+  Int_t nSS = 0;
+  char stavnam[30];
+  snprintf(stavnam, 30, "%s%d", GetITSStavePattern(),lay);
+  TGeoVolume* volLd = gGeoManager->GetVolume(stavnam);
+  if (!volLd) AliFatal(Form("can't find %s volume",stavnam));
+  //
+  // Loop on all stave nodes, count Chip volumes by checking names
+  Int_t nNodes = volLd->GetNodes()->GetEntries();
+  for (Int_t j=0; j<nNodes; j++) if (strstr(volLd->GetNodes()->At(j)->GetName(),GetITSSubStavePattern())) nSS++;
+  //
+  return nSS;
+  //
+}
+
+//______________________________________________________________________
+Int_t AliITSUGeomTGeo::ExtractNumberOfModules(Int_t lay) const
+{
+  // Determines the number of modules in substave in the stave of the layer
+  //
+  // Inputs:
+  //   lay: layer number, starting from 0
+  //
+  // for the setup w/o modules defined the module and the stave or the substave is the same thing
+  if (fgITSModuleName.IsNull()) return 0;
+  char stavnam[30];
+  TGeoVolume* volLd = 0;
+  if (!fgITSSubStaveName.IsNull()) {
+    snprintf(stavnam, 30, "%s%d", GetITSSubStavePattern(),lay); 
+    volLd = gGeoManager->GetVolume(stavnam);
+  }
+  if (!volLd) { // no substaves, check staves
+    snprintf(stavnam, 30, "%s%d", GetITSStavePattern(),lay); 
+    volLd = gGeoManager->GetVolume(stavnam);
+  }
+  if (!volLd) return 0;
+  Int_t nMod = 0;
+  //
+  // Loop on all substave nodes, count module volumes by checking names
+  Int_t nNodes = volLd->GetNodes()->GetEntries();
+  for (Int_t j=0; j<nNodes; j++) if (strstr(volLd->GetNodes()->At(j)->GetName(),GetITSModulePattern())) nMod++;
+  //
+  return nMod;
+  //
+}
+
+//______________________________________________________________________
+Int_t AliITSUGeomTGeo::ExtractNChipsPerModule(Int_t lay)  const
+{
+  // Determines the number of chips per module on the (sub)stave in the Upgrade Geometry
   //
   // Inputs:
   //   lay: layer number from 0
   // MS
-  Int_t numberOfModules = 0;
-  char laddnam[30];
-  snprintf(laddnam, 30, "%s%d", fgkITSLadName,lay);
-  TGeoVolume* volLd = gGeoManager->GetVolume(laddnam);
-  if (!volLd) AliFatal(Form("can't find %s volume",laddnam));
+  Int_t numberOfChips = 0;
+  char stavnam[30];
+  TGeoVolume* volLd = 0;
+  if (!fgITSModuleName.IsNull()) {
+    snprintf(stavnam, 30, "%s%d", GetITSModulePattern(),lay); 
+    volLd = gGeoManager->GetVolume(stavnam);
+  }
+  if (!volLd) { // no modules on this layer, check substaves
+    if (!fgITSSubStaveName.IsNull()) {
+      snprintf(stavnam, 30, "%s%d", GetITSSubStavePattern(),lay); 
+      volLd = gGeoManager->GetVolume(stavnam);
+    }
+  }
+  if (!volLd) { // no substaves on this layer, check staves
+    snprintf(stavnam, 30, "%s%d", GetITSStavePattern(),lay);
+    volLd = gGeoManager->GetVolume(stavnam);
+  }
+  if (!volLd) AliFatal(Form("can't find volume containing chips on layer %d",lay));
   //
-  // Loop on all ladder nodes, count Module volumes by checking names
+  // Loop on all stave nodes, count Chip volumes by checking names
   Int_t nNodes = volLd->GetNodes()->GetEntries();
-  for (Int_t j=0; j<nNodes; j++) if (strstr(volLd->GetNodes()->At(j)->GetName(),fgkITSModName)) numberOfModules++;
+  for (Int_t j=0; j<nNodes; j++) {
+    //    AliInfo(Form("L%d %d of %d %s %s -> %d",lay,j,nNodes,volLd->GetNodes()->At(j)->GetName(),GetITSChipPattern(),numberOfChips));
+    if (strstr(volLd->GetNodes()->At(j)->GetName(),GetITSChipPattern())) numberOfChips++;
+  }
   //
-  return numberOfModules;
+  return numberOfChips;
   //
 }
 
 //______________________________________________________________________
-Int_t AliITSUGeomTGeo::ExtractLayerDetType(Int_t lay)  const
+Int_t AliITSUGeomTGeo::ExtractLayerChipType(Int_t lay)  const
 {
   // Determines the layer detector type the Upgrade Geometry
   //
@@ -657,31 +883,32 @@ Int_t AliITSUGeomTGeo::ExtractLayerDetType(Int_t lay)  const
   // Return:
   //   detector type id for the layer
   // MS
-  char laddnam[30];
-  snprintf(laddnam, 30, "%s%d", fgkITSLrName,lay);
-  TGeoVolume* volLd = gGeoManager->GetVolume(laddnam);
-  if (!volLd) {AliFatal(Form("can't find %s volume",laddnam)); return -1;}
+  char stavnam[30];
+  snprintf(stavnam, 30, "%s%d", GetITSLayerPattern(),lay);
+  TGeoVolume* volLd = gGeoManager->GetVolume(stavnam);
+  if (!volLd) {AliFatal(Form("can't find %s volume",stavnam)); return -1;}
   //
   return volLd->GetUniqueID();
   //
 }
 
 //______________________________________________________________________
-UInt_t AliITSUGeomTGeo::ComposeDetTypeID(UInt_t segmId)
+UInt_t AliITSUGeomTGeo::ComposeChipTypeID(UInt_t segmId)
 {
-  if (segmId>=kMaxSegmPerDetType) AliFatalClass(Form("Id=%d is >= max.allowed %d",segmId,kMaxSegmPerDetType));
-  return segmId + kDetTypePix*kMaxSegmPerDetType;
+  if (segmId>=kMaxSegmPerChipType) AliFatalClass(Form("Id=%d is >= max.allowed %d",segmId,kMaxSegmPerChipType));
+  return segmId + kChipTypePix*kMaxSegmPerChipType;
 }
 
 //______________________________________________________________________
 void AliITSUGeomTGeo::Print(Option_t *) const
 {
   // print
-  printf("Geometry version %d, NLayers:%d NModules:%d\n",fVersion,fNLayers,fNModules);
+  printf("Geometry version %d, NLayers:%d NChips:%d\n",fVersion,fNLayers,fNChips);
   if (fVersion==kITSVNA) return;
   for (int i=0;i<fNLayers;i++) {
-    printf("Lr%2d\tNLadd:%2d\tNDet:%2d\tDetType:%3d\tMod#:%4d:%4d\tWrapVol:%d\n",
-          i,fNLadders[i],fNDetectors[i],fLrDetType[i],GetFirstModIndex(i),GetLastModIndex(i),fLr2Wrapper[i]);
+    printf("Lr%2d\tNStav:%2d\tNChips:%2d\tNMod:%d\tNSubSt:%d\tNSt:%3d\tChipType:%3d\tChip#:%4d:%4d\tWrapVol:%d\n",
+          i,fNStaves[i],fNChipsPerModule[i],fNModules[i],fNSubStaves[i],fNStaves[i],
+          fLrChipType[i],GetFirstChipIndex(i),GetLastChipIndex(i),fLr2Wrapper[i]);
   }
 }
 
@@ -690,9 +917,9 @@ void AliITSUGeomTGeo::FetchMatrices()
 {
   // store pointer on often used matrices for faster access
   if (!gGeoManager) AliFatal("Geometry is not loaded");
-  fMatSens = new TObjArray(fNModules);
+  fMatSens = new TObjArray(fNChips);
   fMatSens->SetOwner(kTRUE);
-  for (int i=0;i<fNModules;i++) fMatSens->AddAt(new TGeoHMatrix(*ExtractMatrixSens(i)),i);
+  for (int i=0;i<fNChips;i++) fMatSens->AddAt(new TGeoHMatrix(*ExtractMatrixSens(i)),i);
   CreateT2LMatrices();
 }
 
@@ -700,12 +927,12 @@ void AliITSUGeomTGeo::FetchMatrices()
 void AliITSUGeomTGeo::CreateT2LMatrices()
 {
   // create tracking to local (Sensor!) matrices
-  fMatT2L  = new TObjArray(fNModules);  
+  fMatT2L  = new TObjArray(fNChips);  
   fMatT2L->SetOwner(kTRUE);
   TGeoHMatrix matLtoT;
   double loc[3]={0,0,0},glo[3];
   const double *rotm;
-  for (int isn=0;isn<fNModules;isn++) {
+  for (int isn=0;isn<fNChips;isn++) {
     const TGeoHMatrix* matSens = GetMatrixSens(isn);
     if (!matSens) {AliFatal(Form("Failed to get matrix for sensor %d",isn)); return;}
     matSens->LocalToMaster(loc,glo);
index 1b6dbfc6278cae57584b8b69e19a33b425cca45c..3f98c5d1a4b1f5aabdf1dd370da7cb493a57d85f 100644 (file)
@@ -5,7 +5,7 @@
  * See cxx source for full Copyright notice                               */
 
 /////////////////////////////////////////////////////////////////////////
-//  AliITSUGeomTGeo is a simple interface class to TGeoManager       //
+//  AliITSUGeomTGeo is a simple interface class to TGeoManager         //
 //  It is used in the simulation and reconstruction in order to        //
 //  query the TGeo ITS geometry                                        //
 //                                                                     //
 //  method if the structures are initialized. To be converted to       //
 //  singleton at later stage.                                          //
 //                                                                     //
-//  Note on the upgrade detector types:                                //
-//  The coarse type defines detectors served by different classes,     //
-//  like Pix. Each such a detector type can have kMaxSegmPerDetType    //
+//  Note on the upgrade chip types:                                    //
+//  The coarse type defines chips served by different classes,         //
+//  like Pix. Each such a chip type can have kMaxSegmPerChipType       //
 //  segmentations (pitch etc.) whose parameteres are stored in the     //
 //  AliITSsegmentation derived class (like AliITSUSegmentationPix)     //
-//  This allows to have in the setup modules served by the same        //
+//  This allows to have in the setup chips served by the same          //
 //  classes but with different segmentations.                          //
-//  The full detector type is composed as:                             //
-//  CoarseType*kMaxSegmPerDetType + segmentationType                   //
+//  The full chip type is composed as:                                 //
+//  CoarseType*kMaxSegmPerChipType + segmentationType                  //
 //  The only requirement on the segmentationType that should be        //
-//  < kMaxSegmPerDetType.                                              //
-//  The methods like GetLayerDetTypeID return the full detector type   //
+//  < kMaxSegmPerChipType.                                             //
+//  The methods like GetLayerChipTypeID return the full chip type      //
 //                                                                     //
 //                                                                     //
 /////////////////////////////////////////////////////////////////////////
@@ -47,65 +47,76 @@ class AliITSUGeomTGeo : public TObject {
 
  public:
   enum {kITSVNA, kITSVUpg}; // ITS version
-  enum {kDetTypePix=0, kNDetTypes, kMaxSegmPerDetType=10}; // defined detector types (each one can have different segmentations)
+  enum {kChipTypePix=0, kNChipTypes, kMaxSegmPerChipType=10}; // defined detector chip types (each one can have different segmentations)
   //
   AliITSUGeomTGeo(Bool_t build = kFALSE, Bool_t loadSegmentations = kTRUE);
   virtual ~AliITSUGeomTGeo(); 
   AliITSUGeomTGeo(const AliITSUGeomTGeo &src);
   AliITSUGeomTGeo& operator=(const AliITSUGeomTGeo &geom);
   //
-  Int_t  GetNModules()                                                    const {return fNModules;}
-  Int_t  GetNDetectors(Int_t lay)                                         const {return fNDetectors[lay];}
-  Int_t  GetNLadders(Int_t lay)                                           const {return fNLadders[lay];}
-  Int_t  GetNLayers()                                                     const {return fNLayers;}
+  Int_t  GetNChips()                                                    const {return fNChips;}
+  Int_t  GetNChipsPerModule(Int_t lay)                                  const {return fNChipsPerModule[lay];}
+  Int_t  GetNChipsPerSubStave(Int_t lay)                                const {return fNChipsPerSubStave[lay];}
+  Int_t  GetNChipsPerStave(Int_t lay)                                   const {return fNChipsPerStave[lay];}
+  Int_t  GetNChipsPerLayer(Int_t lay)                                   const {return fNChipsPerLayer[lay];}
+  Int_t  GetNModules(Int_t lay)                                         const {return fNModules[lay];}
+  Int_t  GetNSubStaves(Int_t lay)                                       const {return fNSubStaves[lay];}
+  Int_t  GetNStaves(Int_t lay)                                          const {return fNStaves[lay];}
+  Int_t  GetNLayers()                                                   const {return fNLayers;}
   
-  Int_t  GetModuleIndex(Int_t lay,int detInLay)                           const {return GetFirstModIndex(lay)+detInLay;}
-  Int_t  GetModuleIndex(Int_t lay,Int_t lad,Int_t det)                    const;
-  Bool_t GetModuleId(Int_t index,Int_t &lay,Int_t &lad,Int_t &det)        const;
-  Int_t  GetLayer(Int_t index)                                            const;
-  Int_t  GetLadder(Int_t index)                                           const;
-  Int_t  GetModIdInLayer(Int_t index)                                     const;
-  Int_t  GetModIdInLadder(Int_t index)                                    const;
+  Int_t  GetChipIndex(Int_t lay,int detInLay)                           const {return GetFirstChipIndex(lay)+detInLay;}
+  Int_t  GetChipIndex(Int_t lay,Int_t sta,Int_t detInSta)               const;
+  Int_t  GetChipIndex(Int_t lay,Int_t sta, Int_t subSta, Int_t detInSubSta) const;
+  Int_t  GetChipIndex(Int_t lay,Int_t sta, Int_t subSta, Int_t md, Int_t detInMod) const;
+  Bool_t GetChipId(Int_t index,Int_t &lay,Int_t &sta,Int_t &ssta,Int_t &mod,Int_t &chip)        const;
+  Int_t  GetLayer(Int_t index)                                          const;
+  Int_t  GetStave(Int_t index)                                          const;
+  Int_t  GetSubStave(Int_t index)                                       const;
+  Int_t  GetModule(Int_t index)                                         const;
+  Int_t  GetChipIdInLayer(Int_t index)                                  const;
+  Int_t  GetChipIdInStave(Int_t index)                                  const;
+  Int_t  GetChipIdInSubStave(Int_t index)                               const;
+  Int_t  GetChipIdInModule(Int_t index)                                 const;
   //
-  Int_t  GetLastModIndex(Int_t lay)                                       const {return fLastModIndex[lay];}
-  Int_t  GetFirstModIndex(Int_t lay)                                      const {return (lay==0) ? 0:fLastModIndex[lay-1]+1;}
+  Int_t  GetLastChipIndex(Int_t lay)                                       const {return fLastChipIndex[lay];}
+  Int_t  GetFirstChipIndex(Int_t lay)                                      const {return (lay==0) ? 0:fLastChipIndex[lay-1]+1;}
   //  
   const char *GetSymName(Int_t index)                                     const;
-  const char *GetSymName(Int_t lay,Int_t lad,Int_t det)                   const;
+  const char *GetSymName(Int_t lay,Int_t sta,Int_t det)                   const;
   //
-  // Attention: these are the matrices for the alignable volumes of the modules, i.e. not necessarily the sensors
+  // Attention: these are the matrices for the alignable volumes of the chips, i.e. not necessarily the sensors
   TGeoHMatrix* GetMatrix(Int_t index)                                     const;
-  TGeoHMatrix* GetMatrix(Int_t lay,Int_t lad,Int_t det)                   const;
+  TGeoHMatrix* GetMatrix(Int_t lay,Int_t sta,Int_t det)                   const;
   Bool_t GetTranslation(Int_t index, Double_t t[3])                       const;
-  Bool_t GetTranslation(Int_t lay,Int_t lad,Int_t det, Double_t t[3])     const;
+  Bool_t GetTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3])     const;
   Bool_t GetRotation(Int_t index, Double_t r[9])                          const;
-  Bool_t GetRotation(Int_t lay,Int_t lad,Int_t det, Double_t r[9])        const;
+  Bool_t GetRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9])        const;
   Bool_t GetOrigMatrix(Int_t index, TGeoHMatrix &m)                       const;
-  Bool_t GetOrigMatrix(Int_t lay,Int_t lad,Int_t det, TGeoHMatrix &m)     const;
+  Bool_t GetOrigMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m)     const;
   Bool_t GetOrigTranslation(Int_t index, Double_t t[3])                   const;
-  Bool_t GetOrigTranslation(Int_t lay,Int_t lad,Int_t det, Double_t t[3]) const;
+  Bool_t GetOrigTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3]) const;
   Bool_t GetOrigRotation(Int_t index, Double_t r[9])                      const;
-  Bool_t GetOrigRotation(Int_t lay,Int_t lad,Int_t det, Double_t r[9])    const;
+  Bool_t GetOrigRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9])    const;
   //
   const TGeoHMatrix* GetMatrixT2L(Int_t index);
-  const TGeoHMatrix* GetMatrixT2L(Int_t lay,Int_t lad,Int_t det)  {return GetMatrixT2L( GetModuleIndex(lay,lad,det) );}
+  const TGeoHMatrix* GetMatrixT2L(Int_t lay,Int_t sta,Int_t det)  {return GetMatrixT2L( GetChipIndex(lay,sta,det) );}
   const TGeoHMatrix* GetMatrixSens(Int_t index);
-  const TGeoHMatrix* GetMatrixSens(Int_t lay,Int_t lad,Int_t det) {return GetMatrixSens( GetModuleIndex(lay,lad,det) );}
+  const TGeoHMatrix* GetMatrixSens(Int_t lay,Int_t sta,Int_t det) {return GetMatrixSens( GetChipIndex(lay,sta,det) );}
   //
   Bool_t GetTrackingMatrix(Int_t index, TGeoHMatrix &m);
-  Bool_t GetTrackingMatrix(Int_t lay,Int_t lad,Int_t det, TGeoHMatrix &m);
+  Bool_t GetTrackingMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m);
   //
   // Attention: these are transformations wrt sensitive volume!
   void   LocalToGlobal(Int_t index, const Double_t *loc, Double_t *glob);
-  void   LocalToGlobal(Int_t lay, Int_t lad, Int_t det,const Double_t *loc, Double_t *glob);
+  void   LocalToGlobal(Int_t lay, Int_t sta, Int_t det,const Double_t *loc, Double_t *glob);
   //
   void   GlobalToLocal(Int_t index, const Double_t *glob, Double_t *loc);
-  void   GlobalToLocal(Int_t lay, Int_t lad, Int_t det,const Double_t *glob, Double_t *loc);
+  void   GlobalToLocal(Int_t lay, Int_t sta, Int_t det,const Double_t *glob, Double_t *loc);
   //
   void   LocalToGlobalVect(Int_t index, const Double_t *loc, Double_t *glob);
   void   GlobalToLocalVect(Int_t index, const Double_t *glob, Double_t *loc);
-  Int_t  GetLayerDetTypeID(Int_t lr)                                         const;
-  Int_t  GetModuleDetTypeID(Int_t id)                                        const;
+  Int_t  GetLayerChipTypeID(Int_t lr)                                         const;
+  Int_t  GetChipChipTypeID(Int_t id)                                        const;
   //
   const AliITSsegmentation* GetSegmentationByID(Int_t id)                    const;
   const AliITSsegmentation* GetSegmentation(Int_t lr)                        const;
@@ -115,25 +126,39 @@ class AliITSUGeomTGeo : public TObject {
   static      UInt_t GetUIDShift()                                      {return fgUIDShift;}
   static      void   SetUIDShift(UInt_t s=16)                           {fgUIDShift = s<16 ? s:16;}
   //
-  static const char* GetITSVolPattern()                                 {return fgkITSVolName;}
-  static const char* GetITSLayerPattern()                               {return fgkITSLrName;}
-  static const char* GetITSWrapVolPattern()                             {return fgkITSWrapVolName;}
-  static const char* GetITSLadderPattern()                              {return fgkITSLadName;}
-  static const char* GetITSModulePattern()                              {return fgkITSModName;}
-  static const char* GetITSSensorPattern()                              {return fgkITSSensName;}
+  static const char* GetITSVolPattern()                                 {return fgITSVolName.Data();}
+  static const char* GetITSLayerPattern()                               {return fgITSLrName.Data();}
+  static const char* GetITSWrapVolPattern()                             {return fgITSWrapVolName.Data();}
+  static const char* GetITSStavePattern()                               {return fgITSStaveName.Data();}
+  static const char* GetITSSubStavePattern()                            {return fgITSSubStaveName.Data();}
+  static const char* GetITSModulePattern()                              {return fgITSModuleName.Data();}
+  static const char* GetITSChipPattern()                                {return fgITSChipName.Data();}
+  static const char* GetITSSensorPattern()                              {return fgITSSensName.Data();}
   static const char* GetITSsegmentationFileName()                       {return fgITSsegmFileName.Data();}
-  static const char* GetDetTypeName(Int_t i);
+  static const char* GetChipTypeName(Int_t i);
+
+  static void        SetITSVolPattern(const char* nm)                   {fgITSVolName = nm;}
+  static void        SetITSLayerPattern(const char* nm)                 {fgITSLrName = nm;}
+  static void        SetITSWrapVolPattern(const char* nm)               {fgITSWrapVolName = nm;}
+  static void        SetITSStavePattern(const char* nm)                 {fgITSStaveName = nm;}
+  static void        SetITSSubStavePattern(const char* nm)              {fgITSSubStaveName = nm;}
+  static void        SetITSModulePattern(const char* nm)                {fgITSModuleName = nm;}
+  static void        SetITSChipPattern(const char* nm)                  {fgITSChipName = nm;}
+  static void        SetITSSensorPattern(const char* nm)                {fgITSSensName = nm;}
+  static void        SetChipTypeName(Int_t i,const char* nm);
   static void        SetITSsegmentationFileName(const char* nm)         {fgITSsegmFileName = nm;}
-  static UInt_t      ComposeDetTypeID(UInt_t segmId);
+  static UInt_t      ComposeChipTypeID(UInt_t segmId);
   //
   static const char *ComposeSymNameITS();
   static const char *ComposeSymNameLayer(Int_t lr);
-  static const char *ComposeSymNameLadder(Int_t lr, Int_t lad);
-  static const char *ComposeSymNameModule(Int_t lr, Int_t lad, int det);
+  static const char *ComposeSymNameStave(Int_t lr, Int_t sta);
+  static const char *ComposeSymNameSubStave(Int_t lr, Int_t sta, Int_t ssta);
+  static const char *ComposeSymNameModule(Int_t lr, Int_t sta, Int_t ssta, Int_t mod);
+  static const char *ComposeSymNameChip(Int_t lr, Int_t sta, Int_t ssta, Int_t mod, Int_t chip);
   //
   // hack to avoid using AliGeomManager
-  Int_t              LayerToVolUID(Int_t lay,int detInLay)        const {return ModuleVolUID(GetModuleIndex(lay,detInLay));}
-  static Int_t       ModuleVolUID(Int_t mod)                            {return (mod&0xffff)<<fgUIDShift;}
+  Int_t              LayerToVolUID(Int_t lay,int detInLay)        const {return ChipVolUID(GetChipIndex(lay,detInLay));}
+  static Int_t       ChipVolUID(Int_t mod)                            {return (mod&0xffff)<<fgUIDShift;}
   //
  protected:
   void         FetchMatrices();
@@ -142,9 +167,11 @@ class AliITSUGeomTGeo : public TObject {
   TGeoHMatrix* ExtractMatrixSens(Int_t index)                     const;
   Bool_t       GetLayer(Int_t index,Int_t &lay,Int_t &index2)     const;
   TGeoPNEntry* GetPNEntry(Int_t index)                            const;
-  Int_t        ExtractNumberOfDetectors(Int_t lay)                const;
-  Int_t        ExtractNumberOfLadders(Int_t lay)                  const;
-  Int_t        ExtractLayerDetType(Int_t lay)                     const;
+  Int_t        ExtractNChipsPerModule(Int_t lay)                  const;
+  Int_t        ExtractNumberOfStaves(Int_t lay)                   const;
+  Int_t        ExtractNumberOfSubStaves(Int_t lay)                const;
+  Int_t        ExtractNumberOfModules(Int_t lay)                  const;
+  Int_t        ExtractLayerChipType(Int_t lay)                    const;
   Int_t        ExtractNumberOfLayers();
   void         BuildITS(Bool_t loadSegm);
   //
@@ -153,99 +180,108 @@ class AliITSUGeomTGeo : public TObject {
   //
   Int_t  fVersion;             // ITS Version 
   Int_t  fNLayers;             // number of layers
-  Int_t  fNModules;            // The total number of modules
-  Int_t *fNLadders;            //[fNLayers] Array of the number of ladders/layer(layer)
-  Int_t *fLrDetType;           //[fNLayers] Array of layer detector types
-  Int_t *fNDetectors;          //[fNLayers] Array of the number of detector/ladder(layer)
-  Int_t *fLastModIndex;        //[fNLayers] max ID of the detctor in the layer
+  Int_t  fNChips;              // The total number of chips
+  Int_t *fNStaves;             //[fNLayers] Array of the number of staves/layer(layer)
+  Int_t *fNSubStaves;          //[fNLayers] Array of the number of substaves/stave(layer)
+  Int_t *fNModules;            //[fNLayers] Array of the number of modules/substave(layer)
+  Int_t *fNChipsPerModule;     //[fNLayers] Array of the number of chips per module (group of chips on the substaves)
+  Int_t *fNChipsPerSubStave;   //[fNLayers] Array of the number of chips per substave
+  Int_t *fNChipsPerStave;      //[fNLayers] Array of the number of chips per stave
+  Int_t *fNChipsPerLayer;      //[fNLayers] Array of the number of chips per stave
+
+  //
+  Int_t *fLrChipType;          //[fNLayers] Array of layer chip types
+  Int_t *fLastChipIndex;       //[fNLayers] max ID of the detctor in the layer
   Char_t fLr2Wrapper[AliITSUAux::kMaxLayers]; // layer -> wrapper correspondence
   //
   TObjArray* fMatSens;         // Sensor's matrices pointers in the geometry
   TObjArray* fMatT2L;          // Tracking to Local matrices pointers in the geometry
   TObjArray* fSegm;            // segmentations
   //
-  static       UInt_t fgUIDShift;                // bit shift to go from mod.id to modUUID for TGeo
-  static const char*  fgkITSVolName;             // ITS mother volume name
-  static const char*  fgkITSLrName;              // ITS Layer name
-  static const char*  fgkITSLadName;             // ITS Ladder name 
-  static const char*  fgkITSModName;             // ITS Module name 
-  static const char*  fgkITSSensName;            // ITS Sensor name 
-  static const char*  fgkITSWrapVolName;         // ITS Wrapper volume name 
-  static const char*  fgkITSDetTypeName[kNDetTypes]; // ITS upg detType Names
+  static UInt_t   fgUIDShift;               // bit shift to go from mod.id to modUUID for TGeo
+  static TString  fgITSVolName;             // ITS mother volume name
+  static TString  fgITSLrName;              // ITS Layer name
+  static TString  fgITSStaveName;           // ITS Stave name 
+  static TString  fgITSSubStaveName;        // ITS SubStave name 
+  static TString  fgITSModuleName;          // ITS Module name 
+  static TString  fgITSChipName;            // ITS Chip name 
+  static TString  fgITSSensName;            // ITS Sensor name 
+  static TString  fgITSWrapVolName;         // ITS Wrapper volume name 
+  static TString  fgITSChipTypeName[kNChipTypes]; // ITS upg detType Names
   //
-  static TString      fgITSsegmFileName;         // file name for segmentations
+  static TString  fgITSsegmFileName;         // file name for segmentations
   //
   ClassDef(AliITSUGeomTGeo, 2) // ITS geometry based on TGeo
 };
 
 //_____________________________________________________________________________________________
-inline const char *AliITSUGeomTGeo::GetSymName(Int_t lay,Int_t lad,Int_t det) const    
+inline const char *AliITSUGeomTGeo::GetSymName(Int_t lay,Int_t sta,Int_t det) const    
 {
   // sym name
-  return GetSymName(GetModuleIndex(lay,lad,det));
+  return GetSymName(GetChipIndex(lay,sta,det));
 }
 
 //_____________________________________________________________________________________________
-inline TGeoHMatrix* AliITSUGeomTGeo::GetMatrix(Int_t lay,Int_t lad,Int_t det) const    
+inline TGeoHMatrix* AliITSUGeomTGeo::GetMatrix(Int_t lay,Int_t sta,Int_t det) const    
 {
-  // module current matrix
-  return GetMatrix(GetModuleIndex(lay,lad,det));
+  // chip current matrix
+  return GetMatrix(GetChipIndex(lay,sta,det));
 }
 
 //_____________________________________________________________________________________________
-inline Bool_t AliITSUGeomTGeo::GetTranslation(Int_t lay,Int_t lad,Int_t det, Double_t t[3]) const    
+inline Bool_t AliITSUGeomTGeo::GetTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3]) const    
 {
   // translation
-  return GetTranslation(GetModuleIndex(lay,lad,det),t); 
+  return GetTranslation(GetChipIndex(lay,sta,det),t); 
 }
 
 //_____________________________________________________________________________________________
-inline Bool_t AliITSUGeomTGeo::GetRotation(Int_t lay,Int_t lad,Int_t det, Double_t r[9]) const    
+inline Bool_t AliITSUGeomTGeo::GetRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9]) const    
 {
   // rot
-  return GetRotation(GetModuleIndex(lay,lad,det),r); 
+  return GetRotation(GetChipIndex(lay,sta,det),r); 
 }
 
 //_____________________________________________________________________________________________
-inline Bool_t AliITSUGeomTGeo::GetOrigMatrix(Int_t lay,Int_t lad,Int_t det, TGeoHMatrix &m) const    
+inline Bool_t AliITSUGeomTGeo::GetOrigMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m) const    
 {
   // orig matrix
-  return GetOrigMatrix(GetModuleIndex(lay,lad,det),m); 
+  return GetOrigMatrix(GetChipIndex(lay,sta,det),m); 
 }
 
 //_____________________________________________________________________________________________
-inline Bool_t AliITSUGeomTGeo::GetOrigTranslation(Int_t lay,Int_t lad,Int_t det, Double_t t[3]) const    
+inline Bool_t AliITSUGeomTGeo::GetOrigTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3]) const    
 {
   // orig trans
-  return GetOrigTranslation(GetModuleIndex(lay,lad,det),t); 
+  return GetOrigTranslation(GetChipIndex(lay,sta,det),t); 
 }
 
 //_____________________________________________________________________________________________
-inline Bool_t AliITSUGeomTGeo::GetOrigRotation(Int_t lay,Int_t lad,Int_t det, Double_t r[9]) const    
+inline Bool_t AliITSUGeomTGeo::GetOrigRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9]) const    
 {
   // orig rot
-  return GetOrigRotation(GetModuleIndex(lay,lad,det),r); 
+  return GetOrigRotation(GetChipIndex(lay,sta,det),r); 
 }
 
 //_____________________________________________________________________________________________
-inline Bool_t AliITSUGeomTGeo::GetTrackingMatrix(Int_t lay,Int_t lad,Int_t det, TGeoHMatrix &m)
+inline Bool_t AliITSUGeomTGeo::GetTrackingMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m)
 {
   // tracking mat
-  return GetTrackingMatrix(GetModuleIndex(lay,lad,det),m); 
+  return GetTrackingMatrix(GetChipIndex(lay,sta,det),m); 
 }
 
 //_____________________________________________________________________________________________
-inline Int_t  AliITSUGeomTGeo::GetLayerDetTypeID(Int_t lr) const  
+inline Int_t  AliITSUGeomTGeo::GetLayerChipTypeID(Int_t lr) const  
 {
   // detector type ID of layer
-  return fLrDetType[lr];
+  return fLrChipType[lr];
 }
 
 //_____________________________________________________________________________________________
-inline Int_t  AliITSUGeomTGeo::GetModuleDetTypeID(Int_t id) const  
+inline Int_t  AliITSUGeomTGeo::GetChipChipTypeID(Int_t id) const  
 {
-  // detector type ID of module
-  return GetLayerDetTypeID(GetLayer(id));
+  // detector type ID of chip
+  return GetLayerChipTypeID(GetLayer(id));
 } 
 
 //_____________________________________________________________________________________________
@@ -293,24 +329,31 @@ inline void AliITSUGeomTGeo::GlobalToLocalVect(Int_t index, const Double_t *glob
 }
 
 //_____________________________________________________________________________________________
-inline void AliITSUGeomTGeo::LocalToGlobal(Int_t lay, Int_t lad, Int_t det,const Double_t *loc, Double_t *glob)
+inline void AliITSUGeomTGeo::LocalToGlobal(Int_t lay, Int_t sta, Int_t det,const Double_t *loc, Double_t *glob)
 {
   // Local2Master (sensor)
-  LocalToGlobal(GetModuleIndex(lay,lad,det), loc, glob);
+  LocalToGlobal(GetChipIndex(lay,sta,det), loc, glob);
 }
 
 //_____________________________________________________________________________________________
-inline void AliITSUGeomTGeo::GlobalToLocal(Int_t lay, Int_t lad, Int_t det,const Double_t *glob, Double_t *loc)
+inline void AliITSUGeomTGeo::GlobalToLocal(Int_t lay, Int_t sta, Int_t det,const Double_t *glob, Double_t *loc)
 {
   // master2local (sensor)
-  GlobalToLocal(GetModuleIndex(lay,lad,det), glob, loc);
+  GlobalToLocal(GetChipIndex(lay,sta,det), glob, loc);
+}
+
+//_____________________________________________________________________________________________
+inline const char* AliITSUGeomTGeo::GetChipTypeName(Int_t i)
+{
+  if (i>=kNChipTypes) i/=kMaxSegmPerChipType; // full type is provided
+  return fgITSChipTypeName[i].Data();
 }
 
 //_____________________________________________________________________________________________
-inline const char* AliITSUGeomTGeo::GetDetTypeName(Int_t i)
+inline void AliITSUGeomTGeo::SetChipTypeName(Int_t i, const char* nm)
 {
-  if (i>=kNDetTypes) i/=kMaxSegmPerDetType; // full type is provided
-  return fgkITSDetTypeName[i];
+  if (i>=kNChipTypes) i/=kMaxSegmPerChipType; // full type is provided
+  fgITSChipTypeName[i] = nm;
 }
 
 //_____________________________________________________________________________________________
@@ -324,7 +367,7 @@ inline const AliITSsegmentation* AliITSUGeomTGeo::GetSegmentationByID(Int_t id)
 inline const AliITSsegmentation* AliITSUGeomTGeo::GetSegmentation(Int_t lr) const 
 {
   // get segmentation of layer
-  return fSegm ? (AliITSsegmentation*)fSegm->At( GetLayerDetTypeID(lr) ) : 0;
+  return fSegm ? (AliITSsegmentation*)fSegm->At( GetLayerChipTypeID(lr) ) : 0;
 }
 
 #endif
index d9bb058bf2babafeb066155fdaf9cb5be228fad9..21f07d0a0bdb086cdbf64ff338339349ba84046b 100644 (file)
@@ -61,7 +61,7 @@ AliITSUHit& AliITSUHit::operator=(const AliITSUHit &h)
 void AliITSUHit::GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof)
 {
   // Returns the position and time of flight of this hit in the local
-  // coordinates of this module, and in the units of the Monte Carlo.
+  // coordinates of this chip, and in the units of the Monte Carlo.
   //
   AliITSUGeomTGeo *gm = ((AliITSU*)gAlice->GetDetector("ITS"))->GetITSGeomTGeo();
   if (!gm) AliFatal("NULL pointer to the geometry!");
@@ -78,7 +78,7 @@ void AliITSUHit::GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof)
 void AliITSUHit::GetPositionL0(Double_t &x,Double_t &y,Double_t &z,Double_t &tof)
 {
   // Returns the initial position and time of flight of this hit 
-  // in the local coordinates of this module, and in the units of the 
+  // in the local coordinates of this chip, and in the units of the 
   AliITSUGeomTGeo *gm = ((AliITSU*)gAlice->GetDetector("ITS"))->GetITSGeomTGeo();
   if (!gm) AliFatal("NULL pointer to the geometry!");
   double g[3]={fx0,fy0,fz0},l[3];  
@@ -90,13 +90,13 @@ void AliITSUHit::GetPositionL0(Double_t &x,Double_t &y,Double_t &z,Double_t &tof
 }
 
 //______________________________________________________________________
-void AliITSUHit::GetDetectorID(Int_t &layer,Int_t &ladder,Int_t &det) const
+void AliITSUHit::GetChipID(Int_t &layer,Int_t &stave,Int_t &sstave, Int_t &mod,Int_t &det) const
 {
-  // Returns the layer ladder and detector number lables for this
-  // ITS module. Note: indices start from 0!
+  // Returns the layer stave and detector number lables for this
+  // ITS chip. Note: indices start from 0!
   AliITSUGeomTGeo *gm = ((AliITSU*)gAlice->GetDetector("ITS"))->GetITSGeomTGeo();
   if (!gm) AliFatal("NULL pointer to the geometry!");
-  gm->GetModuleId(fModule,layer,ladder,det);
+  gm->GetChipId(fModule,layer,stave,sstave,mod,det);
 }  
 
 //______________________________________________________________________
@@ -109,21 +109,39 @@ Int_t AliITSUHit::GetLayer() const
 }  
 
 //______________________________________________________________________
-Int_t AliITSUHit::GetLadder() const
+Int_t AliITSUHit::GetStave() const
 {
-  // Returns the ladder of TS module. Note: indices start from 0!
+  // Returns the stave of TS chip. Note: indices start from 0!
   AliITSUGeomTGeo *gm = ((AliITSU*)gAlice->GetDetector("ITS"))->GetITSGeomTGeo();
   if (!gm) AliFatal("NULL pointer to the geometry!");
-  return gm->GetLadder(fModule);
+  return gm->GetStave(fModule);
 }  
 
 //______________________________________________________________________
-Int_t AliITSUHit::GetDetector() const
+Int_t AliITSUHit::GetSubStave() const
 {
-  // Returns the detector within the ladder. Note: indices start from 0!
+  // Returns the substave of the chip. Note: indices start from 0!
   AliITSUGeomTGeo *gm = ((AliITSU*)gAlice->GetDetector("ITS"))->GetITSGeomTGeo();
   if (!gm) AliFatal("NULL pointer to the geometry!");
-  return gm->GetModIdInLadder(fModule);
+  return gm->GetSubStave(fModule);
+}  
+
+//______________________________________________________________________
+Int_t AliITSUHit::GetModule() const
+{
+  // Returns the module of the chip. Note: indices start from 0!
+  AliITSUGeomTGeo *gm = ((AliITSU*)gAlice->GetDetector("ITS"))->GetITSGeomTGeo();
+  if (!gm) AliFatal("NULL pointer to the geometry!");
+  return gm->GetModule(fModule);
+}  
+
+//______________________________________________________________________
+Int_t AliITSUHit::GetChipInModule() const // former GetDetector
+{
+  // Returns the detector within the module(or stave). Note: indices start from 0!
+  AliITSUGeomTGeo *gm = ((AliITSU*)gAlice->GetDetector("ITS"))->GetITSGeomTGeo();
+  if (!gm) AliFatal("NULL pointer to the geometry!");
+  return gm->GetChipIdInModule(fModule);
 }  
 
 //______________________________________________________________________
index a6f240e3a1067c1143968fba68c3d3b9dbdb01ce..e1b118b14ee1ae8be478c8ed9e3d7936dcb526a7 100644 (file)
@@ -24,10 +24,16 @@ class AliITSUHit : public AliITShit {
   AliITSUHit(const AliITSUHit &h);
   AliITSUHit& operator=(const AliITSUHit &h);
   virtual ~AliITSUHit() {}
+
+  void SetChip(Int_t chip) {SetModule(chip);}
+  Int_t GetChip()          {return GetModule();}
+
   virtual Int_t GetLayer() const;
-  virtual Int_t GetLadder() const;
-  virtual Int_t GetDetector() const;
-  virtual void  GetDetectorID(Int_t &layer,Int_t &ladder,Int_t &det) const;
+  virtual Int_t GetStave() const;
+  virtual Int_t GetSubStave() const;
+  virtual Int_t GetModule() const;  
+  virtual Int_t GetChipInModule() const;
+  virtual void  GetChipID(Int_t &layer,Int_t &stave,Int_t &sstave, Int_t &mod, Int_t &det) const;
   virtual void  GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof);
   virtual void  GetPositionL(Float_t &x,Float_t &y,Float_t &z) {Float_t tf;GetPositionL(x,y,z,tf);}
   virtual void  GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t) {Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;}
@@ -37,6 +43,8 @@ class AliITSUHit : public AliITShit {
   virtual void Print(Option_t *option="") const;
   //
  protected:
+  virtual void SetModule(Int_t mod){fModule=mod;};
+  virtual Int_t GetModule(){return fModule;};
 
   ClassDef(AliITSUHit,1)  //Hits object
         
index 730a1f6ef37d346ee89097b144eb8cbcd974a075..37879e63ca4f850115d740e247102b5004306ba2 100644 (file)
@@ -250,23 +250,23 @@ void AliITSULoader::SetupDigits(TObjArray *digPerDet,Int_t n,
     } // end for i
 }
 //---------------------------------------------------------------------
-AliITSdigit * AliITSULoader::GetDigit(TObjArray *digPerDet,Int_t module,
+AliITSdigit * AliITSULoader::GetDigit(TObjArray *digPerDet,Int_t chip,
                                        Int_t digit){
-    // Gets the digit for for a specific detector type and module.
+    // Gets the digit for for a specific detector type and chip.
     // To be used in conjustion with Setupdigits(AliITS *its).
     // Inputs:
     //   TObjArray *digPereDet    Pointer to the Array of digits
-    //   Int_t      module        Module number
+    //   Int_t      chip        Chip number
     //   Int_t      digit         Digit number
     // Outputs:
     //   none.
     // Return:
     //   returns the pointer to the digit. if zero then last digit for that
-    //   module.
+    //   chip.
 
     if(digPerDet==0){
-        Error("GetDigit","digPerDet=%p, module=%d, digit=%d",
-              digPerDet,module,digit);
+        Error("GetDigit","digPerDet=%p, chip=%d, digit=%d",
+              digPerDet,chip,digit);
         return 0;
     } // end if
     return 0;
index 029307e5ad6c242d6d0a603397543fa32aa182ee..182ac3246be980c9f9841bdcd2f11117748d75bf 100644 (file)
@@ -20,13 +20,13 @@ class AliITSULoader: public AliLoader{
     void           MakeTree(Option_t* opt);
     virtual void   SetupDigits(TObjArray *digPerDet,Int_t n,
                                 const Char_t **digclass); // Sets up digits
-    // Gets the AliITSdigit for a given module and a specific digit in that
-    // module. Array of digits stored in AliITS (must use 
+    // Gets the AliITSdigit for a given chip and a specific digit in that
+    // chip. Array of digits stored in AliITS (must use 
     // SetupDigits(AliITS *its)).
-    // virtual AliITSdigit* GetDigit(AliITS *its,Int_t module,Int_t digit);
-    // Gets the AliITSdigit for a given module and a specific digit in that
-    // module. Array of digits stored in a user defined TObjArray digPerDet
-    virtual AliITSdigit* GetDigit(TObjArray *digPerDet,Int_t module,Int_t digit);
+    // virtual AliITSdigit* GetDigit(AliITS *its,Int_t chip,Int_t digit);
+    // Gets the AliITSdigit for a given chip and a specific digit in that
+    // chip. Array of digits stored in a user defined TObjArray digPerDet
+    virtual AliITSdigit* GetDigit(TObjArray *digPerDet,Int_t chip,Int_t digit);
 
     //Raw Clusters
     AliDataLoader* GetRawClLoader() {return GetDataLoader("Raw Clusters");}
index 6e69371f9c5628c87d9ff46da764e56b5106f9c3..d0dbb21b5943910c990bf5d25451657cf0c6021c 100644 (file)
@@ -78,10 +78,10 @@ Bool_t AliITSURecoDet::Build()
   //
   // build active ITS layers
   for (int ilr=0;ilr<nlr;ilr++) {
-    int lrTyp = fGeom->GetLayerDetTypeID(ilr);
+    int lrTyp = fGeom->GetLayerChipTypeID(ilr);
     // name layer according its active id, detector type and segmentation tyoe
-    AliITSURecoLayer* lra = new AliITSURecoLayer(Form("Lr%d%s%d",ilr,fGeom->GetDetTypeName(lrTyp),
-                                                     lrTyp%AliITSUGeomTGeo::kMaxSegmPerDetType),
+    AliITSURecoLayer* lra = new AliITSURecoLayer(Form("Lr%d%s%d",ilr,fGeom->GetChipTypeName(lrTyp),
+                                                     lrTyp%AliITSUGeomTGeo::kMaxSegmPerChipType),
                                                 ilr,fGeom);
     lra->SetPassive(kFALSE);
     AddLayer(lra);
@@ -220,9 +220,9 @@ void AliITSURecoDet::CreateClusterArrays()
   for (int ilr=0;ilr<fNLayersActive;ilr++) {
     AliITSURecoLayer*  lr = GetLayerActive(ilr);
     lr->SetOwnsClusterArray(kTRUE);
-    int tpDet = fGeom->GetLayerDetTypeID(ilr)/AliITSUGeomTGeo::kMaxSegmPerDetType;
+    int tpDet = fGeom->GetLayerChipTypeID(ilr)/AliITSUGeomTGeo::kMaxSegmPerChipType;
     //
-    if (tpDet == AliITSUGeomTGeo::kDetTypePix) {
+    if (tpDet == AliITSUGeomTGeo::kChipTypePix) {
       lr->SetClusters(new TClonesArray(AliITSUClusterPix::Class()));
     }
     else {
index 4dde66b76b112645a0c149b72b286343890d6d9c..c2f6f3a33e8cbcf1d49b5f71e1ed693ada6c00c7 100644 (file)
@@ -16,18 +16,18 @@ ClassImp(AliITSURecoLayer)
 AliITSURecoLayer::AliITSURecoLayer(const char* name)
   :fActiveID(-1)
   ,fNSensors(0)
-  ,fNSensInLadder(0)
-  ,fNLadders(0)
+  ,fNSensInStave(0)
+  ,fNStaves(0)
   ,fR(0)
   ,fRMax(0)
   ,fRMin(0)
   ,fZMax(0)
   ,fZMin(0)
-  ,fPhiLadMax(0)
-  ,fPhiLadMin(0)
+  ,fPhiStaMax(0)
+  ,fPhiStaMin(0)
   ,fPhiOffs(0)
   ,fSensDZInv(0)
-  ,fDPhiLadInv(0)
+  ,fDPhiStaInv(0)
   ,fMaxStep(0.5)
   ,fSensors(0)
   ,fITSGeom(0)
@@ -41,18 +41,18 @@ AliITSURecoLayer::AliITSURecoLayer(const char* name)
 AliITSURecoLayer::AliITSURecoLayer(const char* name, Int_t activeID, AliITSUGeomTGeo* gm)
   :fActiveID(activeID)
   ,fNSensors(0)
-  ,fNSensInLadder(0)
-  ,fNLadders(0)
+  ,fNSensInStave(0)
+  ,fNStaves(0)
   ,fR(0)
   ,fRMax(0)
   ,fRMin(0)
   ,fZMax(0)
   ,fZMin(0)
-  ,fPhiLadMax(0)
-  ,fPhiLadMin(0)
+  ,fPhiStaMax(0)
+  ,fPhiStaMin(0)
   ,fPhiOffs(0)
   ,fSensDZInv(0)
-  ,fDPhiLadInv(0)
+  ,fDPhiStaInv(0)
   ,fMaxStep(0.5)
   ,fSensors(0)
   ,fITSGeom(gm)
@@ -68,8 +68,8 @@ AliITSURecoLayer::~AliITSURecoLayer()
 {
   // def. d-tor
   delete[] fSensors;
-  delete[] fPhiLadMax;
-  delete[] fPhiLadMin;
+  delete[] fPhiStaMax;
+  delete[] fPhiStaMin;
   if (GetOwnsClusterArray()) delete fClusters;
 }
 
@@ -89,9 +89,9 @@ void AliITSURecoLayer::Build()
   // build internal structures
   const double kSafeR = 0.05; // safety margin for Rmin,Rmax of the layer
   if (fActiveID<0) return;
-  fNLadders = fITSGeom->GetNLadders(fActiveID);
-  fNSensInLadder = fITSGeom->GetNDetectors(fActiveID);
-  fNSensors = fNLadders*fNSensInLadder;
+  fNStaves = fITSGeom->GetNStaves(fActiveID);
+  fNSensInStave = fITSGeom->GetNChipsPerModule(fActiveID);
+  fNSensors = fNStaves*fNSensInStave;
   fSensors = new AliITSURecoSens*[fNSensors];
   const AliITSsegmentation* kSegm = fITSGeom->GetSegmentation(fActiveID);
   //
@@ -102,18 +102,18 @@ void AliITSURecoLayer::Build()
   fRMax=fZMax=-1e9;
   double phiTF,rTF, loc[3]={0,0,0},glo[3];
   fNSensors = 0;
-  fPhiLadMin = new Double_t[fNLadders];
-  fPhiLadMax = new Double_t[fNLadders];
+  fPhiStaMin = new Double_t[fNStaves];
+  fPhiStaMax = new Double_t[fNStaves];
   fSensDZInv = 0;
-  fDPhiLadInv = fNLadders/TwoPi();
+  fDPhiStaInv = fNStaves/TwoPi();
   //
-  for (int ild=0;ild<fNLadders;ild++) {
-    fPhiLadMin[ild] = 1e9;
-    fPhiLadMax[ild] = -1e9;
+  for (int ild=0;ild<fNStaves;ild++) {
+    fPhiStaMin[ild] = 1e9;
+    fPhiStaMax[ild] = -1e9;
     //
-    for (int idt=0;idt<fNSensInLadder;idt++) {
+    for (int idt=0;idt<fNSensInStave;idt++) {
       AliITSURecoSens* sens = new AliITSURecoSens(fNSensors++);
-      fSensors[ild*fNSensInLadder+idt] = sens;
+      fSensors[ild*fNSensInStave+idt] = sens;
       //
       double phiMin=1e9,phiMax=-1e9,zMin=1e9,zMax=-1e9;
       mmod = *fITSGeom->GetMatrixSens(fActiveID,ild,idt);
@@ -151,10 +151,10 @@ void AliITSURecoLayer::Build()
       sens->SetXTF(rTF);
       sens->SetPhiTF(phiTF);
       //
-      if      (fPhiLadMin[ild]>1e8)  fPhiLadMin[ild] = phiMin;
-      else if (!OKforPhiMin(fPhiLadMin[ild],phiMin)) fPhiLadMin[ild] = phiMin;
-      if      (fPhiLadMax[ild]<-1e8) fPhiLadMax[ild] = phiMax;
-      else if (!OKforPhiMax(fPhiLadMax[ild],phiMax)) fPhiLadMax[ild] = phiMax;
+      if      (fPhiStaMin[ild]>1e8)  fPhiStaMin[ild] = phiMin;
+      else if (!OKforPhiMin(fPhiStaMin[ild],phiMin)) fPhiStaMin[ild] = phiMin;
+      if      (fPhiStaMax[ild]<-1e8) fPhiStaMax[ild] = phiMax;
+      else if (!OKforPhiMax(fPhiStaMax[ild],phiMax)) fPhiStaMax[ild] = phiMax;
       if (fZMin>zMin) fZMin = zMin;
       if (fZMax<zMax) fZMax = zMax;
       //
@@ -167,7 +167,7 @@ void AliITSURecoLayer::Build()
   fR = 0.5*(fRMin+fRMax);
   fRMin -= kSafeR;
   fRMax += kSafeR;
-  double dz = fNSensInLadder>0 ? fSensDZInv/(fNSensInLadder-1)/fNLadders : fZMax-fZMin;
+  double dz = fNSensInStave>0 ? fSensDZInv/(fNSensInStave-1)/fNStaves : fZMax-fZMin;
   fSensDZInv = 1./dz;
 
   const int kNBId[3][3] = { 
@@ -177,19 +177,19 @@ void AliITSURecoLayer::Build()
   };
 
   // add neighbours info
-  double zTol = 0.45*dz, phiTol = 0.45*TwoPi()/fNLadders;
-  for (int ild=0;ild<fNLadders;ild++) {
-    for (int idt=0;idt<fNSensInLadder;idt++) {
+  double zTol = 0.45*dz, phiTol = 0.45*TwoPi()/fNStaves;
+  for (int ild=0;ild<fNStaves;ild++) {
+    for (int idt=0;idt<fNSensInStave;idt++) {
       AliITSURecoSens* sens = GetSensor(ild,idt);
       //
       for (int ils=-1;ils<=1;ils++) {
-       int ildN = ild+ils;  // ladders of neighbouring sensors
-       if (ildN<0) ildN = fNLadders-1; else if (ildN==fNLadders) ildN = 0;
+       int ildN = ild+ils;  // staves of neighbouring sensors
+       if (ildN<0) ildN = fNStaves-1; else if (ildN==fNStaves) ildN = 0;
        for (int ids=-1;ids<=1;ids++) {
          int idtN = idt+ids;
-         if (idtN<0 || idtN==fNSensInLadder || (ids==0&&ils==0)) continue;
+         if (idtN<0 || idtN==fNSensInStave || (ids==0&&ils==0)) continue;
          AliITSURecoSens* sensN = GetSensor(ildN,idtN); // potential neighbor
-         int neighbID = ildN*fNSensInLadder+idtN;
+         int neighbID = ildN*fNSensInStave+idtN;
          //      
          int zType = 1;  // side
          if (sens->GetZMin()-zTol  > sensN->GetZMax()) continue; // too large distance
@@ -217,7 +217,7 @@ void AliITSURecoLayer::Build()
        } // phi scan
       } // z scan
     } // sensors
-  } // ladders
+  } // staves
   //
 }
 
@@ -231,16 +231,16 @@ Int_t AliITSURecoLayer::FindSensors(const double* impPar, AliITSURecoSens *senso
   if (z>fZMax+impPar[3]) return 0; // outside of Z coverage
   z -= fZMin;
   if (z<-impPar[3]) return 0; // outside of Z coverage
-  int sensInLad = int(z*fSensDZInv);
-  if      (sensInLad<0) sensInLad = 0;
-  else if (sensInLad>=fNSensInLadder) sensInLad = fNSensInLadder-1;
+  int sensInSta = int(z*fSensDZInv);
+  if      (sensInSta<0) sensInSta = 0;
+  else if (sensInSta>=fNSensInStave) sensInSta = fNSensInStave-1;
   //
   double phi = impPar[0] - fPhiOffs;
   BringTo02Pi(phi);
-  int ladID = int(phi*fDPhiLadInv);  // ladder id
+  int staID = int(phi*fDPhiStaInv);  // stave id
   int nsens = 0;
   //
-  AliITSURecoSens* sensN,*sens = GetSensor(ladID*fNSensInLadder+sensInLad);
+  AliITSURecoSens* sensN,*sens = GetSensor(staID*fNSensInStave+sensInSta);
   sensors[nsens++] = sens;
   //
   // check neighbours
@@ -294,10 +294,10 @@ Int_t AliITSURecoLayer::FindSensors(const double* impPar, AliITSURecoSens *senso
       }
     }
     if (nFnd>0) {
-      Int_t layS,ladS,sensS;
+      Int_t layS,staS,sensS;
       for (int is=0;is<nFnd;is++) {
-       fITSGeom->GetModuleId(fndSens[is],layS,ladS,sensS);
-       printf("SNMC#%d(%d): %d %d %d | ",is,mcLab,layS,ladS,sensS); GetSensorFromID(fndSens[is])->Print();
+       fITSGeom->GetChipId(fndSens[is],layS,staS,sensS);
+       printf("SNMC#%d(%d): %d %d %d | ",is,mcLab,layS,staS,sensS); GetSensorFromID(fndSens[is])->Print();
       }
     }
   }
@@ -314,16 +314,16 @@ Int_t AliITSURecoLayer::FindSensors(const double* impPar, AliITSURecoSens *senso
     if (nFnd>0) printf("MissedSens!!!\n");
     return 0; // outside of Z coverage
   }
-  int sensInLad = int(z*fSensDZInv);
-  if      (sensInLad<0) sensInLad = 0;
-  else if (sensInLad>=fNSensInLadder) sensInLad = fNSensInLadder-1;
+  int sensInSta = int(z*fSensDZInv);
+  if      (sensInSta<0) sensInSta = 0;
+  else if (sensInSta>=fNSensInStave) sensInSta = fNSensInStave-1;
   //
   double phi = impPar[0] - fPhiOffs;
   BringTo02Pi(phi);
-  int ladID = int(phi*fDPhiLadInv);  // ladder id
+  int staID = int(phi*fDPhiStaInv);  // stave id
   int nsens = 0;
   //
-  AliITSURecoSens* sensN,*sens = GetSensor(ladID*fNSensInLadder+sensInLad);
+  AliITSURecoSens* sensN,*sens = GetSensor(staID*fNSensInStave+sensInSta);
   sensors[nsens++] = sens;
   //
   // check neighbours
@@ -356,11 +356,11 @@ Int_t AliITSURecoLayer::FindSensors(const double* impPar, AliITSURecoSens *senso
   if (sensN && OKforPhiMin(phiMn,sensN->GetPhiMax()) && sensN->GetZMax()>zMn) sensors[nsens++] = sensN;
   //
   if (mcLab>=0) {
-    Int_t layS,ladS,sensS;
+    Int_t layS,staS,sensS;
     printf("Found %d sensors for phi %.3f : %.3f | Z %.4f %.4f\n", nsens,phiMn,phiMx,zMn,zMx); 
     for (int is=0;is<nsens;is++) {
-      fITSGeom->GetModuleId(sensors[is]->GetID()+fITSGeom->GetFirstModIndex(fActiveID),layS,ladS,sensS);
-      printf("*SNF#%d: %d %d %d | ",is,layS,ladS,sensS); sensors[is]->Print();
+      fITSGeom->GetChipId(sensors[is]->GetID()+fITSGeom->GetFirstModIndex(fActiveID),layS,staS,sensS);
+      printf("*SNF#%d: %d %d %d | ",is,layS,staS,sensS); sensors[is]->Print();
     }
     for (int ism=0;ism<nFnd;ism++) {
       AliITSURecoSens* snMC = GetSensorFromID(fndSens[ism]);
@@ -390,7 +390,7 @@ void AliITSURecoLayer::ProcessClusters(Int_t mode)
     if (vID<curSensID) {AliFatal("Clusters are not sorted in increasing sensorID");}
     if (vID>curSensID) {
       if (curSens) curSens->ProcessClusters(mode);    // prepare clusters for reconstruction
-      curSens   = GetSensor(vID - fITSGeom->GetFirstModIndex(fActiveID));
+      curSens   = GetSensor(vID - fITSGeom->GetFirstChipIndex(fActiveID));
       curSensID = vID;
       curSens->SetFirstClusterId(icl);
     }
@@ -423,7 +423,7 @@ Int_t  AliITSURecoLayer::Compare(const TObject* obj) const
 AliITSURecoSens* AliITSURecoLayer::GetSensorFromID(Int_t i) const 
 {
   // get sensor from its global id
-  i -= fITSGeom->GetFirstModIndex(fActiveID);
-  if (i<0||i>=fNSensors) AliFatal(Form("Sensor with id=%d is not in layer %d",i+fITSGeom->GetFirstModIndex(fActiveID),fActiveID));
+  i -= fITSGeom->GetFirstChipIndex(fActiveID);
+  if (i<0||i>=fNSensors) AliFatal(Form("Sensor with id=%d is not in layer %d",i+fITSGeom->GetFirstChipIndex(fActiveID),fActiveID));
   return (AliITSURecoSens*)fSensors[i];
 }
index b3ada71d826ec7c6ea777eaace18159fbae981cf..23e933765fc48790001e145018bda512042b2b9e 100644 (file)
@@ -35,8 +35,8 @@ class AliITSURecoLayer : public TNamed
   Int_t              GetID()                       const {return (int)GetUniqueID();}
   Int_t              GetActiveID()                 const {return fActiveID;}
   Int_t              GetNSensors()                 const {return fNSensors;}
-  Int_t              GetNLadders()                 const {return fNLadders;}
-  Int_t              GetNSensInLadder()            const {return fNSensInLadder;}
+  Int_t              GetNStaves()                 const {return fNStaves;}
+  Int_t              GetNSensInStave()            const {return fNSensInStave;}
   Double_t           GetRMin()                     const {return fRMin;}
   Double_t           GetRMax()                     const {return fRMax;}
   Double_t           GetDR()                       const {return fRMax-fRMin;}
@@ -61,7 +61,7 @@ class AliITSURecoLayer : public TNamed
   void               SetMaxStep(Double_t st)             {fMaxStep = st>0 ? st : 0.1;}
   //
   AliITSURecoSens*   GetSensor(Int_t i)            const {return i<0 ? 0:(AliITSURecoSens*)fSensors[i];}
-  AliITSURecoSens*   GetSensor(Int_t ld,Int_t is)  const {return GetSensor(ld*fNSensInLadder+is);}
+  AliITSURecoSens*   GetSensor(Int_t ld,Int_t is)  const {return GetSensor(ld*fNSensInStave+is);}
   AliITSURecoSens*   GetSensorFromID(Int_t i)      const;
   TClonesArray*      GetClusters()                 const {return (TClonesArray*)fClusters;}
   TClonesArray**     GetClustersAddress()                {return (TClonesArray**)&fClusters;}  
@@ -82,19 +82,19 @@ class AliITSURecoLayer : public TNamed
   //
  protected:
   Int_t              fActiveID;  // ID within active layers
-  Int_t              fNSensors;  // N of modules
-  Int_t              fNSensInLadder; // N sensors in the ladder
-  Int_t              fNLadders;  // N ladder
+  Int_t              fNSensors;  // N of chips
+  Int_t              fNSensInStave; // N sensors in the stave
+  Int_t              fNStaves;  // N stave
   Double_t           fR;         // mean R
   Double_t           fRMax;      // max  R
   Double_t           fRMin;      // min  R
   Double_t           fZMax;      // max  Z
   Double_t           fZMin;      // min  Z
-  Double_t*          fPhiLadMax; // max lab phi of the ladder
-  Double_t*          fPhiLadMin; // min lab phi of the ladder
-  Double_t           fPhiOffs;   // offset in phi for 1st ladder
+  Double_t*          fPhiStaMax; // max lab phi of the stave
+  Double_t*          fPhiStaMin; // min lab phi of the stave
+  Double_t           fPhiOffs;   // offset in phi for 1st stave
   Double_t           fSensDZInv; // inverse mean sensor Z span
-  Double_t           fDPhiLadInv;// inverse mean ladder dphi
+  Double_t           fDPhiStaInv;// inverse mean stave dphi
   Double_t           fMaxStep;   // max step in tracking X allowed within layer
   AliITSURecoSens**  fSensors;   // sensors
   AliITSUGeomTGeo*   fITSGeom;   // geometry interface
index c089ea3938c4b1fb6b501536f8ddbbb6f68dcab4..5795edca0b132e52aec5d3b855901706ac7f6db3 100644 (file)
@@ -94,8 +94,8 @@ void AliITSUReconstructor::Init()
   //
   for (int ilr=fGeom->GetNLayers();ilr--;) {
     fClusters[ilr] = 0;
-    int tpDet = fGeom->GetLayerDetTypeID(ilr)/AliITSUGeomTGeo::kMaxSegmPerDetType;
-    if (tpDet == AliITSUGeomTGeo::kDetTypePix) {
+    int tpDet = fGeom->GetLayerChipTypeID(ilr)/AliITSUGeomTGeo::kMaxSegmPerChipType;
+    if (tpDet == AliITSUGeomTGeo::kChipTypePix) {
       if (!clusPIX)    clusPIX    = new AliITSUClusterizer();
       fClusterFinders.AddAtAndExpand(clusPIX, ilr);
       fClusters[ilr] = new TClonesArray(AliITSUClusterPix::Class());
@@ -129,8 +129,8 @@ void AliITSUReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) c
   for (int ilr=0;ilr<fGeom->GetNLayers();ilr++) {
     lrBranch[ilr] = 0;
     if (clustersTree) { // do we write clusters tree?
-      int tp = fGeom->GetLayerDetTypeID(ilr)/AliITSUGeomTGeo::kMaxSegmPerDetType;
-      if (tp==AliITSUGeomTGeo::kDetTypePix) {
+      int tp = fGeom->GetLayerChipTypeID(ilr)/AliITSUGeomTGeo::kMaxSegmPerChipType;
+      if (tp==AliITSUGeomTGeo::kChipTypePix) {
        lrBranch[ilr] = clustersTree->Bronch(Form("ITSRecPoints%d",ilr),"TClonesArray",&fClusters[ilr]);
       }
       else {
@@ -157,8 +157,8 @@ void AliITSUReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) c
     clFinder->SetAllowDiagonalClusterization(recPar->GetAllowDiagonalClusterization(ilr));
     clFinder->PrepareLorentzAngleCorrection(bz);
     //
-    int modF=fGeom->GetFirstModIndex(ilr);
-    int modL=fGeom->GetLastModIndex(ilr)+1;
+    int modF=fGeom->GetFirstChipIndex(ilr);
+    int modL=fGeom->GetLastChipIndex(ilr)+1;
     for (int imod=modF;imod<modL;imod++) {
       digitsTree->GetEntry(imod);   
       int ndig  = digArrPix->GetEntries();
index 1ddba73a7374b26574f4819aac314e651b89cc91..67ce41d18b2bc771eb633d2410d04312358753b9 100644 (file)
@@ -25,7 +25,7 @@ using namespace TMath;
 
 //______________________________________________________________________
 AliITSUSDigit::AliITSUSDigit() 
-: fModule(0)
+: fChip(0)
   ,fNTracks(0)
   ,fROCycle(0)
   ,fTsignal(0.0)
@@ -41,8 +41,8 @@ AliITSUSDigit::AliITSUSDigit()
 }
 
 //______________________________________________________________________
-AliITSUSDigit::AliITSUSDigit(UInt_t module,UInt_t index,Double_t noise,Int_t roCycle) 
-  :fModule(module)
+AliITSUSDigit::AliITSUSDigit(UInt_t chip,UInt_t index,Double_t noise,Int_t roCycle) 
+  :fChip(chip)
   ,fNTracks(0)
   ,fROCycle(roCycle)
   ,fTsignal(0.0)
@@ -59,8 +59,8 @@ AliITSUSDigit::AliITSUSDigit(UInt_t module,UInt_t index,Double_t noise,Int_t roC
 }
 
 //______________________________________________________________________
-AliITSUSDigit::AliITSUSDigit(Int_t track,Int_t hit,UInt_t module,UInt_t index,Double_t signal,Int_t roCycle)
-  :fModule(module)
+AliITSUSDigit::AliITSUSDigit(Int_t track,Int_t hit,UInt_t chip,UInt_t index,Double_t signal,Int_t roCycle)
+  :fChip(chip)
   ,fNTracks(1)
   ,fROCycle(roCycle)
   ,fTsignal(signal)
@@ -71,7 +71,7 @@ AliITSUSDigit::AliITSUSDigit(Int_t track,Int_t hit,UInt_t module,UInt_t index,Do
   // Inputs:
   //    Int_t track     The track number which produced this signal
   //    Int_t hit       The hit number which produced this signal
-  //    Int_t module    The module where this signal occurred
+  //    Int_t chip    The chip where this signal occurred
   //    Int_t index     The cell index where this signal occurred
   //    Double_t signal The value of the signal (ionization)
   //    Int_t roCycle   Read-Out cycle
@@ -101,7 +101,7 @@ AliITSUSDigit& AliITSUSDigit::operator=(const AliITSUSDigit &source)
 //______________________________________________________________________
 AliITSUSDigit::AliITSUSDigit(const AliITSUSDigit &source) 
   :TObject(source)
-  ,fModule(source.fModule)
+  ,fChip(source.fChip)
   ,fNTracks(source.fNTracks)
   ,fROCycle(source.fROCycle)
   ,fTsignal(source.fTsignal)
@@ -124,7 +124,7 @@ void AliITSUSDigit::AddSignal(Int_t track,Int_t hit,Double_t signal)
   // Inputs:
   //    Int_t track     The track number which produced this signal
   //    Int_t hit       The hit number which produced this signal
-  //    Int_t module    The module where this signal occurred
+  //    Int_t chip    The chip where this signal occurred
   //    Int_t index     The cell index where this signal occurred
   //    Double_t signal The value of the signal (ionization)
   Int_t    i,j;
@@ -192,7 +192,7 @@ void AliITSUSDigit::AddSignal(Int_t track,Int_t hit,Double_t signal)
 void AliITSUSDigit::Add(const AliITSUSDigit *pl)
 {
   // Adds the contents of pl to this
-  // pl could come from different module and index 
+  // pl could come from different chip and index 
   Double_t sigT = 0.0;
   for(int i=pl->GetNTracks();i--;) {
     double sig = pl->GetSignal(i); 
@@ -241,6 +241,6 @@ void AliITSUSDigit::Print(Option_t*) const
 {
   // print itself
   printf("Mod: %4d Index:%7d Ntr:%2d | TotSignal:%.2e Noise:%.2e ROCycle: %d|",
-        fModule,GetUniqueID(),fNTracks,fTsignal,fNoise,fROCycle);
+        fChip,GetUniqueID(),fNTracks,fTsignal,fNoise,fROCycle);
   for (int i=0;i<fNTracks;i++) printf("%d(%.2e) |",fTrack[i],fSignal[i]); printf("\n");
 }
index ee459878d1e195f9f93463684ea5154ca59019cd..2ca362593dcbebee94c089cbd6ad7dadfbbb3318 100644 (file)
@@ -13,8 +13,8 @@ class AliITSUSDigit: public TObject
   enum {kBuffSize=10};
   //
   AliITSUSDigit();
-  AliITSUSDigit(Int_t track,Int_t hit,UInt_t module,UInt_t index,Double_t signal,Int_t roCycle=0);
-  AliITSUSDigit(UInt_t module,UInt_t index,Double_t noise,Int_t roCycle=0);
+  AliITSUSDigit(Int_t track,Int_t hit,UInt_t chip,UInt_t index,Double_t signal,Int_t roCycle=0);
+  AliITSUSDigit(UInt_t chip,UInt_t index,Double_t noise,Int_t roCycle=0);
   AliITSUSDigit(const AliITSUSDigit &source);
   AliITSUSDigit& operator=(const AliITSUSDigit &source);
   virtual ~AliITSUSDigit() {}
@@ -32,7 +32,7 @@ class AliITSUSDigit: public TObject
   //
   Int_t GetTrack(Int_t i)        const {return ((i>=0&&i<kBuffSize) ? fTrack[i] : 0);}
   Int_t GetHit(Int_t i)          const {return ((i>=0&&i<kBuffSize) ? fHits[i] : 0);}
-  Int_t GetModule()              const {return fModule;}
+  Int_t GetChip()              const {return fChip;}
   Int_t GetNTracks()             const {return fNTracks;}
   Int_t GetROCycle()             const {return fROCycle;}
   //
@@ -49,7 +49,7 @@ class AliITSUSDigit: public TObject
   static Int_t GetBuffSize() {return kBuffSize;};
   //
  private:
-  UShort_t fModule;            // module number
+  UShort_t fChip;            // chip number
   UShort_t fNTracks;           // number of tracks contributing
   Int_t    fROCycle;           // readOut cycle
   Int_t    fTrack[kBuffSize];  // track Number
index c0d44a044ea949cfa3a388a76e8f9f40a8bd1b6b..05a267c41b500b1047ce465149baf4f94a80d2bb 100644 (file)
@@ -27,7 +27,7 @@ using namespace TMath;
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Segmentation class for pixels                                                                          //
-// Questions to solve: are guardrings needed and do they belong to the sensor or to the module in TGeo    //
+// Questions to solve: are guardrings needed and do they belong to the sensor or to the chip in TGeo    //
 //                     At the moment assume that the local coord syst. is located at bottom left corner   //
 //                     of the ACTIVE matrix. If the guardring to be accounted in the local coords, in     //
 //                     the Z and X conversions one needs to first subtract the  fGuardLft and fGuardBot   //
@@ -70,7 +70,7 @@ AliITSUSegmentationPix::AliITSUSegmentationPix(UInt_t id, int nchips,int ncol,in
   ,fDiodShidtMatZ(0)
 {
   // Default constructor, sizes in cm
-  if (nchips) SetUniqueID( AliITSUGeomTGeo::ComposeDetTypeID(id) );
+  if (nchips) SetUniqueID( AliITSUGeomTGeo::ComposeChipTypeID(id) );
   fChipDZ = (fNColPerChip-2)*fPitchZ + fPitchZLftCol + fPitchZRgtCol;;
   fDxActive = fNRow*fPitchX;
   fDzActive = fNChips*fChipDZ;
index fb5916bcaf5ad332bd739079a4b1fb1c8130160a..7ef4295e06b484902226829327b57f9638cc64ab 100644 (file)
@@ -64,7 +64,7 @@ public AliITSsegmentation {
   virtual void PrintDefaultParameters() const {AliWarning("No def. parameters defined as const static data members");}
   virtual void Print(Option_t* option = "") const;
   //
-  virtual Int_t                    GetDetTypeID()              const {return GetUniqueID();}
+  virtual Int_t                    GetChipTypeID()              const {return GetUniqueID();}
   //
   void         SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Float_t *shiftX, const Float_t *shiftZ);
   void         SetDiodShiftMatrix(Int_t nrow,Int_t ncol, const Double_t *shiftX, const Double_t *shiftZ);
@@ -93,7 +93,7 @@ public AliITSsegmentation {
     Float_t fPitchZLftCol;    // Z pitch of left column of each chip
     Float_t fPitchZRgtCol;    // Z pitch of right column of each chip
     Float_t fChipDZ;          // aux: chip size along Z
-    Int_t   fNChips;          // number of chips per module
+    Int_t   fNChips;          // number of chips per chip
     Int_t   fNColPerChip;     // number of columns per chip
     Int_t   fNRow;            // number of rows
     Int_t   fNCol;            // number of columns (total)
index 6b42fb59f9c6317bfc3cca608990b4681a55fdc8..a0d4a6f2744f0ff0d85fd532fb14508775533031 100644 (file)
@@ -301,7 +301,7 @@ Double_t AliITSUSimuParam::ApplyPixBaselineAndNoise(UInt_t mod) const
   // generate random noise 
   double base,noise;
   if (mod>=fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     base = fPixBaselineDef;
     noise = fPixNoiseDef;
   }
@@ -318,7 +318,7 @@ Double_t AliITSUSimuParam::CalcProbNoiseOverThreshold(UInt_t mod) const
   // calculate probability of noise exceeding the threshold
   double base,noise,thresh;
   if (mod>=fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     base   = fPixBaselineDef;
     noise  = fPixNoiseDef;
     thresh = fPixThreshDef;
@@ -356,7 +356,7 @@ void AliITSUSimuParam::SetPixThreshold(Double_t thresh, Double_t sigma, int mod)
     }
   }
   else if (mod>=(int)fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     fPixThreshDef = thresh;
     fPixThrSigmaDef  = sigma;
   }
@@ -372,7 +372,7 @@ Double_t AliITSUSimuParam::GetPixThreshold(UInt_t mod) const
 {
   // obtain threshold
   if (mod>=fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     return fPixThreshDef;
   }
   else return fPixThresh[mod];
@@ -383,7 +383,7 @@ void AliITSUSimuParam::GetPixThreshold(UInt_t mod, Double_t &thresh, Double_t &s
 {
   // obtain thresholds
   if (mod>=fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     thresh = fPixThreshDef;
     sigma  = fPixThrSigmaDef;
   }
@@ -402,7 +402,7 @@ void AliITSUSimuParam::SetPixBiasVoltage(Double_t val, int mod)
     for (int i=fNPix;i--;) fPixBiasVoltage[i] = val;
   }
   else if (mod>=(int)fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     fPixBiasVoltageDef = val;
   }
   else fPixBiasVoltage[mod] = val;
@@ -414,7 +414,7 @@ Double_t AliITSUSimuParam::GetPixBiasVoltage(UInt_t mod) const
 {
   // obtain threshold
   if (mod>=fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     return fPixBiasVoltageDef;
   }
   else return fPixBiasVoltage[mod];
@@ -433,7 +433,7 @@ void AliITSUSimuParam::SetPixNoise(Double_t noise, Double_t baseline, int mod)
     }
   }
   else if (mod>=(int)fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     fPixNoiseDef = noise;
     fPixBaselineDef  = baseline;
   }
@@ -449,7 +449,7 @@ void AliITSUSimuParam::GetPixNoise(UInt_t mod, Double_t &noise, Double_t &baseli
 {
   // obtain noise
   if (mod>=fNPix) {
-    if (fNPix>0) {AliFatal(Form("Wrong module %d, NPidUpg=%d",mod,fNPix));}
+    if (fNPix>0) {AliFatal(Form("Wrong chip %d, NPidUpg=%d",mod,fNPix));}
     noise     = fPixNoiseDef;
     baseline  = fPixBaselineDef;
   }
index ccd72a0857b5a4812c6d1dbe1c123bc5ee3723d4..857e5b595f64058cfd33b78346755c77ec3a505d 100644 (file)
@@ -104,7 +104,7 @@ class AliITSUSimuParam : public TObject {
   static const Float_t fgkGeVtoChargeDefault;        // default energy to ionize (free an electron) in GeV
   static const Float_t fgkTDefault;                  // default temperature
   static const Float_t fgkPixFakeRateDefault;        // default monopix fake rate
-  static const Bool_t  fgkPixNoiseInAllMod;          // default switch to add digital noise to every module
+  static const Bool_t  fgkPixNoiseInAllMod;          // default switch to add digital noise to every chip
   
   static const Float_t fgkNsigmasDefault; //default for fNsigmas
   static const Int_t   fgkNcompsDefault; //default for fNcomps
@@ -133,10 +133,10 @@ class AliITSUSimuParam : public TObject {
   Float_t    fPixBaselineDef;      // Pix electronic noise: baseline
   Float_t    fPixMinElToAddDef;    // min number of electrons to add
   Float_t    fPixFakeRateDef;      // Fake rate for the monopix
-  Bool_t     fPixNoiseInAllMod;    // Add digital noise to every module
+  Bool_t     fPixNoiseInAllMod;    // Add digital noise to every chip
   //
   Float_t*   fLrROCycleShift; //[fNLayers] optional RO cycle shift for each layer (in fraction of RO cycle length if abs<1)
-                              // if abs>1, then each module will have random phase
+                              // if abs>1, then each chip will have random phase
   Float_t*   fPixThresh;      //[fNPix] Pix Threshold value
   Float_t*   fPixThrSigma;    //[fNPix] Pix Threshold fluctuation
   Float_t*   fPixBiasVoltage; //[fNPix] Bias Voltage for the Pix
index 29885418e802f73f0cbe1bdb91eac2e8ef7f067d..d9bc1ae2586ce11a989da69f8e8e39f603bb93df 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-//////////////////////////////////////////////////////////////////////////////
-// This is the base class for ITS detector signal simulations. Data members //
-// include are a pointer to the AliITSDetTypeSim clas in order to access    //
-// segmentation and response objects                                        // 
-// classes. See the detector specific implementations for the propper code. //
-//////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+// This is the base class for ITSU detector signal simulations. Data members //
+///////////////////////////////////////////////////////////////////////////////
 #include <TRandom.h>
 #include "TSeqCollection.h"
 #include "AliITSUSimulation.h"
 #include "AliITSUSDigit.h"
-#include "AliITSUModule.h"
+#include "AliITSUChip.h"
 #include "AliITSUParamList.h"
 using namespace TMath;
 
@@ -36,7 +33,7 @@ AliITSUSimulation::AliITSUSimulation()
   ,fSensMap(0)
   ,fSimuParam(0)
   ,fResponseParam(0)
-  ,fModule(0)
+  ,fChip(0)
   ,fReadOutCycleOffset(0)
   ,fReadOutCycleLength(25e-6)  
   ,fEvent(0)
@@ -52,7 +49,7 @@ AliITSUSimulation::AliITSUSimulation(AliITSUSimuParam* sim,AliITSUSensMap* map)
   ,fSensMap(map)
   ,fSimuParam(sim)
   ,fResponseParam(0)
-  ,fModule(0)
+  ,fChip(0)
   ,fReadOutCycleOffset(0)
   ,fReadOutCycleLength(25e-6)
   ,fEvent(0)
@@ -70,7 +67,7 @@ AliITSUSimulation::AliITSUSimulation(const AliITSUSimulation &s)
   ,fSensMap(s.fSensMap)
   ,fSimuParam(s.fSimuParam)   
   ,fResponseParam(s.fResponseParam)
-  ,fModule(s.fModule)
+  ,fChip(s.fChip)
   ,fReadOutCycleOffset(s.fReadOutCycleOffset)
   ,fReadOutCycleLength(s.fReadOutCycleLength)
   ,fEvent(s.fEvent)
@@ -90,7 +87,7 @@ AliITSUSimulation&  AliITSUSimulation::operator=(const AliITSUSimulation &s)
   fSensMap   = s.fSensMap;
   fSimuParam = s.fSimuParam;
   fResponseParam = s.fResponseParam;
-  fModule    = s.fModule;
+  fChip    = s.fChip;
   fReadOutCycleOffset = s.fReadOutCycleOffset;
   fReadOutCycleLength = s.fReadOutCycleLength;
   fEvent     = s.fEvent;
@@ -98,12 +95,12 @@ AliITSUSimulation&  AliITSUSimulation::operator=(const AliITSUSimulation &s)
 }
 
 //______________________________________________________________________
-void AliITSUSimulation::InitSimulationModule(AliITSUModule* mod, Int_t event, AliITSsegmentation* seg, AliITSUParamList* resp)
+void AliITSUSimulation::InitSimulationChip(AliITSUChip* mod, Int_t event, AliITSsegmentation* seg, AliITSUParamList* resp)
 {
   //  This function creates maps to build the list of tracks for each
   //  summable digit. Inputs defined by base class.
   //
-  SetModule(mod);
+  SetChip(mod);
   SetSegmentation(seg);
   SetResponseParam(resp);
   ClearMap();
@@ -114,9 +111,9 @@ void AliITSUSimulation::InitSimulationModule(AliITSUModule* mod, Int_t event, Al
 }
 
 //______________________________________________________________________
-Bool_t AliITSUSimulation::AddSDigitsToModule(TSeqCollection *pItemArr,Int_t mask )
+Bool_t AliITSUSimulation::AddSDigitsToChip(TSeqCollection *pItemArr,Int_t mask )
 {
-  // Add Summable digits to module maps.
+  // Add Summable digits to chip maps.
   // Inputs:
   //    pItemArr  Array of AliITSpListItems (SDigits).
   //    mask    Track number off set value 
@@ -126,7 +123,7 @@ Bool_t AliITSUSimulation::AddSDigitsToModule(TSeqCollection *pItemArr,Int_t mask
   // 
   for( Int_t i=0; i<nItems; i++ ) {
     AliITSUSDigit * pItem = (AliITSUSDigit *)(pItemArr->At( i ));
-    if(pItem->GetModule() != int(fModule->GetIndex()) ) AliFatal(Form("SDigits module %d != current module %d: exit", pItem->GetModule(),fModule->GetIndex()));
+    if(pItem->GetChip() != int(fChip->GetIndex()) ) AliFatal(Form("SDigits chip %d != current chip %d: exit", pItem->GetChip(),fChip->GetIndex()));
     if(pItem->GetSumSignal()>0.0 ) sig = kTRUE;
     AliITSUSDigit* oldItem = (AliITSUSDigit*)fSensMap->GetItem(pItem);
     if (!oldItem) {
@@ -150,7 +147,7 @@ void AliITSUSimulation::UpdateMapSignal(UInt_t col,UInt_t row,Int_t trk,Int_t ht
   UInt_t ind = fSensMap->GetIndex(col,row,roCycle);
   AliITSUSDigit* oldItem = (AliITSUSDigit*)fSensMap->GetItem(ind);  
   if (!oldItem) {    
-    fSensMap->RegisterItem( new(fSensMap->GetFree()) AliITSUSDigit(trk,ht,fModule->GetIndex(),ind,signal,roCycle) );
+    fSensMap->RegisterItem( new(fSensMap->GetFree()) AliITSUSDigit(trk,ht,fChip->GetIndex(),ind,signal,roCycle) );
     fCyclesID[roCycle+kMaxROCycleAccept] = kTRUE;
   }
   else oldItem->AddSignal(trk,ht,signal);
@@ -168,7 +165,7 @@ void AliITSUSimulation::UpdateMapNoise(UInt_t col,UInt_t row,Double_t noise, Int
   UInt_t ind = fSensMap->GetIndex(col,row,roCycle);
   AliITSUSDigit* oldItem = (AliITSUSDigit*)fSensMap->GetItem(ind);
   if (!oldItem) {
-    fSensMap->RegisterItem( new(fSensMap->GetFree()) AliITSUSDigit(fModule->GetIndex(),ind,noise,roCycle) );
+    fSensMap->RegisterItem( new(fSensMap->GetFree()) AliITSUSDigit(fChip->GetIndex(),ind,noise,roCycle) );
     fCyclesID[roCycle+kMaxROCycleAccept] = kTRUE;
   }
   else oldItem->AddNoise(noise);
index aad2adfe3b3ef17898f5a4f1a13f7779e8198cd3..bb95716be97ad01537266c961b1d58532df0009e 100644 (file)
@@ -23,7 +23,7 @@
 
 class AliITSCalibration;
 class AliITSUSimuParam;
-class AliITSUModule;
+class AliITSUChip;
 class TRandom;
 class TSegCollection;
 class AliITSUParamList;
@@ -50,16 +50,16 @@ class AliITSUSimulation : public TObject
   //
   void UpdateMapSignal(UInt_t col,UInt_t row, Int_t trk,Int_t ht,Double_t signal, Int_t roCycle=0);
   void UpdateMapNoise(UInt_t col,UInt_t row, Double_t noise, Int_t roCycle=0);
-  virtual void InitSimulationModule(AliITSUModule* mod, Int_t ev, AliITSsegmentation* seg, AliITSUParamList* resp);
+  virtual void InitSimulationChip(AliITSUChip* mod, Int_t ev, AliITSsegmentation* seg, AliITSUParamList* resp);
   //
   // Hits -> SDigits
-  virtual void SDigitiseModule() = 0;
-  virtual void FinishSDigitiseModule() = 0;
-  virtual Bool_t AddSDigitsToModule( TSeqCollection *pItemArray, Int_t mask );
+  virtual void SDigitiseChip() = 0;
+  virtual void FinishSDigitiseChip() = 0;
+  virtual Bool_t AddSDigitsToChip( TSeqCollection *pItemArray, Int_t mask );
   //
   // Hits -> Digits
-  virtual void DigitiseModule() = 0;
-  virtual void CreateFastRecPoints(AliITSUModule *,Int_t,TRandom *,TClonesArray* /*recp*/) {}
+  virtual void DigitiseChip() = 0;
+  virtual void CreateFastRecPoints(AliITSUChip *,Int_t,TRandom *,TClonesArray* /*recp*/) {}
   //
   // readout phase (strobe, timing etc) generation
   virtual Double_t GenerateReadOutCycleOffset();
@@ -69,7 +69,7 @@ class AliITSUSimulation : public TObject
   AliITSsegmentation* GetSegmentation()                const {return fSeg;}
   AliITSUSimuParam*   GetSimuParam()                   const {return fSimuParam;}
   AliITSUSensMap*     GetMap()                         const {return fSensMap;}
-  AliITSUModule*      GetModule()                      const {return fModule;}
+  AliITSUChip*      GetChip()                      const {return fChip;}
   AliITSUParamList*   GetResponseParam()               const {return fResponseParam;}
   Int_t               GetEvent()                       const {return fEvent;}
   Bool_t              GetDebug(Int_t level=1)          const {return fDebug>=level;}
@@ -81,7 +81,7 @@ class AliITSUSimulation : public TObject
   void SetSimuParam(AliITSUSimuParam *sp)                  {fSimuParam = sp;}
   virtual void SetResponseParam(AliITSUParamList* resp)    {fResponseParam = resp;}
   void SetMap(AliITSUSensMap *p)                           {fSensMap = p;}
-  void SetModule(AliITSUModule* mod)                       {fModule=mod;} 
+  void SetChip(AliITSUChip* mod)                       {fChip=mod;} 
   void SetEvent(Int_t evnt)                                {fEvent=evnt;} 
   void SetDebug(Int_t level=5)                             {fDebug=level;}
   void SetNoDebug()                                        {fDebug=0;}
@@ -106,7 +106,7 @@ class AliITSUSimulation : public TObject
   AliITSUSensMap      *fSensMap;        //! sensor map for hits manipulations
   AliITSUSimuParam    *fSimuParam;      //! simulation parameters
   AliITSUParamList    *fResponseParam;  //! response parameterization data
-  AliITSUModule       *fModule;         //! module being processed
+  AliITSUChip       *fChip;         //! chip being processed
   Float_t              fReadOutCycleOffset; //! The phase of the RO with respect to the trigger
   Float_t              fReadOutCycleLength; //! readout cycle lenght in s
 
index 0b0055b94a59d255495c0c8cc581877c4b0aacdd..67906cc2e24e641670fa22c773ad3c678581b0b5 100644 (file)
@@ -21,7 +21,7 @@
 #include "AliITSU.h"
 #include "AliITSUDigitPix.h"
 #include "AliITSUHit.h"
-#include "AliITSUModule.h"
+#include "AliITSUChip.h"
 #include "AliITSUSensMap.h"
 #include "AliITSUCalibrationPix.h"
 #include "AliITSUSegmentationPix.h"
@@ -67,7 +67,7 @@ AliITSUSimulationPix::AliITSUSimulationPix()
   ,fROTimeFun(0)
 {
    // Default constructor.
-  SetUniqueID(AliITSUGeomTGeo::kDetTypePix);
+  SetUniqueID(AliITSUGeomTGeo::kChipTypePix);
 }
 
 //______________________________________________________________________
@@ -80,7 +80,7 @@ AliITSUSimulationPix::AliITSUSimulationPix(AliITSUSimuParam* sim,AliITSUSensMap*
   ,fROTimeFun(0)
 {
   // standard constructor
-  SetUniqueID(AliITSUGeomTGeo::kDetTypePix);
+  SetUniqueID(AliITSUGeomTGeo::kChipTypePix);
   Init();
 }
 
@@ -154,12 +154,12 @@ Bool_t AliITSUSimulationPix::SetTanLorAngle(Double_t weightHole)
 }
 
 //_____________________________________________________________________
-void AliITSUSimulationPix::SDigitiseModule()
+void AliITSUSimulationPix::SDigitiseChip()
 {
   //  This function begins the work of creating S-Digits.
     
-  AliDebug(10,Form("In event %d module %d there are %d hits", fEvent, fModule->GetIndex(),fModule->GetNHits()));       
-  if (fModule->GetNHits()) Hits2SDigitsFast();
+  AliDebug(10,Form("In event %d chip %d there are %d hits", fEvent, fChip->GetIndex(),fChip->GetNHits()));       
+  if (fChip->GetNHits()) Hits2SDigitsFast();
   if (!fSensMap->GetEntries()) return;
   WriteSDigits();
   ClearMap();
@@ -181,7 +181,7 @@ void AliITSUSimulationPix::WriteSDigits()
 }
 
 //______________________________________________________________________
-void AliITSUSimulationPix::FinishSDigitiseModule()
+void AliITSUSimulationPix::FinishSDigitiseChip()
 {
    //  This function calls SDigitsToDigits which creates Digits from SDigits
   FrompListToDigits();
@@ -190,7 +190,7 @@ void AliITSUSimulationPix::FinishSDigitiseModule()
 }
 
 //______________________________________________________________________
-void AliITSUSimulationPix::DigitiseModule()
+void AliITSUSimulationPix::DigitiseChip()
 {
   //  This function creates Digits straight from the hits and then adds
   //  electronic noise to the digits before adding them to pList
@@ -198,14 +198,14 @@ void AliITSUSimulationPix::DigitiseModule()
   //
   // pick charge spread function
   Hits2SDigitsFast();
-  FinishSDigitiseModule();
+  FinishSDigitiseChip();
 }
 
 //______________________________________________________________________
 void AliITSUSimulationPix::Hits2SDigits()
 {
   // Does the charge distributions using Gaussian diffusion charge charing.
-  Int_t nhits = fModule->GetNHits();
+  Int_t nhits = fChip->GetNHits();
   if (!nhits) return;
   //
   Int_t h,ix,iz,i;
@@ -218,7 +218,7 @@ void AliITSUSimulationPix::Hits2SDigits()
   //
   for (h=0;h<nhits;h++) {
     //
-    if (!fModule->LineSegmentL(h,x0,x1,y0,y1,z0,z1,de,tof,idtrack)) continue;
+    if (!fChip->LineSegmentL(h,x0,x1,y0,y1,z0,z1,de,tof,idtrack)) continue;
     st = Sqrt(x1*x1+y1*y1+z1*z1);
     if (st>0.0) {
       st = (Double_t)((Int_t)(st*1e4)); // number of microns
@@ -279,9 +279,9 @@ void AliITSUSimulationPix::Hits2SDigits()
 void AliITSUSimulationPix::Hits2SDigitsFast()
 {
   // Does the charge distributions using Gaussian diffusion charge charing.    // Inputs:
-  //    AliITSUModule *mod  Pointer to this module
+  //    AliITSUChip *mod  Pointer to this chip
   //
-  TObjArray *hits = fModule->GetHits();
+  TObjArray *hits = fChip->GetHits();
   Int_t nhits = hits->GetEntriesFast();
   if (nhits<=0) return;
   //
@@ -295,7 +295,7 @@ void AliITSUSimulationPix::Hits2SDigitsFast()
   //
   for (h=0;h<nhits;h++) {
     //
-    if (!fModule->LineSegmentL(h,x0,x1,y0,y1,z0,z1,de,tof,idtrack)) continue;
+    if (!fChip->LineSegmentL(h,x0,x1,y0,y1,z0,z1,de,tof,idtrack)) continue;
     //
     st = Sqrt(x1*x1+y1*y1+z1*z1); 
     if (st>0.0) {
@@ -490,13 +490,13 @@ Double_t AliITSUSimulationPix::SpreadFunGauss2D(const Double_t *dtIn)
 //______________________________________________________________________
 void AliITSUSimulationPix::RemoveDeadPixels() 
 {
-  // Removes dead pixels on each module (ladder)
+  // Removes dead pixels on each chip (ladder)
   // This should be called before going from sdigits to digits (i.e. from FrompListToDigits)
   
   AliITSUCalibrationPix* calObj = (AliITSUCalibrationPix*) GetCalibDead();
   if (!calObj) return;
   //
-  if (calObj->IsBad()) {ClearMap(); return;} // whole module is masked
+  if (calObj->IsBad()) {ClearMap(); return;} // whole chip is masked
   //
   // prepare the list of r/o cycles seen
   Char_t cyclesSeen[2*kMaxROCycleAccept+1];
@@ -526,12 +526,12 @@ void AliITSUSimulationPix::RemoveDeadPixels()
 //______________________________________________________________________
 void AliITSUSimulationPix::AddNoisyPixels() 
 {
-  // Adds noisy pixels on each module (ladder)
+  // Adds noisy pixels on each chip (ladder)
   // This should be called before going from sdigits to digits (i.e. FrompListToDigits)
   AliITSUCalibrationPix* calObj = (AliITSUCalibrationPix*) GetCalibNoisy();
   if (!calObj) { AliDebug(10,Form("  No Calib Object for Noise!!! ")); return;}
   for (Int_t i=calObj->GetNrBad(); i--;) UpdateMapNoise(calObj->GetBadColAt(i), calObj->GetBadRowAt(i), 
-                                                       10*fSimuParam->GetPixThreshold(fModule->GetIndex()));
+                                                       10*fSimuParam->GetPixThreshold(fChip->GetIndex()));
   //
 }
 
@@ -561,7 +561,7 @@ void AliITSUSimulationPix::FrompListToDigits()
   if (!nsd) return; // nothing to digitize
   //
   UInt_t row,col;
-  Int_t iCycle,modId = fModule->GetIndex();
+  Int_t iCycle,modId = fChip->GetIndex();
   Double_t sig;
   const Int_t    knmaxtrk=AliITSdigit::GetNTracks();
   static AliITSU *aliITS = (AliITSU*)gAlice->GetModule("ITS");
@@ -592,7 +592,7 @@ void AliITSUSimulationPix::FrompListToDigits()
       dig.SetTrack(j,-3);
       dig.SetHit(j,-1);
     }
-    aliITS->AddSimDigit(AliITSUGeomTGeo::kDetTypePix, &dig);
+    aliITS->AddSimDigit(AliITSUGeomTGeo::kChipTypePix, &dig);
   }
   // 
 }
@@ -602,7 +602,7 @@ Int_t AliITSUSimulationPix::AddRandomNoisePixels(Double_t tof)
 {
   // create random noisy sdigits above threshold 
   //
-  int modId = fModule->GetIndex();
+  int modId = fChip->GetIndex();
   int npix = fSeg->GetNPads();
   int ncand = gRandom->Poisson( npix*fSimuParam->GetPixFakeRate() );
   if (ncand<1) return 0;
@@ -633,7 +633,7 @@ void AliITSUSimulationPix::SetCoupling(AliITSUSDigit* old)
   //  The parameters probcol and probrow are the probability of the
   //  signal in one pixel shared in the two adjacent pixels along
   //  the column and row direction, respectively.
-  //  Note pList is goten via GetMap() and module is not need any more.
+  //  Note pList is goten via GetMap() and chip is not need any more.
   //  Otherwise it is identical to that coded by Tiziano Virgili (BSN).
   UInt_t col,row;
   Int_t iCycle;
@@ -674,11 +674,11 @@ void AliITSUSimulationPix::SetCouplingOld(AliITSUSDigit* old)
   // old            existing AliITSUSDigit
   // ntrack         track incex number
   // idhit          hit index number
-  // module         module number
+  // chip         chip number
   //
   UInt_t col,row;
   Int_t cycle;
-  Int_t modId = fModule->GetIndex();
+  Int_t modId = fChip->GetIndex();
   Double_t pulse1,pulse2;
   Double_t couplR=0.0,couplC=0.0;
   //
@@ -746,11 +746,11 @@ void AliITSUSimulationPix::SetResponseParam(AliITSUParamList* resp)
   //___ Set the Rolling Shutter read-out window 
   fReadOutCycleLength = fResponseParam->GetParameter(kReadOutCycleLength);
   //___ Pixel discrimination threshold, and the S/N cut
-  fSimuParam->SetPixThreshold(fResponseParam->GetParameter(kPixNoiseMPV) *fResponseParam->GetParameter(kPixSNDisrcCut) , fResponseParam->GetParameter(kPixSNDisrcCut),-1); //for all modules
+  fSimuParam->SetPixThreshold(fResponseParam->GetParameter(kPixNoiseMPV) *fResponseParam->GetParameter(kPixSNDisrcCut) , fResponseParam->GetParameter(kPixSNDisrcCut),-1); //for all chips
   //___ Minimum number of electrons to add 
   fSimuParam->SetPixMinElToAdd(fResponseParam->GetParameter(kPixMinElToAdd));
   //___ Set the Pixel Noise MPV and Sigma (the noise distribution is Landau not Gauss due to RTN)
-  fSimuParam->SetPixNoise( fResponseParam->GetParameter(kPixNoiseMPV), fResponseParam->GetParameter(kPixNoiseSigma), -1); //for all modules
+  fSimuParam->SetPixNoise( fResponseParam->GetParameter(kPixNoiseMPV), fResponseParam->GetParameter(kPixNoiseSigma), -1); //for all chips
   //___ Pixel fake hit rate
   fSimuParam->SetPixFakeRate( fResponseParam->GetParameter(kPixFakeRate) );
   //___ To apply the noise or not
index 5e4bd9056743e92666553c6b60a900147455cf26..c746c6ad681857b91bfa4d9452e9f42fbae26d8c 100644 (file)
@@ -13,7 +13,7 @@
 #include "AliITSUSegmentationPix.h"
 
 class TH1F;
-class AliITSUModule;
+class AliITSUChip;
 class AliITSUSimuParam;
 class AliITSUParamList;
 class TH2;
@@ -43,7 +43,7 @@ public:
         ,kPixSNDisrcCut                      // S/N cut applied at discrimination level
         ,kPixMinElToAdd                      // Min number of electrons to add to sdig
         ,kPixNoiseIsOn                       // Turn Pixel Noise on
-        ,kPixNoiseInAllMod                   // To apply pixel noise in all modules, if not only on ones where there is a hit
+        ,kPixNoiseInAllMod                   // To apply pixel noise in all chips, if not only on ones where there is a hit
        ,kPixNoiseMPV                        // Pixel noise MPV
         ,kPixNoiseSigma                      // Pixel noise sigma
         ,kPixFakeRate                        // Pixel fake rate        
@@ -69,10 +69,10 @@ public:
   AliITSUSimulationPix& operator=(const AliITSUSimulationPix &s);
   void Init();
   //
-  void FinishSDigitiseModule();
-  void DigitiseModule();
+  void FinishSDigitiseChip();
+  void DigitiseChip();
   //
-  void SDigitiseModule();
+  void SDigitiseChip();
   void WriteSDigits();
   void Hits2SDigits();
   void Hits2SDigitsFast();
@@ -85,7 +85,7 @@ public:
   Double_t GetTanLorAngle() const {return fTanLorAng;};
   //
   // For backwards compatibility
-  void SDigitsToDigits(){ FinishSDigitiseModule();}
+  void SDigitsToDigits(){ FinishSDigitiseChip();}
   //  
   Double_t SpreadFunDoubleGauss2D(const Double_t *dtIn);
   Double_t SpreadFunGauss2D(const Double_t *dtIn);
index fb29a5e300ae13fc8ab6111e1aa7c84d38a51a73..db1e2004cc085d176d513612599dbfd274593873 100644 (file)
@@ -8,15 +8,12 @@
 //  
 //*******************************************************************
 
-using std::cout;
-using std::endl;
-
 ClassImp(AliITSUSuze02)
 
 AliITSUSuze02::AliITSUSuze02(Int_t Nrows, Int_t Ncols):
-  fNRowsModule(Nrows),
-  fNColsModule(Ncols),
-  fModule(new TMatrixF(Nrows,Ncols)), 
+  fNRowsChip(Nrows),
+  fNColsChip(Ncols),
+  fChip(new TMatrixF(Nrows,Ncols)), 
   fTestColumnSize(2),
   fTestRowSize(2),
   fNWindowsPer32colsMax(0),
@@ -26,7 +23,7 @@ AliITSUSuze02::AliITSUSuze02(Int_t Nrows, Int_t Ncols):
   fNEncodedWindows(0),
   fNDigitsLost(0),
   fNLostWindows(0),
-  fDataSizePerModule(0),
+  fDataSizePerChip(0),
   fNWindowsPer32colsMin(0),
   fNWindowsPerHalfFSBBMin(0),
   fNWindowsPerFSBBMin(0)
@@ -37,9 +34,9 @@ AliITSUSuze02::AliITSUSuze02(Int_t Nrows, Int_t Ncols):
 }  
   
 AliITSUSuze02::AliITSUSuze02(const AliITSUSuze02& suze): 
-  fNRowsModule(suze.fNRowsModule),
-  fNColsModule(suze.fNColsModule),
-  fModule(new TMatrixF(*suze.fModule)), 
+  fNRowsChip(suze.fNRowsChip),
+  fNColsChip(suze.fNColsChip),
+  fChip(new TMatrixF(*suze.fChip)), 
   fTestColumnSize(suze.fTestColumnSize),
   fTestRowSize(suze.fTestRowSize),
   fNWindowsPer32colsMax(suze.fNWindowsPer32colsMax),
@@ -49,7 +46,7 @@ AliITSUSuze02::AliITSUSuze02(const AliITSUSuze02& suze):
   fNEncodedWindows(suze.fNEncodedWindows),
   fNDigitsLost(suze.fNDigitsLost),
   fNLostWindows(suze.fNLostWindows),
-  fDataSizePerModule(suze.fDataSizePerModule),
+  fDataSizePerChip(suze.fDataSizePerChip),
   fNWindowsPer32colsMin(suze.fNWindowsPer32colsMin),
   fNWindowsPerHalfFSBBMin(suze.fNWindowsPerHalfFSBBMin),
   fNWindowsPerFSBBMin(suze.fNWindowsPerFSBBMin)
@@ -59,9 +56,9 @@ AliITSUSuze02::AliITSUSuze02(const AliITSUSuze02& suze):
 AliITSUSuze02 &AliITSUSuze02::operator=(const AliITSUSuze02& suze) {
   if (&suze == this) return *this;
 
-  fNRowsModule = suze.fNRowsModule;
-  fNColsModule = suze.fNColsModule;
-  fModule = new TMatrixF(*suze.fModule);  
+  fNRowsChip = suze.fNRowsChip;
+  fNColsChip = suze.fNColsChip;
+  fChip = new TMatrixF(*suze.fChip);  
   fTestColumnSize = suze.fTestColumnSize;
   fTestRowSize = suze.fTestRowSize;
   fNWindowsPer32colsMax = suze.fNWindowsPer32colsMax;
@@ -71,7 +68,7 @@ AliITSUSuze02 &AliITSUSuze02::operator=(const AliITSUSuze02& suze) {
   fNEncodedWindows = suze.fNEncodedWindows;
   fNDigitsLost = suze.fNDigitsLost;
   fNLostWindows = suze.fNLostWindows;
-  fDataSizePerModule = suze.fDataSizePerModule;
+  fDataSizePerChip = suze.fDataSizePerChip;
   fNWindowsPer32colsMin = suze.fNWindowsPer32colsMin;
   fNWindowsPerHalfFSBBMin = suze.fNWindowsPerHalfFSBBMin;
   fNWindowsPerFSBBMin = suze.fNWindowsPerFSBBMin;
@@ -80,7 +77,7 @@ AliITSUSuze02 &AliITSUSuze02::operator=(const AliITSUSuze02& suze) {
 }
 
 AliITSUSuze02::~AliITSUSuze02() {
-  if(fModule) delete fModule;
+  if(fChip) delete fChip;
 }
 
 void AliITSUSuze02::SetEncodingWindowSize(Int_t Wrows, Int_t Wcols){
@@ -95,17 +92,17 @@ void AliITSUSuze02::SetQuotas(Int_t q32, Int_t qHalfFSBB, Int_t qFSBB){
 }
 
 void AliITSUSuze02::AddDigit(Int_t row, Int_t col){
-  (*fModule)(row,col)++;
+  (*fChip)(row,col)++;
 }
 
 //void AliITSUSuze02::Process(Bool_t Verbose){  
 void AliITSUSuze02::Process(TH1F* OverflowCodes, TH1F* NDigitsPerEncodingWindowDist, Bool_t Verbose) {
 
   //cout<<"Processing"<<endl;
-  //fModule->Print(); 
+  //fChip->Print(); 
   
-  Int_t NRowsFSBB=fNRowsModule;
-  Int_t NColsFSBB=fNColsModule/kNumberOfFSBB;
+  Int_t NRowsFSBB=fNRowsChip;
+  Int_t NColsFSBB=fNColsChip/kNumberOfFSBB;
   TMatrixF FSBB(NRowsFSBB,NColsFSBB);
   
   Int_t NRowsSuperLine=fTestColumnSize;
@@ -153,10 +150,10 @@ void AliITSUSuze02::Process(TH1F* OverflowCodes, TH1F* NDigitsPerEncodingWindowD
   fNDigitsEncoded=0;
   fNLostWindows=0;
   fNDigitsLost=0;
-  fDataSizePerModule=0;    
+  fDataSizePerChip=0;    
   
   for(Int_t FSBBindex=0; FSBBindex<kNumberOfFSBB; FSBBindex++){
-    FSBB=fModule->GetSub(0,NRowsFSBB-1,FSBBindex*NColsFSBB,(FSBBindex+1)*NColsFSBB-1);
+    FSBB=fChip->GetSub(0,NRowsFSBB-1,FSBBindex*NColsFSBB,(FSBBindex+1)*NColsFSBB-1);
     SuperLineDown=FSBB.GetSub(0,NRowsSuperLine-1,0,NColsSuperLine-1);
     for(Int_t SuperLineX2StartRow=0; SuperLineX2StartRow<NRowsFSBB; SuperLineX2StartRow+=NRowsSuperLine){
       if(nWindowsPerFSBB<fNWindowsPerFSBBMin) {fNWindowsPerFSBBMin=nWindowsPerFSBB;} //saving the lowest number of remaining windows
@@ -284,7 +281,7 @@ void AliITSUSuze02::Process(TH1F* OverflowCodes, TH1F* NDigitsPerEncodingWindowD
             }
           }
         }
-        fDataSizePerModule+=(DataSizePerSuperLineX2+DataSizePerSuperLineX2Header);
+        fDataSizePerChip+=(DataSizePerSuperLineX2+DataSizePerSuperLineX2Header);
       }
     }
   }
@@ -300,14 +297,14 @@ void AliITSUSuze02::GetResults(){
 /*
 void AliITSUSuze02::InitHistos(){
   fOverflowCodes = new TH1F("OverflowCodes","Overflow codes",8,0,8);
-  if(fNRowsModule*fNColsModule){
-    fNDigitsPerEncodingWindowDist = new TH1F("nDigitsPerEncodingWindowPerModule","nDigitsPerEncodingWindowPerModule",fTestColumnSize*fTestRowSize,1,fTestColumnSize*fTestRowSize+1);
+  if(fNRowsChip*fNColsChip){
+    fNDigitsPerEncodingWindowDist = new TH1F("nDigitsPerEncodingWindowPerChip","nDigitsPerEncodingWindowPerChip",fTestColumnSize*fTestRowSize,1,fTestColumnSize*fTestRowSize+1);
   }
   else{
     printf("Run AliITSUSuze02::SetEncodingWindowSize first\n");
   }
 }
 */
-void AliITSUSuze02::ResetModule(){
-  fModule->Zero();
+void AliITSUSuze02::ResetChip(){
+  fChip->Zero();
 }
index ef9350aef0450ffaf7316be5185b7259099c3e63..405d03960f73a18a39935df77bf67ba15eee2138 100644 (file)
@@ -33,22 +33,22 @@ class AliITSUSuze02{
   Int_t GetNDigitsLost() {return fNDigitsLost;}
   Int_t GetNLostWindows() {return fNLostWindows;}    
   
-  Int_t GetDataSize() {return fDataSizePerModule;}  
+  Int_t GetDataSize() {return fDataSizePerChip;}  
   
   Int_t GetNWindowsPer32colsMin() {return fNWindowsPer32colsMin;}
   Int_t GetNWindowsPerHalfFSBBMin() {return fNWindowsPerHalfFSBBMin;}
   Int_t GetNWindowsPerFSBBMin() {return fNWindowsPerFSBBMin;}
   
-  void ResetModule();
+  void ResetChip();
   
   private:         
   static const Int_t kNumberOfFSBB=3; 
   static const Int_t kNumberOfHalfFSBB=2;
   
   //matrix to be processed by Suze02   
-  Int_t fNRowsModule;
-  Int_t fNColsModule;
-  TMatrixF* fModule
+  Int_t fNRowsChip;
+  Int_t fNColsChip;
+  TMatrixF* fChip
                
   //Suze02 parameters
   Int_t fTestColumnSize;   //Number of rows of the encoding window
@@ -69,7 +69,7 @@ class AliITSUSuze02{
   //TH1F* fOverflowCodes;
   //TH1F* fNDigitsPerEncodingWindowDist;
   
-  Int_t fDataSizePerModule;
+  Int_t fDataSizePerChip;
   
   Int_t fNWindowsPer32colsMin;
   Int_t fNWindowsPerHalfFSBBMin;
index 59796e491ec18fcb6d23dd82b4d2d422d91968ac..51bfc81c8fcc19bf79b7ac93f7fecad36528b9ba 100644 (file)
@@ -1444,7 +1444,7 @@ void AliITSUTrackerGlo::UpdateESDTrack(AliITSUTrackHyp* hyp,Int_t flag)
   }
   //
   esdTr->SetITSLabel(hyp->GetITSLabel());
-  // transfer module indices
+  // transfer chip indices
   // TODO
 }
 
index df52bfc60257b41e87dc39ae69ecd50c75e48e48..5747e1cd01dd438015c5671d830d1d6936daedff 100644 (file)
@@ -69,13 +69,13 @@ AliITSUv0::AliITSUv0()
   ,fLayPhi0(0)
   ,fLayRadii(0)
   ,fLayZLength(0)
-  ,fLaddPerLay(0)
-  ,fModPerLadd(0)
-  ,fLadThick(0)
-  ,fLadWidth(0)
-  ,fLadTilt(0)
+  ,fStavPerLay(0)
+  ,fModPerStav(0)
+  ,fStaThick(0)
+  ,fStaWidth(0)
+  ,fStaTilt(0)
   ,fDetThick(0)
-  ,fDetTypeID(0)
+  ,fChipTypeID(0)
   ,fBuildLevel(0)
   ,fUpGeom(0)
   ,fStaveModel(kModel0)
@@ -100,13 +100,13 @@ AliITSUv0::AliITSUv0(const char *title,const Int_t nlay)
   ,fLayPhi0(0)
   ,fLayRadii(0)
   ,fLayZLength(0)
-  ,fLaddPerLay(0)
-  ,fModPerLadd(0)
-  ,fLadThick(0)
-  ,fLadWidth(0)
-  ,fLadTilt(0)
+  ,fStavPerLay(0)
+  ,fModPerStav(0)
+  ,fStaThick(0)
+  ,fStaWidth(0)
+  ,fStaTilt(0)
   ,fDetThick(0)
-  ,fDetTypeID(0)
+  ,fChipTypeID(0)
   ,fBuildLevel(0)
   ,fUpGeom(0)
   ,fStaveModel(kModel0)
@@ -126,13 +126,13 @@ AliITSUv0::AliITSUv0(const char *title,const Int_t nlay)
   fLayPhi0    = new Double_t[fNLayers];
   fLayRadii   = new Double_t[fNLayers];
   fLayZLength = new Double_t[fNLayers];
-  fLaddPerLay = new Int_t[fNLayers];
-  fModPerLadd = new Int_t[fNLayers];
-  fLadThick   = new Double_t[fNLayers];
-  fLadWidth   = new Double_t[fNLayers];
-  fLadTilt    = new Double_t[fNLayers];
+  fStavPerLay = new Int_t[fNLayers];
+  fModPerStav = new Int_t[fNLayers];
+  fStaThick   = new Double_t[fNLayers];
+  fStaWidth   = new Double_t[fNLayers];
+  fStaTilt    = new Double_t[fNLayers];
   fDetThick   = new Double_t[fNLayers];
-  fDetTypeID  = new UInt_t[fNLayers];
+  fChipTypeID  = new UInt_t[fNLayers];
   fBuildLevel = new Int_t[fNLayers];
 
 
@@ -143,11 +143,11 @@ AliITSUv0::AliITSUv0(const char *title,const Int_t nlay)
       fLayPhi0[j] = 0;
       fLayRadii[j] = 0.;
       fLayZLength[j] = 0.;
-      fLaddPerLay[j] = 0;
-      fModPerLadd[j] = 0;
-      fLadWidth[j] = 0.;
+      fStavPerLay[j] = 0;
+      fModPerStav[j] = 0;
+      fStaWidth[j] = 0.;
       fDetThick[j] = 0.;
-      fDetTypeID[j] = 0;
+      fChipTypeID[j] = 0;
       fBuildLevel[j] = 0;
       fUpGeom[j] = 0;     
     }
@@ -167,13 +167,13 @@ AliITSUv0::~AliITSUv0() {
   delete [] fLayPhi0;
   delete [] fLayRadii;
   delete [] fLayZLength;
-  delete [] fLaddPerLay;
-  delete [] fModPerLadd;
-  delete [] fLadThick;
-  delete [] fLadWidth;
-  delete [] fLadTilt;
+  delete [] fStavPerLay;
+  delete [] fModPerStav;
+  delete [] fStaThick;
+  delete [] fStaWidth;
+  delete [] fStaTilt;
   delete [] fDetThick;
-  delete [] fDetTypeID;
+  delete [] fChipTypeID;
   delete [] fBuildLevel;
   delete [] fUpGeom;
   delete [] fWrapRMin;
@@ -208,7 +208,7 @@ void AliITSUv0::AddAlignableVolumes() const{
   if( !gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameITS(),pth.Data()) )
     AliFatal(Form("Unable to set alignable entry ! %s :: %s","ITS",pth.Data()));    
   //
-  int modNum = 0;
+  int chipNum = 0;
   //
   for (int lr=0; lr<fNLayers; lr++) {
     //
@@ -216,22 +216,22 @@ void AliITSUv0::AddAlignableVolumes() const{
     //printf("SetAlignable: %s %s\n",snm.Data(),pth.Data());
     gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameLayer(lr),pth.Data());
     //
-    for (int ld=0; ld<fLaddPerLay[lr]; ld++) {
+    for (int ld=0; ld<fStavPerLay[lr]; ld++) {
       //
-      TString pthL = Form("%s/%s%d_%d",pth.Data(),AliITSUGeomTGeo::GetITSLadderPattern(),lr,ld);
+      TString pthL = Form("%s/%s%d_%d",pth.Data(),AliITSUGeomTGeo::GetITSStavePattern(),lr,ld);
       //printf("SetAlignable: %s %s\n",snmL.Data(),pthL.Data());
-      gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameLadder(lr,ld),pthL.Data());
+      gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameStave(lr,ld),pthL.Data());
       //
-      for (int md=0; md<fModPerLadd[lr]; md++) {
+      for (int md=0; md<fModPerStav[lr]; md++) {
        //
-       TString pthM = Form("%s/%s%d_%d",pthL.Data(),AliITSUGeomTGeo::GetITSModulePattern(),lr,md);
+       TString pthM = Form("%s/%s%d_%d",pthL.Data(),AliITSUGeomTGeo::GetITSChipPattern(),lr,md);
        //
-       // RS: Attention, this is a hack: AliGeomManager cannot accomodate all ITSU modules w/o
-       // conflicts with TPC. For this reason we define the UID of the module to be simply its ID
-       //      int modUID = AliGeomManager::LayerToVolUID(lr+1,modNum++); // here modNum would be module within the layer
-       int modUID = AliITSUGeomTGeo::ModuleVolUID( modNum++ );
+       // RS: Attention, this is a hack: AliGeomManager cannot accomodate all ITSU chips w/o
+       // conflicts with TPC. For this reason we define the UID of the chip to be simply its ID
+       //      int modUID = AliGeomManager::LayerToVolUID(lr+1,chipNum++); // here chipNum would be chip within the layer
+       int modUID = AliITSUGeomTGeo::ChipVolUID( chipNum++ );
        // 
-       gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameModule(lr,ld,md),pthM.Data(),modUID);
+       gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameChip(lr,ld,-1,-1,md),pthM.Data(),modUID);
        //
       }
     }
@@ -286,19 +286,19 @@ void AliITSUv0::CreateGeometry() {
   for (Int_t j=0; j<fNLayers; j++) {
     if (fLayRadii[j] <= 0)                 AliFatal(Form("Wrong layer radius for layer %d (%f)",j,fLayRadii[j]));
     if (fLayZLength[j] <= 0)               AliFatal(Form("Wrong layer length for layer %d (%f)",j,fLayZLength[j]));
-    if (fLaddPerLay[j] <= 0)               AliFatal(Form("Wrong number of ladders for layer %d (%d)",j,fLaddPerLay[j]));
-    if (fModPerLadd[j] <= 0)               AliFatal(Form("Wrong number of modules for layer %d (%d)",j,fModPerLadd[j]));
-    if (fLadThick[j] < 0)                  AliFatal(Form("Wrong ladder thickness for layer %d (%f)",j,fLadThick[j]));
-    if (fLayTurbo[j] && fLadWidth[j] <= 0) AliFatal(Form("Wrong ladder width for layer %d (%f)",j,fLadWidth[j]));
-    if (fDetThick[j] < 0)                  AliFatal(Form("Wrong module thickness for layer %d (%f)",j,fDetThick[j]));
+    if (fStavPerLay[j] <= 0)               AliFatal(Form("Wrong number of staves for layer %d (%d)",j,fStavPerLay[j]));
+    if (fModPerStav[j] <= 0)               AliFatal(Form("Wrong number of chips for layer %d (%d)",j,fModPerStav[j]));
+    if (fStaThick[j] < 0)                  AliFatal(Form("Wrong stave thickness for layer %d (%f)",j,fStaThick[j]));
+    if (fLayTurbo[j] && fStaWidth[j] <= 0) AliFatal(Form("Wrong stave width for layer %d (%f)",j,fStaWidth[j]));
+    if (fDetThick[j] < 0)                  AliFatal(Form("Wrong chip thickness for layer %d (%f)",j,fDetThick[j]));
     //
     if (j > 0) {
       if (fLayRadii[j]<=fLayRadii[j-1])    AliFatal(Form("Layer %d radius (%f) is smaller than layer %d radius (%f)",
                                                         j,fLayRadii[j],j-1,fLayRadii[j-1]));
     } // if (j > 0)
 
-    if (fLadThick[j] == 0) AliInfo(Form("Ladder thickness for layer %d not set, using default",j));
-    if (fDetThick[j] == 0) AliInfo(Form("Module thickness for layer %d not set, using default",j));
+    if (fStaThick[j] == 0) AliInfo(Form("Stave thickness for layer %d not set, using default",j));
+    if (fDetThick[j] == 0) AliInfo(Form("Chip thickness for layer %d not set, using default",j));
 
   } // for (Int_t j=0; j<fNLayers; j++)
 
@@ -318,22 +318,22 @@ void AliITSUv0::CreateGeometry() {
     //
     if (fLayTurbo[j]) {
       fUpGeom[j] = new AliITSUv0Layer(j,kTRUE,kFALSE);
-      fUpGeom[j]->SetLadderWidth(fLadWidth[j]);
-      fUpGeom[j]->SetLadderTilt(fLadTilt[j]);
+      fUpGeom[j]->SetStaveWidth(fStaWidth[j]);
+      fUpGeom[j]->SetStaveTilt(fStaTilt[j]);
     }
     else fUpGeom[j] = new AliITSUv0Layer(j,kFALSE);
     //
     fUpGeom[j]->SetPhi0(fLayPhi0[j]);
     fUpGeom[j]->SetRadius(fLayRadii[j]);
     fUpGeom[j]->SetZLength(fLayZLength[j]);
-    fUpGeom[j]->SetNLadders(fLaddPerLay[j]);
-    fUpGeom[j]->SetNModules(fModPerLadd[j]);
-    fUpGeom[j]->SetDetType(fDetTypeID[j]);
+    fUpGeom[j]->SetNStaves(fStavPerLay[j]);
+    fUpGeom[j]->SetNChips(fModPerStav[j]);
+    fUpGeom[j]->SetChipType(fChipTypeID[j]);
     fUpGeom[j]->SetBuildLevel(fBuildLevel[j]);
     fUpGeom[j]->SetStaveModel(fStaveModel);
     AliDebug(1,Form("fBuildLevel: %d\n",fBuildLevel[j]));
     //
-    if (fLadThick[j] != 0) fUpGeom[j]->SetLadderThick(fLadThick[j]);
+    if (fStaThick[j] != 0) fUpGeom[j]->SetStaveThick(fStaThick[j]);
     if (fDetThick[j] != 0) fUpGeom[j]->SetSensorThick(fDetThick[j]);
     //
     for (int iw=0;iw<fNWrapVol;iw++) {
@@ -477,7 +477,7 @@ void AliITSUv0::CreateMaterials() {
 
 //______________________________________________________________________
 void AliITSUv0::DefineLayer(const Int_t nlay, const double phi0, const Double_t r,
-                           const Double_t zlen, const Int_t nladd,
+                           const Double_t zlen, const Int_t nstav,
                            const Int_t nmod, const Double_t lthick,
                            const Double_t dthick, const UInt_t dettypeID)
 {
@@ -487,9 +487,9 @@ void AliITSUv0::DefineLayer(const Int_t nlay, const double phi0, const Double_t
   //          phi0    layer phi0
   //          r       layer radius
   //          zlen    layer length
-  //          nladd   number of ladders
-  //          nmod    number of modules per ladder
-  //          lthick  ladder thickness (if omitted, defaults to 0)
+  //          nstav   number of staves
+  //          nmod    number of chips per stave
+  //          lthick  stave thickness (if omitted, defaults to 0)
   //          dthick  detector thickness (if omitted, defaults to 0)
   // Outputs:
   //   none.
@@ -505,32 +505,32 @@ void AliITSUv0::DefineLayer(const Int_t nlay, const double phi0, const Double_t
   fLayPhi0[nlay] = phi0;
   fLayRadii[nlay] = r;
   fLayZLength[nlay] = zlen;
-  fLaddPerLay[nlay] = nladd;
-  fModPerLadd[nlay] = nmod;
-  fLadThick[nlay] = lthick;
+  fStavPerLay[nlay] = nstav;
+  fModPerStav[nlay] = nmod;
+  fStaThick[nlay] = lthick;
   fDetThick[nlay] = dthick;
-  fDetTypeID[nlay] = dettypeID;
+  fChipTypeID[nlay] = dettypeID;
     
 }
 
 //______________________________________________________________________
-void AliITSUv0::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
+void AliITSUv0::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nstav,
                                 Int_t nmod, Double_t width, Double_t tilt,
                                 Double_t lthick,Double_t dthick,
                                 UInt_t dettypeID, Int_t buildLevel)
 {
   //     Sets the layer parameters for a "turbo" layer
-  //     (i.e. a layer whose ladders overlap in phi)
+  //     (i.e. a layer whose staves overlap in phi)
   // Inputs:
   //          nlay    layer number
-  //          phi0    phi of 1st ladder
+  //          phi0    phi of 1st stave
   //          r       layer radius
   //          zlen    layer length
-  //          nladd   number of ladders
-  //          nmod    number of modules per ladder
-  //          width   ladder width
+  //          nstav   number of staves
+  //          nmod    number of chips per stave
+  //          width   stave width
   //          tilt    layer tilt angle (degrees)
-  //          lthick  ladder thickness (if omitted, defaults to 0)
+  //          lthick  stave thickness (if omitted, defaults to 0)
   //          dthick  detector thickness (if omitted, defaults to 0)
   //          dettypeID  ??
   //          buildLevel (if 0, all geometry is build, used for material budget studies)
@@ -548,13 +548,13 @@ void AliITSUv0::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t
   fLayPhi0[nlay] = phi0;
   fLayRadii[nlay] = r;
   fLayZLength[nlay] = zlen;
-  fLaddPerLay[nlay] = nladd;
-  fModPerLadd[nlay] = nmod;
-  fLadThick[nlay] = lthick;
-  fLadWidth[nlay] = width;
-  fLadTilt[nlay] = tilt;
+  fStavPerLay[nlay] = nstav;
+  fModPerStav[nlay] = nmod;
+  fStaThick[nlay] = lthick;
+  fStaWidth[nlay] = width;
+  fStaTilt[nlay] = tilt;
   fDetThick[nlay] = dthick;
-  fDetTypeID[nlay] = dettypeID;
+  fChipTypeID[nlay] = dettypeID;
   fBuildLevel[nlay] = buildLevel;
 
 }
@@ -562,7 +562,7 @@ void AliITSUv0::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t
 //______________________________________________________________________
 void AliITSUv0::GetLayerParameters(Int_t nlay, Double_t &phi0,
                                   Double_t &r, Double_t &zlen,
-                                  Int_t &nladd, Int_t &nmod,
+                                  Int_t &nstav, Int_t &nmod,
                                   Double_t &width, Double_t &tilt,
                                   Double_t &lthick, Double_t &dthick,
                                   UInt_t &dettype) const
@@ -571,14 +571,14 @@ void AliITSUv0::GetLayerParameters(Int_t nlay, Double_t &phi0,
   // Inputs:
   //          nlay    layer number
   // Outputs:
-  //          phi0    phi of 1st ladder
+  //          phi0    phi of 1st stave
   //          r       layer radius
   //          zlen    layer length
-  //          nladd   number of ladders
-  //          nmod    number of modules per ladder
-  //          width   ladder width
-  //          tilt    ladder tilt angle
-  //          lthick  ladder thickness
+  //          nstav   number of staves
+  //          nmod    number of chips per stave
+  //          width   stave width
+  //          tilt    stave tilt angle
+  //          lthick  stave thickness
   //          dthick  detector thickness
   //          dettype detector type
   // Return:
@@ -592,13 +592,13 @@ void AliITSUv0::GetLayerParameters(Int_t nlay, Double_t &phi0,
   phi0   = fLayPhi0[nlay];
   r      = fLayRadii[nlay];
   zlen   = fLayZLength[nlay];
-  nladd  = fLaddPerLay[nlay];
-  nmod   = fModPerLadd[nlay];
-  width  = fLadWidth[nlay];
-  tilt   = fLadTilt[nlay];
-  lthick = fLadThick[nlay];
+  nstav  = fStavPerLay[nlay];
+  nmod   = fModPerStav[nlay];
+  width  = fStaWidth[nlay];
+  tilt   = fStaTilt[nlay];
+  lthick = fStaThick[nlay];
   dthick = fDetThick[nlay];
-  dettype= fDetTypeID[nlay];
+  dettype= fChipTypeID[nlay];
 }
 
 //______________________________________________________________________
@@ -710,12 +710,12 @@ void AliITSUv0::StepManager()
     gMC->CurrentVolOffID(2,cpn0);
   } //
 
-  mod = fGeomTGeo->GetModuleIndex(lay,cpn0,cpn1);
+  mod = fGeomTGeo->GetChipIndex(lay,cpn0,cpn1);
   //RS2DEL  fInitGeom.DecodeDetector(mod,lay+1,cpn0,cpn1,copy);
   //
   // Fill hit structure.
   //
-  hit.SetModule(mod);
+  hit.SetChip(mod);
   hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber());
   gMC->TrackPosition(position);
   gMC->TrackMomentum(momentum);
@@ -743,17 +743,17 @@ void AliITSUv0::StepManager()
 }
 
 //______________________________________________________________________
-void AliITSUv0::SetLayerDetTypeID(Int_t lr, UInt_t id)
+void AliITSUv0::SetLayerChipTypeID(Int_t lr, UInt_t id)
 {
   // set det type
-  if (!fDetTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
-  fDetTypeID[lr] = id;
+  if (!fChipTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
+  fChipTypeID[lr] = id;
 }
 
 //______________________________________________________________________
-Int_t AliITSUv0::GetLayerDetTypeID(Int_t lr)
+Int_t AliITSUv0::GetLayerChipTypeID(Int_t lr)
 {
   // set det type
-  if (!fDetTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
-  return fDetTypeID[lr];
+  if (!fChipTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
+  return fChipTypeID[lr];
 }
index 25c8811985d56cf898892382ce27a48afcee631f..0f201e4705e7917806e42e1bca8faa3f82de3f23 100644 (file)
@@ -44,13 +44,13 @@ class AliITSUv0 : public AliITSU {
   virtual void   AddAlignableVolumes() const;
   virtual void   CreateGeometry();
   virtual void   CreateMaterials();
-  virtual void   DefineLayer(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd,
+  virtual void   DefineLayer(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nstav,
                             Int_t nmod, Double_t lthick=0.,Double_t dthick=0.,UInt_t detType=0);
-  virtual void   DefineLayerTurbo(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd,
+  virtual void   DefineLayerTurbo(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nstav,
                                  Int_t nmod,Double_t width,Double_t tilt,
                                  Double_t lthick = 0.,Double_t dthick = 0.,UInt_t detType=0, Int_t buildFlag=0);
   virtual void   GetLayerParameters(Int_t nlay, Double_t &phi0,Double_t &r, Double_t &zlen,
-                                   Int_t &nladd, Int_t &nmod,
+                                   Int_t &nstav, Int_t &nmod,
                                    Double_t &width, Double_t &tilt,
                                    Double_t &lthick, Double_t &mthick,
                                    UInt_t &dettype) const;
@@ -60,8 +60,8 @@ class AliITSUv0 : public AliITSU {
   virtual Int_t  IsVersion()                 const { return 20;}  // vUpgrade ? do we need this
   virtual void   SetDefaults();
   virtual void   StepManager();
-  virtual void   SetLayerDetTypeID(Int_t lr, UInt_t id);
-  virtual Int_t  GetLayerDetTypeID(Int_t lr);
+  virtual void   SetLayerChipTypeID(Int_t lr, UInt_t id);
+  virtual Int_t  GetLayerChipTypeID(Int_t lr);
   virtual void   SetStaveModel(AliITSUModel_t model) {fStaveModel=model;}
   virtual AliITSUModel_t GetStaveModel() const {return fStaveModel;}
   //
@@ -77,16 +77,16 @@ class AliITSUv0 : public AliITSU {
   Double_t* fWrapRMax;       // max radius of wrapper volume
   Double_t* fWrapZSpan;      // Z span of wrapper volume
   Bool_t   *fLayTurbo;       // True for "turbo" layers
-  Double_t *fLayPhi0;        // Vector of layer's 1st ladder phi in lab
+  Double_t *fLayPhi0;        // Vector of layer's 1st stave phi in lab
   Double_t *fLayRadii;       // Vector of layer radii
   Double_t *fLayZLength;     // Vector of layer length along Z
-  Int_t    *fLaddPerLay;     // Vector of number of ladders per layer
-  Int_t    *fModPerLadd;     // Vector of number of modules per ladder
-  Double_t *fLadThick;       // Vector of ladder thicknesses
-  Double_t *fLadWidth;       // Vector of ladder width (only used for turbo)
-  Double_t *fLadTilt;        // Vector of ladder tilt (only used for turbo)
+  Int_t    *fStavPerLay;     // Vector of number of staves per layer
+  Int_t    *fModPerStav;     // Vector of number of chips per stave
+  Double_t *fStaThick;       // Vector of stave thicknesses
+  Double_t *fStaWidth;       // Vector of stave width (only used for turbo)
+  Double_t *fStaTilt;        // Vector of stave tilt (only used for turbo)
   Double_t *fDetThick;       // Vector of detector thicknesses
-  UInt_t   *fDetTypeID;      // Vector of detector type id
+  UInt_t   *fChipTypeID;      // Vector of detector type id
   Int_t    *fBuildLevel;     // Vector of Material Budget Studies
   //  
   AliITSUv0Layer **fUpGeom; //! Geometry
index a55a173642a11bd98b69dabf2ed6cc741fad19a5..af8e51243f2dc8d7665e2c39f2d57f7971d0e292 100644 (file)
@@ -45,7 +45,7 @@
 using namespace TMath;
 
 const Double_t AliITSUv0Layer::fgkDefaultSensorThick = 300*fgkmicron;
-const Double_t AliITSUv0Layer::fgkDefaultLadderThick =   1*fgkcm;
+const Double_t AliITSUv0Layer::fgkDefaultStaveThick =   1*fgkcm;
 
 ClassImp(AliITSUv0Layer)
 
@@ -59,12 +59,12 @@ AliITSUv0Layer::AliITSUv0Layer():
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(0),
   fBuildLevel(0),
   fStaveModel(AliITSUv0::kModelDummy)
@@ -82,12 +82,12 @@ AliITSUv0Layer::AliITSUv0Layer(Int_t debug):
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(0),
   fBuildLevel(0),
   fStaveModel(AliITSUv0::kModelDummy)
@@ -105,12 +105,12 @@ AliITSUv0Layer::AliITSUv0Layer(Int_t lay, Int_t debug):
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(0),
   fBuildLevel(0),
   fStaveModel(AliITSUv0::kModelDummy)
@@ -128,19 +128,19 @@ AliITSUv0Layer::AliITSUv0Layer(Int_t lay, Bool_t turbo, Int_t debug):
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(turbo),
   fBuildLevel(0),
   fStaveModel(AliITSUv0::kModelDummy)
 {
   //
   // Constructor setting layer number and debugging level
-  // for a "turbo" layer (i.e. where ladders overlap in phi)
+  // for a "turbo" layer (i.e. where staves overlap in phi)
   //
 }
 
@@ -152,12 +152,12 @@ AliITSUv0Layer::AliITSUv0Layer(const AliITSUv0Layer &s):
   fLayRadius(s.fLayRadius),
   fZLength(s.fZLength),
   fSensorThick(s.fSensorThick),
-  fLadderThick(s.fLadderThick),
-  fLadderWidth(s.fLadderWidth),
-  fLadderTilt(s.fLadderTilt),
-  fNLadders(s.fNLadders),
-  fNModules(s.fNModules),
-  fDetTypeID(s.fDetTypeID),
+  fStaveThick(s.fStaveThick),
+  fStaveWidth(s.fStaveWidth),
+  fStaveTilt(s.fStaveTilt),
+  fNStaves(s.fNStaves),
+  fNChips(s.fNChips),
+  fChipTypeID(s.fChipTypeID),
   fIsTurbo(s.fIsTurbo),
   fBuildLevel(s.fBuildLevel),
   fStaveModel(s.fStaveModel)
@@ -180,13 +180,13 @@ AliITSUv0Layer& AliITSUv0Layer::operator=(const AliITSUv0Layer &s)
   fLayRadius   = s.fLayRadius;
   fZLength     = s.fZLength;
   fSensorThick = s.fSensorThick;
-  fLadderThick = s.fLadderThick;
-  fLadderWidth = s.fLadderWidth;
-  fLadderTilt  = s.fLadderTilt;
-  fNLadders    = s.fNLadders;
-  fNModules    = s.fNModules;
+  fStaveThick = s.fStaveThick;
+  fStaveWidth = s.fStaveWidth;
+  fStaveTilt  = s.fStaveTilt;
+  fNStaves    = s.fNStaves;
+  fNChips    = s.fNChips;
   fIsTurbo     = s.fIsTurbo;
-  fDetTypeID   = s.fDetTypeID;
+  fChipTypeID   = s.fChipTypeID;
   fBuildLevel  = s.fBuildLevel;
   fStaveModel  = s.fStaveModel;
 
@@ -225,13 +225,13 @@ void AliITSUv0Layer::CreateLayer(TGeoVolume *moth){
   // Check if the user set the proper parameters
   if (fLayRadius <= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius));
   if (fZLength   <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength));
-  if (fNLadders  <= 0) AliFatal(Form("Wrong number of ladders (%d)",fNLadders));
-  if (fNModules  <= 0) AliFatal(Form("Wrong number of modules (%d)",fNModules));
+  if (fNStaves  <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves));
+  if (fNChips  <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips));
 
-  if (fLadderThick <= 0) {
-    AliInfo(Form("Ladder thickness wrong or not set (%f), using default (%f)",
-                fLadderThick,fgkDefaultLadderThick));
-    fLadderThick = fgkDefaultLadderThick;
+  if (fStaveThick <= 0) {
+    AliInfo(Form("Stave thickness wrong or not set (%f), using default (%f)",
+                fStaveThick,fgkDefaultStaveThick));
+    fStaveThick = fgkDefaultStaveThick;
   }
 
   if (fSensorThick <= 0) {
@@ -240,10 +240,10 @@ void AliITSUv0Layer::CreateLayer(TGeoVolume *moth){
     fSensorThick = fgkDefaultSensorThick;
   }
 
-  if (fSensorThick > fLadderThick) {
-    AliWarning(Form("Sensor thickness (%f) is greater than ladder thickness (%f), fixing",
-                fSensorThick,fLadderThick));
-    fSensorThick = fLadderThick;
+  if (fSensorThick > fStaveThick) {
+    AliWarning(Form("Sensor thickness (%f) is greater than stave thickness (%f), fixing",
+                fSensorThick,fStaveThick));
+    fSensorThick = fStaveThick;
   }
 
 
@@ -254,32 +254,32 @@ void AliITSUv0Layer::CreateLayer(TGeoVolume *moth){
   }
 
 
-  // First create the ladder container
-  alpha = (360./(2*fNLadders))*DegToRad();
+  // First create the stave container
+  alpha = (360./(2*fNStaves))*DegToRad();
 
-  //  fLadderWidth = fLayRadius*Tan(alpha);
+  //  fStaveWidth = fLayRadius*Tan(alpha);
 
   snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber);
   TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
-  layVol->SetUniqueID(fDetTypeID);
+  layVol->SetUniqueID(fChipTypeID);
 
 //  layVol->SetVisibility(kFALSE);
   layVol->SetVisibility(kTRUE);
   layVol->SetLineColor(1);
 
-  TGeoVolume *laddVol = CreateLadder();
+  TGeoVolume *stavVol = CreateStave();
 
 
   // Now build up the layer
-  alpha = 360./fNLadders;
-  Double_t r = fLayRadius + ((TGeoBBox*)laddVol->GetShape())->GetDY();
-  for (Int_t j=0; j<fNLadders; j++) {
+  alpha = 360./fNStaves;
+  Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY();
+  for (Int_t j=0; j<fNStaves; j++) {
     Double_t phi = j*alpha + fPhi0;
     xpos = r*CosD(phi);// r*SinD(-phi);
     ypos = r*SinD(phi);// r*CosD(-phi);
     zpos = 0.;
     phi += 90;
-    layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
+    layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
                                                    new TGeoRotation("",phi,0,0)));
   }
 
@@ -296,7 +296,7 @@ void AliITSUv0Layer::CreateLayer(TGeoVolume *moth){
 void AliITSUv0Layer::CreateLayerTurbo(TGeoVolume *moth){
 //
 // Creates the actual Layer and places inside its mother volume
-// A so-called "turbo" layer is a layer where ladders overlap in phi
+// A so-called "turbo" layer is a layer where staves overlap in phi
 // User can set width and tilt angle, no check is performed here
 // to avoid volume overlaps
 //
@@ -320,31 +320,31 @@ void AliITSUv0Layer::CreateLayerTurbo(TGeoVolume *moth){
 
 
   // Check if the user set the proper (remaining) parameters
-  if (fLadderWidth <= 0)
-    AliFatal(Form("Wrong ladder width (%f)",fLadderWidth));
-  if (Abs(fLadderTilt) > 45)
-    AliWarning(Form("Ladder tilt angle (%f) greater than 45deg",fLadderTilt));
+  if (fStaveWidth <= 0)
+    AliFatal(Form("Wrong stave width (%f)",fStaveWidth));
+  if (Abs(fStaveTilt) > 45)
+    AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt));
 
 
   snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber);
   TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
-  layVol->SetUniqueID(fDetTypeID);
+  layVol->SetUniqueID(fChipTypeID);
   layVol->SetVisibility(kTRUE);
   layVol->SetLineColor(1);
-  TGeoVolume *laddVol = CreateLadder();
+  TGeoVolume *stavVol = CreateStave();
 
 
   // Now build up the layer
-  alpha = 360./fNLadders;
-  Double_t r = fLayRadius /* +module thick ?! */;
-  for (Int_t j=0; j<fNLadders; j++) {
+  alpha = 360./fNStaves;
+  Double_t r = fLayRadius /* +chip thick ?! */;
+  for (Int_t j=0; j<fNStaves; j++) {
     Double_t phi = j*alpha + fPhi0;
     xpos = r*CosD(phi);// r*SinD(-phi);
     ypos = r*SinD(phi);// r*CosD(-phi);
     zpos = 0.;
     phi += 90;
-    layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
-                                                   new TGeoRotation("", phi-fLadderTilt,0,0)));
+    layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
+                                                   new TGeoRotation("", phi-fStaveTilt,0,0)));
   }
 
 
@@ -355,9 +355,9 @@ void AliITSUv0Layer::CreateLayerTurbo(TGeoVolume *moth){
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateLadder(const TGeoManager * /*mgr*/){
+TGeoVolume* AliITSUv0Layer::CreateStave(const TGeoManager * /*mgr*/){
 //
-// Creates the actual Ladder
+// Creates the actual Stave
 //
 // Input:
 //         mgr  : the GeoManager (used only to get the proper material)
@@ -376,70 +376,70 @@ TGeoVolume* AliITSUv0Layer::CreateLadder(const TGeoManager * /*mgr*/){
 
 
   // First create all needed shapes
-  alpha = (360./(2*fNLadders))*DegToRad();
+  alpha = (360./(2*fNStaves))*DegToRad();
 
-  // The ladder
+  // The stave
   xlen = fLayRadius*Tan(alpha);
-  if (fIsTurbo) xlen = 0.5*fLadderWidth;
-  ylen = 0.5*fLadderThick;
+  if (fIsTurbo) xlen = 0.5*fStaveWidth;
+  ylen = 0.5*fStaveThick;
   zlen = 0.5*fZLength;
 
   Double_t yplus = 0.46;
   //  Double_t origin[]={0,-yplus/2,0};
-  //  TGeoBBox *ladder = new TGeoBBox(xlen, ylen+yplus/2, zlen, origin);
-  TGeoXtru *ladder = new TGeoXtru(2); //z sections
+  //  TGeoBBox *stave = new TGeoBBox(xlen, ylen+yplus/2, zlen, origin);
+  TGeoXtru *stave = new TGeoXtru(2); //z sections
   Double_t xv[5] = {xlen,xlen,0,-xlen,-xlen};
   Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09};    
-  ladder->DefinePolygon(5,xv,yv);
-  ladder->DefineSection(0,-zlen,0,0,1.);
-  ladder->DefineSection(1,+zlen,0,0,1.);
+  stave->DefinePolygon(5,xv,yv);
+  stave->DefineSection(0,-zlen,0,0,1.);
+  stave->DefineSection(1,+zlen,0,0,1.);
   
 
   // We have all shapes: now create the real volumes
 //  TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
 
-  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
-//  TGeoVolume *laddVol = new TGeoVolume(volname, ladder, medAir);
-  TGeoVolume *laddVol = new TGeoVolumeAssembly(volname);
+  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
+//  TGeoVolume *stavVol = new TGeoVolume(volname, stave, medAir);
+  TGeoVolume *stavVol = new TGeoVolumeAssembly(volname);
 
-  //  laddVol->SetVisibility(kFALSE);
-  laddVol->SetVisibility(kTRUE);
-  laddVol->SetLineColor(2);
-  TGeoVolume *modVol = CreateModule(xlen,ylen, zlen);
+  //  stavVol->SetVisibility(kFALSE);
+  stavVol->SetVisibility(kTRUE);
+  stavVol->SetLineColor(2);
+  TGeoVolume *modVol = CreateChip(xlen,ylen, zlen);
 
 
-  // Now build up the ladder
+  // Now build up the stave
   zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
-  for (Int_t j=0; j<fNModules; j++) {
+  for (Int_t j=0; j<fNChips; j++) {
     xpos = 0.;
     ypos = 0.021;  // Remove small overlap - M.S: 21may13
-    zpos = -ladder->GetDZ() + j*2*zmod + zmod;
-    laddVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
+    zpos = -stave->GetDZ() + j*2*zmod + zmod;
+    stavVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
   }
  
 
   // put mechanical stave structure, only inner barrel up to now
   if (fLayerNumber<3) {
-    TGeoVolume *mechLaddVol = CreateStaveStruct(xlen,zlen); 
-    if (mechLaddVol)
-      laddVol->AddNode(mechLaddVol, fNModules, new TGeoCombiTrans(0, -0.15-ylen, 0, new TGeoRotation("",0, 0, 180)));
+    TGeoVolume *mechStavVol = CreateStaveStruct(xlen,zlen); 
+    if (mechStavVol)
+      stavVol->AddNode(mechStavVol, fNChips, new TGeoCombiTrans(0, -0.15-ylen, 0, new TGeoRotation("",0, 0, 180)));
   }
   
 
-  // Done, return the ladder
-  return laddVol;
+  // Done, return the stave
+  return stavVol;
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateStaveStruct(const Double_t xlad,
-                                             const Double_t zlad,
+TGeoVolume* AliITSUv0Layer::CreateStaveStruct(const Double_t xsta,
+                                             const Double_t zsta,
                                              const TGeoManager *mgr){
 //
 // Create the mechanical stave structure
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -450,33 +450,33 @@ TGeoVolume* AliITSUv0Layer::CreateStaveStruct(const Double_t xlad,
 // Updated:      26 Apr 2013  Mario Sitta
 //
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   switch (fStaveModel) {
     case AliITSUv0::kModelDummy:
-      mechLaddVol = CreateStaveModelDummy(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModelDummy(xsta,zsta,mgr);
       break;
     case AliITSUv0::kModel0:
-      mechLaddVol = CreateStaveModel0(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModel0(xsta,zsta,mgr);
       break;
     case AliITSUv0::kModel1:
-      mechLaddVol = CreateStaveModel1(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModel1(xsta,zsta,mgr);
       break;
     case AliITSUv0::kModel21:
-      mechLaddVol = CreateStaveModel21(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModel21(xsta,zsta,mgr);
       break;
     case AliITSUv0::kModel22:
-      mechLaddVol = CreateStaveModel22(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModel22(xsta,zsta,mgr);
       break;
     case AliITSUv0::kModel3:
-      mechLaddVol = CreateStaveModel3(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModel3(xsta,zsta,mgr);
       break;
     default:
       AliFatal(Form("Unknown stave model %d",fStaveModel));
       break;
   }
 
-  return mechLaddVol; 
+  return mechStavVol; 
 }
 
 
@@ -488,8 +488,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModelDummy(const Double_t ,
 // Create dummy stave
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -505,15 +505,15 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModelDummy(const Double_t ,
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
-                                             const Double_t zlad,
+TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xsta,
+                                             const Double_t zsta,
                                              const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 0 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -536,8 +536,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius = 0.15/2;
   Double_t kConeInRadius = 0.1430/2;
-  Double_t kStaveLength = zlad*2;
-  Double_t kStaveWidth = xlad*2-kConeOutRadius*2;
+  Double_t kStaveLength = zsta*2;
+  Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
   Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
   Double_t kStaveHeight = 0.3;
   Double_t kHeight = kStaveHeight/2;
@@ -555,11 +555,11 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
   AliDebug(1, Form("BuildLevel %d\n",fBuildLevel));
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
 
   Double_t z=0, y=-0.011+0.0150, x=0;
 
-   TGeoVolume *mechLaddVol = 0;
+   TGeoVolume *mechStavVol = 0;
 
   if (fBuildLevel < 5) {
 
@@ -571,10 +571,10 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);
       
     // detailed structure ++++++++++++++
     //Pipe Kapton grey-35
@@ -582,8 +582,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
     TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton);
     volCoolTube->SetFillColor(35);
     volCoolTube->SetLineColor(35);
-    mechLaddVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
-    mechLaddVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
   }
 
   if (fBuildLevel < 4) {
@@ -591,8 +591,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
     TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater);
     volCoolTubeW->SetFillColor(4);
     volCoolTubeW->SetLineColor(4);
-    mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
-    mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
   }
 
   //frequency of filament
@@ -608,16 +608,16 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
     volT2->SetFillColor(12); 
 
     for(int i=1;i<loop;i++){  //i<60;i++){
-      mechLaddVol->AddNode(volT2,4*i+0,
+      mechStavVol->AddNode(volT2,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
                                                     new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+1,
+      mechStavVol->AddNode(volT2,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
                                                     new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+2,
+      mechStavVol->AddNode(volT2,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
                                                     new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+3,
+      mechStavVol->AddNode(volT2,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),  
                                                     new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
     }
@@ -630,16 +630,16 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
     volT1->SetFillColor(12); 
 
     for(int i=1;i<loop;i++){
-      mechLaddVol->AddNode(volT1,4*i+0,
+      mechStavVol->AddNode(volT1,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),  
                                                     new TGeoRotation("volT1",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+1,
+      mechStavVol->AddNode(volT1,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2,  //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volT1",90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+2,
+      mechStavVol->AddNode(volT1,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volT1",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+3,
+      mechStavVol->AddNode(volT1,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volT1",-90,+kAlpha,0)));
     }
@@ -653,52 +653,52 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xlad,
     volTG->SetFillColor(5); 
 
     for(int i=1;i<loop;i++){ //i<60;i++){
-      mechLaddVol->AddNode(volTG,4*i+0,
+      mechStavVol->AddNode(volTG,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), 
                                                     new TGeoRotation("volTG",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volTG,4*i+1,
+      mechStavVol->AddNode(volTG,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), 
                                                     new TGeoRotation("volTG",90,kAlpha,0)));
-      mechLaddVol->AddNode(volTG,4*i+2,
+      mechStavVol->AddNode(volTG,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volTG",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volTG,4*i+3,
+      mechStavVol->AddNode(volTG,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volTG",-90,+kAlpha,0)));
     }
 
-    TGeoBBox *glue = new TGeoBBox(xlad, 0.005/2, zlad);
+    TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
     TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue);
     volGlue->SetLineColor(5);
     volGlue->SetFillColor(5); 
-    //mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
-    mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
+    //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
   }
 
   if (fBuildLevel < 1) {
     //Flex cable brown-28 TGeoBBox(width,thickness,length); 
-    TGeoBBox *kapCable = new TGeoBBox(xlad, 0.01/2, zlad);
+    TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
     TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
     volCable->SetLineColor(28);
     volCable->SetFillColor(28); 
-    mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
  }
 
   // Done, return the stave structur
-  return mechLaddVol;
+  return mechStavVol;
 }
 
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
-                                             const Double_t zlad,
+TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xsta,
+                                             const Double_t zsta,
                                              const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 1 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -721,9 +721,9 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius = 0.15/2;
   //    Double_t kConeInRadius = 0.1430/2;
-  Double_t kStaveLength = zlad*2;
-  //    Double_t kStaveWidth = xlad*2-kConeOutRadius*2;
-  Double_t kStaveWidth = xlad*2;
+  Double_t kStaveLength = zsta*2;
+  //    Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
+  Double_t kStaveWidth = xsta*2;
   Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
   Double_t kStaveHeight = 0.3;
   Double_t kHeight = kStaveHeight/2;
@@ -737,10 +737,10 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
   Int_t  loop = (Int_t)((kStaveLength/(2*kL1))/2);
   
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
     
 
   // detailed structure ++++++++++++++
@@ -749,7 +749,7 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
   // Polimide micro channels numbers
   Double_t yMC = y-kHeight+0.01;
   Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
-  Double_t xladMC = (nb*0.1-0.08)/2;
+  Double_t xstaMC = (nb*0.1-0.08)/2;
 
 
   if (fBuildLevel < 5) {
@@ -761,37 +761,37 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);
       
     // Polimide micro channels numbers
-    TGeoBBox *tM0=new TGeoBBox(xladMC, 0.005/2, zlad);
+    TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta);
     TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton);
     volTM0->SetLineColor(35);
     volTM0->SetFillColor(35); 
-    mechLaddVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
-    mechLaddVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
       
-    TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zlad);
+    TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
     TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton);
     volTM0b->SetLineColor(35);
     volTM0b->SetFillColor(35); 
     for (Int_t ib=0;ib<nb;ib++) {
-      mechLaddVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
     }
       
   }
     
   if (fBuildLevel < 4) {
     // Water in Polimide micro channels
-    TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zlad+0.1);
+    TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1);
     TGeoVolume *volWater=new TGeoVolume("Water", water, medWater);
     volWater->SetLineColor(4);
     volWater->SetFillColor(4); 
     for (Int_t ib=0;ib<(nb-1);ib++) {
-      mechLaddVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
     }
   }
     
@@ -804,16 +804,16 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
     volT1->SetLineColor(12);
     volT1->SetFillColor(12); 
     for(int i=0;i<loop;i++){//i<30;i++){
-      mechLaddVol->AddNode(volT1,4*i+0,
+      mechStavVol->AddNode(volT1,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+1,
+      mechStavVol->AddNode(volT1,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2, 
                                                     new TGeoRotation("volT1",90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+2,
+      mechStavVol->AddNode(volT1,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+3,
+      mechStavVol->AddNode(volT1,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,+kAlpha,0)));
     }
@@ -824,16 +824,16 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
     volT2->SetLineColor(12);
     volT2->SetFillColor(12); 
     for(int i=0;i<loop;i++){ //i<30;i++){
-      mechLaddVol->AddNode(volT2,4*i+0,
+      mechStavVol->AddNode(volT2,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
                                                     new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+1,
+      mechStavVol->AddNode(volT2,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
                                                     new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+2,
+      mechStavVol->AddNode(volT2,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
                                                     new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+3,
+      mechStavVol->AddNode(volT2,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
     }
@@ -846,58 +846,58 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xlad,
     volT3->SetLineColor(5);
     volT3->SetFillColor(5); 
     for(int i=0;i<loop;i++){//i<30;i++){
-      mechLaddVol->AddNode(volT3,4*i+0,
+      mechStavVol->AddNode(volT3,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volT3,4*i+1,
+      mechStavVol->AddNode(volT3,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, 
                                                     new TGeoRotation("volT1",90,kAlpha,0)));
-      mechLaddVol->AddNode(volT3,4*i+2,
+      mechStavVol->AddNode(volT3,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volT3,4*i+3,
+      mechStavVol->AddNode(volT3,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,+kAlpha,0)));
     }
       
     // Glue microchannel and sensor
-    TGeoBBox *glueM = new TGeoBBox(xlad, 0.01/2, zlad);
+    TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta);
     TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue);
     volGlueM->SetLineColor(5);
     volGlueM->SetFillColor(5); 
-    mechLaddVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
 
     // Glue sensor and kapton
-    TGeoBBox *glue = new TGeoBBox(xlad, 0.005/2, zlad);
+    TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
     TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue);
     volGlue->SetLineColor(5);
     volGlue->SetFillColor(5); 
-    mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
   }
 
   if (fBuildLevel < 1) {
-    TGeoBBox *kapCable = new TGeoBBox(xlad, 0.01/2, zlad);
+    TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
     TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
     volCable->SetLineColor(28);
     volCable->SetFillColor(28); 
-    mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
   }
     
   // Done, return the stave structur
-  return mechLaddVol;
+  return mechStavVol;
 
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
-                                              const Double_t zlad,
+TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xsta,
+                                              const Double_t zsta,
                                               const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 2.1 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -923,8 +923,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius =0.151384/2;
   Double_t kConeInRadius = 0.145034/2;
-  Double_t kStaveLength = zlad;
-  Double_t kStaveWidth = xlad*2;
+  Double_t kStaveLength = zsta;
+  Double_t kStaveWidth = xsta*2;
   Double_t kWidth = (kStaveWidth+0.005)/4;
   Double_t kStaveHeigth = 0.33;//0.33;
   Double_t kHeight = (kStaveHeigth+0.025)/2;
@@ -944,11 +944,11 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
 
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
 
   Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0;
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   if (fBuildLevel < 5) {
     // world (trapezoid)
@@ -959,18 +959,18 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);  
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);  
       
     //Pipe Kapton grey-35 
     TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius);
     TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
     volCone1->SetFillColor(35);
     volCone1->SetLineColor(35);
-    mechLaddVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
-    mechLaddVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
   }
 
   if (fBuildLevel < 4) {
@@ -979,8 +979,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
     TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
     volCoolTubeW->SetFillColor(4);
     volCoolTubeW->SetLineColor(4);
-    mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
-    mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
   }
 
   if (fBuildLevel < 3) {
@@ -991,11 +991,11 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
     volT2->SetLineColor(12);
     volT2->SetFillColor(12); 
     for(int i=0;i<loop;i++){// i<28;i++){
-      mechLaddVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
-      mechLaddVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
-//    mechLaddVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
+      mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
+//    mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
 
  }
  
@@ -1004,75 +1004,75 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
     TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K);
     plate4->SetFillColor(35);
     plate4->SetLineColor(35);
-    mechLaddVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
-    mechLaddVol->AddNode(plate4,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
+    mechStavVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
+    mechStavVol->AddNode(plate4,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
     //wall side in
     TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50);
     TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K);
     plate5->SetFillColor(12);
     plate5->SetLineColor(12);
-    mechLaddVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
-    mechLaddVol->AddNode(plate5,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+0.03+0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
+    mechStavVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
+    mechStavVol->AddNode(plate5,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+0.03+0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
 
      //Amec Thermasol red-2 cover tube FGS300
     TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180);
     TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
     cone11->SetFillColor(2);
     cone11->SetLineColor(2);
-    mechLaddVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
-    mechLaddVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
+    mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
+    mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
 
     TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50);
     TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
     plate2->SetFillColor(2);
     plate2->SetLineColor(2);
-    mechLaddVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
+    mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
 
     TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50);
     TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
     plate21->SetFillColor(2);
     plate21->SetLineColor(2);
-    mechLaddVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
-    mechLaddVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
+    mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
+    mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
 
     TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50);
     TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
     plate22->SetFillColor(2);
     plate22->SetLineColor(2);
-    mechLaddVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-    mechLaddVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-    mechLaddVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-    mechLaddVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
 
     //C Fleece
     TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180); 
     TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece);
     cone12->SetFillColor(28);
     cone12->SetLineColor(28);
-    mechLaddVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
-    mechLaddVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
+    mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
+    mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
 
     TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50);
     TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece);
     plate3->SetFillColor(28);
     plate3->SetLineColor(28);
-    mechLaddVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
+    mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
 
     TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50);
     TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece);
     plate31->SetFillColor(28);
     plate31->SetLineColor(28);
-    mechLaddVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
-    mechLaddVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
+    mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
+    mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
 
     TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50);
     TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece);
     plate32->SetFillColor(28);
     plate32->SetLineColor(28);
-    mechLaddVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-    mechLaddVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-    mechLaddVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-    mechLaddVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
 
 
     //K13D2U carbon plate
@@ -1080,52 +1080,52 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xlad,
     TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k);
     plate1->SetFillColor(5);
     plate1->SetLineColor(5);
-    mechLaddVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
+    mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
 
     //C Fleece bottom plate 
     TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50);
     TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece);
     plate6->SetFillColor(2);
     plate6->SetLineColor(2);
-    mechLaddVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
+    mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
       
       
   }
 
   if (fBuildLevel < 2) {
     //Glue layers and kapton
-    TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zlad);
+    TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta);
     TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
     volGlue->SetLineColor(5);
     volGlue->SetFillColor(5); 
-    mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
-    mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
   }
 
   if (fBuildLevel < 1) {
-    TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zlad);
+    TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta);
     TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
     volCable->SetLineColor(28);
     volCable->SetFillColor(28); 
-    mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+0.01+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+0.01+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
   }
     
 
   // Done, return the stave structure
-  return mechLaddVol;
+  return mechStavVol;
   
 }
 // new model22
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xlad,
-                                              const Double_t zlad,
+TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xsta,
+                                              const Double_t zsta,
                                               const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 2.2 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1152,8 +1152,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius =0.107/2;//0.107/2;
   Double_t kConeInRadius = 0.1015/2;//0.10105/2
-  Double_t kStaveLength = zlad;
-  Double_t kStaveWidth = xlad*2;
+  Double_t kStaveLength = zsta;
+  Double_t kStaveWidth = xsta*2;
   Double_t kWidth = (kStaveWidth)/4;
   Double_t kStaveHeight = 0.283;//0.33;
   Double_t kHeight = (kStaveHeight)/2;
@@ -1178,11 +1178,11 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xlad,
   Int_t  loop = (Int_t)(kStaveLength/(2*kL1));
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
 
   Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0;
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   if (fBuildLevel < 5) {
     // world (trapezoid)
@@ -1196,18 +1196,18 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);  
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);  
       
     //Polyimide Pipe Kapton grey-35 
     TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001);
     TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
     volCone1->SetFillColor(35);
     volCone1->SetLineColor(35);
-    mechLaddVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
-    mechLaddVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
     }
 
   if (fBuildLevel < 4) {
@@ -1215,8 +1215,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xlad,
     TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
     volCoolTubeW->SetFillColor(4);
     volCoolTubeW->SetLineColor(4);
-    mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
-    mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
   }
 
   if (fBuildLevel < 3) {
@@ -1228,13 +1228,13 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xlad,
     volT2->SetFillColor(12); 
     for(int i=0;i<loop;i++){// i<28;i++){
       // 1) Front Left Top Filament
-       mechLaddVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
+       mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
       // 2) Front Right Top Filament
-      mechLaddVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
+      mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
       // 3) Back Left  Top Filament
-      mechLaddVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
       // 4) Back Right Top Filament
-      mechLaddVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
+      mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
    }
  
      //Vertex  structure 
@@ -1244,131 +1244,131 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xlad,
       TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K);
       ibdv->SetFillColor(12);
       ibdv->SetLineColor(12);
-      mechLaddVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
+      mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
 
       //left trd2
       TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
       TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K);
       ibdv2->SetFillColor(12);
       ibdv2->SetLineColor(12);
-      mechLaddVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0355,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355,
+      mechStavVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0355,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355,
 
       //right trd3
       TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
       TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K);
       ibdv3->SetFillColor(12);
       ibdv3->SetLineColor(12);
-      mechLaddVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0355,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C
+      mechStavVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0355,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C
       
      //Carbon Fleece
-      TGeoConeSeg *cons2 = new TGeoConeSeg(zlad,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180); 
+      TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180); 
       TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece);
       cone12->SetFillColor(28);
       cone12->SetLineColor(28);
-      mechLaddVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
-      mechLaddVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
+      mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
+      mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
 
-      TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zlad);//kStaveLength-0.50);
+      TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50);
       TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece);
       plate3->SetFillColor(28);
       plate3->SetLineColor(28);
-      mechLaddVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
+      mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
 
-      TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zlad);
+      TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta);
       TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece);
       plate31->SetFillColor(28);
       plate31->SetLineColor(28);
-      mechLaddVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
-      mechLaddVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
+      mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
+      mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
 
-      TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zlad);
+      TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta);
       TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece);
       plate32->SetFillColor(28);
       plate32->SetLineColor(28);
-      mechLaddVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-      mechLaddVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-      mechLaddVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-      mechLaddVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
 
      //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper
-      TGeoConeSeg *cons1 = new TGeoConeSeg(zlad,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
+      TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
       TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
       cone11->SetFillColor(2);
       cone11->SetLineColor(2);
-      mechLaddVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
-      mechLaddVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
+      mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
+      mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
 
-      TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zlad);//kStaveLength-0.50);
+      TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50);
       TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
       plate2->SetFillColor(2);
       plate2->SetLineColor(2);
-      mechLaddVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
+      mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
 
-      TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zlad);
+      TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta);
       TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
       plate21->SetFillColor(2);
       plate21->SetLineColor(2);
-      mechLaddVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
-      mechLaddVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(klay1/2)-0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
+      mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
+      mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(klay1/2)-0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
 
-      TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zlad);
+      TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta);
       TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
       plate22->SetFillColor(2);
       plate22->SetLineColor(2);
-      mechLaddVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-      mechLaddVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-      mechLaddVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-      mechLaddVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
 
      //K13D2U CF plate
-      TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zlad);
+      TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta);
       TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k);
       plate1->SetFillColor(5);
       plate1->SetLineColor(5);
-      mechLaddVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
+      mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
 
      //C Fleece bottom plate 
-      TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zlad);
+      TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta);
       TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece);
       plate6->SetFillColor(2);
       plate6->SetLineColor(2);
-      mechLaddVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
+      mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
 
     }
    if (fBuildLevel < 2) {
       //Glue klayers and kapton
-     TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zlad);
+     TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta);
       TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
       volGlue->SetLineColor(5);
       volGlue->SetFillColor(5); 
-      // mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
+      // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
     }
 
      if (fBuildLevel < 1) {
      //Flex Cable or Bus
-      TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zlad);//klay5/2
+      TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2
       TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
       volCable->SetLineColor(28);
       volCable->SetFillColor(28); 
-      //      mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
+      //      mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
       }
     // Done, return the stave structe
-    return mechLaddVol;
+    return mechStavVol;
 }
 
 // model3
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
-                                              const Double_t zlad,
+TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xsta,
+                                              const Double_t zsta,
                                               const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 3 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1394,8 +1394,8 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
 
   // Local parameters
     Double_t kConeOutRadius = 0.15/2;
-    Double_t kStaveLength = zlad*2;
-    Double_t kStaveWidth = xlad*2;
+    Double_t kStaveLength = zsta*2;
+    Double_t kStaveWidth = xsta*2;
     Double_t w = kStaveWidth/4;//1/2 of W
     Double_t staveHeight = 0.3;
     Double_t h = staveHeight/2;
@@ -1413,9 +1413,9 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
        Double_t ang1 = 0*TMath::DegToRad();
        Double_t ang2 = 0*TMath::DegToRad();
        Double_t ang3 = 0*TMath::DegToRad();
-       Int_t modules = 4;
+       Int_t chips = 4;
        Double_t headWidth=0.25;
-       Double_t smcLength=kStaveLength/modules-2*headWidth;//6.25;
+       Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25;
        Double_t smcWidth=kStaveWidth;
        Double_t smcSide1Thick=0.03;
        Double_t vaporThick=0.032;
@@ -1428,7 +1428,7 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
 
 
     char volname[30];
-    snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+    snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
     
     // detailed structure ++++++++++++++
     Double_t z=0, y=0-0.007, x=0;
@@ -1436,10 +1436,10 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
     // Polimide micro channels numbers
     Double_t yMC = y-h+0.01;
     Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
-    Double_t xladMC = (nb*0.1-0.08)/2;
+    Double_t xstaMC = (nb*0.1-0.08)/2;
 
 
-    TGeoVolume *mechLaddVol = 0;
+    TGeoVolume *mechStavVol = 0;
     if (fBuildLevel < 5) {
       // world (trapezoid)
       TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
@@ -1448,10 +1448,10 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       mechStruct->DefinePolygon(5,xv,yv);
       mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
       mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
-      mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-      mechLaddVol->SetLineColor(12);
-      mechLaddVol->SetFillColor(12); 
-      mechLaddVol->SetVisibility(kTRUE);
+      mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+      mechStavVol->SetLineColor(12);
+      mechStavVol->SetFillColor(12); 
+      mechStavVol->SetVisibility(kTRUE);
 
        // Silicon micro channels numbers
       
@@ -1460,79 +1460,79 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       volTM0a->SetLineColor(35);
       volTM0a->SetFillColor(35); 
 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
-      mechLaddVol->AddNode(volTM0a, 1, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
+      mechStavVol->AddNode(volTM0a, 1, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
       }
       TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton);
       volTM0c->SetLineColor(35);
       volTM0c->SetFillColor(35); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));
-      mechLaddVol->AddNode(volTM0c, 1, new TGeoCombiTrans(x-(smcWidth/2)+(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));
+      mechStavVol->AddNode(volTM0c, 1, new TGeoCombiTrans(x-(smcWidth/2)+(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton);
       volTM0c1->SetLineColor(6);
       volTM0c1->SetFillColor(6); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0c1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0c1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton);
       volTM0c2->SetLineColor(35);
       volTM0c2->SetFillColor(35); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0c2, 0, new TGeoCombiTrans(x+smcWidth/2-(0.072/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0c2, 0, new TGeoCombiTrans(x+smcWidth/2-(0.072/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton);
       volTM0c2r->SetLineColor(35);
       volTM0c2r->SetFillColor(35); 
-      for(Int_t  mo=1; mo<=modules; mo++) {      
-      mechLaddVol->AddNode(volTM0c2r, 0, new TGeoCombiTrans(x-smcWidth/2+(0.068/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {      
+      mechStavVol->AddNode(volTM0c2r, 0, new TGeoCombiTrans(x-smcWidth/2+(0.068/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2);
       TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton);
       volTM0d->SetLineColor(12);
       volTM0d->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0d, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0d, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
 
       TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2);
       TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton);
       volTM0d1->SetLineColor(12);
       volTM0d1->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0d1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0d1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2);
       TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton);
       volTM0d2->SetLineColor(12);
       volTM0d2->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d2, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d2, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2);
       TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton);
       volTM0d2r->SetLineColor(12);
       volTM0d2r->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d2r, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d2r, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2);
       TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton);    
       volTM0e->SetLineColor(12);
       volTM0e->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
+      for(Int_t  mo=1; mo<=chips; mo++) {
       for (Int_t ie=0;ie<11;ie++) {
-       mechLaddVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-       mechLaddVol->AddNode(volTM0e, 1, new TGeoCombiTrans(x+(ie*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+smcSpace+(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0e, 1, new TGeoCombiTrans(x+(ie*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+smcSpace+(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
          }
       }
       
@@ -1543,9 +1543,9 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick;
       volTM0f->SetLineColor(12);
       volTM0f->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-       mechLaddVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-       mechLaddVol->AddNode(volTM0f, 1, new TGeoCombiTrans(x-smcCloseWallliquid+(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+       mechStavVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0f, 1, new TGeoCombiTrans(x-smcCloseWallliquid+(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       //Head(back) microchannel
 
@@ -1553,59 +1553,59 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton);
       volTM0hb->SetLineColor(4);
       volTM0hb->SetFillColor(4); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0hb, 1, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0hb, 1, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2);
       TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton);
       volTM0h1->SetLineColor(5);
       volTM0h1->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0h1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-headWidth+(0.05/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0h1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-headWidth+(0.05/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2);
       TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton);
       volTM0h2->SetLineColor(6);
       volTM0h2->SetFillColor(6);
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0h2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-0.02-(0.18/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0h2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-0.02-(0.18/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
       TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton);
       volTM0h3->SetLineColor(5);
       volTM0h3->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0h3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0h3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2);
       TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton);
       volTM0b1->SetLineColor(5);
       volTM0b1->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0b1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+headWidth-(0.03/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0b1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+headWidth-(0.03/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2);
       TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton);
       volTM0b2->SetLineColor(6);
       volTM0b2->SetFillColor(6); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0b2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+0.02+(0.2/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0b2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+0.02+(0.2/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
       TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton);
       volTM0b3->SetLineColor(5);
       volTM0b3->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0b3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0b3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
      
-      TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zlad);
+      TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
       TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton);
       volTM0b->SetLineColor(35);
       volTM0b->SetFillColor(35); 
       for (Int_t ib=0;ib<nb;ib++) {
-       //mechLaddVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
+       //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
       }
       
       } 
@@ -1618,15 +1618,15 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater);
       volTM0dv->SetLineColor(2);
       volTM0dv->SetFillColor(2);
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0dv, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0dv, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2);
       TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater);
       volTM0dl->SetLineColor(3);
       volTM0dl->SetFillColor(3); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0dl, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0dl, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       // small cooling fluid now using water wait for freeon value  
       TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
@@ -1637,10 +1637,10 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater);
       volTM0dvp->SetLineColor(2);
       volTM0dvp->SetFillColor(2); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
+      for(Int_t  mo=1; mo<=chips; mo++) {
       for (Int_t is=0;is<12;is++) {
-       mechLaddVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-       mechLaddVol->AddNode(volTM0dvp, 1, new TGeoCombiTrans(x-(is*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0dvp, 1, new TGeoCombiTrans(x-(is*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       }
 
@@ -1659,16 +1659,16 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       volT1->SetLineColor(12);
       volT1->SetFillColor(12); 
       for(int i=0;i<loop;i++){//i<30;i++){
-               mechLaddVol->AddNode(volT1,4*i+0,
+               mechStavVol->AddNode(volT1,4*i+0,
                                    new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, 
                                                       new TGeoRotation("volT1",-90,alpha,0)));
-       mechLaddVol->AddNode(volT1,4*i+1,
+       mechStavVol->AddNode(volT1,4*i+1,
                                    new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, 
                                                       new TGeoRotation("volT1",90,alpha,0)));
-       mechLaddVol->AddNode(volT1,4*i+2,
+       mechStavVol->AddNode(volT1,4*i+2,
                                    new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, 
                                                       new TGeoRotation("volT1",-90,-alpha,0)));
-       mechLaddVol->AddNode(volT1,4*i+3,
+       mechStavVol->AddNode(volT1,4*i+3,
                                    new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, 
                                                       new TGeoRotation("volT1",-90,+alpha,0)));
        }
@@ -1680,16 +1680,16 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
       volT2->SetLineColor(12);
       volT2->SetFillColor(12); 
       for(int i=0;i<loop;i++){ //i<30;i++){
-               mechLaddVol->AddNode(volT2,4*i+0,
+               mechStavVol->AddNode(volT2,4*i+0,
                                    new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
                                                       new TGeoRotation("volT2",90,90-alpha,90-beta)));
-       mechLaddVol->AddNode(volT2,4*i+1,
+       mechStavVol->AddNode(volT2,4*i+1,
                                    new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
                                                       new TGeoRotation("volT2",90,-90+alpha,-90+beta)));
-       mechLaddVol->AddNode(volT2,4*i+2,
+       mechStavVol->AddNode(volT2,4*i+2,
                                    new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
                                                       new TGeoRotation("volT2",90,-90+alpha,90-beta)));
-       mechLaddVol->AddNode(volT2,4*i+3,
+       mechStavVol->AddNode(volT2,4*i+3,
                                    new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, 
                                                       new TGeoRotation("volT2",90,90-alpha,-90+beta)));
        }
@@ -1698,52 +1698,52 @@ TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xlad,
     if (fBuildLevel < 2) {
 
       // Glue Filament and Silicon MicroChannel
-      TGeoBBox *tM0=new TGeoBBox(xladMC/5, klay4/2, zlad);
+      TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta);
       TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue );
       volTM0->SetLineColor(5);
       volTM0->SetFillColor(5); 
-      mechLaddVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xlad/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xlad/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
 
             
       // Glue microchannel and sensor
-      TGeoBBox *glueM = new TGeoBBox(xladMC/5, klay4/2, zlad);
+      TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta);
       TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue);
       volGlueM->SetLineColor(5);
       volGlueM->SetFillColor(5); 
-      mechLaddVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xlad/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xlad/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
      
        // Glue sensor and kapton
-      TGeoBBox *glue = new TGeoBBox(xlad, klay4/2, zlad);
+      TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta);
       TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue);
       volGlue->SetLineColor(5);
       volGlue->SetFillColor(5); 
-       mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
+       mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
     }      
 
     if (fBuildLevel < 1) {
-      TGeoBBox *kapCable = new TGeoBBox(xlad, klay5/2, zlad);
+      TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta);
       TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable);
       volCable->SetLineColor(28);
       volCable->SetFillColor(28); 
-      mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
     }
 
   // Done, return the stave structur
-    return mechLaddVol;
+    return mechStavVol;
  }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv0Layer::CreateModule(const Double_t xlad,
-                                         const Double_t ylad,   
-                                        const Double_t zlad,
+TGeoVolume* AliITSUv0Layer::CreateChip(const Double_t xsta,
+                                         const Double_t ysta,   
+                                        const Double_t zsta,
                                         const TGeoManager *mgr){
 //
-// Creates the actual Module
+// Creates the actual Chip
 //
 // Input:
-//         xlad,zlad : the ladder dimensions
+//         xsta,zsta : the stave dimensions
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1760,13 +1760,13 @@ TGeoVolume* AliITSUv0Layer::CreateModule(const Double_t xlad,
 
   // First create all needed shapes
 
-  // The module
-  TGeoBBox *module = new TGeoBBox(xlad,  ylad, zlad/fNModules);
+  // The chip
+  TGeoBBox *chip = new TGeoBBox(xsta,  ysta, zsta/fNChips);
 
   // The sensor
-  xlen = module->GetDX();
+  xlen = chip->GetDX();
   ylen = 0.5*fSensorThick;
-  zlen = module->GetDZ();
+  zlen = chip->GetDZ();
   TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
 
 
@@ -1774,9 +1774,9 @@ TGeoVolume* AliITSUv0Layer::CreateModule(const Double_t xlad,
   //TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
   TGeoMedium *medSi  = mgr->GetMedium("ITS_SI$");
 
-  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
-  // TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
-  TGeoVolume *modVol = new TGeoVolume(volname, module, medSi);
+  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
+  // TGeoVolume *modVol = new TGeoVolume(volname, chip, medAir);
+  TGeoVolume *modVol = new TGeoVolume(volname, chip, medSi);
   modVol->SetVisibility(kTRUE);
   modVol->SetLineColor(1);
 
@@ -1789,14 +1789,14 @@ TGeoVolume* AliITSUv0Layer::CreateModule(const Double_t xlad,
   sensVol->SetFillStyle(4000); // 0% transparent
 
 
-  // Now build up the module
+  // Now build up the chip
   xpos = 0.;
-  ypos = -module->GetDY() + sensor->GetDY();
+  ypos = -chip->GetDY() + sensor->GetDY();
   zpos = 0.;
 
   modVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos));
 
-  // Done, return the module
+  // Done, return the chip
   return modVol;
 }
 
@@ -1804,8 +1804,8 @@ TGeoVolume* AliITSUv0Layer::CreateModule(const Double_t xlad,
 Double_t AliITSUv0Layer::RadiusOfTurboContainer(){
 //
 // Computes the inner radius of the air container for the Turbo configuration
-// as the radius of either the circle tangent to the ladder or the circle
-// passing for the ladder's lower vertex
+// as the radius of either the circle tangent to the stave or the circle
+// passing for the stave's lower vertex
 //
 // Input:
 //         none (all needed parameters are class members)
@@ -1818,32 +1818,32 @@ Double_t AliITSUv0Layer::RadiusOfTurboContainer(){
 // Created:      08 Mar 2012  Mario Sitta
 //
 
-  Double_t rr, delta, z, lladd, rladd;
+  Double_t rr, delta, z, lstav, rstav;
 
-  if (fLadderThick > 89.) // Very big angle: avoid overflows since surely
+  if (fStaveThick > 89.) // Very big angle: avoid overflows since surely
     return -1;            // the radius from lower vertex is the right value
 
-  rladd = fLayRadius + 0.5*fLadderThick;
-  delta = (0.5*fLadderThick)/CosD(fLadderTilt);
-  z     = (0.5*fLadderThick)*TanD(fLadderTilt);
+  rstav = fLayRadius + 0.5*fStaveThick;
+  delta = (0.5*fStaveThick)/CosD(fStaveTilt);
+  z     = (0.5*fStaveThick)*TanD(fStaveTilt);
 
-  rr = rladd - delta;
-  lladd = (0.5*fLadderWidth) - z;
+  rr = rstav - delta;
+  lstav = (0.5*fStaveWidth) - z;
 
-  if ( (rr*SinD(fLadderTilt) < lladd) )
-    return (rr*CosD(fLadderTilt));
+  if ( (rr*SinD(fStaveTilt) < lstav) )
+    return (rr*CosD(fStaveTilt));
   else
     return -1;
 }
 
 //________________________________________________________________________
-void AliITSUv0Layer::SetLadderTilt(const Double_t t)
+void AliITSUv0Layer::SetStaveTilt(const Double_t t)
 {
 //
-// Sets the Ladder tilt angle (for turbo layers only)
+// Sets the Stave tilt angle (for turbo layers only)
 //
 // Input:
-//         t :  the ladder tilt angle
+//         t :  the stave tilt angle
 //
 // Output:
 //
@@ -1853,19 +1853,19 @@ void AliITSUv0Layer::SetLadderTilt(const Double_t t)
 //
 
   if (fIsTurbo)
-    fLadderTilt = t;
+    fStaveTilt = t;
   else
     AliError("Not a Turbo layer");
 
 }
 
 //________________________________________________________________________
-void AliITSUv0Layer::SetLadderWidth(const Double_t w){
+void AliITSUv0Layer::SetStaveWidth(const Double_t w){
 //
-// Sets the Ladder width (for turbo layers only)
+// Sets the Stave width (for turbo layers only)
 //
 // Input:
-//         w :  the ladder width
+//         w :  the stave width
 //
 // Output:
 //
@@ -1875,7 +1875,7 @@ void AliITSUv0Layer::SetLadderWidth(const Double_t w){
 //
 
   if (fIsTurbo)
-    fLadderWidth = w;
+    fStaveWidth = w;
   else
     AliError("Not a Turbo layer");
 
index f76e777aaaa117069273b63a9183f1706abe6975..03178028fdb26e74bbfa4b469bb37a7b542fa25e 100644 (file)
@@ -38,28 +38,28 @@ class AliITSUv0Layer : public AliITSv11Geometry {
     //
     Bool_t    IsTurbo() const {return fIsTurbo;};
 
-    Double_t  GetLadderThick() const {return fLadderThick;};
-    Double_t  GetLadderTilt()  const {return fLadderTilt;};
-    Double_t  GetLadderWidth() const {return fLadderWidth;};
+    Double_t  GetStaveThick() const {return fStaveThick;};
+    Double_t  GetStaveTilt()  const {return fStaveTilt;};
+    Double_t  GetStaveWidth() const {return fStaveWidth;};
     Double_t  GetSensorThick() const {return fSensorThick;};
-    Double_t  GetNLadders()    const {return fNLadders;};
-    Double_t  GetNModules()    const {return fNModules;};
+    Double_t  GetNStaves()    const {return fNStaves;};
+    Double_t  GetNChips()    const {return fNChips;};
     Double_t  GetRadius()      const {return fLayRadius;};
     Double_t  GetPhi0()        const {return fPhi0;};
     Double_t  GetZLength()     const {return fZLength;};
-    Int_t     GetDetType()     const {return fDetTypeID;}
+    Int_t     GetChipType()     const {return fChipTypeID;}
     AliITSUv0::AliITSUModel_t GetStaveModel() const {return fStaveModel;}
     //
-    void      SetLadderThick(Double_t t)    {fLadderThick = t;};
-    void      SetLadderTilt(Double_t t);
-    void      SetLadderWidth(Double_t w);
+    void      SetStaveThick(Double_t t)    {fStaveThick = t;};
+    void      SetStaveTilt(Double_t t);
+    void      SetStaveWidth(Double_t w);
     void      SetSensorThick(Double_t t)    {fSensorThick = t;};
-    void      SetNLadders(Int_t n)          {fNLadders = n;};
-    void      SetNModules(Int_t m)          {fNModules = m;};
+    void      SetNStaves(Int_t n)          {fNStaves = n;};
+    void      SetNChips(Int_t m)          {fNChips = m;};
     void      SetRadius(Double_t r)         {fLayRadius = r;};
     void      SetPhi0(Double_t phi)         {fPhi0 = phi;}
     void      SetZLength(Double_t z)        {fZLength   = z;};
-    void      SetDetType(Int_t tp)          {fDetTypeID = tp;}
+    void      SetChipType(Int_t tp)          {fChipTypeID = tp;}
     void      SetBuildLevel(Int_t buildLevel){fBuildLevel=buildLevel;}
     void      SetStaveModel(AliITSUv0::AliITSUModel_t model) {fStaveModel=model;}
     virtual void CreateLayer(TGeoVolume *moth);
@@ -69,9 +69,9 @@ class AliITSUv0Layer : public AliITSv11Geometry {
 
     Double_t RadiusOfTurboContainer();
 
-    TGeoVolume* CreateLadder(const TGeoManager *mgr=gGeoManager);
-    //TGeoVolume* CreateModule(Double_t x, Double_t z, const TGeoManager *mgr=gGeoManager);
-    TGeoVolume* CreateModule(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
+    TGeoVolume* CreateStave(const TGeoManager *mgr=gGeoManager);
+    //TGeoVolume* CreateChip(Double_t x, Double_t z, const TGeoManager *mgr=gGeoManager);
+    TGeoVolume* CreateChip(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
 
 
     TGeoVolume* CreateStaveStruct(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
@@ -84,16 +84,16 @@ class AliITSUv0Layer : public AliITSv11Geometry {
 
 
     Int_t     fLayerNumber; // Current layer number
-    Double_t  fPhi0;        // lab phi of 1st ladder, in degrees!!!
+    Double_t  fPhi0;        // lab phi of 1st stave, in degrees!!!
     Double_t  fLayRadius;   // Inner radius of this layer
     Double_t  fZLength;     // Z length of this layer
     Double_t  fSensorThick; // Sensor thickness
-    Double_t  fLadderThick; // Ladder thickness
-    Double_t  fLadderWidth; // Ladder width (for turbo layers only)
-    Double_t  fLadderTilt;  // Ladder tilt angle (for turbo layers only) in degrees
-    Int_t     fNLadders;    // Number of ladders in this layer
-    Int_t     fNModules;    // Number of modules per ladder in this layer
-    UInt_t    fDetTypeID;   // detector type id
+    Double_t  fStaveThick; // Stave thickness
+    Double_t  fStaveWidth; // Stave width (for turbo layers only)
+    Double_t  fStaveTilt;  // Stave tilt angle (for turbo layers only) in degrees
+    Int_t     fNStaves;    // Number of staves in this layer
+    Int_t     fNChips;    // Number of chips per stave in this layer
+    UInt_t    fChipTypeID;   // detector type id
     Bool_t    fIsTurbo;     // True if this layer is a "turbo" layer
     Int_t     fBuildLevel;  // Used for material studies
 
@@ -102,7 +102,7 @@ class AliITSUv0Layer : public AliITSv11Geometry {
     // Parameters for the Upgrade geometry
 
     static const Double_t fgkDefaultSensorThick; // Default sensor thickness
-    static const Double_t fgkDefaultLadderThick; // Default ladder thickness
+    static const Double_t fgkDefaultStaveThick; // Default stave thickness
 
   ClassDef(AliITSUv0Layer,0) // ITS Upgrade v0 geometry
 };
index bf99be32aabe373a9feb33b849ac526072506a4b..77fa195b92cb338f7a58324c2006ab3cce0290bd 100644 (file)
@@ -69,13 +69,13 @@ AliITSUv1::AliITSUv1()
   ,fLayPhi0(0)
   ,fLayRadii(0)
   ,fLayZLength(0)
-  ,fLaddPerLay(0)
-  ,fModPerLadd(0)
-  ,fLadThick(0)
-  ,fLadWidth(0)
-  ,fLadTilt(0)
+  ,fStavPerLay(0)
+  ,fModPerStav(0)
+  ,fStaThick(0)
+  ,fStaWidth(0)
+  ,fStaTilt(0)
   ,fDetThick(0)
-  ,fDetTypeID(0)
+  ,fChipTypeID(0)
   ,fBuildLevel(0)
   ,fUpGeom(0)
   ,fStaveModelIB(kIBModel0)
@@ -101,13 +101,13 @@ AliITSUv1::AliITSUv1(const char *title,const Int_t nlay)
   ,fLayPhi0(0)
   ,fLayRadii(0)
   ,fLayZLength(0)
-  ,fLaddPerLay(0)
-  ,fModPerLadd(0)
-  ,fLadThick(0)
-  ,fLadWidth(0)
-  ,fLadTilt(0)
+  ,fStavPerLay(0)
+  ,fModPerStav(0)
+  ,fStaThick(0)
+  ,fStaWidth(0)
+  ,fStaTilt(0)
   ,fDetThick(0)
-  ,fDetTypeID(0)
+  ,fChipTypeID(0)
   ,fBuildLevel(0)
   ,fUpGeom(0)
   ,fStaveModelIB(kIBModel0)
@@ -128,13 +128,13 @@ AliITSUv1::AliITSUv1(const char *title,const Int_t nlay)
   fLayPhi0    = new Double_t[fNLayers];
   fLayRadii   = new Double_t[fNLayers];
   fLayZLength = new Double_t[fNLayers];
-  fLaddPerLay = new Int_t[fNLayers];
-  fModPerLadd = new Int_t[fNLayers];
-  fLadThick   = new Double_t[fNLayers];
-  fLadWidth   = new Double_t[fNLayers];
-  fLadTilt    = new Double_t[fNLayers];
+  fStavPerLay = new Int_t[fNLayers];
+  fModPerStav = new Int_t[fNLayers];
+  fStaThick   = new Double_t[fNLayers];
+  fStaWidth   = new Double_t[fNLayers];
+  fStaTilt    = new Double_t[fNLayers];
   fDetThick   = new Double_t[fNLayers];
-  fDetTypeID  = new UInt_t[fNLayers];
+  fChipTypeID  = new UInt_t[fNLayers];
   fBuildLevel = new Int_t[fNLayers];
 
 
@@ -145,11 +145,11 @@ AliITSUv1::AliITSUv1(const char *title,const Int_t nlay)
       fLayPhi0[j] = 0;
       fLayRadii[j] = 0.;
       fLayZLength[j] = 0.;
-      fLaddPerLay[j] = 0;
-      fModPerLadd[j] = 0;
-      fLadWidth[j] = 0.;
+      fStavPerLay[j] = 0;
+      fModPerStav[j] = 0;
+      fStaWidth[j] = 0.;
       fDetThick[j] = 0.;
-      fDetTypeID[j] = 0;
+      fChipTypeID[j] = 0;
       fBuildLevel[j] = 0;
       fUpGeom[j] = 0;     
     }
@@ -169,13 +169,13 @@ AliITSUv1::~AliITSUv1() {
   delete [] fLayPhi0;
   delete [] fLayRadii;
   delete [] fLayZLength;
-  delete [] fLaddPerLay;
-  delete [] fModPerLadd;
-  delete [] fLadThick;
-  delete [] fLadWidth;
-  delete [] fLadTilt;
+  delete [] fStavPerLay;
+  delete [] fModPerStav;
+  delete [] fStaThick;
+  delete [] fStaWidth;
+  delete [] fStaTilt;
   delete [] fDetThick;
-  delete [] fDetTypeID;
+  delete [] fChipTypeID;
   delete [] fBuildLevel;
   delete [] fUpGeom;
   delete [] fWrapRMin;
@@ -199,7 +199,7 @@ void AliITSUv1::AddAlignableVolumes() const{
   //   none.
   // Return:
   //   none.
-
+  /*
   AliInfo("Add ITS alignable volumes");
 
   if (!gGeoManager) { AliFatal("TGeoManager doesn't exist !"); return;  }
@@ -218,27 +218,28 @@ void AliITSUv1::AddAlignableVolumes() const{
     //printf("SetAlignable: %s %s\n",snm.Data(),pth.Data());
     gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameLayer(lr),pth.Data());
     //
-    for (int ld=0; ld<fLaddPerLay[lr]; ld++) {
+    for (int ld=0; ld<fStavPerLay[lr]; ld++) {
       //
-      TString pthL = Form("%s/%s%d_%d",pth.Data(),AliITSUGeomTGeo::GetITSLadderPattern(),lr,ld);
+      TString pthL = Form("%s/%s%d_%d",pth.Data(),AliITSUGeomTGeo::GetITSStavePattern(),lr,ld);
       //printf("SetAlignable: %s %s\n",snmL.Data(),pthL.Data());
-      gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameLadder(lr,ld),pthL.Data());
+      gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameStave(lr,ld),pthL.Data());
       //
-      for (int md=0; md<fModPerLadd[lr]; md++) {
+      for (int md=0; md<fModPerStav[lr]; md++) {
        //
-       TString pthM = Form("%s/%s%d_%d",pthL.Data(),AliITSUGeomTGeo::GetITSModulePattern(),lr,md);
+       TString pthM = Form("%s/%s%d_%d",pthL.Data(),AliITSUGeomTGeo::GetITSChipPattern(),lr,md);
        //
-       // RS: Attention, this is a hack: AliGeomManager cannot accomodate all ITSU modules w/o
-       // conflicts with TPC. For this reason we define the UID of the module to be simply its ID
-       //      int modUID = AliGeomManager::LayerToVolUID(lr+1,modNum++); // here modNum would be module within the layer
-       int modUID = AliITSUGeomTGeo::ModuleVolUID( modNum++ );
+       // RS: Attention, this is a hack: AliGeomManager cannot accomodate all ITSU chips w/o
+       // conflicts with TPC. For this reason we define the UID of the chip to be simply its ID
+       //      int modUID = AliGeomManager::LayerToVolUID(lr+1,modNum++); // here modNum would be chip within the layer
+       int modUID = AliITSUGeomTGeo::ChipVolUID( modNum++ );
        // 
-       gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameModule(lr,ld,md),pthM.Data(),modUID);
+       gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameChip(lr,ld,md),pthM.Data(),modUID);
        //
       }
     }
   }
   //
+  */
 }
 
 //______________________________________________________________________
@@ -288,19 +289,19 @@ void AliITSUv1::CreateGeometry() {
   for (Int_t j=0; j<fNLayers; j++) {
     if (fLayRadii[j] <= 0)                 AliFatal(Form("Wrong layer radius for layer %d (%f)",j,fLayRadii[j]));
     if (fLayZLength[j] <= 0)               AliFatal(Form("Wrong layer length for layer %d (%f)",j,fLayZLength[j]));
-    if (fLaddPerLay[j] <= 0)               AliFatal(Form("Wrong number of ladders for layer %d (%d)",j,fLaddPerLay[j]));
-    if (fModPerLadd[j] <= 0)               AliFatal(Form("Wrong number of modules for layer %d (%d)",j,fModPerLadd[j]));
-    if (fLadThick[j] < 0)                  AliFatal(Form("Wrong ladder thickness for layer %d (%f)",j,fLadThick[j]));
-    if (fLayTurbo[j] && fLadWidth[j] <= 0) AliFatal(Form("Wrong ladder width for layer %d (%f)",j,fLadWidth[j]));
-    if (fDetThick[j] < 0)                  AliFatal(Form("Wrong module thickness for layer %d (%f)",j,fDetThick[j]));
+    if (fStavPerLay[j] <= 0)               AliFatal(Form("Wrong number of staves for layer %d (%d)",j,fStavPerLay[j]));
+    if (fModPerStav[j] <= 0)               AliFatal(Form("Wrong number of chips for layer %d (%d)",j,fModPerStav[j]));
+    if (fStaThick[j] < 0)                  AliFatal(Form("Wrong stave thickness for layer %d (%f)",j,fStaThick[j]));
+    if (fLayTurbo[j] && fStaWidth[j] <= 0) AliFatal(Form("Wrong stave width for layer %d (%f)",j,fStaWidth[j]));
+    if (fDetThick[j] < 0)                  AliFatal(Form("Wrong chip thickness for layer %d (%f)",j,fDetThick[j]));
     //
     if (j > 0) {
       if (fLayRadii[j]<=fLayRadii[j-1])    AliFatal(Form("Layer %d radius (%f) is smaller than layer %d radius (%f)",
                                                         j,fLayRadii[j],j-1,fLayRadii[j-1]));
     } // if (j > 0)
 
-    if (fLadThick[j] == 0) AliInfo(Form("Ladder thickness for layer %d not set, using default",j));
-    if (fDetThick[j] == 0) AliInfo(Form("Module thickness for layer %d not set, using default",j));
+    if (fStaThick[j] == 0) AliInfo(Form("Stave thickness for layer %d not set, using default",j));
+    if (fDetThick[j] == 0) AliInfo(Form("Chip thickness for layer %d not set, using default",j));
 
   } // for (Int_t j=0; j<fNLayers; j++)
 
@@ -320,17 +321,17 @@ void AliITSUv1::CreateGeometry() {
     //
     if (fLayTurbo[j]) {
       fUpGeom[j] = new AliITSUv1Layer(j,kTRUE,kFALSE);
-      fUpGeom[j]->SetLadderWidth(fLadWidth[j]);
-      fUpGeom[j]->SetLadderTilt(fLadTilt[j]);
+      fUpGeom[j]->SetStaveWidth(fStaWidth[j]);
+      fUpGeom[j]->SetStaveTilt(fStaTilt[j]);
     }
     else fUpGeom[j] = new AliITSUv1Layer(j,kFALSE);
     //
     fUpGeom[j]->SetPhi0(fLayPhi0[j]);
     fUpGeom[j]->SetRadius(fLayRadii[j]);
     fUpGeom[j]->SetZLength(fLayZLength[j]);
-    fUpGeom[j]->SetNLadders(fLaddPerLay[j]);
-    fUpGeom[j]->SetNModules(fModPerLadd[j]);
-    fUpGeom[j]->SetDetType(fDetTypeID[j]);
+    fUpGeom[j]->SetNStaves(fStavPerLay[j]);
+    fUpGeom[j]->SetNChips(fModPerStav[j]);
+    fUpGeom[j]->SetChipType(fChipTypeID[j]);
     fUpGeom[j]->SetBuildLevel(fBuildLevel[j]);
     if (j < 3)
       fUpGeom[j]->SetStaveModel(fStaveModelIB);
@@ -338,7 +339,7 @@ void AliITSUv1::CreateGeometry() {
       fUpGeom[j]->SetStaveModel(fStaveModelOB);
     AliDebug(1,Form("fBuildLevel: %d\n",fBuildLevel[j]));
     //
-    if (fLadThick[j] != 0) fUpGeom[j]->SetLadderThick(fLadThick[j]);
+    if (fStaThick[j] != 0) fUpGeom[j]->SetStaveThick(fStaThick[j]);
     if (fDetThick[j] != 0) fUpGeom[j]->SetSensorThick(fDetThick[j]);
     //
     for (int iw=0;iw<fNWrapVol;iw++) {
@@ -485,7 +486,7 @@ void AliITSUv1::CreateMaterials() {
 
 //______________________________________________________________________
 void AliITSUv1::DefineLayer(const Int_t nlay, const double phi0, const Double_t r,
-                           const Double_t zlen, const Int_t nladd,
+                           const Double_t zlen, const Int_t nstav,
                            const Int_t nmod, const Double_t lthick,
                            const Double_t dthick, const UInt_t dettypeID,
                            const Int_t buildLevel)
@@ -496,9 +497,9 @@ void AliITSUv1::DefineLayer(const Int_t nlay, const double phi0, const Double_t
   //          phi0    layer phi0
   //          r       layer radius
   //          zlen    layer length
-  //          nladd   number of ladders
-  //          nmod    number of modules per ladder
-  //          lthick  ladder thickness (if omitted, defaults to 0)
+  //          nstav   number of staves
+  //          nmod    number of chips per stave
+  //          lthick  stave thickness (if omitted, defaults to 0)
   //          dthick  detector thickness (if omitted, defaults to 0)
   //          buildLevel (if 0, all geometry is build, used for material budget studies)
   // Outputs:
@@ -515,33 +516,33 @@ void AliITSUv1::DefineLayer(const Int_t nlay, const double phi0, const Double_t
   fLayPhi0[nlay] = phi0;
   fLayRadii[nlay] = r;
   fLayZLength[nlay] = zlen;
-  fLaddPerLay[nlay] = nladd;
-  fModPerLadd[nlay] = nmod;
-  fLadThick[nlay] = lthick;
+  fStavPerLay[nlay] = nstav;
+  fModPerStav[nlay] = nmod;
+  fStaThick[nlay] = lthick;
   fDetThick[nlay] = dthick;
-  fDetTypeID[nlay] = dettypeID;
+  fChipTypeID[nlay] = dettypeID;
   fBuildLevel[nlay] = buildLevel;
     
 }
 
 //______________________________________________________________________
-void AliITSUv1::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
+void AliITSUv1::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nstav,
                                 Int_t nmod, Double_t width, Double_t tilt,
                                 Double_t lthick,Double_t dthick,
                                 UInt_t dettypeID, Int_t buildLevel)
 {
   //     Sets the layer parameters for a "turbo" layer
-  //     (i.e. a layer whose ladders overlap in phi)
+  //     (i.e. a layer whose staves overlap in phi)
   // Inputs:
   //          nlay    layer number
-  //          phi0    phi of 1st ladder
+  //          phi0    phi of 1st stave
   //          r       layer radius
   //          zlen    layer length
-  //          nladd   number of ladders
-  //          nmod    number of modules per ladder
-  //          width   ladder width
+  //          nstav   number of staves
+  //          nmod    number of chips per stave
+  //          width   stave width
   //          tilt    layer tilt angle (degrees)
-  //          lthick  ladder thickness (if omitted, defaults to 0)
+  //          lthick  stave thickness (if omitted, defaults to 0)
   //          dthick  detector thickness (if omitted, defaults to 0)
   //          dettypeID  ??
   //          buildLevel (if 0, all geometry is build, used for material budget studies)
@@ -559,13 +560,13 @@ void AliITSUv1::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t
   fLayPhi0[nlay] = phi0;
   fLayRadii[nlay] = r;
   fLayZLength[nlay] = zlen;
-  fLaddPerLay[nlay] = nladd;
-  fModPerLadd[nlay] = nmod;
-  fLadThick[nlay] = lthick;
-  fLadWidth[nlay] = width;
-  fLadTilt[nlay] = tilt;
+  fStavPerLay[nlay] = nstav;
+  fModPerStav[nlay] = nmod;
+  fStaThick[nlay] = lthick;
+  fStaWidth[nlay] = width;
+  fStaTilt[nlay] = tilt;
   fDetThick[nlay] = dthick;
-  fDetTypeID[nlay] = dettypeID;
+  fChipTypeID[nlay] = dettypeID;
   fBuildLevel[nlay] = buildLevel;
 
 }
@@ -573,7 +574,7 @@ void AliITSUv1::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t
 //______________________________________________________________________
 void AliITSUv1::GetLayerParameters(Int_t nlay, Double_t &phi0,
                                   Double_t &r, Double_t &zlen,
-                                  Int_t &nladd, Int_t &nmod,
+                                  Int_t &nstav, Int_t &nmod,
                                   Double_t &width, Double_t &tilt,
                                   Double_t &lthick, Double_t &dthick,
                                   UInt_t &dettype) const
@@ -582,14 +583,14 @@ void AliITSUv1::GetLayerParameters(Int_t nlay, Double_t &phi0,
   // Inputs:
   //          nlay    layer number
   // Outputs:
-  //          phi0    phi of 1st ladder
+  //          phi0    phi of 1st stave
   //          r       layer radius
   //          zlen    layer length
-  //          nladd   number of ladders
-  //          nmod    number of modules per ladder
-  //          width   ladder width
-  //          tilt    ladder tilt angle
-  //          lthick  ladder thickness
+  //          nstav   number of staves
+  //          nmod    number of chips per stave
+  //          width   stave width
+  //          tilt    stave tilt angle
+  //          lthick  stave thickness
   //          dthick  detector thickness
   //          dettype detector type
   // Return:
@@ -603,13 +604,13 @@ void AliITSUv1::GetLayerParameters(Int_t nlay, Double_t &phi0,
   phi0   = fLayPhi0[nlay];
   r      = fLayRadii[nlay];
   zlen   = fLayZLength[nlay];
-  nladd  = fLaddPerLay[nlay];
-  nmod   = fModPerLadd[nlay];
-  width  = fLadWidth[nlay];
-  tilt   = fLadTilt[nlay];
-  lthick = fLadThick[nlay];
+  nstav  = fStavPerLay[nlay];
+  nmod   = fModPerStav[nlay];
+  width  = fStaWidth[nlay];
+  tilt   = fStaTilt[nlay];
+  lthick = fStaThick[nlay];
   dthick = fDetThick[nlay];
-  dettype= fDetTypeID[nlay];
+  dettype= fChipTypeID[nlay];
 }
 
 //______________________________________________________________________
@@ -721,12 +722,12 @@ void AliITSUv1::StepManager()
     gMC->CurrentVolOffID(2,cpn0);
   } //
 
-  mod = fGeomTGeo->GetModuleIndex(lay,cpn0,cpn1);
+  mod = fGeomTGeo->GetChipIndex(lay,cpn0,cpn1);
   //RS2DEL  fInitGeom.DecodeDetector(mod,lay+1,cpn0,cpn1,copy);
   //
   // Fill hit structure.
   //
-  hit.SetModule(mod);
+  hit.SetChip(mod);
   hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber());
   gMC->TrackPosition(position);
   gMC->TrackMomentum(momentum);
@@ -754,17 +755,17 @@ void AliITSUv1::StepManager()
 }
 
 //______________________________________________________________________
-void AliITSUv1::SetLayerDetTypeID(Int_t lr, UInt_t id)
+void AliITSUv1::SetLayerChipTypeID(Int_t lr, UInt_t id)
 {
   // set det type
-  if (!fDetTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
-  fDetTypeID[lr] = id;
+  if (!fChipTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
+  fChipTypeID[lr] = id;
 }
 
 //______________________________________________________________________
-Int_t AliITSUv1::GetLayerDetTypeID(Int_t lr)
+Int_t AliITSUv1::GetLayerChipTypeID(Int_t lr)
 {
   // set det type
-  if (!fDetTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
-  return fDetTypeID[lr];
+  if (!fChipTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
+  return fChipTypeID[lr];
 }
index 40336b269bd8cb1d25571600b72ffddaa1b45adf..cad621988071185fb9bb7271578ff258eeb2fb00 100644 (file)
@@ -46,13 +46,13 @@ class AliITSUv1 : public AliITSU {
   virtual void   AddAlignableVolumes() const;
   virtual void   CreateGeometry();
   virtual void   CreateMaterials();
-  virtual void   DefineLayer(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd,
+  virtual void   DefineLayer(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nstav,
                             Int_t nmod, Double_t lthick=0.,Double_t dthick=0.,UInt_t detType=0, Int_t buildFlag=0);
-  virtual void   DefineLayerTurbo(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd,
+  virtual void   DefineLayerTurbo(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nstav,
                                  Int_t nmod,Double_t width,Double_t tilt,
                                  Double_t lthick = 0.,Double_t dthick = 0.,UInt_t detType=0, Int_t buildFlag=0);
   virtual void   GetLayerParameters(Int_t nlay, Double_t &phi0,Double_t &r, Double_t &zlen,
-                                   Int_t &nladd, Int_t &nmod,
+                                   Int_t &nstav, Int_t &nmod,
                                    Double_t &width, Double_t &tilt,
                                    Double_t &lthick, Double_t &mthick,
                                    UInt_t &dettype) const;
@@ -62,8 +62,8 @@ class AliITSUv1 : public AliITSU {
   virtual Int_t  IsVersion()                 const { return 20;}  // vUpgrade ? do we need this
   virtual void   SetDefaults();
   virtual void   StepManager();
-  virtual void   SetLayerDetTypeID(Int_t lr, UInt_t id);
-  virtual Int_t  GetLayerDetTypeID(Int_t lr);
+  virtual void   SetLayerChipTypeID(Int_t lr, UInt_t id);
+  virtual Int_t  GetLayerChipTypeID(Int_t lr);
   virtual void   SetStaveModelIB(AliITSUModel_t model) {fStaveModelIB=model;}
   virtual void   SetStaveModelOB(AliITSUModel_t model) {fStaveModelOB=model;}
   virtual AliITSUModel_t GetStaveModelIB() const {return fStaveModelIB;}
@@ -81,16 +81,16 @@ class AliITSUv1 : public AliITSU {
   Double_t* fWrapRMax;       // max radius of wrapper volume
   Double_t* fWrapZSpan;      // Z span of wrapper volume
   Bool_t   *fLayTurbo;       // True for "turbo" layers
-  Double_t *fLayPhi0;        // Vector of layer's 1st ladder phi in lab
+  Double_t *fLayPhi0;        // Vector of layer's 1st stave phi in lab
   Double_t *fLayRadii;       // Vector of layer radii
   Double_t *fLayZLength;     // Vector of layer length along Z
-  Int_t    *fLaddPerLay;     // Vector of number of ladders per layer
-  Int_t    *fModPerLadd;     // Vector of number of modules per ladder
-  Double_t *fLadThick;       // Vector of ladder thicknesses
-  Double_t *fLadWidth;       // Vector of ladder width (only used for turbo)
-  Double_t *fLadTilt;        // Vector of ladder tilt (only used for turbo)
+  Int_t    *fStavPerLay;     // Vector of number of staves per layer
+  Int_t    *fModPerStav;     // Vector of number of chips per stave
+  Double_t *fStaThick;       // Vector of stave thicknesses
+  Double_t *fStaWidth;       // Vector of stave width (only used for turbo)
+  Double_t *fStaTilt;        // Vector of stave tilt (only used for turbo)
   Double_t *fDetThick;       // Vector of detector thicknesses
-  UInt_t   *fDetTypeID;      // Vector of detector type id
+  UInt_t   *fChipTypeID;      // Vector of detector type id
   Int_t    *fBuildLevel;     // Vector of Material Budget Studies
   //  
   AliITSUv1Layer **fUpGeom; //! Geometry
index b5f47828322350a71e9b26ea7083667e1eb058df..966b854580335ce2eb4dc6fa1e9013ff18c2c3e7 100644 (file)
 using namespace TMath;
 
 const Double_t AliITSUv1Layer::fgkDefaultSensorThick = 300*fgkmicron;
-const Double_t AliITSUv1Layer::fgkDefaultLadderThick =   1*fgkcm;
+const Double_t AliITSUv1Layer::fgkDefaultStaveThick =   1*fgkcm;
 
 const Double_t AliITSUv1Layer::fgkOBHalfStaveWidth   =   3.01 *fgkcm;
-const Double_t AliITSUv1Layer::fgkOBModuleGap        =   0.01 *fgkcm;
+const Double_t AliITSUv1Layer::fgkOBChipGap        =   0.01 *fgkcm;
 const Double_t AliITSUv1Layer::fgkOBFlexCable1Thick  =   0.005*fgkcm;
 const Double_t AliITSUv1Layer::fgkOBFlexCable2Thick  =   0.01 *fgkcm;
 const Double_t AliITSUv1Layer::fgkOBBusCable1Thick   =   0.02 *fgkcm;
@@ -56,7 +56,7 @@ const Double_t AliITSUv1Layer::fgkOBBusCable2Thick   =   0.02 *fgkcm;
 const Double_t AliITSUv1Layer::fgkOBColdPlateThick   =   0.012*fgkcm;
 const Double_t AliITSUv1Layer::fgkOBCarbonPlateThick =   0.012*fgkcm;
 const Double_t AliITSUv1Layer::fgkOBGlueThick        =   0.03 *fgkcm;
-const Double_t AliITSUv1Layer::fgkOBModuleZLength    =  21.06 *fgkcm;
+const Double_t AliITSUv1Layer::fgkOBChipZLength    =  21.06 *fgkcm;
 
 
 ClassImp(AliITSUv1Layer)
@@ -71,12 +71,12 @@ AliITSUv1Layer::AliITSUv1Layer():
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(0),
   fBuildLevel(0),
   fStaveModel(AliITSUv1::kIBModelDummy)
@@ -94,12 +94,12 @@ AliITSUv1Layer::AliITSUv1Layer(Int_t debug):
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(0),
   fBuildLevel(0),
   fStaveModel(AliITSUv1::kIBModelDummy)
@@ -117,12 +117,12 @@ AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Int_t debug):
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(0),
   fBuildLevel(0),
   fStaveModel(AliITSUv1::kIBModelDummy)
@@ -140,19 +140,19 @@ AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug):
   fLayRadius(0),
   fZLength(0),
   fSensorThick(0),
-  fLadderThick(0),
-  fLadderWidth(0),
-  fLadderTilt(0),
-  fNLadders(0),
-  fNModules(0),
-  fDetTypeID(0),
+  fStaveThick(0),
+  fStaveWidth(0),
+  fStaveTilt(0),
+  fNStaves(0),
+  fNChips(0),
+  fChipTypeID(0),
   fIsTurbo(turbo),
   fBuildLevel(0),
   fStaveModel(AliITSUv1::kIBModelDummy)
 {
   //
   // Constructor setting layer number and debugging level
-  // for a "turbo" layer (i.e. where ladders overlap in phi)
+  // for a "turbo" layer (i.e. where staves overlap in phi)
   //
 }
 
@@ -164,12 +164,12 @@ AliITSUv1Layer::AliITSUv1Layer(const AliITSUv1Layer &s):
   fLayRadius(s.fLayRadius),
   fZLength(s.fZLength),
   fSensorThick(s.fSensorThick),
-  fLadderThick(s.fLadderThick),
-  fLadderWidth(s.fLadderWidth),
-  fLadderTilt(s.fLadderTilt),
-  fNLadders(s.fNLadders),
-  fNModules(s.fNModules),
-  fDetTypeID(s.fDetTypeID),
+  fStaveThick(s.fStaveThick),
+  fStaveWidth(s.fStaveWidth),
+  fStaveTilt(s.fStaveTilt),
+  fNStaves(s.fNStaves),
+  fNChips(s.fNChips),
+  fChipTypeID(s.fChipTypeID),
   fIsTurbo(s.fIsTurbo),
   fBuildLevel(s.fBuildLevel),
   fStaveModel(s.fStaveModel)
@@ -192,13 +192,13 @@ AliITSUv1Layer& AliITSUv1Layer::operator=(const AliITSUv1Layer &s)
   fLayRadius   = s.fLayRadius;
   fZLength     = s.fZLength;
   fSensorThick = s.fSensorThick;
-  fLadderThick = s.fLadderThick;
-  fLadderWidth = s.fLadderWidth;
-  fLadderTilt  = s.fLadderTilt;
-  fNLadders    = s.fNLadders;
-  fNModules    = s.fNModules;
+  fStaveThick = s.fStaveThick;
+  fStaveWidth = s.fStaveWidth;
+  fStaveTilt  = s.fStaveTilt;
+  fNStaves    = s.fNStaves;
+  fNChips    = s.fNChips;
   fIsTurbo     = s.fIsTurbo;
-  fDetTypeID   = s.fDetTypeID;
+  fChipTypeID   = s.fChipTypeID;
   fBuildLevel  = s.fBuildLevel;
   fStaveModel  = s.fStaveModel;
 
@@ -237,13 +237,13 @@ void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
   // Check if the user set the proper parameters
   if (fLayRadius <= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius));
   if (fZLength   <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength));
-  if (fNLadders  <= 0) AliFatal(Form("Wrong number of ladders (%d)",fNLadders));
-  if (fNModules  <= 0) AliFatal(Form("Wrong number of modules (%d)",fNModules));
+  if (fNStaves  <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves));
+  if (fNChips  <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips));
 
-  if (fLadderThick <= 0) {
-    AliInfo(Form("Ladder thickness wrong or not set (%f), using default (%f)",
-                fLadderThick,fgkDefaultLadderThick));
-    fLadderThick = fgkDefaultLadderThick;
+  if (fStaveThick <= 0) {
+    AliInfo(Form("Stave thickness wrong or not set (%f), using default (%f)",
+                fStaveThick,fgkDefaultStaveThick));
+    fStaveThick = fgkDefaultStaveThick;
   }
 
   if (fSensorThick <= 0) {
@@ -252,10 +252,10 @@ void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
     fSensorThick = fgkDefaultSensorThick;
   }
 
-  if (fSensorThick > fLadderThick) {
-    AliWarning(Form("Sensor thickness (%f) is greater than ladder thickness (%f), fixing",
-                fSensorThick,fLadderThick));
-    fSensorThick = fLadderThick;
+  if (fSensorThick > fStaveThick) {
+    AliWarning(Form("Sensor thickness (%f) is greater than stave thickness (%f), fixing",
+                fSensorThick,fStaveThick));
+    fSensorThick = fStaveThick;
   }
 
 
@@ -266,32 +266,32 @@ void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
   }
 
 
-  // First create the ladder container
-  alpha = (360./(2*fNLadders))*DegToRad();
+  // First create the stave container
+  alpha = (360./(2*fNStaves))*DegToRad();
 
-  //  fLadderWidth = fLayRadius*Tan(alpha);
+  //  fStaveWidth = fLayRadius*Tan(alpha);
 
   snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber);
   TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
-  layVol->SetUniqueID(fDetTypeID);
+  layVol->SetUniqueID(fChipTypeID);
 
 //  layVol->SetVisibility(kFALSE);
   layVol->SetVisibility(kTRUE);
   layVol->SetLineColor(1);
 
-  TGeoVolume *laddVol = CreateLadder();
+  TGeoVolume *stavVol = CreateStave();
 
 
   // Now build up the layer
-  alpha = 360./fNLadders;
-  Double_t r = fLayRadius + ((TGeoBBox*)laddVol->GetShape())->GetDY();
-  for (Int_t j=0; j<fNLadders; j++) {
+  alpha = 360./fNStaves;
+  Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY();
+  for (Int_t j=0; j<fNStaves; j++) {
     Double_t phi = j*alpha + fPhi0;
     xpos = r*CosD(phi);// r*SinD(-phi);
     ypos = r*SinD(phi);// r*CosD(-phi);
     zpos = 0.;
     phi += 90;
-    layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
+    layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
                                                    new TGeoRotation("",phi,0,0)));
   }
 
@@ -308,7 +308,7 @@ void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
 void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){
 //
 // Creates the actual Layer and places inside its mother volume
-// A so-called "turbo" layer is a layer where ladders overlap in phi
+// A so-called "turbo" layer is a layer where staves overlap in phi
 // User can set width and tilt angle, no check is performed here
 // to avoid volume overlaps
 //
@@ -332,31 +332,31 @@ void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){
 
 
   // Check if the user set the proper (remaining) parameters
-  if (fLadderWidth <= 0)
-    AliFatal(Form("Wrong ladder width (%f)",fLadderWidth));
-  if (Abs(fLadderTilt) > 45)
-    AliWarning(Form("Ladder tilt angle (%f) greater than 45deg",fLadderTilt));
+  if (fStaveWidth <= 0)
+    AliFatal(Form("Wrong stave width (%f)",fStaveWidth));
+  if (Abs(fStaveTilt) > 45)
+    AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt));
 
 
   snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber);
   TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
-  layVol->SetUniqueID(fDetTypeID);
+  layVol->SetUniqueID(fChipTypeID);
   layVol->SetVisibility(kTRUE);
   layVol->SetLineColor(1);
-  TGeoVolume *laddVol = CreateLadder();
+  TGeoVolume *stavVol = CreateStave();
 
 
   // Now build up the layer
-  alpha = 360./fNLadders;
-  Double_t r = fLayRadius /* +module thick ?! */;
-  for (Int_t j=0; j<fNLadders; j++) {
+  alpha = 360./fNStaves;
+  Double_t r = fLayRadius /* +chip thick ?! */;
+  for (Int_t j=0; j<fNStaves; j++) {
     Double_t phi = j*alpha + fPhi0;
     xpos = r*CosD(phi);// r*SinD(-phi);
     ypos = r*SinD(phi);// r*CosD(-phi);
     zpos = 0.;
     phi += 90;
-    layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
-                                                   new TGeoRotation("", phi-fLadderTilt,0,0)));
+    layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
+                                                   new TGeoRotation("", phi-fStaveTilt,0,0)));
   }
 
 
@@ -367,9 +367,9 @@ void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateLadder(const TGeoManager * /*mgr*/){
+TGeoVolume* AliITSUv1Layer::CreateStave(const TGeoManager * /*mgr*/){
 //
-// Creates the actual Ladder
+// Creates the actual Stave
 //
 // Input:
 //         mgr  : the GeoManager (used only to get the proper material)
@@ -391,89 +391,89 @@ TGeoVolume* AliITSUv1Layer::CreateLadder(const TGeoManager * /*mgr*/){
 
 
   // First create all needed shapes
-  alpha = (360./(2*fNLadders))*DegToRad();
+  alpha = (360./(2*fNStaves))*DegToRad();
 
-  // The ladder
+  // The stave
   xlenI = fLayRadius*Tan(alpha);
-  if (fIsTurbo) xlenI = 0.5*fLadderWidth;
-  ylen = 0.5*fLadderThick;
+  if (fIsTurbo) xlenI = 0.5*fStaveWidth;
+  ylen = 0.5*fStaveThick;
   zlen = 0.5*fZLength;
 
   Double_t yplus = 0.46;
-  TGeoXtru *ladder = new TGeoXtru(2); //z sections
+  TGeoXtru *stave = new TGeoXtru(2); //z sections
   Double_t xv[5] = {xlenI,xlenI,0,-xlenI,-xlenI};
   Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09};    
-  ladder->DefinePolygon(5,xv,yv);
-  ladder->DefineSection(0,-zlen,0,0,1.);
-  ladder->DefineSection(1,+zlen,0,0,1.);
+  stave->DefinePolygon(5,xv,yv);
+  stave->DefineSection(0,-zlen,0,0,1.);
+  stave->DefineSection(1,+zlen,0,0,1.);
 
   // We have all shapes: now create the real volumes
 
-  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
-//  TGeoVolume *laddVol = new TGeoVolume(volname, ladder, medAir);
-  TGeoVolume *laddVol = new TGeoVolumeAssembly(volname);
+  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
+//  TGeoVolume *stavVol = new TGeoVolume(volname, stave, medAir);
+  TGeoVolume *stavVol = new TGeoVolumeAssembly(volname);
 
-  //  laddVol->SetVisibility(kFALSE);
-  laddVol->SetVisibility(kTRUE);
-  laddVol->SetLineColor(2);
+  //  stavVol->SetVisibility(kFALSE);
+  stavVol->SetVisibility(kTRUE);
+  stavVol->SetLineColor(2);
   TGeoVolume *modVol = 0;
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
-  // Now build up the ladder
+  // Now build up the stave
   if (fLayerNumber<3) {
-    modVol = CreateModuleInnerB(xlenI,ylen,zlen);
+    modVol = CreateChipInnerB(xlenI,ylen,zlen);
     zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
-    for (Int_t j=0; j<fNModules; j++) {
+    for (Int_t j=0; j<fNChips; j++) {
       xpos = 0.;
       ypos = 0.021;  // Remove small overlap - M.S: 21may13
-      zpos = -ladder->GetDZ() + j*2*zmod + zmod;
-      laddVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
+      zpos = -stave->GetDZ() + j*2*zmod + zmod;
+      stavVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
     }
  
   // put mechanical stave structure, only inner barrel up to now
-    mechLaddVol = CreateStaveStructInnerB(xlenI,zlen); 
-    if (mechLaddVol)
-      laddVol->AddNode(mechLaddVol, fNModules, new TGeoCombiTrans(0, -0.15-ylen, 0, new TGeoRotation("",0, 0, 180)));
+    mechStavVol = CreateStaveStructInnerB(xlenI,zlen); 
+    if (mechStavVol)
+      stavVol->AddNode(mechStavVol, fNChips, new TGeoCombiTrans(0, -0.15-ylen, 0, new TGeoRotation("",0, 0, 180)));
   }
 
   else{
     if (fStaveModel == AliITSUv1::kOBModel0) { // Create simplified stave struct as in v0
-      modVol = CreateModuleInnerB(xlenI,ylen,zlen);
+      modVol = CreateChipInnerB(xlenI,ylen,zlen);
   printf("?????? %f %f %f\n",xlenI,ylen,zlen);
       zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
-      for (Int_t j=0; j<fNModules; j++) {
+      for (Int_t j=0; j<fNChips; j++) {
        xpos = 0.;
        ypos = 0.021;  // Remove small overlap - M.S: 21may13
-       zpos = -ladder->GetDZ() + j*2*zmod + zmod;
-       laddVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
+       zpos = -stave->GetDZ() + j*2*zmod + zmod;
+       stavVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
       }
     } else { // (if fStaveModel) Create new stave struct as in TDR
       modVol = CreateStaveOuterB(xLenO);
-      laddVol->AddNode(modVol, 1, new TGeoTranslation(0, 2.5, 0));
+      stavVol->AddNode(modVol, 1, new TGeoTranslation(0, 2.5, 0));
 
-      mechLaddVol = CreateSpaceFrameOuterB(xLenO); 
-      if (mechLaddVol)
-       laddVol->AddNode(mechLaddVol, 1,
+      mechStavVol = CreateSpaceFrameOuterB(xLenO); 
+      if (mechStavVol)
+       stavVol->AddNode(mechStavVol, 1,
                         new TGeoCombiTrans(0, 0, 0,
                                            new TGeoRotation("", 180, 0, 0)));
     } // if (fStaveModel)
   }
   
 
-  // Done, return the ladder
-  return laddVol;
+  // Done, return the stave
+  return stavVol;
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xlad,
-                                                   const Double_t zlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xsta,
+                                                   const Double_t zsta,
                                                    const TGeoManager *mgr){
 //
 // Create the mechanical stave structure
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -484,33 +484,33 @@ TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xlad,
 // Updated:      26 Apr 2013  Mario Sitta
 //
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   switch (fStaveModel) {
     case AliITSUv1::kIBModelDummy:
-      mechLaddVol = CreateStaveModelInnerBDummy(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModelInnerBDummy(xsta,zsta,mgr);
       break;
     case AliITSUv1::kIBModel0:
-      mechLaddVol = CreateStaveModelInnerB0(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModelInnerB0(xsta,zsta,mgr);
       break;
     case AliITSUv1::kIBModel1:
-      mechLaddVol = CreateStaveModelInnerB1(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModelInnerB1(xsta,zsta,mgr);
       break;
     case AliITSUv1::kIBModel21:
-      mechLaddVol = CreateStaveModelInnerB21(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModelInnerB21(xsta,zsta,mgr);
       break;
     case AliITSUv1::kIBModel22:
-      mechLaddVol = CreateStaveModelInnerB22(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModelInnerB22(xsta,zsta,mgr);
       break;
     case AliITSUv1::kIBModel3:
-      mechLaddVol = CreateStaveModelInnerB3(xlad,zlad,mgr);
+      mechStavVol = CreateStaveModelInnerB3(xsta,zsta,mgr);
       break;
     default:
       AliFatal(Form("Unknown stave model %d",fStaveModel));
       break;
   }
 
-  return mechLaddVol; 
+  return mechStavVol; 
 }
 
 
@@ -522,8 +522,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t ,
 // Create dummy stave
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -539,15 +539,15 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t ,
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
-                                                   const Double_t zlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xsta,
+                                                   const Double_t zsta,
                                                    const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 0 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -570,8 +570,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius = 0.15/2;
   Double_t kConeInRadius = 0.1430/2;
-  Double_t kStaveLength = zlad*2;
-  Double_t kStaveWidth = xlad*2-kConeOutRadius*2;
+  Double_t kStaveLength = zsta*2;
+  Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
   Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
   Double_t kStaveHeight = 0.3;
   Double_t kHeight = kStaveHeight/2;
@@ -589,11 +589,11 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
   AliDebug(1, Form("BuildLevel %d\n",fBuildLevel));
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
 
   Double_t z=0, y=-0.011+0.0150, x=0;
 
-   TGeoVolume *mechLaddVol = 0;
+   TGeoVolume *mechStavVol = 0;
 
   if (fBuildLevel < 5) {
 
@@ -605,10 +605,10 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);
       
     // detailed structure ++++++++++++++
     //Pipe Kapton grey-35
@@ -616,8 +616,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
     TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton);
     volCoolTube->SetFillColor(35);
     volCoolTube->SetLineColor(35);
-    mechLaddVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
-    mechLaddVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
   }
 
   if (fBuildLevel < 4) {
@@ -625,8 +625,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
     TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater);
     volCoolTubeW->SetFillColor(4);
     volCoolTubeW->SetLineColor(4);
-    mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
-    mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
+    mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
   }
 
   //frequency of filament
@@ -642,16 +642,16 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
     volT2->SetFillColor(12); 
 
     for(int i=1;i<loop;i++){  //i<60;i++){
-      mechLaddVol->AddNode(volT2,4*i+0,
+      mechStavVol->AddNode(volT2,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
                                                     new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+1,
+      mechStavVol->AddNode(volT2,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
                                                     new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+2,
+      mechStavVol->AddNode(volT2,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
                                                     new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+3,
+      mechStavVol->AddNode(volT2,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),  
                                                     new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
     }
@@ -664,16 +664,16 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
     volT1->SetFillColor(12); 
 
     for(int i=1;i<loop;i++){
-      mechLaddVol->AddNode(volT1,4*i+0,
+      mechStavVol->AddNode(volT1,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),  
                                                     new TGeoRotation("volT1",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+1,
+      mechStavVol->AddNode(volT1,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2,  //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volT1",90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+2,
+      mechStavVol->AddNode(volT1,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volT1",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+3,
+      mechStavVol->AddNode(volT1,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volT1",-90,+kAlpha,0)));
     }
@@ -687,52 +687,52 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
     volTG->SetFillColor(5); 
 
     for(int i=1;i<loop;i++){ //i<60;i++){
-      mechLaddVol->AddNode(volTG,4*i+0,
+      mechStavVol->AddNode(volTG,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), 
                                                     new TGeoRotation("volTG",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volTG,4*i+1,
+      mechStavVol->AddNode(volTG,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), 
                                                     new TGeoRotation("volTG",90,kAlpha,0)));
-      mechLaddVol->AddNode(volTG,4*i+2,
+      mechStavVol->AddNode(volTG,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volTG",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volTG,4*i+3,
+      mechStavVol->AddNode(volTG,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), 
                                                     new TGeoRotation("volTG",-90,+kAlpha,0)));
     }
 
-    TGeoBBox *glue = new TGeoBBox(xlad, 0.005/2, zlad);
+    TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
     TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue);
     volGlue->SetLineColor(5);
     volGlue->SetFillColor(5); 
-    //mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
-    mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
+    //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
   }
 
   if (fBuildLevel < 1) {
     //Flex cable brown-28 TGeoBBox(width,thickness,length); 
-    TGeoBBox *kapCable = new TGeoBBox(xlad, 0.01/2, zlad);
+    TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
     TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
     volCable->SetLineColor(28);
     volCable->SetFillColor(28); 
-    mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
  }
 
   // Done, return the stave structur
-  return mechLaddVol;
+  return mechStavVol;
 }
 
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
-                                                   const Double_t zlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xsta,
+                                                   const Double_t zsta,
                                                    const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 1 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -755,9 +755,9 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius = 0.15/2;
   //    Double_t kConeInRadius = 0.1430/2;
-  Double_t kStaveLength = zlad*2;
-  //    Double_t kStaveWidth = xlad*2-kConeOutRadius*2;
-  Double_t kStaveWidth = xlad*2;
+  Double_t kStaveLength = zsta*2;
+  //    Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
+  Double_t kStaveWidth = xsta*2;
   Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
   Double_t kStaveHeight = 0.3;
   Double_t kHeight = kStaveHeight/2;
@@ -771,10 +771,10 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
   Int_t  loop = (Int_t)((kStaveLength/(2*kL1))/2);
   
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
     
 
   // detailed structure ++++++++++++++
@@ -783,7 +783,7 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
   // Polimide micro channels numbers
   Double_t yMC = y-kHeight+0.01;
   Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
-  Double_t xladMC = (nb*0.1-0.08)/2;
+  Double_t xstaMC = (nb*0.1-0.08)/2;
 
 
   if (fBuildLevel < 5) {
@@ -795,37 +795,37 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);
       
     // Polimide micro channels numbers
-    TGeoBBox *tM0=new TGeoBBox(xladMC, 0.005/2, zlad);
+    TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta);
     TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton);
     volTM0->SetLineColor(35);
     volTM0->SetFillColor(35); 
-    mechLaddVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
-    mechLaddVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
       
-    TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zlad);
+    TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
     TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton);
     volTM0b->SetLineColor(35);
     volTM0b->SetFillColor(35); 
     for (Int_t ib=0;ib<nb;ib++) {
-      mechLaddVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
     }
       
   }
     
   if (fBuildLevel < 4) {
     // Water in Polimide micro channels
-    TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zlad+0.1);
+    TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1);
     TGeoVolume *volWater=new TGeoVolume("Water", water, medWater);
     volWater->SetLineColor(4);
     volWater->SetFillColor(4); 
     for (Int_t ib=0;ib<(nb-1);ib++) {
-      mechLaddVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
     }
   }
     
@@ -838,16 +838,16 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
     volT1->SetLineColor(12);
     volT1->SetFillColor(12); 
     for(int i=0;i<loop;i++){//i<30;i++){
-      mechLaddVol->AddNode(volT1,4*i+0,
+      mechStavVol->AddNode(volT1,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+1,
+      mechStavVol->AddNode(volT1,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2, 
                                                     new TGeoRotation("volT1",90,kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+2,
+      mechStavVol->AddNode(volT1,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volT1,4*i+3,
+      mechStavVol->AddNode(volT1,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,+kAlpha,0)));
     }
@@ -858,16 +858,16 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
     volT2->SetLineColor(12);
     volT2->SetFillColor(12); 
     for(int i=0;i<loop;i++){ //i<30;i++){
-      mechLaddVol->AddNode(volT2,4*i+0,
+      mechStavVol->AddNode(volT2,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
                                                     new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+1,
+      mechStavVol->AddNode(volT2,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
                                                     new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+2,
+      mechStavVol->AddNode(volT2,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
                                                     new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,4*i+3,
+      mechStavVol->AddNode(volT2,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
     }
@@ -880,58 +880,58 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
     volT3->SetLineColor(5);
     volT3->SetFillColor(5); 
     for(int i=0;i<loop;i++){//i<30;i++){
-      mechLaddVol->AddNode(volT3,4*i+0,
+      mechStavVol->AddNode(volT3,4*i+0,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,kAlpha,0)));
-      mechLaddVol->AddNode(volT3,4*i+1,
+      mechStavVol->AddNode(volT3,4*i+1,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, 
                                                     new TGeoRotation("volT1",90,kAlpha,0)));
-      mechLaddVol->AddNode(volT3,4*i+2,
+      mechStavVol->AddNode(volT3,4*i+2,
                                  new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,-kAlpha,0)));
-      mechLaddVol->AddNode(volT3,4*i+3,
+      mechStavVol->AddNode(volT3,4*i+3,
                                  new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, 
                                                     new TGeoRotation("volT1",-90,+kAlpha,0)));
     }
       
     // Glue microchannel and sensor
-    TGeoBBox *glueM = new TGeoBBox(xlad, 0.01/2, zlad);
+    TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta);
     TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue);
     volGlueM->SetLineColor(5);
     volGlueM->SetFillColor(5); 
-    mechLaddVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
 
     // Glue sensor and kapton
-    TGeoBBox *glue = new TGeoBBox(xlad, 0.005/2, zlad);
+    TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
     TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue);
     volGlue->SetLineColor(5);
     volGlue->SetFillColor(5); 
-    mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
   }
 
   if (fBuildLevel < 1) {
-    TGeoBBox *kapCable = new TGeoBBox(xlad, 0.01/2, zlad);
+    TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
     TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
     volCable->SetLineColor(28);
     volCable->SetFillColor(28); 
-    mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
   }
     
   // Done, return the stave structur
-  return mechLaddVol;
+  return mechStavVol;
 
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
-                                                    const Double_t zlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xsta,
+                                                    const Double_t zsta,
                                                     const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 2.1 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -957,8 +957,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius =0.151384/2;
   Double_t kConeInRadius = 0.145034/2;
-  Double_t kStaveLength = zlad;
-  Double_t kStaveWidth = xlad*2;
+  Double_t kStaveLength = zsta;
+  Double_t kStaveWidth = xsta*2;
   Double_t kWidth = (kStaveWidth+0.005)/4;
   Double_t kStaveHeigth = 0.33;//0.33;
   Double_t kHeight = (kStaveHeigth+0.025)/2;
@@ -978,11 +978,11 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
 
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
 
   Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0;
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   if (fBuildLevel < 5) {
     // world (trapezoid)
@@ -993,18 +993,18 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);  
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);  
       
     //Pipe Kapton grey-35 
     TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius);
     TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
     volCone1->SetFillColor(35);
     volCone1->SetLineColor(35);
-    mechLaddVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
-    mechLaddVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
   }
 
   if (fBuildLevel < 4) {
@@ -1013,8 +1013,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
     TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
     volCoolTubeW->SetFillColor(4);
     volCoolTubeW->SetLineColor(4);
-    mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
-    mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
   }
 
   if (fBuildLevel < 3) {
@@ -1025,11 +1025,11 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
     volT2->SetLineColor(12);
     volT2->SetFillColor(12); 
     for(int i=0;i<loop;i++){// i<28;i++){
-      mechLaddVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
-      mechLaddVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
-      mechLaddVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
-//    mechLaddVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
+      mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
+//    mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
 
  }
  
@@ -1038,75 +1038,75 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
     TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K);
     plate4->SetFillColor(35);
     plate4->SetLineColor(35);
-    mechLaddVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
-    mechLaddVol->AddNode(plate4,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
+    mechStavVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
+    mechStavVol->AddNode(plate4,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
     //wall side in
     TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50);
     TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K);
     plate5->SetFillColor(12);
     plate5->SetLineColor(12);
-    mechLaddVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
-    mechLaddVol->AddNode(plate5,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+0.03+0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
+    mechStavVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
+    mechStavVol->AddNode(plate5,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+0.03+0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
 
      //Amec Thermasol red-2 cover tube FGS300
     TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180);
     TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
     cone11->SetFillColor(2);
     cone11->SetLineColor(2);
-    mechLaddVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
-    mechLaddVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
+    mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
+    mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
 
     TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50);
     TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
     plate2->SetFillColor(2);
     plate2->SetLineColor(2);
-    mechLaddVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
+    mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
 
     TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50);
     TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
     plate21->SetFillColor(2);
     plate21->SetLineColor(2);
-    mechLaddVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
-    mechLaddVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
+    mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
+    mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
 
     TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50);
     TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
     plate22->SetFillColor(2);
     plate22->SetLineColor(2);
-    mechLaddVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-    mechLaddVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-    mechLaddVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-    mechLaddVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+    mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
 
     //C Fleece
     TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180); 
     TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece);
     cone12->SetFillColor(28);
     cone12->SetLineColor(28);
-    mechLaddVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
-    mechLaddVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
+    mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
+    mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
 
     TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50);
     TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece);
     plate3->SetFillColor(28);
     plate3->SetLineColor(28);
-    mechLaddVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
+    mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
 
     TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50);
     TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece);
     plate31->SetFillColor(28);
     plate31->SetLineColor(28);
-    mechLaddVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
-    mechLaddVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
+    mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
+    mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
 
     TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50);
     TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece);
     plate32->SetFillColor(28);
     plate32->SetLineColor(28);
-    mechLaddVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-    mechLaddVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-    mechLaddVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-    mechLaddVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+    mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
 
 
     //K13D2U carbon plate
@@ -1114,52 +1114,52 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
     TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k);
     plate1->SetFillColor(5);
     plate1->SetLineColor(5);
-    mechLaddVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
+    mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
 
     //C Fleece bottom plate 
     TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50);
     TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece);
     plate6->SetFillColor(2);
     plate6->SetLineColor(2);
-    mechLaddVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
+    mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
       
       
   }
 
   if (fBuildLevel < 2) {
     //Glue layers and kapton
-    TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zlad);
+    TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta);
     TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
     volGlue->SetLineColor(5);
     volGlue->SetFillColor(5); 
-    mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
-    mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
   }
 
   if (fBuildLevel < 1) {
-    TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zlad);
+    TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta);
     TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
     volCable->SetLineColor(28);
     volCable->SetFillColor(28); 
-    mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+0.01+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
+    mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+0.01+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
   }
     
 
   // Done, return the stave structure
-  return mechLaddVol;
+  return mechStavVol;
   
 }
 // new model22
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
-                                                    const Double_t zlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xsta,
+                                                    const Double_t zsta,
                                                     const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 2.2 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1186,8 +1186,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
   // Local parameters
   Double_t kConeOutRadius =0.107/2;//0.107/2;
   Double_t kConeInRadius = 0.1015/2;//0.10105/2
-  Double_t kStaveLength = zlad;
-  Double_t kStaveWidth = xlad*2;
+  Double_t kStaveLength = zsta;
+  Double_t kStaveWidth = xsta*2;
   Double_t kWidth = (kStaveWidth)/4;
   Double_t kStaveHeight = 0.283;//0.33;
   Double_t kHeight = (kStaveHeight)/2;
@@ -1212,11 +1212,11 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
   Int_t  loop = (Int_t)(kStaveLength/(2*kL1));
 
   char volname[30];
-  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+  snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
 
   Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0;
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   if (fBuildLevel < 5) {
     // world (trapezoid)
@@ -1230,18 +1230,18 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
     mechStruct->DefineSection(0,-kStaveLength,0,0,1.);
     mechStruct->DefineSection(1,kStaveLength,0,0,1.);
 
-    mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-    mechLaddVol->SetLineColor(12);
-    mechLaddVol->SetFillColor(12); 
-    mechLaddVol->SetVisibility(kTRUE);  
+    mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+    mechStavVol->SetLineColor(12);
+    mechStavVol->SetFillColor(12); 
+    mechStavVol->SetVisibility(kTRUE);  
       
     //Polyimide Pipe Kapton grey-35 
     TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001);
     TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
     volCone1->SetFillColor(35);
     volCone1->SetLineColor(35);
-    mechLaddVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
-    mechLaddVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
     }
 
   if (fBuildLevel < 4) {
@@ -1249,8 +1249,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
     TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
     volCoolTubeW->SetFillColor(4);
     volCoolTubeW->SetLineColor(4);
-    mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
-    mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
+    mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
   }
 
   if (fBuildLevel < 3) {
@@ -1262,13 +1262,13 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
     volT2->SetFillColor(12); 
     for(int i=0;i<loop;i++){// i<28;i++){
       // 1) Front Left Top Filament
-       mechLaddVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
+       mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
       // 2) Front Right Top Filament
-      mechLaddVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
+      mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
       // 3) Back Left  Top Filament
-      mechLaddVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
+      mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
       // 4) Back Right Top Filament
-      mechLaddVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
+      mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
    }
  
      //Vertex  structure 
@@ -1278,131 +1278,131 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
       TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K);
       ibdv->SetFillColor(12);
       ibdv->SetLineColor(12);
-      mechLaddVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
+      mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
 
       //left trd2
       TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
       TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K);
       ibdv2->SetFillColor(12);
       ibdv2->SetLineColor(12);
-      mechLaddVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0355,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355,
+      mechStavVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0355,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355,
 
       //right trd3
       TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
       TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K);
       ibdv3->SetFillColor(12);
       ibdv3->SetLineColor(12);
-      mechLaddVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0355,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C
+      mechStavVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0355,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C
       
      //Carbon Fleece
-      TGeoConeSeg *cons2 = new TGeoConeSeg(zlad,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180); 
+      TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180); 
       TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece);
       cone12->SetFillColor(28);
       cone12->SetLineColor(28);
-      mechLaddVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
-      mechLaddVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
+      mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
+      mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
 
-      TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zlad);//kStaveLength-0.50);
+      TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50);
       TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece);
       plate3->SetFillColor(28);
       plate3->SetLineColor(28);
-      mechLaddVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
+      mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
 
-      TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zlad);
+      TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta);
       TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece);
       plate31->SetFillColor(28);
       plate31->SetLineColor(28);
-      mechLaddVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
-      mechLaddVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
+      mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
+      mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
 
-      TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zlad);
+      TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta);
       TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece);
       plate32->SetFillColor(28);
       plate32->SetLineColor(28);
-      mechLaddVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-      mechLaddVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-      mechLaddVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
-      mechLaddVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
+      mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
 
      //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper
-      TGeoConeSeg *cons1 = new TGeoConeSeg(zlad,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
+      TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
       TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
       cone11->SetFillColor(2);
       cone11->SetLineColor(2);
-      mechLaddVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
-      mechLaddVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
+      mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
+      mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
 
-      TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zlad);//kStaveLength-0.50);
+      TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50);
       TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
       plate2->SetFillColor(2);
       plate2->SetLineColor(2);
-      mechLaddVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
+      mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
 
-      TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zlad);
+      TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta);
       TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
       plate21->SetFillColor(2);
       plate21->SetLineColor(2);
-      mechLaddVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
-      mechLaddVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(klay1/2)-0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
+      mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
+      mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(klay1/2)-0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
 
-      TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zlad);
+      TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta);
       TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
       plate22->SetFillColor(2);
       plate22->SetLineColor(2);
-      mechLaddVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-      mechLaddVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-      mechLaddVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
-      mechLaddVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
+      mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
 
      //K13D2U CF plate
-      TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zlad);
+      TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta);
       TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k);
       plate1->SetFillColor(5);
       plate1->SetLineColor(5);
-      mechLaddVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
+      mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
 
      //C Fleece bottom plate 
-      TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zlad);
+      TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta);
       TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece);
       plate6->SetFillColor(2);
       plate6->SetLineColor(2);
-      mechLaddVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
+      mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
 
     }
    if (fBuildLevel < 2) {
       //Glue klayers and kapton
-     TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zlad);
+     TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta);
       TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
       volGlue->SetLineColor(5);
       volGlue->SetFillColor(5); 
-      // mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
+      // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
     }
 
      if (fBuildLevel < 1) {
      //Flex Cable or Bus
-      TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zlad);//klay5/2
+      TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2
       TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
       volCable->SetLineColor(28);
       volCable->SetFillColor(28); 
-      //      mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
+      //      mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
       }
     // Done, return the stave structe
-    return mechLaddVol;
+    return mechStavVol;
 }
 
 // model3
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
-                                                   const Double_t zlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xsta,
+                                                   const Double_t zsta,
                                                    const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for Model 3 of TDR
 //
 // Input:
-//         xlad : X length
-//         zlad : Z length
+//         xsta : X length
+//         zsta : Z length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1428,8 +1428,8 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
 
   // Local parameters
     Double_t kConeOutRadius = 0.15/2;
-    Double_t kStaveLength = zlad*2;
-    Double_t kStaveWidth = xlad*2;
+    Double_t kStaveLength = zsta*2;
+    Double_t kStaveWidth = xsta*2;
     Double_t w = kStaveWidth/4;//1/2 of W
     Double_t staveHeight = 0.3;
     Double_t h = staveHeight/2;
@@ -1447,9 +1447,9 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
        Double_t ang1 = 0*TMath::DegToRad();
        Double_t ang2 = 0*TMath::DegToRad();
        Double_t ang3 = 0*TMath::DegToRad();
-       Int_t modules = 4;
+       Int_t chips = 4;
        Double_t headWidth=0.25;
-       Double_t smcLength=kStaveLength/modules-2*headWidth;//6.25;
+       Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25;
        Double_t smcWidth=kStaveWidth;
        Double_t smcSide1Thick=0.03;
        Double_t vaporThick=0.032;
@@ -1462,7 +1462,7 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
 
 
     char volname[30];
-    snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
+    snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
     
     // detailed structure ++++++++++++++
     Double_t z=0, y=0-0.007, x=0;
@@ -1470,10 +1470,10 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
     // Polimide micro channels numbers
     Double_t yMC = y-h+0.01;
     Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
-    Double_t xladMC = (nb*0.1-0.08)/2;
+    Double_t xstaMC = (nb*0.1-0.08)/2;
 
 
-    TGeoVolume *mechLaddVol = 0;
+    TGeoVolume *mechStavVol = 0;
     if (fBuildLevel < 5) {
       // world (trapezoid)
       TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
@@ -1482,10 +1482,10 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       mechStruct->DefinePolygon(5,xv,yv);
       mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
       mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
-      mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
-      mechLaddVol->SetLineColor(12);
-      mechLaddVol->SetFillColor(12); 
-      mechLaddVol->SetVisibility(kTRUE);
+      mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
+      mechStavVol->SetLineColor(12);
+      mechStavVol->SetFillColor(12); 
+      mechStavVol->SetVisibility(kTRUE);
 
        // Silicon micro channels numbers
       
@@ -1494,79 +1494,79 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       volTM0a->SetLineColor(35);
       volTM0a->SetFillColor(35); 
 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
-      mechLaddVol->AddNode(volTM0a, 1, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
+      mechStavVol->AddNode(volTM0a, 1, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
       }
       TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton);
       volTM0c->SetLineColor(35);
       volTM0c->SetFillColor(35); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));
-      mechLaddVol->AddNode(volTM0c, 1, new TGeoCombiTrans(x-(smcWidth/2)+(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));
+      mechStavVol->AddNode(volTM0c, 1, new TGeoCombiTrans(x-(smcWidth/2)+(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton);
       volTM0c1->SetLineColor(6);
       volTM0c1->SetFillColor(6); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0c1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0c1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton);
       volTM0c2->SetLineColor(35);
       volTM0c2->SetFillColor(35); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0c2, 0, new TGeoCombiTrans(x+smcWidth/2-(0.072/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0c2, 0, new TGeoCombiTrans(x+smcWidth/2-(0.072/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2);
       TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton);
       volTM0c2r->SetLineColor(35);
       volTM0c2r->SetFillColor(35); 
-      for(Int_t  mo=1; mo<=modules; mo++) {      
-      mechLaddVol->AddNode(volTM0c2r, 0, new TGeoCombiTrans(x-smcWidth/2+(0.068/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {      
+      mechStavVol->AddNode(volTM0c2r, 0, new TGeoCombiTrans(x-smcWidth/2+(0.068/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2);
       TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton);
       volTM0d->SetLineColor(12);
       volTM0d->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0d, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0d, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
 
       TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2);
       TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton);
       volTM0d1->SetLineColor(12);
       volTM0d1->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0d1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0d1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2);
       TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton);
       volTM0d2->SetLineColor(12);
       volTM0d2->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d2, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d2, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2);
       TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton);
       volTM0d2r->SetLineColor(12);
       volTM0d2r->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0d2r, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0d2r, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2);
       TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton);    
       volTM0e->SetLineColor(12);
       volTM0e->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
+      for(Int_t  mo=1; mo<=chips; mo++) {
       for (Int_t ie=0;ie<11;ie++) {
-       mechLaddVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-       mechLaddVol->AddNode(volTM0e, 1, new TGeoCombiTrans(x+(ie*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+smcSpace+(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0e, 1, new TGeoCombiTrans(x+(ie*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+smcSpace+(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
          }
       }
       
@@ -1577,9 +1577,9 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick;
       volTM0f->SetLineColor(12);
       volTM0f->SetFillColor(12); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-       mechLaddVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-       mechLaddVol->AddNode(volTM0f, 1, new TGeoCombiTrans(x-smcCloseWallliquid+(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+       mechStavVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0f, 1, new TGeoCombiTrans(x-smcCloseWallliquid+(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       //Head(back) microchannel
 
@@ -1587,59 +1587,59 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton);
       volTM0hb->SetLineColor(4);
       volTM0hb->SetFillColor(4); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0hb, 1, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0hb, 1, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2);
       TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton);
       volTM0h1->SetLineColor(5);
       volTM0h1->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0h1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-headWidth+(0.05/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0h1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-headWidth+(0.05/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2);
       TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton);
       volTM0h2->SetLineColor(6);
       volTM0h2->SetFillColor(6);
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0h2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-0.02-(0.18/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0h2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-0.02-(0.18/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
       TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton);
       volTM0h3->SetLineColor(5);
       volTM0h3->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0h3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0h3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2);
       TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton);
       volTM0b1->SetLineColor(5);
       volTM0b1->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0b1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+headWidth-(0.03/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0b1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+headWidth-(0.03/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2);
       TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton);
       volTM0b2->SetLineColor(6);
       volTM0b2->SetFillColor(6); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0b2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+0.02+(0.2/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0b2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+0.02+(0.2/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
       TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton);
       volTM0b3->SetLineColor(5);
       volTM0b3->SetFillColor(5); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0b3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0b3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
      
-      TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zlad);
+      TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
       TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton);
       volTM0b->SetLineColor(35);
       volTM0b->SetFillColor(35); 
       for (Int_t ib=0;ib<nb;ib++) {
-       //mechLaddVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
+       //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
       }
       
       } 
@@ -1652,15 +1652,15 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater);
       volTM0dv->SetLineColor(2);
       volTM0dv->SetFillColor(2);
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0dv, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0dv, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2);
       TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater);
       volTM0dl->SetLineColor(3);
       volTM0dl->SetFillColor(3); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
-      mechLaddVol->AddNode(volTM0dl, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+      for(Int_t  mo=1; mo<=chips; mo++) {
+      mechStavVol->AddNode(volTM0dl, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       // small cooling fluid now using water wait for freeon value  
       TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
@@ -1671,10 +1671,10 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater);
       volTM0dvp->SetLineColor(2);
       volTM0dvp->SetFillColor(2); 
-      for(Int_t  mo=1; mo<=modules; mo++) {
+      for(Int_t  mo=1; mo<=chips; mo++) {
       for (Int_t is=0;is<12;is++) {
-       mechLaddVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
-       mechLaddVol->AddNode(volTM0dvp, 1, new TGeoCombiTrans(x-(is*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
+       mechStavVol->AddNode(volTM0dvp, 1, new TGeoCombiTrans(x-(is*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
       }
       }
 
@@ -1693,16 +1693,16 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       volT1->SetLineColor(12);
       volT1->SetFillColor(12); 
       for(int i=0;i<loop;i++){//i<30;i++){
-               mechLaddVol->AddNode(volT1,4*i+0,
+               mechStavVol->AddNode(volT1,4*i+0,
                                    new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, 
                                                       new TGeoRotation("volT1",-90,alpha,0)));
-       mechLaddVol->AddNode(volT1,4*i+1,
+       mechStavVol->AddNode(volT1,4*i+1,
                                    new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, 
                                                       new TGeoRotation("volT1",90,alpha,0)));
-       mechLaddVol->AddNode(volT1,4*i+2,
+       mechStavVol->AddNode(volT1,4*i+2,
                                    new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, 
                                                       new TGeoRotation("volT1",-90,-alpha,0)));
-       mechLaddVol->AddNode(volT1,4*i+3,
+       mechStavVol->AddNode(volT1,4*i+3,
                                    new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, 
                                                       new TGeoRotation("volT1",-90,+alpha,0)));
        }
@@ -1714,16 +1714,16 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
       volT2->SetLineColor(12);
       volT2->SetFillColor(12); 
       for(int i=0;i<loop;i++){ //i<30;i++){
-               mechLaddVol->AddNode(volT2,4*i+0,
+               mechStavVol->AddNode(volT2,4*i+0,
                                    new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
                                                       new TGeoRotation("volT2",90,90-alpha,90-beta)));
-       mechLaddVol->AddNode(volT2,4*i+1,
+       mechStavVol->AddNode(volT2,4*i+1,
                                    new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
                                                       new TGeoRotation("volT2",90,-90+alpha,-90+beta)));
-       mechLaddVol->AddNode(volT2,4*i+2,
+       mechStavVol->AddNode(volT2,4*i+2,
                                    new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
                                                       new TGeoRotation("volT2",90,-90+alpha,90-beta)));
-       mechLaddVol->AddNode(volT2,4*i+3,
+       mechStavVol->AddNode(volT2,4*i+3,
                                    new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, 
                                                       new TGeoRotation("volT2",90,90-alpha,-90+beta)));
        }
@@ -1732,50 +1732,50 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
     if (fBuildLevel < 2) {
 
       // Glue Filament and Silicon MicroChannel
-      TGeoBBox *tM0=new TGeoBBox(xladMC/5, klay4/2, zlad);
+      TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta);
       TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue );
       volTM0->SetLineColor(5);
       volTM0->SetFillColor(5); 
-      mechLaddVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xlad/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xlad/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
 
             
       // Glue microchannel and sensor
-      TGeoBBox *glueM = new TGeoBBox(xladMC/5, klay4/2, zlad);
+      TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta);
       TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue);
       volGlueM->SetLineColor(5);
       volGlueM->SetFillColor(5); 
-      mechLaddVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xlad/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
-      mechLaddVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xlad/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
      
        // Glue sensor and kapton
-      TGeoBBox *glue = new TGeoBBox(xlad, klay4/2, zlad);
+      TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta);
       TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue);
       volGlue->SetLineColor(5);
       volGlue->SetFillColor(5); 
-       mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
+       mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
     }      
 
     if (fBuildLevel < 1) {
-      TGeoBBox *kapCable = new TGeoBBox(xlad, klay5/2, zlad);
+      TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta);
       TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable);
       volCable->SetLineColor(28);
       volCable->SetFillColor(28); 
-      mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
+      mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
     }
 
   // Done, return the stave structur
-    return mechLaddVol;
+    return mechStavVol;
  }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const Double_t xlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const Double_t xsta,
                                              const TGeoManager *mgr){
 //
-// Create the module stave for the Outer Barrel
+// Create the chip stave for the Outer Barrel
 //
 // Input:
-//         xlad : X length
+//         xsta : X length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1785,24 +1785,24 @@ TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const Double_t xlad,
 // Created:      20 Dec 2013  Mario Sitta
 //
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   switch (fStaveModel) {
     case AliITSUv1::kOBModelDummy:
-      mechLaddVol = CreateStaveModelOuterBDummy(xlad,mgr);
+      mechStavVol = CreateStaveModelOuterBDummy(xsta,mgr);
       break;
     case AliITSUv1::kOBModel0:
-      mechLaddVol = CreateStaveModelOuterB0(xlad,mgr);
+      mechStavVol = CreateStaveModelOuterB0(xsta,mgr);
       break;
     case AliITSUv1::kOBModel1:
-      mechLaddVol = CreateStaveModelOuterB1(xlad,mgr);
+      mechStavVol = CreateStaveModelOuterB1(xsta,mgr);
       break;
     default:
       AliFatal(Form("Unknown stave model %d",fStaveModel));
       break;
   }
 
-  return mechLaddVol; 
+  return mechStavVol; 
 }
 
 //________________________________________________________________________
@@ -1812,7 +1812,7 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterBDummy(const Double_t ,
 // Create dummy stave
 //
 // Input:
-//         xlad : X length
+//         xsta : X length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1832,11 +1832,11 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const Double_t ,
                                                    const TGeoManager *) const {
 //
 // Creation of the mechanical stave structure for the Outer Barrel as in v0
-// is done directly in CreateLadder, so this method does nothing
+// is done directly in CreateStave, so this method does nothing
 // (doing it there is simpler, since all needed dimensions are known)
 //
 // Input:
-//         xlad : X length
+//         xsta : X length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1851,13 +1851,13 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const Double_t ,
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
+TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xsta,
                                                    const TGeoManager *mgr){
 //
 // Create the mechanical stave structure for the Outer Barrel as in TDR
 //
 // Input:
-//         xlad : X length
+//         xsta : X length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -1880,7 +1880,7 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
 
 
   // Local parameters
-  Double_t modGap             = fgkOBModuleGap;
+  Double_t modGap             = fgkOBChipGap;
   Double_t yFlex1             = fgkOBFlexCable1Thick;
   Double_t yFlex2             = fgkOBFlexCable2Thick;
   Double_t yBus1              = fgkOBBusCable1Thick;
@@ -1893,10 +1893,10 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
   Double_t flexOverlap        = 5;
   Double_t deltaY             = 0.176;
   Double_t xOverlap           = 0.23;       //overlapping of the halfStaves to cover the dead zone of sensors
-  Double_t zMod               = fgkOBModuleZLength;
+  Double_t zMod               = fgkOBChipZLength;
   Double_t xHalfSt            = fgkOBHalfStaveWidth/2;
   Double_t xPos               = xOverlap/2 - xHalfSt;
-  Double_t xlen               = xlad;
+  Double_t xlen               = xsta;
   Double_t rMin               = 0.267/2;
   Double_t rMax               = rMin + 0.0065;
   Double_t kLay1              = 0.004;      //carbon fleece
@@ -1909,12 +1909,12 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
   Double_t zlen;
 
 
-  if (fIsTurbo) xlen = 0.5*fLadderWidth;
-  //ylen    = 0.5*fLadderThick;
+  if (fIsTurbo) xlen = 0.5*fStaveWidth;
+  //ylen    = 0.5*fStaveThick;
   ymod    = 0.005/2;//0.5*fSensorThick;
   ylen    = 0.5*(2*kLay1+2*kLay2+2*rMax+yCPlate+yGlue+ yModPlate + ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2 + deltaY);
-  zact    = fNModules*zMod; //active area 
-  zbus    = zact + (fNModules-1)*modGap; 
+  zact    = fNChips*zMod; //active area 
+  zbus    = zact + (fNChips-1)*modGap; 
   zlen    = zbus/2;
 
 
@@ -1942,7 +1942,7 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
   TGeoBBox *mechStruct = new TGeoBBox("mechanicalStructure",xlen, ylen, 0.5*fZLength); 
 
 
-  TGeoVolume *modVol       = CreateModuleOuterB(xHalfSt, ymod, zMod);
+  TGeoVolume *modVol       = CreateChipOuterB(xHalfSt, ymod, zMod);
  
   TGeoVolume *coolTubeVol  = new TGeoVolume("CoolingTubeVol",coolTube,medKapton);
   TGeoVolume *coolTubeWVol = new TGeoVolume("CoolingTubeWaterVol",coolTubeW,medWater);
@@ -1963,11 +1963,11 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
   TGeoVolume *plate21Vol   = new TGeoVolume("CarbonFleeceLR2",box21,medFGS003);
   TGeoVolume *plate22Vol   = new TGeoVolume("CarbonFleeceMiddle2",box22,medFGS003);
   TGeoVolume *plate23Vol   = new TGeoVolume("CarbonFleeceVertical2",box23,medFGS003);
-  TGeoVolume *mechLaddVol  = new TGeoVolume("mechLadderVolume",mechStruct,medAir);
+  TGeoVolume *mechStavVol  = new TGeoVolume("mechStaveVolume",mechStruct,medAir);
 
-  mechLaddVol->SetLineColor(12);
-  mechLaddVol->SetFillColor(12); 
-  mechLaddVol->SetVisibility(kTRUE);
+  mechStavVol->SetLineColor(12);
+  mechStavVol->SetFillColor(12); 
+  mechStavVol->SetVisibility(kTRUE);
 
   modVol->SetVisibility(kTRUE);
   flex1_5cmVol->SetLineColor(kRed);
@@ -1993,124 +1993,124 @@ TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
 
   //Carbon Fleece
 
-  mechLaddVol->AddNode(plate11Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
-  mechLaddVol->AddNode(plate11Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
-  mechLaddVol->AddNode(plate11Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
-  mechLaddVol->AddNode(plate11Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
-  mechLaddVol->AddNode(plate12Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
-  mechLaddVol->AddNode(plate12Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2 + deltaY,0));
-  mechLaddVol->AddNode(plate13Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
-  mechLaddVol->AddNode(plate13Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
-  mechLaddVol->AddNode(plate13Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
-  mechLaddVol->AddNode(plate13Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
-  mechLaddVol->AddNode(plate13Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
-  mechLaddVol->AddNode(plate13Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
-  mechLaddVol->AddNode(plate13Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
-  mechLaddVol->AddNode(plate13Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
-
-  mechLaddVol->AddNode(cone1Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(cone1Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(cone1Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
-  mechLaddVol->AddNode(cone1Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(plate11Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
+  mechStavVol->AddNode(plate11Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
+  mechStavVol->AddNode(plate11Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
+  mechStavVol->AddNode(plate11Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
+  mechStavVol->AddNode(plate12Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
+  mechStavVol->AddNode(plate12Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2 + deltaY,0));
+  mechStavVol->AddNode(plate13Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
+  mechStavVol->AddNode(plate13Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
+  mechStavVol->AddNode(plate13Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
+  mechStavVol->AddNode(plate13Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
+  mechStavVol->AddNode(plate13Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
+  mechStavVol->AddNode(plate13Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
+  mechStavVol->AddNode(plate13Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
+  mechStavVol->AddNode(plate13Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
+
+  mechStavVol->AddNode(cone1Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(cone1Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(cone1Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(cone1Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
 
 
   //Carbon Paper
 
-  mechLaddVol->AddNode(plate21Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box21->GetDX()),-ylen + yPos +2*rMax-kLay2/2,0));
-  mechLaddVol->AddNode(plate21Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2,0));
-  mechLaddVol->AddNode(plate21Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
-  mechLaddVol->AddNode(plate21Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
-  mechLaddVol->AddNode(plate22Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2/2,0));
-  mechLaddVol->AddNode(plate22Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2/2 + deltaY,0));
-  mechLaddVol->AddNode(plate23Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
-  mechLaddVol->AddNode(plate23Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
-  mechLaddVol->AddNode(plate23Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
-  mechLaddVol->AddNode(plate23Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
-  mechLaddVol->AddNode(plate23Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
-  mechLaddVol->AddNode(plate23Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
-  mechLaddVol->AddNode(plate23Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
-  mechLaddVol->AddNode(plate23Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
-
-  mechLaddVol->AddNode(cone2Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(cone2Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(cone2Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
-  mechLaddVol->AddNode(cone2Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(plate21Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box21->GetDX()),-ylen + yPos +2*rMax-kLay2/2,0));
+  mechStavVol->AddNode(plate21Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2,0));
+  mechStavVol->AddNode(plate21Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
+  mechStavVol->AddNode(plate21Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
+  mechStavVol->AddNode(plate22Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2/2,0));
+  mechStavVol->AddNode(plate22Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2/2 + deltaY,0));
+  mechStavVol->AddNode(plate23Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
+  mechStavVol->AddNode(plate23Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
+  mechStavVol->AddNode(plate23Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
+  mechStavVol->AddNode(plate23Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
+  mechStavVol->AddNode(plate23Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
+  mechStavVol->AddNode(plate23Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
+  mechStavVol->AddNode(plate23Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
+  mechStavVol->AddNode(plate23Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
+
+  mechStavVol->AddNode(cone2Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(cone2Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(cone2Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(cone2Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
 
   //Cooling Tubes + water
 
-  mechLaddVol->AddNode(coolTubeVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(coolTubeWVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(coolTubeVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(coolTubeWVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
-  mechLaddVol->AddNode(coolTubeVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
-  mechLaddVol->AddNode(coolTubeWVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
-  mechLaddVol->AddNode(coolTubeVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
-  mechLaddVol->AddNode(coolTubeWVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(coolTubeVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(coolTubeWVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(coolTubeVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(coolTubeWVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
+  mechStavVol->AddNode(coolTubeVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(coolTubeWVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(coolTubeVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
+  mechStavVol->AddNode(coolTubeWVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
 
   //Cold Plate
 
-  mechLaddVol->AddNode(coldPlateVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate/2,0));
-  mechLaddVol->AddNode(coldPlateVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate/2 + deltaY,0));
+  mechStavVol->AddNode(coldPlateVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate/2,0));
+  mechStavVol->AddNode(coldPlateVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate/2 + deltaY,0));
 
   //Glue
 
-  mechLaddVol->AddNode(glueVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2,0));
-  mechLaddVol->AddNode(glueVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2 + deltaY,0));
+  mechStavVol->AddNode(glueVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2,0));
+  mechStavVol->AddNode(glueVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2 + deltaY,0));
 
-  //Module Carbon Plate
+  //Chip Carbon Plate
 
-  mechLaddVol->AddNode(modPlateVol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2,0));
-  mechLaddVol->AddNode(modPlateVol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2 + deltaY,0));
+  mechStavVol->AddNode(modPlateVol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2,0));
+  mechStavVol->AddNode(modPlateVol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2 + deltaY,0));
 
   //Bus
 
-  mechLaddVol->AddNode(bus1Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2,0));
-  mechLaddVol->AddNode(bus1Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2 + deltaY,0));
-  mechLaddVol->AddNode(bus2Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2,0));
-  mechLaddVol->AddNode(bus2Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2 + deltaY,0));
+  mechStavVol->AddNode(bus1Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2,0));
+  mechStavVol->AddNode(bus1Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2 + deltaY,0));
+  mechStavVol->AddNode(bus2Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2,0));
+  mechStavVol->AddNode(bus2Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2 + deltaY,0));
   
-  //FPC + modules
+  //FPC + chips
 
-  for (Int_t j=0; j<fNModules; j++) {
+  for (Int_t j=0; j<fNChips; j++) {
 
-    zpos = -(zact + (fNModules-1)*modGap)/2 + j*(zMod + modGap) + zMod/2;
-    zpos5cm = -(zact + (fNModules-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ;
+    zpos = -(zact + (fNChips-1)*modGap)/2 + j*(zMod + modGap) + zMod/2;
+    zpos5cm = -(zact + (fNChips-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ;
 
-    mechLaddVol->AddNode(modVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod, zpos));
-    mechLaddVol->AddNode(modVol, fNModules+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos));
-    mechLaddVol->AddNode(flex1Vol,j,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos));
-    mechLaddVol->AddNode(flex1Vol,fNModules+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 + deltaY,zpos));
-    mechLaddVol->AddNode(flex2Vol,j,new TGeoTranslation(xPos, -ylen + yPos + yModPlate + 2*rMax + yCPlate + yGlue + 2*ymod + yFlex1 + yFlex2/2,zpos));
-    mechLaddVol->AddNode(flex2Vol,fNModules+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 + deltaY,zpos));
+    mechStavVol->AddNode(modVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod, zpos));
+    mechStavVol->AddNode(modVol, fNChips+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos));
+    mechStavVol->AddNode(flex1Vol,j,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos));
+    mechStavVol->AddNode(flex1Vol,fNChips+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 + deltaY,zpos));
+    mechStavVol->AddNode(flex2Vol,j,new TGeoTranslation(xPos, -ylen + yPos + yModPlate + 2*rMax + yCPlate + yGlue + 2*ymod + yFlex1 + yFlex2/2,zpos));
+    mechStavVol->AddNode(flex2Vol,fNChips+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 + deltaY,zpos));
 
-    if((j+1)!=fNModules){
-      mechLaddVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm));
-      mechLaddVol->AddNode(flex1_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm));
-      mechLaddVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm));
-      mechLaddVol->AddNode(flex2_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm));
+    if((j+1)!=fNChips){
+      mechStavVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm));
+      mechStavVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm));
+      mechStavVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm));
+      mechStavVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm));
     }
     else {
-      mechLaddVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap));
-      mechLaddVol->AddNode(flex1_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap));
-      mechLaddVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap));
-      mechLaddVol->AddNode(flex2_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap));
+      mechStavVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap));
+      mechStavVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap));
+      mechStavVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap));
+      mechStavVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap));
 
       }
   }
   
 
   // Done, return the stave structur
-  return mechLaddVol;
+  return mechStavVol;
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const Double_t xlad,
+TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const Double_t xsta,
                                                   const TGeoManager *mgr){
 //
 // Create the space frame for the Outer Barrel
 //
 // Input:
-//         xlad : X length
+//         xsta : X length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -2119,21 +2119,21 @@ TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const Double_t xlad,
 //
 //
 
-  TGeoVolume *mechLaddVol = 0;
+  TGeoVolume *mechStavVol = 0;
 
   switch (fStaveModel) {
     case AliITSUv1::kOBModelDummy:
-      mechLaddVol = CreateSpaceFrameOuterBDummy(xlad,mgr);
+      mechStavVol = CreateSpaceFrameOuterBDummy(xsta,mgr);
       break;
     case AliITSUv1::kOBModel1:
-      mechLaddVol = CreateSpaceFrameOuterB0(xlad,mgr);
+      mechStavVol = CreateSpaceFrameOuterB0(xsta,mgr);
       break;
     default:
       AliFatal(Form("Unknown stave model %d",fStaveModel));
       break;
   }
 
-  return mechLaddVol; 
+  return mechStavVol; 
 }
 
 //________________________________________________________________________
@@ -2143,7 +2143,7 @@ TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterBDummy(const Double_t ,
 // Create dummy stave
 //
 // Input:
-//         xlad : X length
+//         xsta : X length
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -2182,40 +2182,40 @@ TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB0(const Double_t xlen,
 
 
   // Local parameters
-  Double_t ladderWidth        = 4.2;
-  Double_t ladderHeight       = 4.2;
-//  Double_t ladderSegBoxDW     = 7.5;
-//  Double_t ladderSegBoxDH     = 7.1;
-  Double_t ladderBeamRadius   = 0.06;
-  Double_t ladderLa           = 0.3;
-  Double_t ladderHa           = 0.0721979;
-  Double_t ladderLb           = 0.37;
-  Double_t ladderHb           = 0.0890428;
-  Double_t ladderl            = 0.025;
+  Double_t staveWidth        = 4.2;
+  Double_t staveHeight       = 4.2;
+//  Double_t staveSegBoxDW     = 7.5;
+//  Double_t staveSegBoxDH     = 7.1;
+  Double_t staveBeamRadius   = 0.06;
+  Double_t staveLa           = 0.3;
+  Double_t staveHa           = 0.0721979;
+  Double_t staveLb           = 0.37;
+  Double_t staveHb           = 0.0890428;
+  Double_t stavel            = 0.025;
   Double_t beamSidePhi        = 65;
-  Double_t bottomBeamAngle    = 61.5; //56.5;
-//  Double_t dy                 = ladderSegBoxDH/2;
-  Double_t triangleHeight     = ladderHeight - ladderBeamRadius;
-  Double_t halfTheta          = TMath::ATan( 0.5*ladderWidth/triangleHeight );
+  Double_t bottomBeamAngle    = 56.5;
+//  Double_t dy                 = staveSegBoxDH/2;
+  Double_t triangleHeight     = staveHeight - staveBeamRadius;
+  Double_t halfTheta          = TMath::ATan( 0.5*staveWidth/triangleHeight );
   Double_t alpha              = TMath::Pi()*3./4. - halfTheta/2.;
   Double_t beta               = (TMath::Pi() - 2.*halfTheta)/4.;
-//  Double_t dYTranslation      = (ladderHeight/2. -0.5*ladderWidth*TMath::Tan(beta)-ladderBeamRadius);
-  Double_t distCenterSideDown =  0.5*ladderWidth/TMath::Cos(beta);
+//  Double_t dYTranslation      = (staveHeight/2. -0.5*staveWidth*TMath::Tan(beta)-staveBeamRadius);
+  Double_t distCenterSideDown =  0.5*staveWidth/TMath::Cos(beta);
   Double_t zact;
   Double_t zbus;
   Double_t zlen;
   Double_t seglen;    
 
 
-  zact    = fNModules*fgkOBModuleZLength; //active area 
-  zbus    = zact + (fNModules-1)*fgkOBModuleGap; 
+  zact    = fNChips*fgkOBChipZLength; //active area 
+  zbus    = zact + (fNChips-1)*fgkOBChipGap; 
   zlen    = zbus/2;
   seglen  = zlen/10;
 
   // First create all needed shapes and volumes
 
   TGeoBBox *spaceFrame = new TGeoBBox("CarbonFrame",xlen, 2.2, zlen);
-  TGeoBBox *segment    = new TGeoBBox(ladderWidth/2,ladderHeight/2,seglen/2);
+  TGeoBBox *segment    = new TGeoBBox(staveWidth/2,staveHeight/2,seglen/2);
 
   TGeoVolume *spaceFrameVol = new TGeoVolume("CarbonFrameVolume",
                                             spaceFrame, medAir);
@@ -2225,42 +2225,42 @@ TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB0(const Double_t xlen,
 
   //SpaceFrame
 
-  //--- the top V of the Carbon Fiber Ladder (segment)
-  TGeoArb8 *cfLaddTop1 = CreateLadderSide("CFladdTopCornerVol1shape", seglen/2., halfTheta, -1, ladderLa, ladderHa, ladderl);
-  TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerVol1", cfLaddTop1,medCarbon);
-  TGeoArb8 *cfLaddTop2 = CreateLadderSide( "CFladdTopCornerVol2shape", seglen/2., halfTheta, 1, ladderLa, ladderHa, ladderl);
-  TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerVol2",cfLaddTop2,medCarbon );
+  //--- the top V of the Carbon Fiber Stave (segment)
+  TGeoArb8 *cfStavTop1 = CreateStaveSide("CFstavTopCornerVol1shape", seglen/2., halfTheta, -1, staveLa, staveHa, stavel);
+  TGeoVolume *cfStavTopVol1 = new TGeoVolume("ITSsddCFstavTopCornerVol1", cfStavTop1,medCarbon);
+  TGeoArb8 *cfStavTop2 = CreateStaveSide( "CFstavTopCornerVol2shape", seglen/2., halfTheta, 1, staveLa, staveHa, stavel);
+  TGeoVolume *cfStavTopVol2 = new TGeoVolume("ITSsddCFstavTopCornerVol2",cfStavTop2,medCarbon );
 
-  //TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkLadderHeight/2-dy, 0);
-  TGeoTranslation *trTop1 = new TGeoTranslation(0, ladderHeight/2, 0);
+  //TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkStaveHeight/2-dy, 0);
+  TGeoTranslation *trTop1 = new TGeoTranslation(0, staveHeight/2, 0);
   
   //--- the 2 side V
-  TGeoArb8 *cfLaddSide1 = CreateLadderSide( "CFladdSideCornerVol1shape", seglen/2., beta, -1,ladderLb, ladderHb, ladderl);
-  TGeoVolume *cfLaddSideVol1 = new TGeoVolume( "ITSsddCFladdSideCornerVol1", cfLaddSide1,medCarbon);
-  TGeoArb8 *cfLaddSide2 = CreateLadderSide( "CFladdSideCornerVol2shape", seglen/2., beta, 1, ladderLb, ladderHb, ladderl);
-  TGeoVolume *cfLaddSideVol2 = new TGeoVolume( "ITSsddCFladdSideCornerVol2", cfLaddSide2,medCarbon );
+  TGeoArb8 *cfStavSide1 = CreateStaveSide( "CFstavSideCornerVol1shape", seglen/2., beta, -1,staveLb, staveHb, stavel);
+  TGeoVolume *cfStavSideVol1 = new TGeoVolume( "ITSsddCFstavSideCornerVol1", cfStavSide1,medCarbon);
+  TGeoArb8 *cfStavSide2 = CreateStaveSide( "CFstavSideCornerVol2shape", seglen/2., beta, 1, staveLb, staveHb, stavel);
+  TGeoVolume *cfStavSideVol2 = new TGeoVolume( "ITSsddCFstavSideCornerVol2", cfStavSide2,medCarbon );
 
   
   TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,alpha*TMath::RadToDeg());
   //AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation-dy, 0);
-  AddTranslationToCombiTrans(ctSideR, 0, ladderHeight/2-2.85/*2.765250*//*triangleHeight*/, 0);
+  AddTranslationToCombiTrans(ctSideR, 0, staveHeight/2-2.85/*2.765250*//*triangleHeight*/, 0);
   TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown,0,-alpha*TMath::RadToDeg());
   //AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation-dy, 0);
-  AddTranslationToCombiTrans(ctSideL, 0, ladderHeight/2-2.85/*triangleHeight*/, 0);
+  AddTranslationToCombiTrans(ctSideL, 0, staveHeight/2-2.85/*triangleHeight*/, 0);
 
-  segmentVol->AddNode(cfLaddTopVol1,1,trTop1);
-  segmentVol->AddNode(cfLaddTopVol2,1,trTop1);
-  segmentVol->AddNode(cfLaddSideVol1,1,ctSideR);
-  segmentVol->AddNode(cfLaddSideVol1,2,ctSideL);
-  segmentVol->AddNode(cfLaddSideVol2,1,ctSideR);
-  segmentVol->AddNode(cfLaddSideVol2,2,ctSideL);
+  segmentVol->AddNode(cfStavTopVol1,1,trTop1);
+  segmentVol->AddNode(cfStavTopVol2,1,trTop1);
+  segmentVol->AddNode(cfStavSideVol1,1,ctSideR);
+  segmentVol->AddNode(cfStavSideVol1,2,ctSideL);
+  segmentVol->AddNode(cfStavSideVol2,1,ctSideR);
+  segmentVol->AddNode(cfStavSideVol2,2,ctSideL);
 
 
   //--- The beams
   // Beams on the sides
   Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*TMath::Sin(2*beta)/(TanD(beamSidePhi)*TanD(beamSidePhi))) ));
-  Double_t beamLength = TMath::Sqrt( ladderHeight*ladderHeight/( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))+ ladderWidth*ladderWidth/4.)-ladderLa/2-ladderLb/2;
-  TGeoTubeSeg *sideBeamS = new TGeoTubeSeg(0, ladderBeamRadius,beamLength/2.,0, 180);
+  Double_t beamLength = TMath::Sqrt( staveHeight*staveHeight/( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))+ staveWidth*staveWidth/4.)-staveLa/2-staveLb/2;
+  TGeoTubeSeg *sideBeamS = new TGeoTubeSeg(0, staveBeamRadius,beamLength/2.,0, 180);
   TGeoVolume *sideBeam = new TGeoVolume("ITSsddCFSideBeamVol", sideBeamS,medCarbon);
 
   //Euler rotation : about Z, then new X, then new Z
@@ -2270,48 +2270,48 @@ TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB0(const Double_t xlen,
   TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),-beamPhiPrime*TMath::RadToDeg(),-90);
 
   TGeoCombiTrans *beamTransf[8];
-  beamTransf[0] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot1);
+  beamTransf[0] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot1);
 
-  beamTransf[1] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot1);
+  beamTransf[1] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot1);
   AddTranslationToCombiTrans(beamTransf[1], 0, 0, seglen/2);
 
-  beamTransf[2] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-seglen/8, beamRot2);
+  beamTransf[2] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-seglen/8, beamRot2);
 
-  beamTransf[3] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-seglen/8, beamRot2);
+  beamTransf[3] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-seglen/8, beamRot2);
   AddTranslationToCombiTrans(beamTransf[3], 0, 0, seglen/2);
 
-  beamTransf[4] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot3);
+  beamTransf[4] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot3);
 
-  beamTransf[5] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot3);
+  beamTransf[5] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot3);
   AddTranslationToCombiTrans(beamTransf[5], 0, 0, seglen/2);
 
-  beamTransf[6] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),ladderBeamRadius/2., -seglen/8,beamRot4);
-  beamTransf[7] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),ladderBeamRadius/2.,3*seglen/8,beamRot4);
+  beamTransf[6] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),staveBeamRadius/2., -seglen/8,beamRot4);
+  beamTransf[7] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),staveBeamRadius/2.,3*seglen/8,beamRot4);
 
   //--- Beams of the bottom
-  TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, ladderBeamRadius,ladderWidth/2.-ladderLb/3, 0, 180);
+  TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, staveBeamRadius,staveWidth/2.-staveLb/3, 0, 180);
   TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol", bottomBeam1, medCarbon);
-  TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, ladderBeamRadius,ladderWidth/2.-ladderLb/3, 0, 90);
+  TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, staveBeamRadius,staveWidth/2.-staveLb/3, 0, 90);
   TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",bottomBeam2, medCarbon);
-  TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, ladderBeamRadius,0.5*ladderWidth/SinD(bottomBeamAngle) - ladderLb/3, 0, 180);
+  TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, staveBeamRadius,0.5*staveWidth/SinD(bottomBeamAngle) - staveLb/3, 0, 180);
   TGeoVolume *bottomBeam3Vol = new TGeoVolume("ITSsddBottomBeam3Vol", bottomBeam3, medCarbon);
   TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90,  90);
   TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90);
 
-  TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans("",0,-(ladderHeight/2-ladderBeamRadius),0, bottomBeamRot1);
-  TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius),-seglen/2, bottomBeamRot1);
-  TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius), seglen/2, bottomBeamRot2);
+  TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans("",0,-(staveHeight/2-staveBeamRadius),0, bottomBeamRot1);
+  TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius),-seglen/2, bottomBeamRot1);
+  TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius), seglen/2, bottomBeamRot2);
   // be careful for beams #3: when "reading" from -z to +z and 
-  // from the bottom of the ladder, it should draw a Lambda, and not a V
+  // from the bottom of the stave, it should draw a Lambda, and not a V
   TGeoRotation *bottomBeamRot4 = new TGeoRotation("", -90, bottomBeamAngle, -90);
   TGeoRotation *bottomBeamRot5 = new TGeoRotation("" ,-90,-bottomBeamAngle, -90);
-  TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius),-seglen/4,bottomBeamRot4);
-  TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius),seglen/4, bottomBeamRot5);
+  TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius),-seglen/4,bottomBeamRot4);
+  TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius),seglen/4, bottomBeamRot5);
 
-  cfLaddTopVol1->SetLineColor(35);
-  cfLaddTopVol2->SetLineColor(35);
-  cfLaddSideVol1->SetLineColor(35);
-  cfLaddSideVol2->SetLineColor(35);
+  cfStavTopVol1->SetLineColor(35);
+  cfStavTopVol2->SetLineColor(35);
+  cfStavSideVol1->SetLineColor(35);
+  cfStavSideVol2->SetLineColor(35);
   sideBeam->SetLineColor(35);
   bottomBeam1Vol->SetLineColor(35);
   bottomBeam2Vol->SetLineColor(35);
@@ -2343,15 +2343,15 @@ TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB0(const Double_t xlen,
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(const Double_t xlad,
-                                              const Double_t ylad,   
-                                              const Double_t zlad,
+TGeoVolume* AliITSUv1Layer::CreateChipInnerB(const Double_t xsta,
+                                              const Double_t ysta,   
+                                              const Double_t zsta,
                                               const TGeoManager *mgr){
 //
-// Creates the actual Module
+// Creates the actual Chip
 //
 // Input:
-//         xlad,zlad : the ladder dimensions
+//         xsta,zsta : the stave dimensions
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -2368,13 +2368,13 @@ TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(const Double_t xlad,
 
   // First create all needed shapes
 
-  // The module
-  TGeoBBox *module = new TGeoBBox(xlad,  ylad, zlad/fNModules);
+  // The chip
+  TGeoBBox *chip = new TGeoBBox(xsta,  ysta, zsta/fNChips);
 
   // The sensor
-  xlen = module->GetDX();
+  xlen = chip->GetDX();
   ylen = 0.5*fSensorThick;
-  zlen = module->GetDZ();
+  zlen = chip->GetDZ();
   TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
 
 
@@ -2382,9 +2382,9 @@ TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(const Double_t xlad,
   //TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
   TGeoMedium *medSi  = mgr->GetMedium("ITS_SI$");
 
-  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
-  // TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
-  TGeoVolume *modVol = new TGeoVolume(volname, module, medSi);
+  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
+  // TGeoVolume *modVol = new TGeoVolume(volname, chip, medAir);
+  TGeoVolume *modVol = new TGeoVolume(volname, chip, medSi);
   modVol->SetVisibility(kTRUE);
   modVol->SetLineColor(1);
 
@@ -2397,27 +2397,27 @@ TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(const Double_t xlad,
   sensVol->SetFillStyle(4000); // 0% transparent
 
 
-  // Now build up the module
+  // Now build up the chip
   xpos = 0.;
-  ypos = -module->GetDY() + sensor->GetDY();
+  ypos = -chip->GetDY() + sensor->GetDY();
   zpos = 0.;
 
   modVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos));
 
-  // Done, return the module
+  // Done, return the chip
   return modVol;
 }
 
 //________________________________________________________________________
-TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const Double_t xlad,
-                                              const Double_t ylad,   
+TGeoVolume* AliITSUv1Layer::CreateChipOuterB(const Double_t xsta,
+                                              const Double_t ysta,   
                                               const Double_t zmod,
                                               const TGeoManager *mgr){
 //
-// Creates the actual Module
+// Creates the actual Chip
 //
 // Input:
-//         xlad,ylad,zlad : the half stave dimensions
+//         xsta,ysta,zsta : the half stave dimensions
 //         mgr  : the GeoManager (used only to get the proper material)
 //
 // Output:
@@ -2438,22 +2438,22 @@ TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const Double_t xlad,
   
   // First create all needed shapes
 
-  // The module
-  TGeoBBox *module = new TGeoBBox(xlad,  ylad, zmod/2);
+  // The chip
+  TGeoBBox *chip = new TGeoBBox(xsta,  ysta, zmod/2);
 
   // The sensor
-  xlen = 0.5*(module->GetDX()-xGap/2);
+  xlen = 0.5*(chip->GetDX()-xGap/2);
   //xlen = 0.5*1.5;
-  ylen = ylad;
-  zlen = (2*module->GetDZ()-6*zGap)/14;
+  ylen = ysta;
+  zlen = (2*chip->GetDZ()-6*zGap)/14;
   TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
 
 
   // We have all shapes: now create the real volumes
  
   TGeoMedium *medSi  = mgr->GetMedium("ITS_SI$");
-  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
-  TGeoVolume *modVol = new TGeoVolume(volname, module, medSi);
+  snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
+  TGeoVolume *modVol = new TGeoVolume(volname, chip, medSi);
   modVol->SetVisibility(kTRUE);
 
   snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
@@ -2461,13 +2461,13 @@ TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const Double_t xlad,
   
 
 
-  // Now build up the module
-  xpos = -module->GetDX() + sensor->GetDX();
+  // Now build up the chip
+  xpos = -chip->GetDX() + sensor->GetDX();
   //xpos = -xGap/2 -sensor->GetDX();
-  ypos = -module->GetDY() + sensor->GetDY();
-  for(Int_t k=0;k<7;k++)   //put 7x2 chip into one module
+  ypos = -chip->GetDY() + sensor->GetDY();
+  for(Int_t k=0;k<7;k++)   //put 7x2 chip into one chip
     {
-      zpos = -module->GetDZ() + sensor->GetDZ() + k*(2*sensor->GetDZ() + zGap);
+      zpos = -chip->GetDZ() + sensor->GetDZ() + k*(2*sensor->GetDZ() + zGap);
       modVol->AddNode(sensVol, k+1, new TGeoTranslation(xpos, ypos, zpos));
       modVol->AddNode(sensVol, k+2, new TGeoTranslation(-xpos, ypos, zpos));
     }
@@ -2478,7 +2478,7 @@ TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const Double_t xlad,
   //sensVol->SetTransparency(30);
   sensVol->SetFillColor(sensVol->GetLineColor());
   sensVol->SetFillStyle(4000); // 0% transparent
-  // Done, return the module
+  // Done, return the chip
   return modVol;
 }
 
@@ -2486,8 +2486,8 @@ TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const Double_t xlad,
 Double_t AliITSUv1Layer::RadiusOfTurboContainer(){
 //
 // Computes the inner radius of the air container for the Turbo configuration
-// as the radius of either the circle tangent to the ladder or the circle
-// passing for the ladder's lower vertex
+// as the radius of either the circle tangent to the stave or the circle
+// passing for the stave's lower vertex
 //
 // Input:
 //         none (all needed parameters are class members)
@@ -2500,32 +2500,32 @@ Double_t AliITSUv1Layer::RadiusOfTurboContainer(){
 // Created:      08 Mar 2012  Mario Sitta
 //
 
-  Double_t rr, delta, z, lladd, rladd;
+  Double_t rr, delta, z, lstav, rstav;
 
-  if (fLadderThick > 89.) // Very big angle: avoid overflows since surely
+  if (fStaveThick > 89.) // Very big angle: avoid overflows since surely
     return -1;            // the radius from lower vertex is the right value
 
-  rladd = fLayRadius + 0.5*fLadderThick;
-  delta = (0.5*fLadderThick)/CosD(fLadderTilt);
-  z     = (0.5*fLadderThick)*TanD(fLadderTilt);
+  rstav = fLayRadius + 0.5*fStaveThick;
+  delta = (0.5*fStaveThick)/CosD(fStaveTilt);
+  z     = (0.5*fStaveThick)*TanD(fStaveTilt);
 
-  rr = rladd - delta;
-  lladd = (0.5*fLadderWidth) - z;
+  rr = rstav - delta;
+  lstav = (0.5*fStaveWidth) - z;
 
-  if ( (rr*SinD(fLadderTilt) < lladd) )
-    return (rr*CosD(fLadderTilt));
+  if ( (rr*SinD(fStaveTilt) < lstav) )
+    return (rr*CosD(fStaveTilt));
   else
     return -1;
 }
 
 //________________________________________________________________________
-void AliITSUv1Layer::SetLadderTilt(const Double_t t)
+void AliITSUv1Layer::SetStaveTilt(const Double_t t)
 {
 //
-// Sets the Ladder tilt angle (for turbo layers only)
+// Sets the Stave tilt angle (for turbo layers only)
 //
 // Input:
-//         t :  the ladder tilt angle
+//         t :  the stave tilt angle
 //
 // Output:
 //
@@ -2535,19 +2535,19 @@ void AliITSUv1Layer::SetLadderTilt(const Double_t t)
 //
 
   if (fIsTurbo)
-    fLadderTilt = t;
+    fStaveTilt = t;
   else
     AliError("Not a Turbo layer");
 
 }
 
 //________________________________________________________________________
-void AliITSUv1Layer::SetLadderWidth(const Double_t w){
+void AliITSUv1Layer::SetStaveWidth(const Double_t w){
 //
-// Sets the Ladder width (for turbo layers only)
+// Sets the Stave width (for turbo layers only)
 //
 // Input:
-//         w :  the ladder width
+//         w :  the stave width
 //
 // Output:
 //
@@ -2557,14 +2557,14 @@ void AliITSUv1Layer::SetLadderWidth(const Double_t w){
 //
 
   if (fIsTurbo)
-    fLadderWidth = w;
+    fStaveWidth = w;
   else
     AliError("Not a Turbo layer");
 
 }
 
 //________________________________________________________________________
-TGeoArb8 *AliITSUv1Layer::CreateLadderSide(const char *name,
+TGeoArb8 *AliITSUv1Layer::CreateStaveSide(const char *name,
                          Double_t dz, Double_t angle, Double_t xSign,
                          Double_t L, Double_t H, Double_t l) {
 //
@@ -2573,30 +2573,30 @@ TGeoArb8 *AliITSUv1Layer::CreateLadderSide(const char *name,
 // in AliITSv11GeometrySDD class by L.Gaudichet)
 //
 
-    // Create one half of the V shape corner of CF ladder
+    // Create one half of the V shape corner of CF stave
   
-    TGeoArb8 *cfLaddSide = new TGeoArb8(dz);
-    cfLaddSide->SetName(name);
+    TGeoArb8 *cfStavSide = new TGeoArb8(dz);
+    cfStavSide->SetName(name);
 
     // Points must be in clockwise order
-    cfLaddSide->SetVertex(0, 0,  0);
-    cfLaddSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
+    cfStavSide->SetVertex(0, 0,  0);
+    cfStavSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
                          -L*TMath::Cos(angle)-l*TMath::Sin(angle));
-    cfLaddSide->SetVertex(4, 0,  0);
-    cfLaddSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
+    cfStavSide->SetVertex(4, 0,  0);
+    cfStavSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
                          -L*TMath::Cos(angle)-l*TMath::Sin(angle));
     if (xSign < 0) {
-     cfLaddSide->SetVertex(1, 0, -H);
-     cfLaddSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
-     cfLaddSide->SetVertex(5, 0, -H);
-     cfLaddSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
+     cfStavSide->SetVertex(1, 0, -H);
+     cfStavSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
+     cfStavSide->SetVertex(5, 0, -H);
+     cfStavSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
     } else {
-     cfLaddSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
-     cfLaddSide->SetVertex(3, 0, -H);
-     cfLaddSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
-     cfLaddSide->SetVertex(7, 0, -H);
+     cfStavSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
+     cfStavSide->SetVertex(3, 0, -H);
+     cfStavSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
+     cfStavSide->SetVertex(7, 0, -H);
     }
-    return cfLaddSide;
+    return cfStavSide;
 }
 
 //________________________________________________________________________
index 520cbd00b71aab26bf295bffa7f2fc7375ad41ff..a363b5e57dae137b414c306d7fb20c497264da1b 100644 (file)
@@ -37,28 +37,28 @@ class AliITSUv1Layer : public AliITSv11Geometry {
     //
     Bool_t    IsTurbo() const {return fIsTurbo;};
 
-    Double_t  GetLadderThick() const {return fLadderThick;};
-    Double_t  GetLadderTilt()  const {return fLadderTilt;};
-    Double_t  GetLadderWidth() const {return fLadderWidth;};
+    Double_t  GetStaveThick() const {return fStaveThick;};
+    Double_t  GetStaveTilt()  const {return fStaveTilt;};
+    Double_t  GetStaveWidth() const {return fStaveWidth;};
     Double_t  GetSensorThick() const {return fSensorThick;};
-    Double_t  GetNLadders()    const {return fNLadders;};
-    Double_t  GetNModules()    const {return fNModules;};
+    Double_t  GetNStaves()    const {return fNStaves;};
+    Double_t  GetNChips()    const {return fNChips;};
     Double_t  GetRadius()      const {return fLayRadius;};
     Double_t  GetPhi0()        const {return fPhi0;};
     Double_t  GetZLength()     const {return fZLength;};
-    Int_t     GetDetType()     const {return fDetTypeID;}
+    Int_t     GetChipType()     const {return fChipTypeID;}
     AliITSUv1::AliITSUModel_t GetStaveModel() const {return fStaveModel;}
     //
-    void      SetLadderThick(Double_t t)    {fLadderThick = t;};
-    void      SetLadderTilt(Double_t t);
-    void      SetLadderWidth(Double_t w);
+    void      SetStaveThick(Double_t t)    {fStaveThick = t;};
+    void      SetStaveTilt(Double_t t);
+    void      SetStaveWidth(Double_t w);
     void      SetSensorThick(Double_t t)    {fSensorThick = t;};
-    void      SetNLadders(Int_t n)          {fNLadders = n;};
-    void      SetNModules(Int_t m)          {fNModules = m;};
+    void      SetNStaves(Int_t n)          {fNStaves = n;};
+    void      SetNChips(Int_t m)          {fNChips = m;};
     void      SetRadius(Double_t r)         {fLayRadius = r;};
     void      SetPhi0(Double_t phi)         {fPhi0 = phi;}
     void      SetZLength(Double_t z)        {fZLength   = z;};
-    void      SetDetType(Int_t tp)          {fDetTypeID = tp;}
+    void      SetChipType(Int_t tp)          {fChipTypeID = tp;}
     void      SetBuildLevel(Int_t buildLevel){fBuildLevel=buildLevel;}
     void      SetStaveModel(AliITSUv1::AliITSUModel_t model) {fStaveModel=model;}
     virtual void CreateLayer(TGeoVolume *moth);
@@ -68,10 +68,10 @@ class AliITSUv1Layer : public AliITSv11Geometry {
 
     Double_t RadiusOfTurboContainer();
 
-    TGeoVolume* CreateLadder(const TGeoManager *mgr=gGeoManager);
-    //TGeoVolume* CreateModule(Double_t x, Double_t z, const TGeoManager *mgr=gGeoManager);
-    TGeoVolume* CreateModuleInnerB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
-    TGeoVolume* CreateModuleOuterB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
+    TGeoVolume* CreateStave(const TGeoManager *mgr=gGeoManager);
+    //TGeoVolume* CreateChip(Double_t x, Double_t z, const TGeoManager *mgr=gGeoManager);
+    TGeoVolume* CreateChipInnerB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
+    TGeoVolume* CreateChipOuterB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
 
 
     TGeoVolume* CreateStaveStructInnerB(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
@@ -90,7 +90,7 @@ class AliITSUv1Layer : public AliITSv11Geometry {
     TGeoVolume* CreateSpaceFrameOuterBDummy(Double_t x, const TGeoManager *mgr=gGeoManager) const;
     TGeoVolume* CreateSpaceFrameOuterB0(Double_t x, const TGeoManager *mgr=gGeoManager);
 
-    TGeoArb8* CreateLadderSide(const char *name,
+    TGeoArb8* CreateStaveSide(const char *name,
                               Double_t dz, Double_t angle, Double_t xSign,
                               Double_t L, Double_t H, Double_t l);
     TGeoCombiTrans* CreateCombiTrans( const char *name,
@@ -102,16 +102,16 @@ class AliITSUv1Layer : public AliITSv11Geometry {
 
 
     Int_t     fLayerNumber; // Current layer number
-    Double_t  fPhi0;        // lab phi of 1st ladder, in degrees!!!
+    Double_t  fPhi0;        // lab phi of 1st stave, in degrees!!!
     Double_t  fLayRadius;   // Inner radius of this layer
     Double_t  fZLength;     // Z length of this layer
     Double_t  fSensorThick; // Sensor thickness
-    Double_t  fLadderThick; // Ladder thickness
-    Double_t  fLadderWidth; // Ladder width (for turbo layers only)
-    Double_t  fLadderTilt;  // Ladder tilt angle (for turbo layers only) in degrees
-    Int_t     fNLadders;    // Number of ladders in this layer
-    Int_t     fNModules;    // Number of modules per ladder in this layer
-    UInt_t    fDetTypeID;   // detector type id
+    Double_t  fStaveThick; // Stave thickness
+    Double_t  fStaveWidth; // Stave width (for turbo layers only)
+    Double_t  fStaveTilt;  // Stave tilt angle (for turbo layers only) in degrees
+    Int_t     fNStaves;    // Number of staves in this layer
+    Int_t     fNChips;    // Number of chips per stave in this layer
+    UInt_t    fChipTypeID;   // detector type id
     Bool_t    fIsTurbo;     // True if this layer is a "turbo" layer
     Int_t     fBuildLevel;  // Used for material studies
 
@@ -120,10 +120,10 @@ class AliITSUv1Layer : public AliITSv11Geometry {
     // Parameters for the Upgrade geometry
 
     static const Double_t fgkDefaultSensorThick; // Default sensor thickness
-    static const Double_t fgkDefaultLadderThick; // Default ladder thickness
+    static const Double_t fgkDefaultStaveThick; // Default stave thickness
 
     static const Double_t fgkOBHalfStaveWidth;   // OB Half Stave Width
-    static const Double_t fgkOBModuleGap;        // Gap between OB modules
+    static const Double_t fgkOBChipGap;        // Gap between OB chips
     static const Double_t fgkOBFlexCable1Thick;  // Thickness of
     static const Double_t fgkOBFlexCable2Thick;  // OB flex cables
     static const Double_t fgkOBBusCable1Thick;   // Thickness of
@@ -131,7 +131,7 @@ class AliITSUv1Layer : public AliITSv11Geometry {
     static const Double_t fgkOBCarbonPlateThick; // OB Carbon Plate Thickness
     static const Double_t fgkOBColdPlateThick;   // OB Cold Plate Thickness
     static const Double_t fgkOBGlueThick;        // OB Glue total Thickness
-    static const Double_t fgkOBModuleZLength;    // OB Module Length along Z
+    static const Double_t fgkOBChipZLength;    // OB Chip Length along Z
 
   ClassDef(AliITSUv1Layer,0) // ITS Upgrade v1 geometry
 };
index d3eda96e394f977adf71fa68df6866c4fea12a9e..f509db7fec47def5aade7f5141bbf8af460796d8 100644 (file)
@@ -34,7 +34,7 @@ AliITSUv0.cxx
 AliITSUv0Layer.cxx 
 AliITSUv1.cxx 
 AliITSUv1Layer.cxx 
-AliITSUModule.cxx
+AliITSUChip.cxx
 AliITSUSimuParam.cxx
 AliITSUSimulation.cxx
 AliITSUSimulationPix.cxx
index daaa8489075f1a287cde00af50845d235ad08bfe..e54177b66345f4bb570766932e09094e2bfbbce0 100644 (file)
@@ -37,7 +37,7 @@
 #pragma link C++ class AliITSUpgradeReconstructor+;
 #pragma link C++ class AliITSUpgradeClusterList+;
 #pragma link C++ class AliITSUpgradeClusterListNode+;
-#pragma link C++ class AliITSUPixelModule+;
+#pragma link C++ class AliITSUPixelChip+;
 #pragma link C++ class AliITSUpgradeClusterFinder+;
 */
 
index 8014d82f0e67c4c50d0f6de33f320bbd892755c7..cfeaaf305c76165fa97d7e133044f27ef672d891 100644 (file)
@@ -22,7 +22,7 @@
 #pragma link C++ class  AliITSUv0Layer+;
 #pragma link C++ class  AliITSUv1+;
 #pragma link C++ class  AliITSUv1Layer+;
-#pragma link C++ class  AliITSUModule+;
+#pragma link C++ class  AliITSUChip+;
 #pragma link C++ class  AliITSUSimuParam+;
 #pragma link C++ class  AliITSUSimulation+;
 #pragma link C++ class  AliITSUSimulationPix+;
index f91b7b05d3f3784629711a6aa7213661a6350e44..8e5bb729d35388a72e808cd65097f5a574f2dfee 100644 (file)
@@ -1,6 +1,6 @@
 // macro to create 
 Double_t sgXMod=30e-4,sgYMod=30e-4,sgZMod=30e-4,sgThtMod=0.1,sgPsiMod=0.1,sgPhiMod=0.1;
-Double_t sgXLad=30e-4,sgYLad=30e-4,sgZLad=30e-4,sgThtLad=0.1,sgPsiLad=0.1,sgPhiLad=0.1;
+Double_t sgXSta=30e-4,sgYSta=30e-4,sgZSta=30e-4,sgThtSta=0.1,sgPsiSta=0.1,sgPhiSta=0.1;
 Double_t sgXLay=30e-4,sgYLay=30e-4,sgZLay=30e-4,sgThtLay=0.1,sgPsiLay=0.1,sgPhiLay=0.1;
 Double_t sgXITS=100e-4,sgYITS=100e-4,sgZITS=2000e-4,sgThtITS=0.1,sgPsiITS=0.1,sgPhiITS=0.1;
 //
@@ -80,28 +80,28 @@ void MakeITSUResMisAlignment()
     new( (*deltas)[idel++] ) AliAlignObjParams(sname.Data(),dummyVID,
                                               dx,dy,dz,dtht,dpsi,dphi,kTRUE);
     //
-    for (int ild=0;ild<gm0->GetNLadders(ilr);ild++) {
+    for (int ild=0;ild<gm0->GetNStaves(ilr);ild++) {
       //
-      dx   = sgXLad*gRandom->Gaus();
-      dy   = sgYLad*gRandom->Gaus();   
-      dz   = sgZLad*gRandom->Gaus();
-      dtht = sgThtLad*gRandom->Gaus(); 
-      dpsi = sgPsiLad*gRandom->Gaus(); 
-      dphi = sgPhiLad*gRandom->Gaus();         
-      sname = gm0->ComposeSymNameLadder(ilr,ild);
+      dx   = sgXSta*gRandom->Gaus();
+      dy   = sgYSta*gRandom->Gaus();   
+      dz   = sgZSta*gRandom->Gaus();
+      dtht = sgThtSta*gRandom->Gaus(); 
+      dpsi = sgPsiSta*gRandom->Gaus(); 
+      dphi = sgPhiSta*gRandom->Gaus();         
+      sname = gm0->ComposeSymNameStave(ilr,ild);
       new( (*deltas)[idel++] ) AliAlignObjParams(sname.Data(),dummyVID,
                                                 dx,dy,dz,dtht,dpsi,dphi,kTRUE);
       //
-      for (int isn=0;isn<gm0->GetNDetectors(ilr);isn++) {
+      for (int isn=0;isn<gm0->GetNChipsPerModule(ilr);isn++) {
        dx   = sgXMod*gRandom->Gaus();
        dy   = sgYMod*gRandom->Gaus();  
        dz   = sgZMod*gRandom->Gaus();
        dtht = sgThtMod*gRandom->Gaus(); 
        dpsi = sgPsiMod*gRandom->Gaus(); 
        dphi = sgPhiMod*gRandom->Gaus();        
-       int mid = gm0->GetModuleIndex(ilr,ild,isn);
+       int mid = gm0->GetChipIndex(ilr,ild,isn);
        sname = gm0->GetSymName(mid);
-       new( (*deltas)[idel++] ) AliAlignObjParams(sname.Data(),gm0->ModuleVolUID(mid),
+       new( (*deltas)[idel++] ) AliAlignObjParams(sname.Data(),gm0->ChipVolUID(mid),
                                                   dx,dy,dz,dtht,dpsi,dphi,kTRUE);
       }
     }
index 82159db4012a729324ec7bbfa0af3328e22a1674..8ad7eaebcb52bd12c99e8100c2303058a177ca0d 100644 (file)
@@ -71,9 +71,9 @@ Int_t GetSuzeLimits(Int_t DataSizePerWindowInRow, Int_t Version, Int_t& Limit32,
   }
 }
 
-void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnlyModulesWithSignal=0, Bool_t AddQED=0, Int_t nEvents=-1, Int_t NRowsEncodingWindow=4,  Int_t NColsEncodingWindow=5, Int_t SuzeLimitsVersion=99, Bool_t SaveResults=kTRUE){ 
+void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnlyChipsWithSignal=0, Bool_t AddQED=0, Int_t nEvents=-1, Int_t NRowsEncodingWindow=4,  Int_t NColsEncodingWindow=5, Int_t SuzeLimitsVersion=99, Bool_t SaveResults=kTRUE){ 
 //CollectMode - defines which digits are added to SUZE matrix (-1 - Noise, +1 - Signal, 0 - Noise+Signal)
-//ProcessOnlyModulesWithSignal - defines if only modules with signal hits are processed, if 0 all the modules are processed
+//ProcessOnlyChipsWithSignal - defines if only modules with signal hits are processed, if 0 all the modules are processed
  
   Int_t DataSizePerWindowInRow = 8 + NRowsEncodingWindow*NColsEncodingWindow+TMath::Ceil(TMath::Log2(NRowsEncodingWindow));
 
@@ -84,7 +84,7 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
   if(CollectMode==-1) cout<<" taking only noise pixels";
   else if(CollectMode==1) cout<<" taking only signal pixels";
   cout<<endl;    
-  if(ProcessOnlyModulesWithSignal) cout<<"Only modules with signal hits will be processed";
+  if(ProcessOnlyChipsWithSignal) cout<<"Only modules with signal hits will be processed";
   else cout<<"All modules will be processed";
   cout<<endl;
   //Int_t debugOn=0; //DEBUG
@@ -108,7 +108,7 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
   Int_t nWindowsPer32colsMin=nWindowsPer32colsMax;
 
   Char_t logfile_name[100];
-  sprintf(logfile_name,"ScanDigits_v15_log_Cycle_%d_nEvents_%d_EncWindow_%dx%d_SuzeLimitsVersion_%d_Mode_%d-%d_QED_%d.log",Cycle,nEvents,NRowsEncodingWindow,NColsEncodingWindow,SuzeLimitsVersion,CollectMode,ProcessOnlyModulesWithSignal,AddQED);
+  sprintf(logfile_name,"ScanDigits_v15_log_Cycle_%d_nEvents_%d_EncWindow_%dx%d_SuzeLimitsVersion_%d_Mode_%d-%d_QED_%d.log",Cycle,nEvents,NRowsEncodingWindow,NColsEncodingWindow,SuzeLimitsVersion,CollectMode,ProcessOnlyChipsWithSignal,AddQED);
   FILE *logfile = fopen (logfile_name,"w");
 
   gAlice=NULL;
@@ -127,7 +127,7 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
   AliITSUGeomTGeo* gm = new AliITSUGeomTGeo(kTRUE,kTRUE);
   //
   Int_t nLayers = gm->GetNLayers();
-  Int_t nModules = gm->GetNModules();
+  Int_t nChips = gm->GetNChips();
 
   AliLoader *dl = runLoader->GetDetectorLoader("ITS");
 
@@ -148,26 +148,26 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
   if(nEvents==-1) nEvents=runLoader->GetNumberOfEvents();
   printf("N Events : %i \n",nEvents);
 
-  //Module sizes
-  Int_t Module_Ncols=1362;
-  Int_t Module_Nrows_small=320;
-  Int_t Module_Nrows_big=640;
+  //Chip sizes
+  Int_t Chip_Ncols=1362;
+  Int_t Chip_Nrows_small=320;
+  Int_t Chip_Nrows_big=640;
   Int_t ColAddress=0;
   Int_t RowAddress=0;
 
   Int_t DataSize=0;
-  //Int_t ModuleSum=0;
+  //Int_t ChipSum=0;
 
-  TH1F* OverflowCodesPerModule = new TH1F("OverflowCodesPerModule","OverflowCodesPerModule",8,0,8);
+  TH1F* OverflowCodesPerChip = new TH1F("OverflowCodesPerChip","OverflowCodesPerChip",8,0,8);
   TH1F* OverflowCodes = new TH1F("OverflowCodes","Overflow codes",8,0,8);
   TH1F* OverflowCodesPerLayer[nLayers];
 
-  TH1F* nDigitsPerEncodingWindowPerModule = new TH1F("nDigitsPerEncodingWindowPerModule","nDigitsPerEncodingWindowPerModule",NRowsEncodingWindow*NColsEncodingWindow,1,NRowsEncodingWindow*NColsEncodingWindow+1);
+  TH1F* nDigitsPerEncodingWindowPerChip = new TH1F("nDigitsPerEncodingWindowPerChip","nDigitsPerEncodingWindowPerChip",NRowsEncodingWindow*NColsEncodingWindow,1,NRowsEncodingWindow*NColsEncodingWindow+1);
   TH1F* nDigitsPerEncodingWindow = new TH1F("nDigitsPerEncodingWindow","nDigitsPerEncodingWindow",NRowsEncodingWindow*NColsEncodingWindow,1,NRowsEncodingWindow*NColsEncodingWindow+1);
   TH1F* nDigitsPerEncodingWindowPerLayer[nLayers];
 
-  Int_t nDigitsLostPerModule=0;
-  Int_t nDigitsEncodedPerModule=0;
+  Int_t nDigitsLostPerChip=0;
+  Int_t nDigitsEncodedPerChip=0;
   Int_t nDigitsLostPerEvent=0;
   Int_t nDigitsPerEvent=0;
   Double_t FractionDigitsLostPerEvent=0;
@@ -175,7 +175,7 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
   Int_t nDigitsLostPerEventPerLayer[nLayers];
   Int_t nDigitsPerEventPerLayer[nLayers];
   Double_t FractionDigitsLostPerEventPerLayer[nLayers];
-  Int_t MaxNWindowsPerLadderPerLayerPerEvent[nLayers];
+  Int_t MaxNWindowsPerStavePerLayerPerEvent[nLayers];
 
   TH1I* NtracksPerEvent_hist = new TH1I("NtracksPerEvent","Ntracks per event",nEvents,0,nEvents);
   TH1I* NdigitsPerEvent_hist = new TH1I("NdigitsPerEvent","Ndigits per event",nEvents,0,nEvents);
@@ -186,27 +186,27 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
   TH1D* FractionDigitsLostPerEvent_hist = new TH1D("FractionDigitsLostPerEvent","Fraction of Digits lost per event",nEvents,0,nEvents);
   TH1D* FractionDigitsLostPerEventPerLayer_hist[nLayers];
 
-  TH1I* MaxNWindowsPerLadderPerLayerPerEvent_hist[nLayers];
+  TH1I* MaxNWindowsPerStavePerLayerPerEvent_hist[nLayers];
 
   Int_t nWindows=0;
 
   //complete maps
-  TH2I* nDigitsPerModulePerEvent = new TH2I("nDigitsPerModulePerEvent","nDigits per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
-  TH2I* nDigitsEncodedPerModulePerEvent = new TH2I("nDigitsEncodedPerModulePerEvent","nDigits encoded per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
-  TH2I* nDigitsLostPerModulePerEvent = new TH2I("nDigitsLostPerModulePerEvent","nDigits lost per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
-  TH2F* FractionDigitsLostPerModulePerEvent = new TH2F("FractionDigitsLostPerModulePerEvent","Fraction of digits lost per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
-  TH2I* nEncodingWindowsPerModulePerEvent = new TH2I("nEncodingWindowsPerModulePerEvent","Encoding windows per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
-  TH2F* nDigitsPerEncodingWindowPerModulePerEvent = new TH2F("nDigitsPerEncodingWindowPerModulePerEvent","Average digits per encoding window per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
+  TH2I* nDigitsPerChipPerEvent = new TH2I("nDigitsPerChipPerEvent","nDigits per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
+  TH2I* nDigitsEncodedPerChipPerEvent = new TH2I("nDigitsEncodedPerChipPerEvent","nDigits encoded per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
+  TH2I* nDigitsLostPerChipPerEvent = new TH2I("nDigitsLostPerChipPerEvent","nDigits lost per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
+  TH2F* FractionDigitsLostPerChipPerEvent = new TH2F("FractionDigitsLostPerChipPerEvent","Fraction of digits lost per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
+  TH2I* nEncodingWindowsPerChipPerEvent = new TH2I("nEncodingWindowsPerChipPerEvent","Encoding windows per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
+  TH2F* nDigitsPerEncodingWindowPerChipPerEvent = new TH2F("nDigitsPerEncodingWindowPerChipPerEvent","Average digits per encoding window per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
 
-  TH2I* nWindowsPerFSBBMinPerModulePerEvent = new TH2I("nWindowsPerFSBBMinPerModulePerEvent","nWindowsPerFSBBMin per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
-  TH2I* nWindowsPerHalfFSBBMinPerModulePerEvent = new TH2I("nWindowsPerHalfFSBBMinPerModulePerEvent","nWindowsPerHalfFSBBMin per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
-  TH2I* nWindowsPer32colsMinPerModulePerEvent = new TH2I("nWindowsPer32colsMinPerModulePerEvent","nWindowsPer32colsMin per Module per Event",nModules,0,nModules,nEvents,0,nEvents);
+  TH2I* nWindowsPerFSBBMinPerChipPerEvent = new TH2I("nWindowsPerFSBBMinPerChipPerEvent","nWindowsPerFSBBMin per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
+  TH2I* nWindowsPerHalfFSBBMinPerChipPerEvent = new TH2I("nWindowsPerHalfFSBBMinPerChipPerEvent","nWindowsPerHalfFSBBMin per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
+  TH2I* nWindowsPer32colsMinPerChipPerEvent = new TH2I("nWindowsPer32colsMinPerChipPerEvent","nWindowsPer32colsMin per Chip per Event",nChips,0,nChips,nEvents,0,nEvents);
 
-  TH2F* DataSizePerModulePerEvent = new TH2F("DataSizePerModulePerEvent","DataSizePerModulePerEvent",nModules,0,nModules,nEvents,0,nEvents);
+  TH2F* DataSizePerChipPerEvent = new TH2F("DataSizePerChipPerEvent","DataSizePerChipPerEvent",nChips,0,nChips,nEvents,0,nEvents);
 
-  Int_t current_ladder=-1;
+  Int_t current_stave=-1;
   Int_t current_layer=-1;
-  Double_t NWindowsPerLadder=0;
+  Double_t NWindowsPerStave=0;
 
   for(Int_t i=0; i<nLayers; i++){
     nDigitsLostPerEventPerLayer[i]=0;
@@ -216,8 +216,8 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
     NdigitsPerEventPerLayer_hist[i] = new TH1I(Form("NdigitsPerEventPerLayer_%d",i),Form("Ndigits at layer %d",i),nEvents,0,nEvents);
     FractionDigitsLostPerEventPerLayer_hist[i] = new TH1D(Form("FractionDigitsLostPerEventPerLayer_%d",i),Form("Fraction of digits lost per event at layer %d",i),nEvents,0,nEvents);
 
-    MaxNWindowsPerLadderPerLayerPerEvent[i]=0;
-    MaxNWindowsPerLadderPerLayerPerEvent_hist[i] = new TH1I(Form("MaxNWindowsPerLadderPerLayerPerEvent_%d",i),Form("Max number of windows per ladder per event at layer %d",i),nEvents,0,nEvents);
+    MaxNWindowsPerStavePerLayerPerEvent[i]=0;
+    MaxNWindowsPerStavePerLayerPerEvent_hist[i] = new TH1I(Form("MaxNWindowsPerStavePerLayerPerEvent_%d",i),Form("Max number of windows per stave per event at layer %d",i),nEvents,0,nEvents);
 
     OverflowCodesPerLayer[i] = new TH1F(Form("OverflowCodesPerLayer_%d",i),Form("Overflow codes at layer %d",i),8,0,8);
     nDigitsPerEncodingWindowPerLayer[i] = new TH1F(Form("nDigitsPerEncodingWindowPerLayer_%d",i),Form("nDigitsPerEncodingWindowPerLayer_%d",i),NRowsEncodingWindow*NColsEncodingWindow,1,NRowsEncodingWindow*NColsEncodingWindow+1);
@@ -245,50 +245,50 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
     for(Int_t i=0; i<nLayers; i++){
       nDigitsPerEventPerLayer[i]=0;
       nDigitsLostPerEventPerLayer[i]=0;
-      MaxNWindowsPerLadderPerLayerPerEvent[i]=0;
+      MaxNWindowsPerStavePerLayerPerEvent[i]=0;
     }
-    current_ladder=-1;
+    current_stave=-1;
     current_layer=-1;
-    NWindowsPerLadder=0;
+    NWindowsPerStave=0;
     
     Int_t ndigQED=0;
     
-    for (Int_t imod=0;imod<nModules;imod++) {
-      AliITSUSuze02* Module;
-      nDigitsLostPerModule=0;
-      nDigitsEncodedPerModule=0;
+    for (Int_t imod=0;imod<nChips;imod++) {
+      AliITSUSuze02* Chip;
+      nDigitsLostPerChip=0;
+      nDigitsEncodedPerChip=0;
       digTree->GetEntry(imod); 
       
       if(AddQED){
         digTreeQED->GetEntry(imod);
         ndigQED = digArrQED->GetEntries();
       }
-      //Int_t detType = gm->GetModuleDetTypeID(imod);
+      //Int_t detType = gm->GetChipChipTypeID(imod);
       //AliITSUSegmentationPix* segm = (AliITSUSegmentationPix*)gm->GetSegmentationByID(detType);
-      Int_t lay,lad,det;
+      Int_t lay,sta,det;
       Int_t ndig  = digArr->GetEntries();
       
       Int_t ndig_in_cycle=0; 
       Int_t ndig_signal_in_cycle=0;
       if (ndig<1) continue;
-      gm->GetModuleId(imod, lay,lad,det);
-//       printf("\nModule %3d: (det %2d in ladder %2d of Layer %d) | NDigits: %4d\n",imod,det,lad,lay,ndig);
+      gm->GetChipId(imod, lay,sta,det);
+//       printf("\nChip %3d: (det %2d in stave %2d of Layer %d) | NDigits: %4d\n",imod,det,sta,lay,ndig);
       //    
-      //if(iEvent==7 && lay==2) cout<<"Module #"<<imod<<endl;     //!!!DEBUG   
+      //if(iEvent==7 && lay==2) cout<<"Chip #"<<imod<<endl;     //!!!DEBUG   
       //if(iEvent==7 && lay==2 && imod==363) debugOn=1; //continue;  //!!!DEBUG
       //else debugOn=0; 
       if(lay>=0 && lay <=2){
-        Module = new AliITSUSuze02(Module_Nrows_small,Module_Ncols);
+        Chip = new AliITSUSuze02(Chip_Nrows_small,Chip_Ncols);
       }
       else{
-        Module = new AliITSUSuze02(Module_Nrows_big,Module_Ncols);
+        Chip = new AliITSUSuze02(Chip_Nrows_big,Chip_Ncols);
       }
       
-      Module->SetEncodingWindowSize(NRowsEncodingWindow,NColsEncodingWindow);
-      Module->SetQuotas(nWindowsPer32colsMax,nWindowsPerHalfFSBBMax,nWindowsPerFSBBMax);
+      Chip->SetEncodingWindowSize(NRowsEncodingWindow,NColsEncodingWindow);
+      Chip->SetQuotas(nWindowsPer32colsMax,nWindowsPerHalfFSBBMax,nWindowsPerFSBBMax);
       
-      OverflowCodesPerModule->Reset();
-      nDigitsPerEncodingWindowPerModule->Reset();
+      OverflowCodesPerChip->Reset();
+      nDigitsPerEncodingWindowPerChip->Reset();
 
       nWindows=0;
       for(Int_t idig=0;idig<ndig;idig++) {
@@ -299,7 +299,7 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
         if(pDig->GetHit(0)!=-1) ndig_signal_in_cycle++;  //counts signal hits in a given RO cycle
         ColAddress=pDig->GetCoord1();
         RowAddress=pDig->GetCoord2();
-        Module->AddDigit(RowAddress,ColAddress);
+        Chip->AddDigit(RowAddress,ColAddress);
       }//diglist  
       
       if(AddQED){
@@ -309,81 +309,81 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
           ndig_in_cycle++; 
           ColAddress=pDig->GetCoord1();
           RowAddress=pDig->GetCoord2();
-          Module->AddDigit(RowAddress,ColAddress);
+          Chip->AddDigit(RowAddress,ColAddress);
         }//diglist
       }
       
       if(ndig_in_cycle<1){  
-        delete Module
+        delete Chip
         continue; //rejects when no hits in a given cycle
       }
       nDigitsPerEvent+=ndig_in_cycle;
       nDigitsPerEventPerLayer[lay]+=ndig_in_cycle;
-      if(ProcessOnlyModulesWithSignal){       //if ProcessOnlyModulesWithSignal==1
+      if(ProcessOnlyChipsWithSignal){       //if ProcessOnlyChipsWithSignal==1
         if(ndig_signal_in_cycle<1){   
-          delete Module;
+          delete Chip;
           continue;  //rejects when only noise is the present
         }
       }
       
-      Module->Process(OverflowCodesPerModule,nDigitsPerEncodingWindowPerModule);
-      DataSize=Module->GetDataSize();
-      nDigitsEncodedPerModule=Module->GetNDigitsEncoded();
-      nDigitsLostPerModule=Module->GetNDigitsLost();
-      nWindows=Module->GetNEncodedWindows();                           
-      nWindowsPer32colsMin=Module->GetNWindowsPer32colsMin();
-      nWindowsPerHalfFSBBMin=Module->GetNWindowsPerHalfFSBBMin();
-      nWindowsPerFSBBMin=Module->GetNWindowsPerFSBBMin();
+      Chip->Process(OverflowCodesPerChip,nDigitsPerEncodingWindowPerChip);
+      DataSize=Chip->GetDataSize();
+      nDigitsEncodedPerChip=Chip->GetNDigitsEncoded();
+      nDigitsLostPerChip=Chip->GetNDigitsLost();
+      nWindows=Chip->GetNEncodedWindows();                           
+      nWindowsPer32colsMin=Chip->GetNWindowsPer32colsMin();
+      nWindowsPerHalfFSBBMin=Chip->GetNWindowsPerHalfFSBBMin();
+      nWindowsPerFSBBMin=Chip->GetNWindowsPerFSBBMin();
       
-     //DataSize=MakeSuze(Module_matrix,OverflowCodesPerModule,nDigitsEncodedPerModule,nDigitsLostPerModule,nWindows,nWindowsPer32colsMax,nWindowsPerHalfFSBBMax,nWindowsPerFSBBMax,nWindowsPer32colsMin,nWindowsPerHalfFSBBMin,nWindowsPerFSBBMin,nDigitsPerEncodingWindowPerModule);
+     //DataSize=MakeSuze(Chip_matrix,OverflowCodesPerChip,nDigitsEncodedPerChip,nDigitsLostPerChip,nWindows,nWindowsPer32colsMax,nWindowsPerHalfFSBBMax,nWindowsPerFSBBMax,nWindowsPer32colsMin,nWindowsPerHalfFSBBMin,nWindowsPerFSBBMin,nDigitsPerEncodingWindowPerChip);
 //       cout<<"SUZE encoded "<<SuzeReturn<<" digits in "<<nWindows<<" windows"<<endl;
-      OverflowCodes->Add(OverflowCodesPerModule);
-      OverflowCodesPerLayer[lay]->Add(OverflowCodesPerModule);
+      OverflowCodes->Add(OverflowCodesPerChip);
+      OverflowCodesPerLayer[lay]->Add(OverflowCodesPerChip);
 
-      nDigitsPerEncodingWindow->Add(nDigitsPerEncodingWindowPerModule);
-      nDigitsPerEncodingWindowPerLayer[lay]->Add(nDigitsPerEncodingWindowPerModule);
+      nDigitsPerEncodingWindow->Add(nDigitsPerEncodingWindowPerChip);
+      nDigitsPerEncodingWindowPerLayer[lay]->Add(nDigitsPerEncodingWindowPerChip);
 
-//       if(nDigitsLostPerModule){
+//       if(nDigitsLostPerChip){
 //         cout<<"------- Some digits were lost. Check overflow errors"<<endl;
-//         cout<<"Module has "<<ModuleSum<<" digits"<<endl;
+//         cout<<"Chip has "<<ChipSum<<" digits"<<endl;
 //         cout<<"SUZE reported "<<SuzeReturn<<" encoded and "<<nDigitsLost<<" lost digits"<<endl;
-//         cout<<"Module n."<<imod<<" has lost "<<nDigitsLostPerModule<<" digits due to the overflow"<<endl;
+//         cout<<"Chip n."<<imod<<" has lost "<<nDigitsLostPerChip<<" digits due to the overflow"<<endl;
 
 //       }
-      if(nDigitsLostPerModule){
-             printf("Event #%d mod. #%d (layer %d) has %d digits lost\n",iEvent,imod,lay,nDigitsLostPerModule);
-             fprintf(logfile,"Event #%d mod. #%d (layer %d) has %d (%f) digits lost\n",iEvent,imod,lay,nDigitsLostPerModule, (Float_t)nDigitsLostPerModule/ndig_in_cycle);
+      if(nDigitsLostPerChip){
+             printf("Event #%d mod. #%d (layer %d) has %d digits lost\n",iEvent,imod,lay,nDigitsLostPerChip);
+             fprintf(logfile,"Event #%d mod. #%d (layer %d) has %d (%f) digits lost\n",iEvent,imod,lay,nDigitsLostPerChip, (Float_t)nDigitsLostPerChip/ndig_in_cycle);
       }
-      nDigitsLostPerEvent+=nDigitsLostPerModule;
-      nDigitsLostPerEventPerLayer[lay]+=nDigitsLostPerModule;
-//       cout<<"Lay:"<<lay<<" Lad:"<<lad<<" current_ladder:"<<current_ladder<<" current layer:"<<current_layer<<" Digits:"<<SuzeReturn<<endl;
+      nDigitsLostPerEvent+=nDigitsLostPerChip;
+      nDigitsLostPerEventPerLayer[lay]+=nDigitsLostPerChip;
+//       cout<<"Lay:"<<lay<<" Sta:"<<sta<<" current_stave:"<<current_stave<<" current layer:"<<current_layer<<" Digits:"<<SuzeReturn<<endl;
       if(lay!=current_layer){
         cout<<"Layer #"<<lay<<endl;
       }
-      if(lad!=current_ladder || lay!=current_layer){
-        current_ladder=lad;
+      if(sta!=current_stave || lay!=current_layer){
+        current_stave=sta;
              current_layer=lay;
-             NWindowsPerLadder=0;
+             NWindowsPerStave=0;
       }
-      NWindowsPerLadder+=nWindows;
-      if(NWindowsPerLadder>MaxNWindowsPerLadderPerLayerPerEvent[current_layer]){
-             MaxNWindowsPerLadderPerLayerPerEvent[current_layer]=NWindowsPerLadder;
-//     cout<<"---- MaxNWindowsPerLadderPerLayerPerEvent:"<<MaxNWindowsPerLadderPerLayerPerEvent[current_layer]<<" at layer:"<<current_layer<<endl;
+      NWindowsPerStave+=nWindows;
+      if(NWindowsPerStave>MaxNWindowsPerStavePerLayerPerEvent[current_layer]){
+             MaxNWindowsPerStavePerLayerPerEvent[current_layer]=NWindowsPerStave;
+//     cout<<"---- MaxNWindowsPerStavePerLayerPerEvent:"<<MaxNWindowsPerStavePerLayerPerEvent[current_layer]<<" at layer:"<<current_layer<<endl;
       }
-      nDigitsPerModulePerEvent->SetBinContent(imod+1,iEvent+1,ndig_in_cycle);
-      nDigitsEncodedPerModulePerEvent->SetBinContent(imod+1,iEvent+1,nDigitsEncodedPerModule);
-      nDigitsLostPerModulePerEvent->SetBinContent(imod+1,iEvent+1,nDigitsLostPerModule);
-      FractionDigitsLostPerModulePerEvent->SetBinContent(imod+1,iEvent+1,(Double_t)nDigitsLostPerModule/ndig_in_cycle);
-      nEncodingWindowsPerModulePerEvent->SetBinContent(imod+1,iEvent+1,nWindows);
-      nDigitsPerEncodingWindowPerModulePerEvent->SetBinContent(imod+1,iEvent+1,(Double_t)nDigitsEncodedPerModule/nWindows); 
-
-      nWindowsPerFSBBMinPerModulePerEvent->SetBinContent(imod+1,iEvent+1,nWindowsPerFSBBMax-nWindowsPerFSBBMin);
-      nWindowsPerHalfFSBBMinPerModulePerEvent->SetBinContent(imod+1,iEvent+1,nWindowsPerHalfFSBBMax-nWindowsPerHalfFSBBMin);
-      nWindowsPer32colsMinPerModulePerEvent->SetBinContent(imod+1,iEvent+1,nWindowsPer32colsMax-nWindowsPer32colsMin);
-
-      DataSizePerModulePerEvent->SetBinContent(imod+1,iEvent+1,DataSize);   
+      nDigitsPerChipPerEvent->SetBinContent(imod+1,iEvent+1,ndig_in_cycle);
+      nDigitsEncodedPerChipPerEvent->SetBinContent(imod+1,iEvent+1,nDigitsEncodedPerChip);
+      nDigitsLostPerChipPerEvent->SetBinContent(imod+1,iEvent+1,nDigitsLostPerChip);
+      FractionDigitsLostPerChipPerEvent->SetBinContent(imod+1,iEvent+1,(Double_t)nDigitsLostPerChip/ndig_in_cycle);
+      nEncodingWindowsPerChipPerEvent->SetBinContent(imod+1,iEvent+1,nWindows);
+      nDigitsPerEncodingWindowPerChipPerEvent->SetBinContent(imod+1,iEvent+1,(Double_t)nDigitsEncodedPerChip/nWindows); 
+
+      nWindowsPerFSBBMinPerChipPerEvent->SetBinContent(imod+1,iEvent+1,nWindowsPerFSBBMax-nWindowsPerFSBBMin);
+      nWindowsPerHalfFSBBMinPerChipPerEvent->SetBinContent(imod+1,iEvent+1,nWindowsPerHalfFSBBMax-nWindowsPerHalfFSBBMin);
+      nWindowsPer32colsMinPerChipPerEvent->SetBinContent(imod+1,iEvent+1,nWindowsPer32colsMax-nWindowsPer32colsMin);
+
+      DataSizePerChipPerEvent->SetBinContent(imod+1,iEvent+1,DataSize);   
       
-      delete Module;
+      delete Chip;
 //      break;
     }//mod
     NtracksPerEvent_hist->SetBinContent(iEvent+1,NtracksKine);
@@ -407,7 +407,7 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
       }
     }
     for(Int_t i=0; i<nLayers; i++){
-      MaxNWindowsPerLadderPerLayerPerEvent_hist[i]->SetBinContent(iEvent+1,MaxNWindowsPerLadderPerLayerPerEvent[i]);
+      MaxNWindowsPerStavePerLayerPerEvent_hist[i]->SetBinContent(iEvent+1,MaxNWindowsPerStavePerLayerPerEvent[i]);
     }
 //     break;
   }//event loop
@@ -422,7 +422,7 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
   TFile* ResultsFile;
   Char_t ResultsFileName[100];
   if(SaveResults){
-    sprintf(ResultsFileName,"ScanDigits_v15_results_cycle_%d_EncWindow_%dx%d_SuzeLimitsVersion_%d_mode_%d-%d_QED_%d.root",Cycle,NRowsEncodingWindow,NColsEncodingWindow,SuzeLimitsVersion,CollectMode,ProcessOnlyModulesWithSignal,AddQED);
+    sprintf(ResultsFileName,"ScanDigits_v15_results_cycle_%d_EncWindow_%dx%d_SuzeLimitsVersion_%d_mode_%d-%d_QED_%d.root",Cycle,NRowsEncodingWindow,NColsEncodingWindow,SuzeLimitsVersion,CollectMode,ProcessOnlyChipsWithSignal,AddQED);
     ResultsFile = new TFile(ResultsFileName,"RECREATE");
 
     OverflowCodes->Write();
@@ -439,24 +439,24 @@ void ScanDigitsSuze02_v15(Int_t Cycle=0, Int_t CollectMode=0, Bool_t ProcessOnly
       NdigitsPerEventPerLayer_hist[i]->Write();
       FractionDigitsLostPerEventPerLayer_hist[i]->Write();
 
-      MaxNWindowsPerLadderPerLayerPerEvent_hist[i]->Write();
+      MaxNWindowsPerStavePerLayerPerEvent_hist[i]->Write();
 
       OverflowCodesPerLayer[i]->Write();
       nDigitsPerEncodingWindowPerLayer[i]->Write();
     }
 
-    nDigitsPerModulePerEvent->Write();
-    nDigitsEncodedPerModulePerEvent->Write();
-    nDigitsLostPerModulePerEvent->Write();
-    FractionDigitsLostPerModulePerEvent->Write();
-    nEncodingWindowsPerModulePerEvent->Write();
-    nDigitsPerEncodingWindowPerModulePerEvent->Write();
+    nDigitsPerChipPerEvent->Write();
+    nDigitsEncodedPerChipPerEvent->Write();
+    nDigitsLostPerChipPerEvent->Write();
+    FractionDigitsLostPerChipPerEvent->Write();
+    nEncodingWindowsPerChipPerEvent->Write();
+    nDigitsPerEncodingWindowPerChipPerEvent->Write();
 
-    nWindowsPerFSBBMinPerModulePerEvent->Write();
-    nWindowsPerHalfFSBBMinPerModulePerEvent->Write();
-    nWindowsPer32colsMinPerModulePerEvent->Write();
+    nWindowsPerFSBBMinPerChipPerEvent->Write();
+    nWindowsPerHalfFSBBMinPerChipPerEvent->Write();
+    nWindowsPer32colsMinPerChipPerEvent->Write();
 
-    DataSizePerModulePerEvent->Write();
+    DataSizePerChipPerEvent->Write();
 
     ResultsFile->Close();
   }
index b42e62e1eea13426aea4b95e00e8ba4f82333382..2ca2f09fa3deaac64fe8cdc4569e3abeb3055f33 100644 (file)
@@ -20,7 +20,7 @@ void readDigits(int nev=-1,int evStart=0)
   AliITSUGeomTGeo* gm = new AliITSUGeomTGeo(kTRUE,kTRUE);
   //
   Int_t nLayers = gm->GetNLayers();
-  Int_t nModules = gm->GetNModules();
+  Int_t nChips = gm->GetNChips();
   Int_t nbins=100;
   Int_t xmin=0;
   Int_t xmax=50000;//00*1e-09;
@@ -66,17 +66,17 @@ void readDigits(int nev=-1,int evStart=0)
     if (sDigTree) sDigTree->SetBranchAddress("ITS",&sDigArr);
     digTree->SetBranchAddress("ITSDigitsPix",&digArr);
 
-    for (int imod=0;imod<nModules;imod++) {
+    for (int imod=0;imod<nChips;imod++) {
       if (sDigTree) sDigTree->GetEntry(imod);
       digTree->GetEntry(imod);      
-      int detType = gm->GetModuleDetTypeID(imod);
+      int detType = gm->GetChipChipTypeID(imod);
       AliITSUSegmentationPix* segm = (AliITSUSegmentationPix*)gm->GetSegmentationByID(detType);
-      int lay,lad,det;
+      int lay,sta,det;
       int nsdig = sDigArr->GetEntries();
       int ndig  = digArr->GetEntries();
       if (ndig<1) continue;
-      gm->GetModuleId(imod, lay,lad,det);
-      printf("\nModule %3d: (det %2d in ladder %2d of Layer %d) |NSDigits: %4d NDigits: %4d\n",imod,det,lad,lay,nsdig,ndig);
+      gm->GetChipId(imod, lay,sta,det);
+      printf("\nChip %3d: (det %2d in stave %2d of Layer %d) |NSDigits: %4d NDigits: %4d\n",imod,det,sta,lay,nsdig,ndig);
       //
       for (int isdig=0;isdig<nsdig;isdig++) {
        AliITSUSDigit *pSdig = (AliITSUSDigit*)sDigArr->At(isdig);
index 43eba6d63e7848091a298a3d14d555b4f7f8cc00..0facb2b9646c52c664145b104baaa41cf7bdfd88 100644 (file)
@@ -68,9 +68,9 @@ void readHit(int nev=-1,int evStart=0)
       for(Int_t iHit=0; iHit<hitList->GetEntries();iHit++){
              
        AliITSUHit *pHit = (AliITSUHit*)hitList->At(iHit);
-       int id = pHit->GetModule();
+       int id = pHit->GetChip();
        int lr = gm->GetLayer(id);
-       int ld = gm->GetLadder(id);
+       int ld = gm->GetStave(id);
        //
        //      if(pHit->GetParticle()->IsPrimary()){
        Double_t xg,yg,zg=0.;
@@ -79,7 +79,7 @@ void readHit(int nev=-1,int evStart=0)
        pHit->GetPositionG0(xg0,yg0,zg0,tg0);
        xyGlob->Fill(xg,yg);
        zGlob->Fill(zg);
-       printf("Module %5d | Lr:%2d Ladder: %3d, X:[%+.5e:%+.5e] Y:[%+.5e:%+.5e] Z:[%+.5e %+.5e] DE: %.5e TrackID: %d\n",id,lr,ld,
+       printf("Chip %5d | Lr:%2d Stave: %3d, X:[%+.5e:%+.5e] Y:[%+.5e:%+.5e] Z:[%+.5e %+.5e] DE: %.5e TrackID: %d\n",id,lr,ld,
               xg0,xg,yg0,yg,zg0,zg,pHit->GetIonization(),pHit->GetTrack());
        hDeLoss[lr]->Fill(pHit->GetIonization());
        //      } // is primary
index 3c358845ab1e5bc5560e4b05e0feec9fa8936542..034d2886e4504dce8bf24e880a528ed09a376e91 100644 (file)
@@ -122,7 +122,7 @@ void CreateITSU()
     if (nStaveLr<0) nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); // calculate automatically
     nModPerStaveLr =  TMath::Nint(tdr5dat[idLr][kNModPerStave]);
     ITS->DefineLayerTurbo(idLr, phi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, 
-                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetDetTypeID());
+                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetChipTypeID());
     printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz(),turbo,nStaveLr,nModPerStaveLr);
     //
   }
index 399e7de7cbe7ad9d7d3cf19d6d8bca51f9266e6d..e9e03d94c9f92f06da72f93757a827cc5ee48c03 100644 (file)
@@ -86,7 +86,7 @@ void CreateITSU()
   seg = seg0;
   nModPerStaveLr = 1+dzLr/seg->Dz();
   nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl);
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetChipTypeID());
   printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr);
   //
   idLr = 1;
@@ -95,7 +95,7 @@ void CreateITSU()
   seg = seg0;
   nModPerStaveLr = 1+dzLr/seg->Dz();
   nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl);
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetChipTypeID());
   printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr);
   //
   idLr = 2;
@@ -104,7 +104,7 @@ void CreateITSU()
   seg = seg0;
   nModPerStaveLr = 1+dzLr/seg->Dz();
   nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl);
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetDetTypeID());
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick03, seg->Dy(), seg->GetChipTypeID());
   printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr);
   //
   // 
@@ -115,7 +115,7 @@ void CreateITSU()
   seg = seg1;
   nModPerStaveLr = 1+dzLr/seg->Dz();
   nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl);
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetChipTypeID());
   printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr);
   //
   idLr = 4;
@@ -124,7 +124,7 @@ void CreateITSU()
   seg = seg1;
   nModPerStaveLr = 1+dzLr/seg->Dz();
   nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl);
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetChipTypeID());
   printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr);
   //
   // 
@@ -135,7 +135,7 @@ void CreateITSU()
   seg = seg1;
   nModPerStaveLr = 1+dzLr/seg->Dz();
   nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl);
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetChipTypeID());
   printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr);
   //
   idLr = 6;
@@ -144,7 +144,7 @@ void CreateITSU()
   seg = seg1;
   nModPerStaveLr = 1+dzLr/seg->Dz();
   nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl);
-  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetDetTypeID());
+  ITS->DefineLayerTurbo(idLr, kPhi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, seg->Dx(), kTilt, kLrTick08, seg->Dy(), seg->GetChipTypeID());
   printf("Add Lr%d: R=%.1f DZ:%.1f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz()/2,nStaveLr,nModPerStaveLr);
   //  
 }
index 2575357032704255ee88db3f8140c729f43c4749..a2c0ba93cf446c496c7a001ba3bc22d7b6f88c17 100644 (file)
@@ -104,7 +104,7 @@ void CreateITSUsinglesegm()
     if (nStaveLr<1) nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); // calculate automatically
     nModPerStaveLr =  TMath::Nint(tdr5dat[idLr][kNModPerStave]);
     ITS->DefineLayerTurbo(idLr, phi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, 
-                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetDetTypeID());
+                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetChipTypeID());
     printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz(),turbo,nStaveLr,nModPerStaveLr);
     //
   }
index b84943632dd8813fb3379be8156882cd102aa346..0b61c5d770ca1f0f19a4d977a8dc47a87898bdfa 100644 (file)
@@ -245,7 +245,7 @@ void compClusHits(int nev=-1)
          AliITSUHit *pHit=0;
          for (int ih=nh;ih--;) {
            AliITSUHit* tHit = (AliITSUHit*)htArr->At(ih);
-           if (tHit->GetModule()!=modID) continue;
+           if (tHit->GetChip()!=modID) continue;
            pHit = tHit;
            break;
          }
index fa780ee92c328ccc38aa75ad5465461f3c469c41..c857897e746531fa87129b99b41b0d77b9547c6b 100644 (file)
@@ -42,7 +42,7 @@ void drawLr(int layMin=1,int layMax=1)
 
   for (Int_t lay=layMin;lay<=layMax;lay++) {
     //
-    AliITSUSegmentationPix* segm = (AliITSUSegmentationPix*)segmArr->At(gm->GetLayerDetTypeID(lay));
+    AliITSUSegmentationPix* segm = (AliITSUSegmentationPix*)segmArr->At(gm->GetLayerChipTypeID(lay));
     for (int ild=0;ild<gm->GetNLadders(lay);ild++) {
     
       // Sensor Matrices
index eb4689f954689da9d2fee79efe0d9dbe3d985b47..8fd11d8e51090140a963977de917ef3911affd8f 100644 (file)
@@ -124,7 +124,7 @@ void CreateITSUv0()
     if (nStaveLr<0) nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); // calculate automatically
     nModPerStaveLr =  TMath::Nint(tdr5dat[idLr][kNModPerStave]);
     ITS->DefineLayerTurbo(idLr, phi0, rLr, nModPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, 
-                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetDetTypeID());
+                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetChipTypeID());
     printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nModPerStaveLr*seg->Dz(),turbo,nStaveLr,nModPerStaveLr);
     //
   }
index 06950e57683afe931eac9d545a6e853c188d4843..6ef131eaeb846c030c70b429c3672e97a93dcdbf 100644 (file)
@@ -129,11 +129,11 @@ void CreateITSUv1()
     if (idLr>=kNLrInner) {
       nChipsPerStaveLr *= nChipsPerModule;
       ITS->DefineLayer(idLr, phi0, rLr, nChipsPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, 
-                      thick, seg->Dy(), seg->GetDetTypeID(),kBuildLevel);
+                      thick, seg->Dy(), seg->GetChipTypeID(),kBuildLevel);
       printf("Add Lr%d: R=%6.2f DZ:%6.2f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nChipsPerStaveLr*seg->Dz(),nStaveLr,nModPerStaveLr);
     } else {
       ITS->DefineLayerTurbo(idLr, phi0, rLr, nChipsPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, 
-                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetDetTypeID());
+                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetChipTypeID());
       printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nChipsPerStaveLr*seg->Dz(),turbo,nStaveLr,nModPerStaveLr);
     }
     //