#include "AliLog.h"
#include "AliRunLoader.h"
#include "AliAlignObj.h"
-#include "AliAlignObjAngles.h"
+#include "AliAlignObjParams.h"
#include "AliRun.h"
#include "AliTRD.h"
#include "AliTRDcalibDB.h"
-#include "AliTRDCommonParam.h"
#include "AliTRDgeometry.h"
#include "AliTRDpadPlane.h"
//
// The geometry constants
//
- const Int_t AliTRDgeometry::fgkNsect = kNsect;
- const Int_t AliTRDgeometry::fgkNplan = kNplan;
- const Int_t AliTRDgeometry::fgkNcham = kNcham;
- const Int_t AliTRDgeometry::fgkNdet = kNdet;
+ const Int_t AliTRDgeometry::fgkNsect = kNsect;
+ const Int_t AliTRDgeometry::fgkNplan = kNplan;
+ const Int_t AliTRDgeometry::fgkNcham = kNcham;
+ const Int_t AliTRDgeometry::fgkNdet = kNdet;
//
// Dimensions of the detector
//
- // Inner and outer radius of the mother volumes
- const Float_t AliTRDgeometry::fgkRmin = 294.0;
- const Float_t AliTRDgeometry::fgkRmax = 368.0;
-
- // Upper and lower length of the mother volumes
- const Float_t AliTRDgeometry::fgkZmax1 = 378.35;
- const Float_t AliTRDgeometry::fgkZmax2 = 302.0;
-
- // Parameter of the BTR mother volumes
- const Float_t AliTRDgeometry::fgkSheight = 77.9;
- const Float_t AliTRDgeometry::fgkSwidth1 = 94.881;
- const Float_t AliTRDgeometry::fgkSwidth2 = 122.353;
- const Float_t AliTRDgeometry::fgkSlenTR1 = 751.0;
- const Float_t AliTRDgeometry::fgkSlenTR2 = 313.5;
- const Float_t AliTRDgeometry::fgkSlenTR3 = 159.5;
+ // Parameter of the BTRD mother volumes
+ const Float_t AliTRDgeometry::fgkSheight = 77.9;
+ const Float_t AliTRDgeometry::fgkSwidth1 = 94.881;
+ const Float_t AliTRDgeometry::fgkSwidth2 = 122.353;
+ const Float_t AliTRDgeometry::fgkSlength = 751.0;
// The super module side plates
- const Float_t AliTRDgeometry::fgkSMpltT = 0.2;
- //const Float_t AliTRDgeometry::fgkSMgapT = 0.5;
+ const Float_t AliTRDgeometry::fgkSMpltT = 0.2;
// Height of different chamber parts
// Radiator
- const Float_t AliTRDgeometry::fgkCraH = 4.8;
+ const Float_t AliTRDgeometry::fgkCraH = 4.8;
// Drift region
- const Float_t AliTRDgeometry::fgkCdrH = 3.0;
+ const Float_t AliTRDgeometry::fgkCdrH = 3.0;
// Amplification region
- const Float_t AliTRDgeometry::fgkCamH = 0.7;
+ const Float_t AliTRDgeometry::fgkCamH = 0.7;
// Readout
- const Float_t AliTRDgeometry::fgkCroH = 2.316;
+ const Float_t AliTRDgeometry::fgkCroH = 2.316;
// Total height
- const Float_t AliTRDgeometry::fgkCH = AliTRDgeometry::fgkCraH
- + AliTRDgeometry::fgkCdrH
- + AliTRDgeometry::fgkCamH
- + AliTRDgeometry::fgkCroH;
+ const Float_t AliTRDgeometry::fgkCH = AliTRDgeometry::fgkCraH
+ + AliTRDgeometry::fgkCdrH
+ + AliTRDgeometry::fgkCamH
+ + AliTRDgeometry::fgkCroH;
// Vertical spacing of the chambers
- const Float_t AliTRDgeometry::fgkVspace = 1.784;
-
+ const Float_t AliTRDgeometry::fgkVspace = 1.784;
// Horizontal spacing of the chambers
- const Float_t AliTRDgeometry::fgkHspace = 2.0;
-
+ const Float_t AliTRDgeometry::fgkHspace = 2.0;
// Radial distance of the first ROC to the outer plates of the SM
- const Float_t AliTRDgeometry::fgkVrocsm = 1.2;
+ const Float_t AliTRDgeometry::fgkVrocsm = 1.2;
// Thicknesses of different parts of the chamber frame
// Lower aluminum frame
- const Float_t AliTRDgeometry::fgkCalT = 0.3;
- // Lower G10 frame sides
- const Float_t AliTRDgeometry::fgkCclsT = 0.3;
- // Lower G10 frame front
- const Float_t AliTRDgeometry::fgkCclfT = 1.0;
- // Upper G10 frame
- const Float_t AliTRDgeometry::fgkCcuT = 0.9;
- // Upper Al frame
- const Float_t AliTRDgeometry::fgkCauT = 1.5;
+ const Float_t AliTRDgeometry::fgkCalT = 0.4;
+ // Lower Wacosit frame sides
+ const Float_t AliTRDgeometry::fgkCclsT = 0.21;
+ // Lower Wacosit frame front
+ const Float_t AliTRDgeometry::fgkCclfT = 1.0;
+ // Thickness of glue around radiator
+ const Float_t AliTRDgeometry::fgkCglT = 0.25;
+ // Upper Wacosit frame
+ const Float_t AliTRDgeometry::fgkCcuT = 0.9;
+ // Al frame of back panel
+ const Float_t AliTRDgeometry::fgkCauT = 1.5;
+ // Additional Al of the lower chamber frame
+ const Float_t AliTRDgeometry::fgkCalW = 1.11;
// Additional width of the readout chamber frames
- const Float_t AliTRDgeometry::fgkCroW = 0.9;
+ const Float_t AliTRDgeometry::fgkCroW = 0.9;
// Difference of outer chamber width and pad plane width
- //const Float_t AliTRDgeometry::fgkCpadW = 1.0;
- const Float_t AliTRDgeometry::fgkCpadW = 0.0;
- const Float_t AliTRDgeometry::fgkRpadW = 1.0;
+ const Float_t AliTRDgeometry::fgkCpadW = 0.0;
+ const Float_t AliTRDgeometry::fgkRpadW = 1.0;
//
// Thickness of the the material layers
//
- const Float_t AliTRDgeometry::fgkRaThick = 0.3646;
- const Float_t AliTRDgeometry::fgkMyThick = 0.005;
- const Float_t AliTRDgeometry::fgkDrThick = AliTRDgeometry::fgkCdrH;
- const Float_t AliTRDgeometry::fgkAmThick = AliTRDgeometry::fgkCamH;
- const Float_t AliTRDgeometry::fgkXeThick = AliTRDgeometry::fgkDrThick
- + AliTRDgeometry::fgkAmThick;
- const Float_t AliTRDgeometry::fgkCuThick = 0.0072;
- const Float_t AliTRDgeometry::fgkSuThick = 0.06;
- const Float_t AliTRDgeometry::fgkFeThick = 0.0044;
- const Float_t AliTRDgeometry::fgkCoThick = 0.02;
- const Float_t AliTRDgeometry::fgkWaThick = 0.02;
- const Float_t AliTRDgeometry::fgkRcThick = 0.0058;
- const Float_t AliTRDgeometry::fgkRpThick = 0.0632;
+ const Float_t AliTRDgeometry::fgkMyThick = 0.005;
+ const Float_t AliTRDgeometry::fgkRaThick = 0.3233;
+ const Float_t AliTRDgeometry::fgkDrThick = AliTRDgeometry::fgkCdrH;
+ const Float_t AliTRDgeometry::fgkAmThick = AliTRDgeometry::fgkCamH;
+ const Float_t AliTRDgeometry::fgkXeThick = AliTRDgeometry::fgkDrThick
+ + AliTRDgeometry::fgkAmThick;
+ const Float_t AliTRDgeometry::fgkWrThick = 0.0002;
+ const Float_t AliTRDgeometry::fgkCuThick = 0.0072;
+ const Float_t AliTRDgeometry::fgkGlThick = 0.05;
+ const Float_t AliTRDgeometry::fgkSuThick = 0.0919;
+ const Float_t AliTRDgeometry::fgkRcThick = 0.0058;
+ const Float_t AliTRDgeometry::fgkRpThick = 0.0632;
+ const Float_t AliTRDgeometry::fgkRoThick = 0.0028;
//
// Position of the material layers
//
- const Float_t AliTRDgeometry::fgkRaZpos = -1.50;
- const Float_t AliTRDgeometry::fgkMyZpos = 0.895;
- const Float_t AliTRDgeometry::fgkDrZpos = 2.4;
- const Float_t AliTRDgeometry::fgkAmZpos = 0.0;
- const Float_t AliTRDgeometry::fgkCuZpos = -0.9995;
- const Float_t AliTRDgeometry::fgkSuZpos = 0.0000;
- const Float_t AliTRDgeometry::fgkFeZpos = 0.0322;
- const Float_t AliTRDgeometry::fgkCoZpos = 0.97;
- const Float_t AliTRDgeometry::fgkWaZpos = 0.99;
- const Float_t AliTRDgeometry::fgkRcZpos = 1.04;
- const Float_t AliTRDgeometry::fgkRpZpos = 1.0;
-
- const Double_t AliTRDgeometry::fgkTime0Base = Rmin() + CraHght() + CdrHght() + CamHght()/2.;
- const Float_t AliTRDgeometry::fgkTime0[6] = { fgkTime0Base + 0 * (Cheight() + Cspace()),
- fgkTime0Base + 1 * (Cheight() + Cspace()),
- fgkTime0Base + 2 * (Cheight() + Cspace()),
- fgkTime0Base + 3 * (Cheight() + Cspace()),
- fgkTime0Base + 4 * (Cheight() + Cspace()),
- fgkTime0Base + 5 * (Cheight() + Cspace()) };
+ const Float_t AliTRDgeometry::fgkRaZpos = 0.0;
+ const Float_t AliTRDgeometry::fgkDrZpos = 2.4;
+ const Float_t AliTRDgeometry::fgkAmZpos = 0.0;
+ const Float_t AliTRDgeometry::fgkWrZpos = 0.0;
+ const Float_t AliTRDgeometry::fgkCuZpos = -0.9995;
+ const Float_t AliTRDgeometry::fgkGlZpos = -0.5;
+ const Float_t AliTRDgeometry::fgkSuZpos = 0.0;
+ const Float_t AliTRDgeometry::fgkRcZpos = 1.04;
+ const Float_t AliTRDgeometry::fgkRpZpos = 1.0;
+ const Float_t AliTRDgeometry::fgkRoZpos = 1.05;
+
+ const Int_t AliTRDgeometry::fgkMCMmax = 16;
+ const Int_t AliTRDgeometry::fgkMCMrow = 4;
+ const Int_t AliTRDgeometry::fgkROBmaxC0 = 6;
+ const Int_t AliTRDgeometry::fgkROBmaxC1 = 8;
+ const Int_t AliTRDgeometry::fgkADCmax = 21;
+ const Int_t AliTRDgeometry::fgkTBmax = 60;
+ const Int_t AliTRDgeometry::fgkPadmax = 18;
+ const Int_t AliTRDgeometry::fgkColmax = 144;
+ const Int_t AliTRDgeometry::fgkRowmaxC0 = 12;
+ const Int_t AliTRDgeometry::fgkRowmaxC1 = 16;
+
+ const Double_t AliTRDgeometry::fgkTime0Base = 300.65;
+ const Float_t AliTRDgeometry::fgkTime0[6] = { fgkTime0Base + 0 * (Cheight() + Cspace())
+ , fgkTime0Base + 1 * (Cheight() + Cspace())
+ , fgkTime0Base + 2 * (Cheight() + Cspace())
+ , fgkTime0Base + 3 * (Cheight() + Cspace())
+ , fgkTime0Base + 4 * (Cheight() + Cspace())
+ , fgkTime0Base + 5 * (Cheight() + Cspace())};
//_____________________________________________________________________________
AliTRDgeometry::AliTRDgeometry()
:AliGeometry()
- ,fMatrixArray(0)
- ,fMatrixCorrectionArray(0)
- ,fMatrixGeo(0)
-
+ ,fClusterMatrixArray(0)
+ ,fPadPlaneArray(0)
{
//
// AliTRDgeometry default constructor
//_____________________________________________________________________________
AliTRDgeometry::AliTRDgeometry(const AliTRDgeometry &g)
:AliGeometry(g)
- ,fMatrixArray(g.fMatrixArray)
- ,fMatrixCorrectionArray(g.fMatrixCorrectionArray)
- ,fMatrixGeo(g.fMatrixGeo)
+ ,fClusterMatrixArray(0)
+ ,fPadPlaneArray(0)
{
//
// AliTRDgeometry copy constructor
// AliTRDgeometry destructor
//
- if (fMatrixArray) {
- delete fMatrixArray;
- fMatrixArray = 0;
+ if (fClusterMatrixArray) {
+ fClusterMatrixArray->Delete();
+ delete fClusterMatrixArray;
+ fClusterMatrixArray = 0;
}
- if (fMatrixCorrectionArray) {
- delete fMatrixCorrectionArray;
- fMatrixCorrectionArray = 0;
+ if (fPadPlaneArray) {
+ fPadPlaneArray->Delete();
+ delete fPadPlaneArray;
+ fPadPlaneArray = 0;
}
}
// Assignment operator
//
- if (this != &g) Init();
+ if (this != &g) {
+ Init();
+ }
return *this;
//
// Initializes the geometry parameter
//
- // The maximum number of pads
- // and the position of pad 0,0,0
- //
- // chambers seen from the top:
- // +----------------------------+
- // | |
- // | | ^
- // | | rphi|
- // | | |
- // |0 | |
- // +----------------------------+ +------>
- // z
- // chambers seen from the side: ^
- // +----------------------------+ drift|
- // |0 | |
- // | | |
- // +----------------------------+ +------>
- // z
- //
- // IMPORTANT: time bin 0 is now the first one in the drift region
- // closest to the readout !!!
- //
Int_t icham;
Int_t iplan;
// The rotation matrix elements
Float_t phi = 0.0;
for (isect = 0; isect < fgkNsect; isect++) {
- phi = -2.0 * TMath::Pi() / (Float_t) fgkNsect * ((Float_t) isect + 0.5);
- fRotA11[isect] = TMath::Cos(phi);
- fRotA12[isect] = TMath::Sin(phi);
- fRotA21[isect] = TMath::Sin(phi);
- fRotA22[isect] = TMath::Cos(phi);
- phi = -1.0 * phi;
+ phi = 2.0 * TMath::Pi() / (Float_t) fgkNsect * ((Float_t) isect + 0.5);
fRotB11[isect] = TMath::Cos(phi);
fRotB12[isect] = TMath::Sin(phi);
fRotB21[isect] = TMath::Sin(phi);
fRotB22[isect] = TMath::Cos(phi);
}
+ // Initialize the SM status
for (isect = 0; isect < fgkNsect; isect++) {
SetSMstatus(isect,1);
}
}
+//_____________________________________________________________________________
+void AliTRDgeometry::CreatePadPlaneArray()
+{
+ //
+ // Creates the array of AliTRDpadPlane objects
+ //
+
+ if (fPadPlaneArray) {
+ fPadPlaneArray->Delete();
+ delete fPadPlaneArray;
+ }
+
+ fPadPlaneArray = new TObjArray(fgkNplan * fgkNcham);
+ for (Int_t iplan = 0; iplan < fgkNplan; iplan++) {
+ for (Int_t icham = 0; icham < fgkNcham; icham++) {
+ Int_t ipp = GetDetectorSec(iplan,icham);
+ fPadPlaneArray->AddAt(CreatePadPlane(iplan,icham),ipp);
+ }
+ }
+
+}
+
+//_____________________________________________________________________________
+AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t iplan, Int_t icham)
+{
+ //
+ // Creates an AliTRDpadPlane object
+ //
+
+ AliTRDpadPlane *padPlane = new AliTRDpadPlane();
+
+ padPlane->SetPlane(iplan);
+ padPlane->SetChamber(icham);
+
+ padPlane->SetRowSpacing(0.0);
+ padPlane->SetColSpacing(0.0);
+
+ padPlane->SetLengthRim(1.0);
+ padPlane->SetWidthRim(0.5);
+
+ padPlane->SetNcols(144);
+
+ //
+ // The pad plane parameter
+ //
+ switch (iplan) {
+ case 0:
+ if (icham == 2) {
+ // L0C0 type
+ padPlane->SetNrows(12);
+ padPlane->SetLength(108.0);
+ padPlane->SetWidth(92.2);
+ padPlane->SetLengthOPad(8.0);
+ padPlane->SetWidthOPad(0.515);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.635);
+ padPlane->SetTiltingAngle(-2.0);
+ }
+ else {
+ // L0C1 type
+ padPlane->SetNrows(16);
+ padPlane->SetLength(122.0);
+ padPlane->SetWidth(92.2);
+ padPlane->SetLengthOPad(7.5);
+ padPlane->SetWidthOPad(0.515);
+ padPlane->SetLengthIPad(7.5);
+ padPlane->SetWidthIPad(0.635);
+ padPlane->SetTiltingAngle(-2.0);
+ }
+ break;
+ case 1:
+ if (icham == 2) {
+ // L1C0 type
+ padPlane->SetNrows(12);
+ padPlane->SetLength(108.0);
+ padPlane->SetWidth(96.6);
+ padPlane->SetLengthOPad(8.0);
+ padPlane->SetWidthOPad(0.585);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.665);
+ padPlane->SetTiltingAngle(2.0);
+ }
+ else {
+ // L1C1 type
+ padPlane->SetNrows(16);
+ padPlane->SetLength(122.0);
+ padPlane->SetWidth(96.6);
+ padPlane->SetLengthOPad(7.5);
+ padPlane->SetWidthOPad(0.585);
+ padPlane->SetLengthIPad(7.5);
+ padPlane->SetWidthIPad(0.665);
+ padPlane->SetTiltingAngle(2.0);
+ }
+ break;
+ case 2:
+ if (icham == 2) {
+ // L2C0 type
+ padPlane->SetNrows(12);
+ padPlane->SetLength(108.0);
+ padPlane->SetWidth(101.1);
+ padPlane->SetLengthOPad(8.0);
+ padPlane->SetWidthOPad(0.705);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.695);
+ padPlane->SetTiltingAngle(-2.0);
+ }
+ else {
+ // L2C1 type
+ padPlane->SetNrows(16);
+ padPlane->SetLength(129.0);
+ padPlane->SetWidth(101.1);
+ padPlane->SetLengthOPad(7.5);
+ padPlane->SetWidthOPad(0.705);
+ padPlane->SetLengthIPad(8.0);
+ padPlane->SetWidthIPad(0.695);
+ padPlane->SetTiltingAngle(-2.0);
+ }
+ break;
+ case 3:
+ if (icham == 2) {
+ // L3C0 type
+ padPlane->SetNrows(12);
+ padPlane->SetLength(108.0);
+ padPlane->SetWidth(105.5);
+ padPlane->SetLengthOPad(8.0);
+ padPlane->SetWidthOPad(0.775);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.725);
+ padPlane->SetTiltingAngle(2.0);
+ }
+ else {
+ // L3C1 type
+ padPlane->SetNrows(16);
+ padPlane->SetLength(136.0);
+ padPlane->SetWidth(105.5);
+ padPlane->SetLengthOPad(7.5);
+ padPlane->SetWidthOPad(0.775);
+ padPlane->SetLengthIPad(8.5);
+ padPlane->SetWidthIPad(0.725);
+ padPlane->SetTiltingAngle(2.0);
+ }
+ break;
+ case 4:
+ if (icham == 2) {
+ // L4C0 type
+ padPlane->SetNrows(12);
+ padPlane->SetLength(108.0);
+ padPlane->SetWidth(109.9);
+ padPlane->SetLengthOPad(8.0);
+ padPlane->SetWidthOPad(0.845);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.755);
+ padPlane->SetTiltingAngle(-2.0);
+ }
+ else {
+ // L4C1 type
+ padPlane->SetNrows(16);
+ padPlane->SetLength(143.0);
+ padPlane->SetWidth(109.9);
+ padPlane->SetLengthOPad(7.5);
+ padPlane->SetWidthOPad(0.845);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.755);
+ padPlane->SetTiltingAngle(-2.0);
+ }
+ break;
+ case 5:
+ if (icham == 2) {
+ // L5C0 type
+ padPlane->SetNrows(12);
+ padPlane->SetLength(108.0);
+ padPlane->SetWidth(114.4);
+ padPlane->SetLengthOPad(8.0);
+ padPlane->SetWidthOPad(0.965);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.785);
+ padPlane->SetTiltingAngle(2.0);
+ }
+ else {
+ // L5C1 type
+ padPlane->SetNrows(16);
+ padPlane->SetLength(145.0);
+ padPlane->SetWidth(114.4);
+ padPlane->SetLengthOPad(8.5);
+ padPlane->SetWidthOPad(0.965);
+ padPlane->SetLengthIPad(9.0);
+ padPlane->SetWidthIPad(0.785);
+ padPlane->SetTiltingAngle(2.0);
+ }
+ break;
+ };
+
+ //
+ // The positions of the borders of the pads
+ //
+ // Row direction
+ //
+ Double_t row = fClength[iplan][icham] / 2.0
+ - fgkRpadW
+ - padPlane->GetLengthRim();
+ for (Int_t ir = 0; ir < padPlane->GetNrows(); ir++) {
+ padPlane->SetPadRow(ir,row);
+ row -= padPlane->GetRowSpacing();
+ if (ir == 0) {
+ row -= padPlane->GetLengthOPad();
+ }
+ else {
+ row -= padPlane->GetLengthIPad();
+ }
+ }
+ //
+ // Column direction
+ //
+ Double_t col = fCwidth[iplan] / 2.0
+ + fgkCroW
+ - padPlane->GetWidthRim();
+ for (Int_t ic = 0; ic < padPlane->GetNcols(); ic++) {
+ padPlane->SetPadCol(ic,col);
+ col -= padPlane->GetColSpacing();
+ if (ic == 0) {
+ col -= padPlane->GetWidthOPad();
+ }
+ else {
+ col -= padPlane->GetWidthIPad();
+ }
+ }
+ // Calculate the offset to translate from the local ROC system into
+ // the local supermodule system, which is used for clusters
+ Double_t rowTmp = fClength[iplan][0]
+ + fClength[iplan][1]
+ + fClength[iplan][2] / 2.0;
+ for (Int_t ic = 0; ic < icham; ic++) {
+ rowTmp -= fClength[iplan][ic];
+ }
+ padPlane->SetPadRowSMOffset(rowTmp - fClength[iplan][icham]/2.0);
+
+ return padPlane;
+
+}
+
//_____________________________________________________________________________
void AliTRDgeometry::CreateGeometry(Int_t *idtmed)
{
//
// Volume (Air) wrapping the readout chamber components
// UTxx includes: UAxx, UDxx, UFxx, UUxx
- // Obs:
+ //
+ // Volume (Air) wrapping the services (fee + cooling)
// UUxx the services volume has been reduced by 7.42 mm
// in order to allow shifts in radial direction
//
- // Lower part of the readout chambers (gas volume + radiator)
+ // Lower part of the readout chambers (drift volume + radiator)
//
- // UAxx Aluminum frames (Al)
- // UBxx G10 frames (C)
- // UCxx Inner volumes (Air)
+ // UAxx Aluminum frames (Al)
+ // UBxx Wacosit frames (C)
+ // UXxx Glue around radiator (Epoxy)
+ // UCxx Inner volumes (Air)
+ // UZxx Additional aluminum ledges (Al)
//
// Upper part of the readout chambers (readout plane + fee)
//
- // UDxx G10 frames (C)
- // UExx Inner volumes of the G10 (Air)
- // UFxx Aluminum frames (Al)
- // UGxx Inner volumes of the Al (Air)
+ // UDxx Wacosit frames of amp. region (C)
+ // UExx Inner volumes of the frame (Air)
+ // UFxx Aluminum frame of back panel (Al)
+ // UGxx Inner volumes of the back panel (Air)
//
// Inner material layers
//
- // UHxx Radiator (Rohacell)
- // UIxx Entrance window (Mylar)
- // UJxx Drift volume (Xe/CO2)
- // UKxx Amplification volume (Xe/CO2)
- // ULxx Pad plane (Cu)
- // UMxx Support structure (Rohacell)
- // UNxx ROB base material (C)
- // UOxx ROB copper (Cu)
+ // UHxx Radiator (Rohacell)
+ // UJxx Drift volume (Xe/CO2)
+ // UKxx Amplification volume (Xe/CO2)
+ // UWxx Wire plane (Cu)
+ // ULxx Pad plane (Cu)
+ // UYxx Glue layer (Epoxy)
+ // UMxx Support structure (Rohacell)
+ // UNxx ROB base material (C)
+ // UOxx ROB copper (Cu)
+ // UVxx ROB other materials (Cu)
//
const Int_t kNparTrd = 4;
// Provides material for side plates of super module
parTrd[0] = fgkSwidth1/2.0;
parTrd[1] = fgkSwidth2/2.0;
- parTrd[2] = fgkSlenTR1/2.0;
+ parTrd[2] = fgkSlength/2.0;
parTrd[3] = fgkSheight/2.0;
gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
- //
// The outer aluminum plates of the super module (Al)
parTrd[0] = fgkSwidth1/2.0;
parTrd[1] = fgkSwidth2/2.0;
- parTrd[2] = fgkSlenTR1/2.0;
+ parTrd[2] = fgkSlength/2.0;
parTrd[3] = fgkSheight/2.0;
gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd);
// full length in z-direction
parTrd[0] = fgkSwidth1/2.0 - fgkSMpltT;
parTrd[1] = fgkSwidth2/2.0 - fgkSMpltT;
- parTrd[2] = fgkSlenTR1/2.0;
+ parTrd[2] = fgkSlength/2.0;
parTrd[3] = fgkSheight/2.0 - fgkSMpltT;
gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
Int_t iDet = GetDetectorSec(iplan,icham);
- // The lower part of the readout chambers (gas volume + radiator)
+ // The lower part of the readout chambers (drift volume + radiator)
// The aluminum frames
sprintf(cTagV,"UA%02d",iDet);
parCha[0] = fCwidth[iplan]/2.0;
fChamberUAboxd[iDet][1] = parCha[1];
fChamberUAboxd[iDet][2] = parCha[2];
gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
- // The G10 frames
+ // The additional aluminum on the frames
+ // This part has not the correct postion but is just supposed to
+ // represent the missing material. The correct from of the L-shaped
+ // profile would not fit into the alignable volume.
+ sprintf(cTagV,"UZ%02d",iDet);
+ parCha[0] = fgkCroW/2.0;
+ parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0;
+ parCha[2] = fgkCalW/2.0;
+ fChamberUAboxd[iDet][0] = fChamberUAboxd[iDet][0] + fgkCroW;
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha);
+ // The Wacosit frames
sprintf(cTagV,"UB%02d",iDet);
parCha[0] = fCwidth[iplan]/2.0 - fgkCalT;
parCha[1] = -1.0;
parCha[2] = -1.0;
gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
- // The inner part (air)
- sprintf(cTagV,"UC%02d",iDet);
+ // The glue around the radiator
+ sprintf(cTagV,"UX%02d",iDet);
parCha[0] = fCwidth[iplan]/2.0 - fgkCalT - fgkCclsT;
- parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0- fgkCclfT;
+ parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0 - fgkCclfT;
+ parCha[2] = fgkCraH/2.0;
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha);
+ // The inner part of radiator (air)
+ sprintf(cTagV,"UC%02d",iDet);
+ parCha[0] = fCwidth[iplan]/2.0 - fgkCalT - fgkCclsT - fgkCglT;
+ parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0 - fgkCclfT - fgkCglT;
parCha[2] = -1.0;
gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
- // The upper part of the readout chambers (readout plane)
- // The G10 frames
+ // The upper part of the readout chambers (amplification volume)
+ // The Wacosit frames
sprintf(cTagV,"UD%02d",iDet);
parCha[0] = fCwidth[iplan]/2.0 + fgkCroW;
parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0;
fChamberUDboxd[iDet][1] = parCha[1];
fChamberUDboxd[iDet][2] = parCha[2];
gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha);
- // The inner part of the G10 frame (air)
+ // The inner part of the Wacosit frame (air)
sprintf(cTagV,"UE%02d",iDet);
parCha[0] = fCwidth[iplan]/2.0 + fgkCroW - fgkCcuT;
- parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0- fgkCcuT;
+ parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0 - fgkCcuT;
parCha[2] = -1.;
gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
+
+ // The support structure (pad plane, back panel, readout boards)
// The aluminum frames
sprintf(cTagV,"UF%02d",iDet);
parCha[0] = fCwidth[iplan]/2.0 + fgkCroW;
// The inner part of the aluminum frames
sprintf(cTagV,"UG%02d",iDet);
parCha[0] = fCwidth[iplan]/2.0 + fgkCroW - fgkCauT;
- parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0- fgkCauT;
+ parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0 - fgkCauT;
parCha[2] = -1.0;
gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha);
// The material layers inside the chambers
+ // Rohacell layer (radiator)
parCha[0] = -1.0;
parCha[1] = -1.0;
- // Rohacell layer (radiator)
parCha[2] = fgkRaThick/2.0;
sprintf(cTagV,"UH%02d",iDet);
gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha);
- // Mylar layer (entrance window + HV cathode)
- parCha[2] = fgkMyThick/2.0;
- sprintf(cTagV,"UI%02d",iDet);
- gMC->Gsvolu(cTagV,"BOX ",idtmed[1308-1],parCha,kNparCha);
// Xe/Isobutane layer (drift volume)
+ parCha[0] = fCwidth[iplan]/2.0 - fgkCalT - fgkCclsT;
+ parCha[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0 - fgkCclfT;
parCha[2] = fgkDrThick/2.0;
sprintf(cTagV,"UJ%02d",iDet);
gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
// Xe/Isobutane layer (amplification volume)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
parCha[2] = fgkAmThick/2.0;
sprintf(cTagV,"UK%02d",iDet);
gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha);
+ // Cu layer (wire plane)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
+ parCha[2] = fgkWrThick/2.0;
+ sprintf(cTagV,"UW%02d",iDet);
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1303-1],parCha,kNparCha);
// Cu layer (pad plane)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
parCha[2] = fgkCuThick/2.0;
sprintf(cTagV,"UL%02d",iDet);
gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha);
+ // Epoxy layer (glue)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
+ parCha[2] = fgkGlThick/2.0;
+ sprintf(cTagV,"UY%02d",iDet);
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha);
// G10 layer (support structure / honeycomb)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
parCha[2] = fgkSuThick/2.0;
sprintf(cTagV,"UM%02d",iDet);
- gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
- // G10 layer (readout board)
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1310-1],parCha,kNparCha);
+ // G10 layer (PCB readout board)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
parCha[2] = fgkRpThick/2;
sprintf(cTagV,"UN%02d",iDet);
gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha);
- // Cu layer (readout board)
+ // Cu layer (traces in readout board)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
parCha[2] = fgkRcThick/2.0;
sprintf(cTagV,"UO%02d",iDet);
gMC->Gsvolu(cTagV,"BOX ",idtmed[1306-1],parCha,kNparCha);
+ // Cu layer (other material on in readout board)
+ parCha[0] = -1.0;
+ parCha[1] = -1.0;
+ parCha[2] = fgkRoThick/2.0;
+ sprintf(cTagV,"UV%02d",iDet);
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1304-1],parCha,kNparCha);
// Position the layers in the chambers
xpos = 0.0;
sprintf(cTagV,"UH%02d",iDet);
sprintf(cTagM,"UC%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
- // Mylar layer (entrance window + HV cathode)
- zpos = fgkMyZpos;
- sprintf(cTagV,"UI%02d",iDet);
- sprintf(cTagM,"UC%02d",iDet);
- gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
// Xe/Isobutane layer (drift volume)
zpos = fgkDrZpos;
sprintf(cTagV,"UJ%02d",iDet);
- sprintf(cTagM,"UC%02d",iDet);
+ sprintf(cTagM,"UB%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
// Upper part
// Xe/Isobutane layer (amplification volume)
sprintf(cTagV,"UK%02d",iDet);
sprintf(cTagM,"UE%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
- // Readout part
+ // Cu layer (wire plane inside amplification volume)
+ zpos = fgkWrZpos;
+ sprintf(cTagV,"UW%02d",iDet);
+ sprintf(cTagM,"UK%02d",iDet);
+ gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
+ // Readout part + support plane
// Cu layer (pad plane)
zpos = fgkCuZpos;
sprintf(cTagV,"UL%02d",iDet);
sprintf(cTagM,"UG%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
+ // Epoxy layer (glue)
+ zpos = fgkGlZpos;
+ sprintf(cTagV,"UY%02d",iDet);
+ sprintf(cTagM,"UG%02d",iDet);
+ gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
// G10 layer (support structure)
zpos = fgkSuZpos;
sprintf(cTagV,"UM%02d",iDet);
sprintf(cTagM,"UG%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
- // G10 layer (readout board)
+ // G10 layer (PCB readout board)
zpos = fgkRpZpos;
sprintf(cTagV,"UN%02d",iDet);
sprintf(cTagM,"UG%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
- // Cu layer (readout board)
+ // Cu layer (traces in readout board)
zpos = fgkRcZpos;
sprintf(cTagV,"UO%02d",iDet);
sprintf(cTagM,"UG%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
+ // Cu layer (other materials on readout board)
+ zpos = fgkRoZpos;
+ sprintf(cTagV,"UV%02d",iDet);
+ sprintf(cTagM,"UG%02d",iDet);
+ gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
// Position the inner volumes of the chambers in the frames
xpos = 0.0;
ypos = 0.0;
+ // The inner part of the radiator
zpos = 0.0;
- // The inside of the lower G10 frame
sprintf(cTagV,"UC%02d",iDet);
+ sprintf(cTagM,"UX%02d",iDet);
+ gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
+ // The glue around the radiator
+ zpos = fgkCraH/2.0 - fgkCdrH/2.0 - fgkCraH/2.0;
+ sprintf(cTagV,"UX%02d",iDet);
sprintf(cTagM,"UB%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
- // The lower G10 frame inside the aluminum frame
+ // The lower Wacosit frame inside the aluminum frame
+ zpos = 0.0;
sprintf(cTagV,"UB%02d",iDet);
sprintf(cTagM,"UA%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
- // The inside of the upper G10 frame
+ // The inside of the upper Wacosit frame
+ zpos = 0.0;
sprintf(cTagV,"UE%02d",iDet);
sprintf(cTagM,"UD%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
// The inside of the upper aluminum frame
+ zpos = 0.0;
sprintf(cTagV,"UG%02d",iDet);
sprintf(cTagM,"UF%02d",iDet);
gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
// Position the frames of the chambers in the TRD mother volume
xpos = 0.0;
- ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.0;
+ ypos = fClength[iplan][0] + fClength[iplan][1] + fClength[iplan][2]/2.0;
for (Int_t ic = 0; ic < icham; ic++) {
- ypos += fClength[iplan][ic];
+ ypos -= fClength[iplan][ic];
}
- ypos += fClength[iplan][icham]/2.0;
- zpos = fgkVrocsm + fgkCraH/2.0 + fgkCdrH/2.0 - fgkSheight/2.0
+ ypos -= fClength[iplan][icham]/2.0;
+ zpos = fgkVrocsm + fgkSMpltT + fgkCraH/2.0 + fgkCdrH/2.0 - fgkSheight/2.0
+ iplan * (fgkCH + fgkVspace);
// The lower aluminum frame, radiator + drift region
sprintf(cTagV,"UA%02d",iDet);
//
// USRL Support rails for the chambers (Al)
// USxx Support cross bars between the chambers (Al)
+ // USHx Horizontal connection between the cross bars (Al)
+ // USLx Long corner ledges (Al)
//
Int_t iplan = 0;
Float_t zpos = 0.0;
Char_t cTagV[5];
+ Char_t cTagM[5];
+
+ // The rotation matrices
+ const Int_t kNmatrix = 4;
+ Int_t matrix[kNmatrix];
+ gMC->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
+ gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0);
+ gMC->Matrix(matrix[2], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0);
+ gMC->Matrix(matrix[3], 90.0, 180.0, 0.0, 180.0, 90.0, 90.0);
//
// The chamber support rails
const Float_t kSRLwid = 2.00;
const Float_t kSRLhgt = 2.3;
- const Float_t kSRLdst = 0.6;
+ const Float_t kSRLdst = 1.0;
const Int_t kNparSRL = 3;
Float_t parSRL[kNparSRL];
- parSRL[0] = kSRLwid/2.0;
- parSRL[1] = fgkSlenTR1/2.;
- parSRL[2] = kSRLhgt/2.0;
+ parSRL[0] = kSRLwid /2.0;
+ parSRL[1] = fgkSlength/2.0;
+ parSRL[2] = kSRLhgt /2.0;
gMC->Gsvolu("USRL","BOX ",idtmed[1301-1],parSRL,kNparSRL);
xpos = 0.0;
ypos = 0.0;
zpos = 0.0;
for (iplan = 0; iplan < kNplan; iplan++) {
- xpos = fCwidth[iplan]/2.0 + kSRLwid/2.0 + kSRLdst;
+ xpos = fCwidth[iplan]/2.0 + kSRLwid/2.0 + kSRLdst;
ypos = 0.0;
- zpos = fgkVrocsm + fgkCraH + fgkCdrH - fgkSheight/2.0 - kSRLhgt/2.0
+ zpos = fgkVrocsm + fgkSMpltT + fgkCraH + fgkCdrH + fgkCamH
+ - fgkSheight/2.0
+ iplan * (fgkCH + fgkVspace);
gMC->Gspos("USRL",iplan+1 ,"UTI1", xpos,ypos,zpos,0,"ONLY");
gMC->Gspos("USRL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,0,"ONLY");
//
const Float_t kSCBwid = 1.0;
+ const Float_t kSCBthk = 2.0;
+ const Float_t kSCHhgt = 0.3;
+
const Int_t kNparSCB = 3;
Float_t parSCB[kNparSCB];
parSCB[1] = kSCBwid/2.0;
- parSCB[2] = fgkCH/2.0;
+ parSCB[2] = fgkCH /2.0 + fgkVspace/2.0 - kSCHhgt;
+
+ const Int_t kNparSCI = 3;
+ Float_t parSCI[kNparSCI];
+ parSCI[1] = -1;
xpos = 0.0;
ypos = 0.0;
zpos = 0.0;
for (iplan = 0; iplan < kNplan; iplan++) {
+ // The aluminum of the cross bars
parSCB[0] = fCwidth[iplan]/2.0 + kSRLdst/2.0;
-
- sprintf(cTagV,"US0%01d",iplan);
+ sprintf(cTagV,"USF%01d",iplan);
gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
- xpos = 0.0;
- ypos = fgkSlenTR1/2.0 - kSCBwid/2.0;
- zpos = fgkVrocsm + fgkCH/2.0 - fgkSheight/2.0 + iplan * (fgkCH + fgkVspace);
- gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
- sprintf(cTagV,"US1%01d",iplan);
- gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
- xpos = 0.0;
- ypos = fClength[iplan][2]/2.0 + fClength[iplan][1];
- zpos = fgkVrocsm + fgkCH/2.0 - fgkSheight/2.0 + iplan * (fgkCH + fgkVspace);
- gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
+ // The empty regions in the cross bars
+ Float_t thkSCB = kSCBthk;
+ if (iplan < 2) {
+ thkSCB *= 1.5;
+ }
+ parSCI[2] = parSCB[2] - thkSCB;
+ parSCI[0] = parSCB[0]/4.0 - kSCBthk;
+ sprintf(cTagV,"USI%01d",iplan);
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parSCI,kNparSCI);
- sprintf(cTagV,"US2%01d",iplan);
- gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
+ sprintf(cTagV,"USI%01d",iplan);
+ sprintf(cTagM,"USF%01d",iplan);
+ ypos = 0.0;
+ zpos = 0.0;
+ xpos = parSCI[0] + thkSCB/2.0;
+ gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY");
+ xpos = - parSCI[0] - thkSCB/2.0;
+ gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY");
+ xpos = 3.0 * parSCI[0] + 1.5 * thkSCB;
+ gMC->Gspos(cTagV,3,cTagM,xpos,ypos,zpos,0,"ONLY");
+ xpos = - 3.0 * parSCI[0] - 1.5 * thkSCB;
+ gMC->Gspos(cTagV,4,cTagM,xpos,ypos,zpos,0,"ONLY");
+
+ sprintf(cTagV,"USF%01d",iplan);
xpos = 0.0;
- ypos = fClength[iplan][2]/2.0;
- zpos = fgkVrocsm + fgkCH/2.0 - fgkSheight/2.0 + iplan * (fgkCH + fgkVspace);
+ zpos = fgkVrocsm + fgkSMpltT + parSCB[2] - fgkSheight/2.0
+ + iplan * (fgkCH + fgkVspace);
+
+ ypos = fgkSlength/2.0 - kSCBwid/2.0;
gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
- sprintf(cTagV,"US3%01d",iplan);
- gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
- xpos = 0.0;
+ ypos = fClength[iplan][2]/2.0 + fClength[iplan][1];
+ gMC->Gspos(cTagV,2,"UTI1", xpos,ypos,zpos,0,"ONLY");
+
+ ypos = fClength[iplan][2]/2.0;
+ gMC->Gspos(cTagV,3,"UTI1", xpos,ypos,zpos,0,"ONLY");
+
ypos = - fClength[iplan][2]/2.0;
- zpos = fgkVrocsm + fgkCH/2.0 - fgkSheight/2.0 + iplan * (fgkCH + fgkVspace);
- gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
+ gMC->Gspos(cTagV,4,"UTI1", xpos,ypos,zpos,0,"ONLY");
- sprintf(cTagV,"US4%01d",iplan);
- gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
- xpos = 0.0;
ypos = - fClength[iplan][2]/2.0 - fClength[iplan][1];
- zpos = fgkVrocsm + fgkCH/2.0 - fgkSheight/2.0 + iplan * (fgkCH + fgkVspace);
- gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
+ gMC->Gspos(cTagV,5,"UTI1", xpos,ypos,zpos,0,"ONLY");
- sprintf(cTagV,"US5%01d",iplan);
- gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB);
+ ypos = - fgkSlength/2.0 + kSCBwid/2.0;
+ gMC->Gspos(cTagV,6,"UTI1", xpos,ypos,zpos,0,"ONLY");
+
+ }
+
+ //
+ // The horizontal connections between the cross bars
+ //
+
+ const Int_t kNparSCH = 3;
+ Float_t parSCH[kNparSCH];
+
+ for (iplan = 1; iplan < kNplan-1; iplan++) {
+
+ parSCH[0] = fCwidth[iplan]/2.0;
+ parSCH[1] = (fClength[iplan+1][2]/2.0 + fClength[iplan+1][1]
+ - fClength[iplan ][2]/2.0 - fClength[iplan ][1])/2.0;
+ parSCH[2] = kSCHhgt/2.0;
+
+ sprintf(cTagV,"USH%01d",iplan);
+ gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCH,kNparSCH);
xpos = 0.0;
- ypos = - fgkSlenTR1/2.0 + kSCBwid/2.0;
- zpos = fgkVrocsm + fgkCH/2.0 - fgkSheight/2.0 + iplan * (fgkCH + fgkVspace);
+ ypos = fClength[iplan][2]/2.0 + fClength[iplan][1] + parSCH[1];
+ zpos = fgkVrocsm + fgkSMpltT - kSCHhgt/2.0 - fgkSheight/2.0
+ + (iplan+1) * (fgkCH + fgkVspace);
gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY");
+ ypos = -ypos;
+ gMC->Gspos(cTagV,2,"UTI1", xpos,ypos,zpos,0,"ONLY");
}
+ //
+ // The long corner ledges
+ //
+
+ const Int_t kNparSCL = 3;
+ Float_t parSCL[kNparSCL];
+ const Int_t kNparSCLb = 11;
+ Float_t parSCLb[kNparSCLb];
+
+ // Upper ledges
+ // Thickness of the corner ledges
+ const Float_t kSCLthkUa = 0.6;
+ const Float_t kSCLthkUb = 0.6;
+ // Width of the corner ledges
+ const Float_t kSCLwidUa = 3.2;
+ const Float_t kSCLwidUb = 4.8;
+ // 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 kSCLposzUb = 0.3;
+ // Vertical
+ parSCL[0] = kSCLthkUa /2.0;
+ parSCL[1] = fgkSlength/2.0;
+ parSCL[2] = kSCLwidUa /2.0;
+ gMC->Gsvolu("USL1","BOX ",idtmed[1301-1],parSCL,kNparSCL);
+ xpos = fgkSwidth2/2.0 - fgkSMpltT - kSCLposxUa;
+ ypos = 0.0;
+ zpos = fgkSheight/2.0 - fgkSMpltT - kSCLposzUa;
+ gMC->Gspos("USL1",1,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
+ xpos = -xpos;
+ gMC->Gspos("USL1",2,"UTI1", xpos,ypos,zpos,matrix[1],"ONLY");
+ // Horizontal
+ parSCL[0] = kSCLwidUb /2.0;
+ parSCL[1] = fgkSlength/2.0;
+ parSCL[2] = kSCLthkUb /2.0;
+ gMC->Gsvolu("USL2","BOX ",idtmed[1301-1],parSCL,kNparSCL);
+ xpos = fgkSwidth2/2.0 - fgkSMpltT - kSCLposxUb;
+ ypos = 0.0;
+ zpos = fgkSheight/2.0 - fgkSMpltT - kSCLposzUb;
+ gMC->Gspos("USL2",1,"UTI1", xpos,ypos,zpos, 0,"ONLY");
+ xpos = -xpos;
+ gMC->Gspos("USL2",2,"UTI1", xpos,ypos,zpos, 0,"ONLY");
+
+ // Lower ledges
+ // Thickness of the corner ledges
+ const Float_t kSCLthkLa = 2.464;
+ const Float_t kSCLthkLb = 1.0;
+ // Width of the corner ledges
+ const Float_t kSCLwidLa = 8.5;
+ const Float_t kSCLwidLb = 3.3;
+ // Position of the corner ledges
+ const Float_t kSCLposxLa = 0.0;
+ const Float_t kSCLposxLb = 2.6;
+ const Float_t kSCLposzLa = -4.25;
+ const Float_t kSCLposzLb = -0.5;
+ // Vertical
+ // Trapezoidal shape
+ parSCLb[ 0] = fgkSlength/2.0;
+ parSCLb[ 1] = 0.0;
+ parSCLb[ 2] = 0.0;
+ parSCLb[ 3] = kSCLwidLa /2.0;
+ parSCLb[ 4] = kSCLthkLb /2.0;
+ parSCLb[ 5] = kSCLthkLa /2.0;
+ parSCLb[ 6] = 5.0;
+ parSCLb[ 7] = kSCLwidLa /2.0;
+ parSCLb[ 8] = kSCLthkLb /2.0;
+ parSCLb[ 9] = kSCLthkLa /2.0;
+ parSCLb[10] = 5.0;
+ gMC->Gsvolu("USL3","TRAP",idtmed[1301-1],parSCLb,kNparSCLb);
+ xpos = fgkSwidth1/2.0 - fgkSMpltT - kSCLposxLa;
+ ypos = 0.0;
+ zpos = - fgkSheight/2.0 + fgkSMpltT - kSCLposzLa;
+ gMC->Gspos("USL3",1,"UTI1", xpos,ypos,zpos,matrix[2],"ONLY");
+ xpos = -xpos;
+ gMC->Gspos("USL3",2,"UTI1", xpos,ypos,zpos,matrix[3],"ONLY");
+ // Horizontal
+ parSCL[0] = kSCLwidLb /2.0;
+ parSCL[1] = fgkSlength/2.0;
+ parSCL[2] = kSCLthkLb /2.0;
+ gMC->Gsvolu("USL4","BOX ",idtmed[1301-1],parSCL,kNparSCL);
+ xpos = fgkSwidth1/2.0 - fgkSMpltT - kSCLposxLb;
+ ypos = 0.0;
+ zpos = - fgkSheight/2.0 + fgkSMpltT - kSCLposzLb;
+ gMC->Gspos("USL4",1,"UTI1", xpos,ypos,zpos, 0,"ONLY");
+ xpos = -xpos;
+ gMC->Gspos("USL4",2,"UTI1", xpos,ypos,zpos, 0,"ONLY");
+
}
//_____________________________________________________________________________
// UTCW Cooling arterias (Water)
// UUxx Volumes for the services at the chambers (Air)
// UTPW Power bars (Cu)
- // UTCP Cooling pipes (Al)
+ // UTCP Cooling pipes (Fe)
// UTCH Cooling pipes (Water)
// UTPL Power lines (Cu)
// UMCM Readout MCMs (G10/Cu/Si)
Char_t cTagV[5];
// The rotation matrices
- const Int_t kNmatrix = 3;
+ const Int_t kNmatrix = 4;
Int_t matrix[kNmatrix];
gMC->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0);
gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
-
- AliTRDCommonParam *commonParam = AliTRDCommonParam::Instance();
- if (!commonParam) {
- AliError("Could not get common parameters\n");
- return;
- }
+ gMC->Matrix(matrix[3], 180.0, 0.0, 90.0, 90.0, 90.0, 180.0);
//
// The cooling arterias
//
// Width of the cooling arterias
- const Float_t kCOLwid = 0.5;
+ const Float_t kCOLwid = 0.8;
// Height of the cooling arterias
- const Float_t kCOLhgt = 5.5;
+ const Float_t kCOLhgt = 6.5;
// Positioning of the cooling
- const Float_t kCOLposx = 1.6;
- const Float_t kCOLposz = -0.2;
+ const Float_t kCOLposx = 1.8;
+ const Float_t kCOLposz = -0.1;
// Thickness of the walls of the cooling arterias
const Float_t kCOLthk = 0.1;
const Int_t kNparCOL = 3;
Float_t parCOL[kNparCOL];
- parCOL[0] = kCOLwid/2.0;
- parCOL[1] = fgkSlenTR1/2.0;
- parCOL[2] = kCOLhgt/2.0;
- gMC->Gsvolu("UTCL","BOX ",idtmed[1324-1],parCOL,kNparCOL);
+ parCOL[0] = kCOLwid /2.0;
+ parCOL[1] = fgkSlength/2.0;
+ parCOL[2] = kCOLhgt /2.0;
+ gMC->Gsvolu("UTCL","BOX ",idtmed[1308-1],parCOL,kNparCOL);
parCOL[0] -= kCOLthk;
- parCOL[1] = fgkSlenTR1/2.0;
+ parCOL[1] = fgkSlength/2.0;
parCOL[2] -= kCOLthk;
gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parCOL,kNparCOL);
zpos = 0.0;
gMC->Gspos("UTCW",1,"UTCL", xpos,ypos,zpos,0,"ONLY");
- for (iplan = 0; iplan < kNplan; iplan++) {
+ for (iplan = 1; iplan < kNplan; iplan++) {
+
xpos = fCwidth[iplan]/2.0 + kCOLwid/2.0 + kCOLposx;
ypos = 0.0;
- zpos = fgkVrocsm + kCOLhgt/2.0 - fgkSheight/2.0 + kCOLposz
+ zpos = fgkVrocsm + fgkSMpltT + kCOLhgt/2.0 - fgkSheight/2.0 + kCOLposz
+ iplan * (fgkCH + fgkVspace);
- // To avoid overlaps !
- if (iplan == 0) zpos += 0.25;
- gMC->Gspos("UTCL",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
- gMC->Gspos("UTCL",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
+ gMC->Gspos("UTCL",iplan ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
+ gMC->Gspos("UTCL",iplan+kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
+
}
+ // The upper most layer (reaching into TOF acceptance)
+ xpos = fCwidth[5]/2.0 - kCOLhgt/2.0 - 1.3;
+ ypos = 0.0;
+ zpos = fgkSheight/2.0 - fgkSMpltT - 0.4 - kCOLwid/2.0;
+ gMC->Gspos("UTCL",6 ,"UTI1", xpos,ypos,zpos,matrix[3],"ONLY");
+ gMC->Gspos("UTCL",6+kNplan,"UTI1",-xpos,ypos,zpos,matrix[3],"ONLY");
+
//
// The power bars
//
const Float_t kPWRwid = 0.6;
- const Float_t kPWRhgt = 4.5;
- const Float_t kPWRposx = 1.05;
- const Float_t kPWRposz = 0.9;
+ const Float_t kPWRhgt = 5.0;
+ const Float_t kPWRposx = 1.4;
+ const Float_t kPWRposz = 1.9;
const Int_t kNparPWR = 3;
Float_t parPWR[kNparPWR];
- parPWR[0] = kPWRwid/2.0;
- parPWR[1] = fgkSlenTR1/2.0;
- parPWR[2] = kPWRhgt/2.0;
+ parPWR[0] = kPWRwid /2.0;
+ parPWR[1] = fgkSlength/2.0;
+ parPWR[2] = kPWRhgt /2.0;
gMC->Gsvolu("UTPW","BOX ",idtmed[1325-1],parPWR,kNparPWR);
- for (iplan = 0; iplan < kNplan; iplan++) {
+ for (iplan = 1; iplan < kNplan; iplan++) {
xpos = fCwidth[iplan]/2.0 + kPWRwid/2.0 + kPWRposx;
ypos = 0.0;
- zpos = fgkVrocsm + kPWRhgt/2.0 - fgkSheight/2.0 + kPWRposz
+ zpos = fgkVrocsm + fgkSMpltT + kPWRhgt/2.0 - fgkSheight/2.0 + kPWRposz
+ iplan * (fgkCH + fgkVspace);
- gMC->Gspos("UTPW",iplan+1 ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
- gMC->Gspos("UTPW",iplan+1+ kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
+ gMC->Gspos("UTPW",iplan ,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY");
+ gMC->Gspos("UTPW",iplan+kNplan,"UTI1",-xpos,ypos,zpos,matrix[1],"ONLY");
}
+ // The upper most layer (reaching into TOF acceptance)
+ xpos = fCwidth[5]/2.0 + kPWRhgt/2.0 - 1.3;
+ ypos = 0.0;
+ zpos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0;
+ gMC->Gspos("UTPW",6 ,"UTI1", xpos,ypos,zpos,matrix[3],"ONLY");
+ gMC->Gspos("UTPW",6+kNplan,"UTI1",-xpos,ypos,zpos,matrix[3],"ONLY");
+
//
// The volumes for the services at the chambers
//
Int_t iDet = GetDetectorSec(iplan,icham);
sprintf(cTagV,"UU%02d",iDet);
- parServ[0] = fCwidth[iplan]/2.0;
+ parServ[0] = fCwidth[iplan] /2.0;
parServ[1] = fClength[iplan][icham]/2.0 - fgkHspace/2.0;
- // ???? !!!!!!!!!!!!!!
- parServ[2] = fgkVspace/2.0 - 0.742/2.0;
+ parServ[2] = fgkVspace /2.0 - 0.742/2.0;
fChamberUUboxd[iDet][0] = parServ[0];
fChamberUUboxd[iDet][1] = parServ[1];
fChamberUUboxd[iDet][2] = parServ[2];
gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ);
- xpos = 0.;
- ypos = - fClength[iplan][0] - fClength[iplan][1] - fClength[iplan][2]/2.0;
+ xpos = 0.0;
+ ypos = fClength[iplan][0] + fClength[iplan][1] + fClength[iplan][2]/2.0;
for (Int_t ic = 0; ic < icham; ic++) {
- ypos += fClength[iplan][ic];
+ ypos -= fClength[iplan][ic];
}
- ypos += fClength[iplan][icham]/2.0;
- zpos = fgkVrocsm + fgkCH + fgkVspace/2.0 - fgkSheight/2.0
+ ypos -= fClength[iplan][icham]/2.0;
+ zpos = fgkVrocsm + fgkSMpltT + fgkCH + fgkVspace/2.0 - fgkSheight/2.0
+ iplan * (fgkCH + fgkVspace);
zpos -= 0.742/2.0;
fChamberUUorig[iDet][0] = xpos;
const Int_t kNparTube = 3;
Float_t parTube[kNparTube];
- // The aluminum pipe for the cooling
+ // The cooling pipes
parTube[0] = 0.0;
parTube[1] = 0.0;
parTube[2] = 0.0;
// The cooling water
parTube[0] = 0.0;
parTube[1] = 0.2/2.0;
- parTube[2] = -1.;
+ parTube[2] = fCwidth[iplan]/2.0;
gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube);
// Water inside the cooling pipe
xpos = 0.0;
for (iplan = 0; iplan < kNplan; iplan++) {
Int_t iDet = GetDetectorSec(iplan,icham);
Int_t iCopy = GetDetector(iplan,icham,0) * 100;
- Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
+ Int_t nMCMrow = GetRowMax(iplan,icham,0);
Float_t ySize = (GetChamberLength(iplan,icham) - 2.0*fgkRpadW)
/ ((Float_t) nMCMrow);
sprintf(cTagV,"UU%02d",iDet);
for (iplan = 0; iplan < kNplan; iplan++) {
Int_t iDet = GetDetectorSec(iplan,icham);
Int_t iCopy = GetDetector(iplan,icham,0) * 100;
- Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
+ Int_t nMCMrow = GetRowMax(iplan,icham,0);
Float_t ySize = (GetChamberLength(iplan,icham) - 2.0*fgkRpadW)
/ ((Float_t) nMCMrow);
sprintf(cTagV,"UU%02d",iDet);
// The MCMs
//
+ const Float_t kMCMx = 3.0;
+ const Float_t kMCMy = 3.0;
+ const Float_t kMCMz = 0.3;
+
+ const Float_t kMCMpcTh = 0.1;
+ const Float_t kMCMcuTh = 0.0025;
+ const Float_t kMCMsiTh = 0.03;
+ const Float_t kMCMcoTh = 0.04;
+
// The mother volume for the MCMs (air)
const Int_t kNparMCM = 3;
Float_t parMCM[kNparMCM];
- parMCM[0] = 3.0/2.0;
- parMCM[1] = 3.0/2.0;
- parMCM[2] = 0.14/2.0;
+ parMCM[0] = kMCMx /2.0;
+ parMCM[1] = kMCMy /2.0;
+ parMCM[2] = kMCMz /2.0;
gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM);
// The MCM carrier G10 layer
- parMCM[0] = 3.0/2.0;
- parMCM[1] = 3.0/2.0;
- parMCM[2] = 0.1/2.0;
+ parMCM[0] = kMCMx /2.0;
+ parMCM[1] = kMCMy /2.0;
+ parMCM[2] = kMCMpcTh/2.0;
gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM);
// The MCM carrier Cu layer
- parMCM[0] = 3.0/2.0;
- parMCM[1] = 3.0/2.0;
- parMCM[2] = 0.0162/2.0;
+ parMCM[0] = kMCMx /2.0;
+ parMCM[1] = kMCMy /2.0;
+ parMCM[2] = kMCMcuTh/2.0;
gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM);
// The silicon of the chips
- parMCM[0] = 3.0/2.0;
- parMCM[1] = 3.0/2.0;
- parMCM[2] = 0.003/2.0;
+ parMCM[0] = kMCMx /2.0;
+ parMCM[1] = kMCMy /2.0;
+ parMCM[2] = kMCMsiTh/2.0;
gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM);
+ // The aluminum of the cooling plates
+ parMCM[0] = kMCMx /2.0;
+ parMCM[1] = kMCMy /2.0;
+ parMCM[2] = kMCMcoTh/2.0;
+ gMC->Gsvolu("UMC4","BOX",idtmed[1324-1],parMCM,kNparMCM);
// Put the MCM material inside the MCM mother volume
xpos = 0.0;
ypos = 0.0;
- zpos = -0.07 + 0.1/2.0;
+ zpos = -kMCMz /2.0 + kMCMpcTh/2.0;
gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
- zpos += 0.1/2.0 + 0.0162/2.0;
+ zpos += kMCMpcTh/2.0 + kMCMcuTh/2.0;
gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
- zpos += 0.00162/2 + 0.003/2.0;
+ zpos += kMCMcuTh/2.0 + kMCMsiTh/2.0;
gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
+ zpos += kMCMsiTh/2.0 + kMCMcoTh/2.0;
+ gMC->Gspos("UMC4",1,"UMCM",xpos,ypos,zpos,0,"ONLY");
// Position the MCMs in the mother volume
for (icham = 0; icham < kNcham; icham++) {
for (iplan = 0; iplan < kNplan; iplan++) {
- // Take out upper plane until TRD mothervolume is adjusted
- //for (iplan = 0; iplan < kNplan-1; iplan++) {
Int_t iDet = GetDetectorSec(iplan,icham);
Int_t iCopy = GetDetector(iplan,icham,0) * 1000;
- Int_t nMCMrow = commonParam->GetRowMax(iplan,icham,0);
+ Int_t nMCMrow = GetRowMax(iplan,icham,0);
Float_t ySize = (GetChamberLength(iplan,icham) - 2.0*fgkRpadW)
/ ((Float_t) nMCMrow);
Int_t nMCMcol = 8;
- Float_t xSize = (GetChamberWidth(iplan) - 2.0* fgkCpadW)
+ Float_t xSize = (GetChamberWidth(iplan) - 2.0*fgkCpadW)
/ ((Float_t) nMCMcol);
sprintf(cTagV,"UU%02d",iDet);
for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
gMC->Gsvolu(cTagM,"BOX ",idtmed[1302-1],xyzBoxd,kNparCha);
sprintf(cTagV,"UA%02d",iDet);
- gMC->Gspos(cTagV,1,cTagM,
- fChamberUAorig[iDet][0]-xyzOrig[0],
- fChamberUAorig[iDet][1]-xyzOrig[1],
- fChamberUAorig[iDet][2]-xyzOrig[2],
- 0,"ONLY");
+ gMC->Gspos(cTagV,1,cTagM
+ ,fChamberUAorig[iDet][0]-xyzOrig[0]
+ ,fChamberUAorig[iDet][1]-xyzOrig[1]
+ ,fChamberUAorig[iDet][2]-xyzOrig[2]
+ ,0,"ONLY");
+
+ sprintf(cTagV,"UZ%02d",iDet);
+ gMC->Gspos(cTagV,1,cTagM
+ ,fChamberUAorig[iDet][0]-xyzOrig[0] + fChamberUAboxd[iDet][0] - fgkCroW/2.0
+ ,fChamberUAorig[iDet][1]-xyzOrig[1]
+ ,fChamberUAorig[iDet][2]-xyzOrig[2] + fgkCraH/2.0 + fgkCdrH/2.0 - fgkCalW/2.0
+ ,0,"ONLY");
+ gMC->Gspos(cTagV,2,cTagM
+ ,fChamberUAorig[iDet][0]-xyzOrig[0] - fChamberUAboxd[iDet][0] + fgkCroW/2.0
+ ,fChamberUAorig[iDet][1]-xyzOrig[1]
+ ,fChamberUAorig[iDet][2]-xyzOrig[2] + fgkCraH/2.0 + fgkCdrH/2.0 - fgkCalW/2.0
+ ,0,"ONLY");
sprintf(cTagV,"UD%02d",iDet);
- gMC->Gspos(cTagV,1,cTagM,
- fChamberUDorig[iDet][0]-xyzOrig[0],
- fChamberUDorig[iDet][1]-xyzOrig[1],
- fChamberUDorig[iDet][2]-xyzOrig[2],
- 0,"ONLY");
+ gMC->Gspos(cTagV,1,cTagM
+ ,fChamberUDorig[iDet][0]-xyzOrig[0]
+ ,fChamberUDorig[iDet][1]-xyzOrig[1]
+ ,fChamberUDorig[iDet][2]-xyzOrig[2]
+ ,0,"ONLY");
sprintf(cTagV,"UF%02d",iDet);
- gMC->Gspos(cTagV,1,cTagM,
- fChamberUForig[iDet][0]-xyzOrig[0],
- fChamberUForig[iDet][1]-xyzOrig[1],
- fChamberUForig[iDet][2]-xyzOrig[2],
- 0,"ONLY");
+ gMC->Gspos(cTagV,1,cTagM
+ ,fChamberUForig[iDet][0]-xyzOrig[0]
+ ,fChamberUForig[iDet][1]-xyzOrig[1]
+ ,fChamberUForig[iDet][2]-xyzOrig[2]
+ ,0,"ONLY");
sprintf(cTagV,"UU%02d",iDet);
- gMC->Gspos(cTagV,1,cTagM,
- fChamberUUorig[iDet][0]-xyzOrig[0],
- fChamberUUorig[iDet][1]-xyzOrig[1],
- fChamberUUorig[iDet][2]-xyzOrig[2],
- 0,"ONLY");
+ gMC->Gspos(cTagV,1,cTagM
+ ,fChamberUUorig[iDet][0]-xyzOrig[0]
+ ,fChamberUUorig[iDet][1]-xyzOrig[1]
+ ,fChamberUUorig[iDet][2]-xyzOrig[2]
+ ,0,"ONLY");
sprintf(cTagV,"UT%02d",iDet);
- gMC->Gspos(cTagV,1,"UTI1",xyzOrig[0],xyzOrig[1],xyzOrig[2],0,"ONLY");
+ gMC->Gspos(cTagV,1,"UTI1"
+ ,xyzOrig[0]
+ ,xyzOrig[1]
+ ,xyzOrig[2]
+ ,0,"ONLY");
}
//_____________________________________________________________________________
-Bool_t AliTRDgeometry::Local2Global(Int_t idet, Double_t *local
- , Double_t *global) const
+Bool_t AliTRDgeometry::RotateBack(Int_t det, Double_t *loc, Double_t *glb) const
{
//
- // Converts local pad-coordinates (row,col,time) into
- // global ALICE reference frame coordinates (x,y,z)
+ // Rotates a chambers to transform the corresponding local frame
+ // coordinates <loc> into the coordinates of the ALICE restframe <glb>.
//
- Int_t icham = GetChamber(idet); // Chamber info (0-4)
- Int_t isect = GetSector(idet); // Sector info (0-17)
- Int_t iplan = GetPlane(idet); // Plane info (0-5)
+ Int_t sector = GetSector(det);
+
+ glb[0] = loc[0] * fRotB11[sector] - loc[1] * fRotB12[sector];
+ glb[1] = loc[0] * fRotB21[sector] + loc[1] * fRotB22[sector];
+ glb[2] = loc[2];
- return Local2Global(iplan,icham,isect,local,global);
+ return kTRUE;
}
-
+
//_____________________________________________________________________________
-Bool_t AliTRDgeometry::Local2Global(Int_t iplan, Int_t icham, Int_t isect
- , Double_t *local, Double_t *global) const
+Int_t AliTRDgeometry::GetDetectorSec(Int_t p, Int_t c)
{
//
- // Converts local pad-coordinates (row,col,time) into
- // global ALICE reference frame coordinates (x,y,z)
+ // Convert plane / chamber into detector number for one single sector
//
- AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
- if (!commonParam) {
- AliError("Could not get common parameters\n");
- return kFALSE;
- }
-
- AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
- if (!calibration) {
- AliError("Could not get calibration data\n");
- return kFALSE;
- }
-
- AliTRDpadPlane *padPlane = commonParam->GetPadPlane(iplan,icham);
-
- // calculate (x,y,z) position in rotated chamber
- Int_t row = ((Int_t) local[0]);
- Int_t col = ((Int_t) local[1]);
- Float_t timeSlice = local[2] + 0.5;
- Float_t time0 = GetTime0(iplan);
-
- Int_t idet = GetDetector(iplan, icham, isect);
-
- Double_t rot[3];
- rot[0] = time0 - (timeSlice - calibration->GetT0(idet, col, row))
- * calibration->GetVdrift(idet, col, row)
- / calibration->GetSamplingFrequency();
- rot[1] = padPlane->GetColPos(col) - 0.5 * padPlane->GetColSize(col);
- rot[2] = padPlane->GetRowPos(row) - 0.5 * padPlane->GetRowSize(row);
-
- // Rotate back to original position
- return RotateBack(idet,rot,global);
+ return (p + c * fgkNplan);
}
//_____________________________________________________________________________
-Bool_t AliTRDgeometry::Global2Local(Int_t mode, Double_t *local, Double_t *global
- , Int_t* index) const
+Int_t AliTRDgeometry::GetDetector(Int_t p, Int_t c, Int_t s)
{
//
- // Converts local pad-coordinates (row,col,time) into
- // global ALICE reference frame coordinates (x,y,z)
- //
- // index[0] = plane number
- // index[1] = chamber number
- // index[2] = sector number
- //
- // mode = 0 - local coordinate in y, z, x - rotated global
+ // Convert plane / chamber / sector into detector number
//
- Int_t idet = GetDetector(index[0],index[1],index[2]); // Detector number
- RotateBack(idet,global,local);
-
- if (mode == 0) {
- return kTRUE;
- }
-
- return kFALSE;
+ return (p + c * fgkNplan + s * fgkNplan * fgkNcham);
}
//_____________________________________________________________________________
-Bool_t AliTRDgeometry::Global2Detector(Double_t global[3], Int_t index[3])
+Int_t AliTRDgeometry::GetPlane(Int_t d)
{
- //
- // Find detector for given global point - Ideal geometry
- //
//
- // input = global position
- // output = index
- // index[0] = plane number
- // index[1] = chamber number
- // index[2] = sector number
+ // Reconstruct the plane number from the detector number
//
- //
- // Find sector
- //
- Float_t fi = TMath::ATan2(global[1],global[0]);
- if (fi < 0) {
- fi += 2.0 * TMath::Pi();
- }
- index[2] = fgkNsect - 1 - TMath::Nint((fi - GetAlpha()/2.0) / GetAlpha());
+ return ((Int_t) (d % fgkNplan));
- //
- // Find plane
- //
- Float_t locx = global[0] * fRotA11[index[2]] + global[1] * fRotA12[index[2]];
- index[0] = 0;
- Float_t max = locx - GetTime0(0);
- for (Int_t iplane = 1; iplane < fgkNplan; iplane++) {
- Float_t dist = TMath::Abs(locx - GetTime0(iplane));
- if (dist < max) {
- index[0] = iplane;
- max = dist;
- }
- }
+}
+//_____________________________________________________________________________
+Int_t AliTRDgeometry::GetChamber(Int_t d) const
+{
//
- // Find chamber
+ // Reconstruct the chamber number from the detector number
//
- if (TMath::Abs(global[2]) < 0.5*GetChamberLength(index[0],2)) {
- index[1] = 2;
- }
- else {
- Double_t localZ = global[2];
- if (global[2] > 0.0) {
- localZ -= 0.5*(GetChamberLength(index[0],2)+GetChamberLength(index[0],1));
- index[1] = (TMath::Abs(localZ) < 0.5*GetChamberLength(index[0],3)) ? 1 : 0;
- }
- else {
- localZ += 0.5*(GetChamberLength(index[0],2)+GetChamberLength(index[0],3));
- index[1] = (TMath::Abs(localZ) < 0.5*GetChamberLength(index[0],1)) ? 3 : 4;
- }
- }
- return kTRUE;
+ return ((Int_t) (d % (fgkNplan * fgkNcham)) / fgkNplan);
}
//_____________________________________________________________________________
-Bool_t AliTRDgeometry::Rotate(Int_t d, Double_t *pos, Double_t *rot) const
+Int_t AliTRDgeometry::GetSector(Int_t d) const
{
//
- // Rotates all chambers in the position of sector 0 and transforms
- // the coordinates in the ALICE restframe <pos> into the
- // corresponding local frame <rot>.
+ // Reconstruct the sector number from the detector number
//
- Int_t sector = GetSector(d);
-
- rot[0] = pos[0] * fRotA11[sector] + pos[1] * fRotA12[sector];
- rot[1] = -pos[0] * fRotA21[sector] + pos[1] * fRotA22[sector];
- rot[2] = pos[2];
-
- return kTRUE;
+ return ((Int_t) (d / (fgkNplan * fgkNcham)));
}
//_____________________________________________________________________________
-Bool_t AliTRDgeometry::RotateBack(Int_t d, Double_t *rot, Double_t *pos) const
+AliTRDpadPlane *AliTRDgeometry::GetPadPlane(Int_t p, Int_t c)
{
//
- // Rotates a chambers from the position of sector 0 into its
- // original position and transforms the corresponding local frame
- // coordinates <rot> into the coordinates of the ALICE restframe <pos>.
+ // Returns the pad plane for a given plane <p> and chamber <c> number
//
- Int_t sector = GetSector(d);
-
- pos[0] = rot[0] * fRotB11[sector] + rot[1] * fRotB12[sector];
- pos[1] = -rot[0] * fRotB21[sector] + rot[1] * fRotB22[sector];
- pos[2] = rot[2];
+ if (!fPadPlaneArray) {
+ CreatePadPlaneArray();
+ }
- return kTRUE;
+ Int_t ipp = GetDetectorSec(p,c);
+ return ((AliTRDpadPlane *) fPadPlaneArray->At(ipp));
}
//_____________________________________________________________________________
-Int_t AliTRDgeometry::GetDetectorSec(Int_t p, Int_t c)
+Int_t AliTRDgeometry::GetRowMax(Int_t p, Int_t c, Int_t /*s*/)
{
//
- // Convert plane / chamber into detector number for one single sector
+ // Returns the number of rows on the pad plane
//
- return (p + c * fgkNplan);
+ return GetPadPlane(p,c)->GetNrows();
}
//_____________________________________________________________________________
-Int_t AliTRDgeometry::GetDetector(Int_t p, Int_t c, Int_t s)
+Int_t AliTRDgeometry::GetColMax(Int_t p)
{
//
- // Convert plane / chamber / sector into detector number
+ // Returns the number of rows on the pad plane
//
- return (p + c * fgkNplan + s * fgkNplan * fgkNcham);
+ return GetPadPlane(p,0)->GetNcols();
}
//_____________________________________________________________________________
-Int_t AliTRDgeometry::GetPlane(Int_t d) const
+Double_t AliTRDgeometry::GetRow0(Int_t p, Int_t c, Int_t /*s*/)
{
//
- // Reconstruct the plane number from the detector number
+ // Returns the position of the border of the first pad in a row
//
- return ((Int_t) (d % fgkNplan));
+ return GetPadPlane(p,c)->GetRow0();
}
//_____________________________________________________________________________
-Int_t AliTRDgeometry::GetChamber(Int_t d) const
+Double_t AliTRDgeometry::GetCol0(Int_t p)
{
//
- // Reconstruct the chamber number from the detector number
+ // Returns the position of the border of the first pad in a column
//
- return ((Int_t) (d % (fgkNplan * fgkNcham)) / fgkNplan);
+ return GetPadPlane(p,0)->GetCol0();
}
//_____________________________________________________________________________
-Int_t AliTRDgeometry::GetSector(Int_t d) const
-{
+//Int_t AliTRDgeometry::GetPadRowFromMCM(Int_t irob, Int_t imcm) const
+//{
//
- // Reconstruct the sector number from the detector number
+ // Return on which row this mcm sits
//
-
- return ((Int_t) (d / (fgkNplan * fgkNcham)));
-
-}
+//
+// return fgkMCMrow*(irob/2) + imcm/fgkMCMrow;
+//
+//}
//_____________________________________________________________________________
-AliTRDgeometry* AliTRDgeometry::GetGeometry(AliRunLoader *runLoader)
-{
+//Int_t AliTRDgeometry::GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const
+//{
//
- // Load the geometry from the galice file
+ // Return which pad is connected to this adc channel. return -1 if it
+ // is one of the not directly connected adc channels (0, 1 20)
//
+//
+// if (iadc < 2 || iadc > 19 ) return -1;
+//
+// return (iadc-2) + (imcm%fgkMCMrow)*fgkPadmax + GetRobSide(irob)*fgkColmax/2;
+//
+//}
- if (!runLoader) runLoader = AliRunLoader::GetRunLoader();
- if (!runLoader) {
- AliErrorGeneral("AliTRDgeometry::GetGeometry","No run loader");
- return NULL;
- }
-
- TDirectory *saveDir = gDirectory;
- runLoader->CdGAFile();
-
- // Try from the galice.root file
- AliTRDgeometry *geom = (AliTRDgeometry *) gDirectory->Get("TRDgeometry");
+//_____________________________________________________________________________
+//Int_t AliTRDgeometry::GetMCMfromPad(Int_t irow, Int_t icol) const
+//{
+ //
+ // Return on which mcm this pad is
+ //
+//
+// if ( irow < 0 || icol < 0 || irow > fgkRowmaxC1 || icol > fgkColmax ) return -1;
+//
+// return (icol%(fgkColmax/2))/fgkPadmax + fgkMCMrow*(irow%fgkMCMrow);
+//
+//}
- if (!geom) {
- // It is not in the file, try to get it from gAlice,
- // which corresponds to the run loader
- AliTRD *trd = (AliTRD *) runLoader->GetAliRun()->GetDetector("TRD");
- geom = trd->GetGeometry();
- }
- if (!geom) {
- AliErrorGeneral("AliTRDgeometry::GetGeometry","Geometry not found");
- return NULL;
- }
+//_____________________________________________________________________________
+//Int_t AliTRDgeometry::GetROBfromPad(Int_t irow, Int_t icol) const
+//{
+ //
+ // Return on which rob this pad is
+ //
+//
+// return (irow/fgkMCMrow)*2 + GetColSide(icol);
+//
+//}
- saveDir->cd();
- return geom;
+//_____________________________________________________________________________
+//Int_t AliTRDgeometry::GetRobSide(Int_t irob) const
+//{
+ //
+ // Return on which side this rob sits (A side = 0, B side = 1)
+ //
+//
+// if ( irob < 0 || irob >= fgkROBmaxC1 ) return -1;
+//
+// return irob%2;
+//
+//}
-}
+//_____________________________________________________________________________
+//Int_t AliTRDgeometry::GetColSide(Int_t icol) const
+//{
+ //
+ // Return on which side this column sits (A side = 0, B side = 1)
+ //
+//
+// if ( icol < 0 || icol >= fgkColmax ) return -1;
+//
+// return icol/(fgkColmax/2);
+//
+//}
//_____________________________________________________________________________
-Bool_t AliTRDgeometry::ReadGeoMatrices()
+Bool_t AliTRDgeometry::CreateClusterMatrixArray()
{
//
- // Read geo matrices from current gGeoManager for each TRD sector
+ // Create the matrices to transform cluster coordinates from the
+ // local chamber system to the tracking coordinate system
//
if (!gGeoManager) {
return kFALSE;
}
- fMatrixArray = new TObjArray(kNdet);
- fMatrixCorrectionArray = new TObjArray(kNdet);
- fMatrixGeo = new TObjArray(kNdet);
- AliAlignObjAngles o;
-
- for (Int_t iLayer = AliAlignObj::kTRD1; iLayer <= AliAlignObj::kTRD6; iLayer++) {
- for (Int_t iModule = 0; iModule < AliAlignObj::LayerSize(iLayer); iModule++) {
-
- UShort_t volid = AliAlignObj::LayerToVolUID(iLayer,iModule);
- const char *path = AliAlignObj::GetVolPath(volid);
- if (!gGeoManager->cd(path)) return kFALSE;
- TGeoHMatrix *m = gGeoManager->GetCurrentMatrix();
- Int_t iLayerTRD = iLayer - AliAlignObj::kTRD1;
- Int_t isector = Nsect() - 1 - (iModule/Ncham());
- Int_t ichamber = Ncham() - 1 - (iModule%Ncham());
- Int_t lid = GetDetector(iLayerTRD,ichamber,isector);
- //
- // Local geo system z-x-y to x-y--z
- //
- fMatrixGeo->AddAt(new TGeoHMatrix(*m),lid);
+ fClusterMatrixArray = new TObjArray(kNdet);
+ AliAlignObjParams o;
+
+ for (Int_t iLayer = AliGeomManager::kTRD1; iLayer <= AliGeomManager::kTRD6; iLayer++) {
+ for (Int_t iModule = 0; iModule < AliGeomManager::LayerSize(iLayer); iModule++) {
+
+ UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iModule);
+ const char *symname = AliGeomManager::SymName(volid);
+ TGeoPNEntry *pne = gGeoManager->GetAlignableEntry(symname);
+ const char *path = symname;
+ if (pne) {
+ path = pne->GetTitle();
+ }
+ if (!strstr(path,"ALIC")) {
+ AliDebug(1,Form("Not a valid path: %s\n",path));
+ continue;
+ }
+ if (!gGeoManager->cd(path)) {
+ continue;
+ }
+ TGeoHMatrix *m = gGeoManager->GetCurrentMatrix();
+ Int_t iLayerTRD = iLayer - AliGeomManager::kTRD1;
+ Int_t isector = iModule/Ncham();
+ Int_t ichamber = iModule%Ncham();
+ Int_t lid = GetDetector(iLayerTRD,ichamber,isector);
TGeoRotation mchange;
mchange.RotateY(90);
mchange.RotateX(90);
- TGeoHMatrix gMatrix(mchange.Inverse());
- gMatrix.MultiplyLeft(m);
- fMatrixArray->AddAt(new TGeoHMatrix(gMatrix),lid);
-
//
- // Cluster transformation matrix
+ // Cluster transformation matrix
//
TGeoHMatrix rotMatrix(mchange.Inverse());
rotMatrix.MultiplyLeft(m);
Double_t sectorAngle = 20.0 * (isector % 18) + 10.0;
TGeoHMatrix rotSector;
rotSector.RotateZ(sectorAngle);
- rotMatrix.MultiplyLeft(&rotSector);
+ rotMatrix.MultiplyLeft(&rotSector.Inverse());
- fMatrixCorrectionArray->AddAt(new TGeoHMatrix(rotMatrix),lid);
+ fClusterMatrixArray->AddAt(new TGeoHMatrix(rotMatrix),lid);
}
}