// //
///////////////////////////////////////////////////////////////////////////////
-
#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);
- }
+ // SM status
+ for (Int_t i = 0; i < kNsector; i++) {
+ fSMstatus[i] = 1;
+ }
+
}
//_____________________________________________________________________________
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
Float_t parTrd[kNparTrd];
Float_t parCha[kNparCha];
- Char_t cTagV[6];
- Char_t cTagM[5];
+ Char_t cTagV[100];
+ Char_t cTagM[100];
// There are three TRD volumes for the supermodules in order to accomodate
// the different arrangements in front of PHOS
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");
Float_t ypos = 0.0;
Float_t zpos = 0.0;
- Char_t cTagV[5];
- Char_t cTagM[5];
+ Char_t cTagV[100];
+ Char_t cTagM[100];
const Int_t kNparTRD = 4;
Float_t parTRD[kNparTRD];
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");
// Lower bar (aluminum)
parBOX[0] = 90.22/2.0;
parBOX[1] = 1.20/2.0;
- parBOX[2] = 1.90/2.0;
+ parBOX[2] = 1.74/2.0;
gMC->Gsvolu("USD8","BOX ",idtmed[1301-1],parBOX,kNparBOX);
xpos = 0.0;
- ypos = fClength[5][2]/2.0;
- zpos = -fgkSheight/2.0 + 2.35;
+ ypos = fClength[5][2]/2.0 - 0.1;
+ zpos = -fgkSheight/2.0 + fgkSMpltT + 2.27;
gMC->Gspos("USD8",1,"UTI1", xpos, ypos, zpos, 0,"ONLY");
gMC->Gspos("USD8",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY");
gMC->Gspos("USD8",3,"UTI2", xpos, ypos, zpos, 0,"ONLY");
//
// The envelope volume (aluminum)
- parTRD[0] = 90.00/2.0;
- parTRD[1] = 114.00/2.0;
+ parTRD[0] = 90.00/2.0 - 0.1;
+ parTRD[1] = 114.00/2.0 - 0.1;
parTRD[2] = 1.50/2.0;
parTRD[3] = 70.30/2.0;
gMC->Gsvolu("USCB","TRD1",idtmed[1301-1],parTRD,kNparTRD);
// Lower bar (aluminum)
parBOX[0] = 90.22/2.0;
parBOX[1] = 1.50/2.0;
- parBOX[2] = 2.20/2.0;
+ parBOX[2] = 2.00/2.0;
gMC->Gsvolu("USC5","BOX ",idtmed[1301-1],parBOX,kNparBOX);
xpos = 0.0;
ypos = fClength[5][2]/2.0 + fClength[5][1] + fClength[5][0];
- zpos = -fgkSheight/2.0 + 2.70;
+ zpos = -fgkSheight/2.0 + fgkSMpltT + 2.60;
gMC->Gspos("USC5",1,"UTI1", xpos, ypos, zpos, 0,"ONLY");
gMC->Gspos("USC5",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY");
gMC->Gspos("USC5",3,"UTI2", xpos, ypos, zpos, 0,"ONLY");
// Position of the corner ledges
const Float_t kSCLposxUa = 0.7;
const Float_t kSCLposxUb = 3.3;
- const Float_t kSCLposzUa = 1.6;
+ const Float_t kSCLposzUa = 1.65;
const Float_t kSCLposzUb = 0.3;
// Vertical
parSCL[0] = kSCLthkUa /2.0;
const Float_t kSCLwidLa = 8.5;
const Float_t kSCLwidLb = 3.3;
// Position of the corner ledges
- const Float_t kSCLposxLa = 0.1;
- const Float_t kSCLposxLb = 2.6;
+ const Float_t kSCLposxLa = 0.15;
+ const Float_t kSCLposxLb = 2.7;
const Float_t kSCLposzLa = -4.25;
const Float_t kSCLposzLb = -0.5;
// Vertical
xpos = 0.0;
ypos = 0.0;
zpos = fgkSheight/2.0 - fgkSMpltT/2.0;
- parPlt[0] = fgkSwidth2/2.0;
+ parPlt[0] = fgkSwidth2/2.0 - 0.2;
parPlt[1] = fgkFlength/2.0;
parPlt[2] = fgkSMpltT /2.0;
gMC->Gsposp("UTA2",1,"UTF2",xpos,ypos,zpos
, 0,"ONLY",parPlt,kNparPlt);
- xpos = (fgkSwidth1 + fgkSwidth2)/4.0;
+ xpos = (fgkSwidth1 + fgkSwidth2)/4.0 - fgkSMpltT/2.0 - 0.0016;
ypos = 0.0;
zpos = 0.0;
parPlt[0] = fgkSMpltT /2.0;
Float_t ypos = 0.0;
Float_t zpos = 0.0;
- Char_t cTagV[5];
+ Char_t cTagV[100];
const Int_t kNparBox = 3;
Float_t parBox[kNparBox];
for (ilayer = 1; ilayer < kNlayer; ilayer++) {
// In baby frame
- xpos = fCwidth[ilayer]/2.0 + kCOLwid/2.0;
+ xpos = fCwidth[ilayer]/2.0 + kCOLwid/2.0 - 1.04;
ypos = kBBSdz/2.0 - kBBMdz/2.0;
zpos = fgkVrocsm + fgkSMpltT + kCOLhgt/2.0 - fgkSheight/2.0 + kCOLposz
+ ilayer * (fgkCH + fgkVspace);
gMC->Gsposp("UTC3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos
,matrix[3],"ONLY",parCOL,kNparCOL);
// In baby frame
- xpos = fCwidth[5]/2.0 - kCOLhgt/2.0 - 2.3;
+ xpos = fCwidth[5]/2.0 - kCOLhgt/2.0 - 3.1;
ypos = kBBSdz/2.0 - kBBMdz/2.0;
zpos = fgkSheight/2.0 - fgkSMpltT - 0.4 - kCOLwid/2.0;
parCOL[0] = kCOLwid/2.0;
for (ilayer = 1; ilayer < kNlayer; ilayer++) {
// In baby frame
- xpos = fCwidth[ilayer]/2.0 + kPWRwid/2.0 + 0.93;
+ xpos = fCwidth[ilayer]/2.0 + kPWRwid/2.0;
ypos = kBBSdz/2.0 - kBBMdz/2.0;
zpos = fgkVrocsm + fgkSMpltT + kPWRhgt/2.0 - fgkSheight/2.0 + kPWRposz
+ ilayer * (fgkCH + fgkVspace);
// The upper most layer
// Along the chambers
xpos = fCwidth[5]/2.0 + kPWRhgt/2.0 - 1.3;
- ypos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0;
- zpos = 0.0;
+ ypos = 0.0;
+ zpos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0;
parPWR[0] = kPWRwid /2.0;
parPWR[1] = fgkSlength/2.0;
parPWR[2] = kPWRhgt /2.0;
gMC->Gsposp("UTP3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos
,matrix[3],"ONLY",parPWR,kNparPWR);
// In baby frame
- xpos = fCwidth[5]/2.0 + kPWRhgt/2.0 - 2.3;
+ xpos = fCwidth[5]/2.0 + kPWRhgt/2.0 - 3.0;
ypos = kBBSdz/2.0 - kBBMdz/2.0;
zpos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0;
parPWR[0] = kPWRwid/2.0;
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");
- }
+ }
}
}
gMC->Gspos("UTPC",ilayer ,"UTF1", xpos,ypos,zpos,matrix[0],"ONLY");
gMC->Gspos("UTPC",ilayer+kNlayer,"UTF1",-xpos,ypos,zpos,matrix[1],"ONLY");
}
- xpos = fCwidth[5]/2.0 + kPWRhgt/2.0 - 1.3;
+ xpos = fCwidth[5]/2.0 + kPWRhgt/2.0 - 2.0;
ypos = 0.0;
zpos = fgkSheight/2.0 - fgkSMpltT - 2.0;
gMC->Gspos("UTPC",5 ,"UTF1", xpos,ypos,zpos,matrix[3],"ONLY");
Float_t xyzOrig[3];
Float_t xyzBoxd[3];
- Char_t cTagV[5];
- Char_t cTagM[5];
+ Char_t cTagV[100];
+ Char_t cTagM[100];
for (Int_t i = 0; i < 3; i++) {
xyzMin[i] = +9999.0;
}
//_____________________________________________________________________________
-Int_t AliTRDgeometry::GetStack(Int_t det) const
+Int_t AliTRDgeometry::GetStack(Int_t det)
{
//
// Reconstruct the stack number from the detector number
}
//_____________________________________________________________________________
-Int_t AliTRDgeometry::GetSector(Int_t det) const
+Int_t AliTRDgeometry::GetSector(Int_t det)
{
//
// Reconstruct the sector number from the detector number
return kFALSE;
}
+ TString volPath;
+ TString vpStr = "ALIC_1/B077_1/BSEGMO";
+ TString vpApp1 = "_1/BTRD";
+ TString vpApp2 = "_1";
+ TString vpApp3a = "/UTR1_1/UTS1_1/UTI1_1";
+ TString vpApp3b = "/UTR2_1/UTS2_1/UTI2_1";
+ TString vpApp3c = "/UTR3_1/UTS3_1/UTI3_1";
+
fClusterMatrixArray = new TObjArray(kNdet);
AliAlignObjParams o;
Int_t iLayerTRD = iLayer - AliGeomManager::kTRD1;
Int_t lid = GetDetector(iLayerTRD,istack,isector);
- // Taking holes into account
+ // Check for disabled supermodules
+ volPath = vpStr;
+ volPath += isector;
+ volPath += vpApp1;
+ volPath += isector;
+ volPath += vpApp2;
+ switch (isector) {
+ case 13:
+ case 14:
+ case 15:
+ if (istack == 2) {
+ continue;
+ }
+ volPath += vpApp3c;
+ break;
+ case 11:
+ case 12:
+ volPath += vpApp3b;
+ break;
+ default:
+ volPath += vpApp3a;
+ };
+ if (!gGeoManager->CheckPath(volPath)) {
+ continue;
+ }
+
+ // Check for holes in from of PHOS
if (((isector == 13) || (isector == 14) || (isector == 15)) &&
- (istack == 2)) continue;
+ (istack == 2)) {
+ continue;
+ }
UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iModule);
const char *symname = AliGeomManager::SymName(volid);