Skip to content

Commit

Permalink
Fix Z position of ML/OL modules to be symmetric wrt half stave center
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Sitta authored and shahor02 committed Jan 20, 2021
1 parent a006141 commit 9ef93a9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Detectors/ITSMFT/ITS/simulation/src/V3Layer.cxx
Expand Up @@ -1827,7 +1827,7 @@ TGeoVolume* V3Layer::createStaveModelOuterB2(const TGeoManager* mgr)
Double_t yGraph = sOBGraphiteFoilThick;
Double_t xHalfSt, yHalfSt;

Double_t xmod, ymod, zmod, ypowbus;
Double_t xmod, ymod, zmod, ypowbus, zbias;
Double_t xtru[12], ytru[12];
Double_t xpos, ypos, ypos1, zpos /*, zpos5cm*/;
Double_t xlen, ylen, zlen;
Expand Down Expand Up @@ -2051,13 +2051,17 @@ TGeoVolume* V3Layer::createStaveModelOuterB2(const TGeoManager* mgr)
// flex1_5cmVol->SetLineColor(kRed);
// flex2_5cmVol->SetLineColor(kGreen);

// Compute starting Z pos to center modules in stave
// (no need to divide by 2, these are already half-lengths)
zbias = zlen - mNumberOfModules * zmod - (mNumberOfModules - 1) * 0.5 * sOBModuleGap;

// Now build up the half stave
ypos = -ypowbus;
halfStaveVol->AddNode(powerBusVol, 1, new TGeoTranslation(0, ypos, 0));

ypos -= (ypowbus + ymod);
for (Int_t j = 0; j < mNumberOfModules; j++) {
zpos = zlen - j * (2 * zmod + sOBModuleGap) - zmod;
zpos = zlen - zbias - j * (2 * zmod + sOBModuleGap) - zmod;
halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(0, ypos, zpos));
mHierarchy[kModule]++;
}
Expand Down

0 comments on commit 9ef93a9

Please sign in to comment.