// //
///////////////////////////////////////////////////////////////////////////////
-
#include <TGeoManager.h>
#include <TGeoPhysicalNode.h>
#include <TGeoMatrix.h>
#include "AliTRDcalibDB.h"
#include "AliTRDgeometry.h"
#include "AliTRDpadPlane.h"
+#include "AliTRDCommonParam.h"
ClassImp(AliTRDgeometry)
fRotB21[isector] = TMath::Sin(phi);
fRotB22[isector] = TMath::Cos(phi);
}
-
- // Initialize the SM status
- for (isector = 0; isector < fgkNsector; isector++) {
- SetSMstatus(isector,1);
- }
}
+//_____________________________________________________________________________
+void AliTRDgeometry::SetSMstatus(Int_t sm, Char_t status)
+{
+ //
+ // Switch on/off supermodules in the geometry
+ //
+
+ AliTRDCommonParam::Instance()->SetSMstatus(sm,status);
+
+}
+
+//_____________________________________________________________________________
+Char_t AliTRDgeometry::GetSMstatus(Int_t sm) const
+{
+ //
+ // Get the supermodule status
+ //
+
+ return AliTRDCommonParam::Instance()->GetSMstatus(sm);
+
+}
+
//_____________________________________________________________________________
void AliTRDgeometry::CreatePadPlaneArray()
{
padPlane->SetWidthOPad(0.515);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.635);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
else {
// L0C1 type
padPlane->SetWidthOPad(0.515);
padPlane->SetLengthIPad(7.5);
padPlane->SetWidthIPad(0.635);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
break;
case 1:
padPlane->SetWidthOPad(0.585);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.665);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
else {
// L1C1 type
padPlane->SetWidthOPad(0.585);
padPlane->SetLengthIPad(7.5);
padPlane->SetWidthIPad(0.665);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
break;
case 2:
padPlane->SetWidthOPad(0.705);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.695);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
else {
// L2C1 type
padPlane->SetWidthOPad(0.705);
padPlane->SetLengthIPad(8.0);
padPlane->SetWidthIPad(0.695);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
break;
case 3:
padPlane->SetWidthOPad(0.775);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.725);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
else {
// L3C1 type
padPlane->SetWidthOPad(0.775);
padPlane->SetLengthIPad(8.5);
padPlane->SetWidthIPad(0.725);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
break;
case 4:
padPlane->SetWidthOPad(0.845);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.755);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
else {
// L4C1 type
padPlane->SetWidthOPad(0.845);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.755);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
break;
case 5:
padPlane->SetWidthOPad(0.965);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.785);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
else {
// L5C1 type
padPlane->SetWidthOPad(0.965);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.785);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
break;
};
//
// Column direction
//
- Double_t col = fCwidth[ilayer] / 2.0
- + fgkCroW
- - padPlane->GetWidthRim();
+ Double_t col = - fCwidth[ilayer] / 2.0
+ - fgkCroW
+ + padPlane->GetWidthRim();
for (Int_t ic = 0; ic < padPlane->GetNcols(); ic++) {
padPlane->SetPadCol(ic,col);
- col -= padPlane->GetColSpacing();
+ col += padPlane->GetColSpacing();
if (ic == 0) {
- col -= padPlane->GetWidthOPad();
+ col += padPlane->GetWidthOPad();
}
else {
- col -= padPlane->GetWidthIPad();
+ col += padPlane->GetWidthIPad();
}
}
// Calculate the offset to translate from the local ROC system into
ypos = 0.0;
zpos = 0.0;
for (Int_t isector = 0; isector < kNsector; isector++) {
- if (fSMstatus[isector]) {
+ if (GetSMstatus(isector)) {
sprintf(cTagV,"BTRD%d",isector);
switch (isector) {
case 13:
ypos = 0.5*fgkSlength + 0.5*fgkFlength;
zpos = 0.0;
for (Int_t isector = 0; isector < kNsector; isector++) {
- if (fSMstatus[isector]) {
+ if (GetSMstatus(isector)) {
sprintf(cTagV,"BTRD%d",isector);
gMC->Gspos("UTF1",1,cTagV,xpos, ypos,zpos,0,"ONLY");
gMC->Gspos("UTF2",1,cTagV,xpos,-ypos,zpos,0,"ONLY");
gMC->Gspos("USD6",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY");
xpos = 0.0;
ypos = fClength[5][2]/2.0;
- zpos = 0.0;
+ zpos = 0.04;
gMC->Gspos("USDB",1,"UTI1", xpos, ypos, zpos, 0,"ONLY");
gMC->Gspos("USDB",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY");
gMC->Gspos("USDB",3,"UTI2", xpos, ypos, zpos, 0,"ONLY");
Int_t iDet = GetDetectorSec(ilayer,istack);
Int_t iCopy = GetDetector(ilayer,istack,0) * 1000;
Int_t nMCMrow = GetRowMax(ilayer,istack,0);
- Float_t ySize = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
+ Float_t ySize = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
/ ((Float_t) nMCMrow);
Int_t nMCMcol = 8;
Float_t xSize = (GetChamberWidth(ilayer) - 2.0*fgkCpadW)
- / ((Float_t) nMCMcol);
+ / ((Float_t) nMCMcol + 6); // Introduce 6 gaps
+ Int_t iMCM[8] = { 1, 2, 3, 5, 8, 9, 10, 12 }; // 0..7 MCM + 6 gap structure
sprintf(cTagV,"UU%02d",iDet);
for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
- xpos = (0.5 + iMCMcol) * xSize + 1.0
+ xpos = (0.5 + iMCM[iMCMcol]) * xSize + 1.0
- fCwidth[ilayer]/2.0;
- ypos = (0.5 + iMCMrow) * ySize + 1.0
+ ypos = (0.5 + iMCMrow) * ySize + 1.0
- fClength[ilayer][istack]/2.0 + fgkHspace/2.0;
zpos = -0.4 + 0.742/2.0;
gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
,xpos,ypos,zpos,0,"ONLY");
- }
+ }
}
}
if (((isector == 13) || (isector == 14) || (isector == 15)) &&
(istack == 2)) continue;
+ // Taking disabled supermodules into account
+ if (!GetSMstatus(isector)) continue;
+
UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iModule);
const char *symname = AliGeomManager::SymName(volid);
TGeoPNEntry *pne = gGeoManager->GetAlignableEntry(symname);