AliFMDGeometryBuilder::MakeXTRU(const TObjArray& verticies,
Double_t thick) const
{
+ //
+ // Make a polygonic extrusion shape based on verticies passed in @a
+ // verticies
+ //
+ // Parameters:
+ // verticies List of verticies
+ // thick Thickness
+ //
+ // Return:
+ // newly allocated polygonic extrusion shape
+ //
TArrayD xs(6);
TArrayD ys(6);
for (Int_t i = 0; i < 3; i++) {
//____________________________________________________________________
TGeoVolume*
-AliFMDGeometryBuilder::RingGeometry(AliFMDRing* r)
+AliFMDGeometryBuilder::RingGeometry(const AliFMDRing* r)
{
// Setup the geometry of a ring. The defined TGeoVolume is
// returned, and should be used when setting up the rest of the
TGeoShape* sensorShape = MakeXTRU(r->GetSensorVerticies(), siThick);
sensorShape->SetName(Form("FMD%c_physical_sensor", id));
sensorShape->SetTitle(Form("FMD %s physical sensor", lName));
- TGeoVolume* sensorVolume = new TGeoVolume(Form(fgkSensorName, id),
- sensorShape, fSi);
+ TString sensorName = TString::Format(fgkSensorName, id);
+ TGeoVolume* sensorVolume = new TGeoVolume(sensorName, sensorShape, fSi);
sensorVolume->SetTitle(Form("FMD %s Sensor", lName));
sensorVolume->VisibleDaughters(kFALSE);
Int_t sid = sensorVolume->GetNumber();
+ theta);
activeShape->SetName(Form(fgkActiveName, id));
activeShape->SetTitle(Form("FMD %s active area", lName));
- TGeoVolume* activeVolume = new TGeoVolume(Form(fgkActiveName, id),
- activeShape,fSi);
+ TString activeName = TString::Format(fgkActiveName, id);
+ TGeoVolume* activeVolume = new TGeoVolume(activeName,activeShape,fSi);
activeVolume->SetTitle(Form("FMD %s active area", lName));
- TGeoVolume* sectorVolume = activeVolume->Divide(Form(fgkSectorName,id),
- 2, 2, -theta,
+ TString sectorName = TString::Format(fgkSectorName,id);
+ TGeoVolume* sectorVolume = activeVolume->Divide(sectorName, 2, 2, -theta,
0,0,"N");
Int_t ns = r->GetNStrips();
Double_t dstrip = (r->GetHighR() - stripoff) / ns;
sectorVolume->SetTitle(Form("FMD %s sector", lName));
- TGeoVolume* stripVolume = sectorVolume->Divide(Form(fgkStripName, id),
+ TString stripName = TString::Format(fgkStripName, id);
+ TGeoVolume* stripVolume = sectorVolume->Divide(stripName,
1, ns, stripoff, dstrip,
0, "SX");
stripVolume->SetTitle(Form("FMD %s strip", lName));
TGeoShape* pcbShape = MakeXTRU(r->GetHybridVerticies(), pcbThick);
pcbShape->SetName(Form("FMD%c_hybrid_pcb", id));
pcbShape->SetTitle(Form("FMD %s hybrid PCB", lName));
- TGeoVolume* pcbVolume = new TGeoVolume(Form(fgkPCBName, id), pcbShape, fPCB);
+ TString pcbName = TString::Format(fgkPCBName, id);
+ TGeoVolume* pcbVolume = new TGeoVolume(pcbName, pcbShape, fPCB);
pcbVolume->SetTitle(Form("FMD %s hybrid PCB", lName));
// Copper layer
TGeoShape* cuShape = MakeXTRU(r->GetHybridVerticies(), cuThick);
cuShape->SetName(Form("FMD%c_hybrid_copper", id));
cuShape->SetTitle(Form("FMD %s hybrid copper", lName));
- TGeoVolume* cuVolume = new TGeoVolume(Form(fgkCuName,id),cuShape,fCopper);
+ TString cuName = TString::Format(fgkCuName,id);
+ TGeoVolume* cuVolume = new TGeoVolume(cuName,cuShape,fCopper);
cuVolume->SetTitle(Form("FMD %s hybrid copper", lName));
// Chip layer
TGeoShape* chipShape = MakeXTRU(r->GetHybridVerticies(), chipThick);
chipShape->SetName(Form("FMD%c_hybrid_chip", id));
chipShape->SetTitle(Form("FMD %s hybrid chip", lName));
- TGeoVolume* chipVolume = new TGeoVolume(Form(fgkChipName,id),chipShape,fChip);
+ TString chipName = TString::Format(fgkChipName,id);
+ TGeoVolume* chipVolume = new TGeoVolume(chipName,chipShape,fChip);
chipVolume->SetTitle(Form("FMD %s hybrid chip", lName));
//------------------------------------------------------------------
TGeoTube* shortLegShape = new TGeoTube(0, legr, (legl-lege) / 2);
shortLegShape->SetName(Form(fgkShortLegName, id));
shortLegShape->SetTitle(Form("FMD %s short support foot", lName));
- TGeoVolume* shortLegVolume = new TGeoVolume(Form(fgkShortLegName, id),
+ TString shortLegName = TString::Format(fgkShortLegName, id);
+ TGeoVolume* shortLegVolume = new TGeoVolume(shortLegName,
shortLegShape, fCopper);
shortLegVolume->SetTitle(Form("FMD %s short support foot", lName));
// Long leg shape
(legl - lege + modSpace) / 2);
longLegShape->SetName(Form(fgkLongLegName, id));
longLegShape->SetTitle(Form("FMD %s long support foot", lName));
- TGeoVolume* longLegVolume = new TGeoVolume(Form(fgkLongLegName, id),
+ TString longLegName = TString::Format(fgkLongLegName, id);
+ TGeoVolume* longLegVolume = new TGeoVolume(longLegName,
longLegShape, fCopper);
longLegVolume->SetTitle(Form("FMD %s long support foot", lName));
Double_t ddit = r->GetFMDDChipThickness();
Double_t ddt = ddpt + ddct + ddit;
- TString pcbName(Form(fgkFMDDPCBName, id));
- TString cuName(Form(fgkFMDDCuName, id));
- TString chipName(Form(fgkFMDDChipName, id));
- new TGeoTubeSeg(Form("%s_inner", pcbName.Data()), ddlr, ddhr, ddpt/2,0,180);
- new TGeoTubeSeg(Form("%s_inner", cuName.Data()), ddlr, ddhr, ddct/2,0,180);
- new TGeoTubeSeg(Form("%s_inner", chipName.Data()), ddlr, ddhr, ddit/2,0,180);
+ TString pcbdName(Form(fgkFMDDPCBName, id));
+ TString cudName(Form(fgkFMDDCuName, id));
+ TString chipdName(Form(fgkFMDDChipName, id));
+ new TGeoTubeSeg(Form("%s_inner", pcbdName.Data()), ddlr, ddhr, ddpt/2,0,180);
+ new TGeoTubeSeg(Form("%s_inner", cudName.Data()), ddlr, ddhr, ddct/2,0,180);
+ new TGeoTubeSeg(Form("%s_inner", chipdName.Data()), ddlr, ddhr, ddit/2,0,180);
Double_t clipWX = 0;
Double_t clipWY = 0;
clipWY = ddhr/2;
}
- new TGeoBBox(Form("%s_clip", pcbName.Data()), clipWX, clipWY, ddpt);
- new TGeoBBox(Form("%s_clip", cuName.Data()), clipWX, clipWY, ddct);
- new TGeoBBox(Form("%s_clip", chipName.Data()),clipWX, clipWY, ddit);
+ new TGeoBBox(Form("%s_clip", pcbdName.Data()), clipWX, clipWY, ddpt);
+ new TGeoBBox(Form("%s_clip", cudName.Data()), clipWX, clipWY, ddct);
+ new TGeoBBox(Form("%s_clip", chipdName.Data()),clipWX, clipWY, ddit);
TGeoTranslation* trans = new TGeoTranslation(Form("%s_trans",
- pcbName.Data()),
+ pcbdName.Data()),
0, clipWY+clipY, 0);
trans->RegisterYourself();
TGeoShape* fmddPcbShape =
- new TGeoCompositeShape(pcbName.Data(),
+ new TGeoCompositeShape(pcbdName.Data(),
Form("%s_inner*%s_clip:%s_trans",
- pcbName.Data(),
- pcbName.Data(),
- pcbName.Data()));
+ pcbdName.Data(),
+ pcbdName.Data(),
+ pcbdName.Data()));
TGeoShape* fmddCuShape =
- new TGeoCompositeShape(cuName.Data(),
+ new TGeoCompositeShape(cudName.Data(),
Form("%s_inner*%s_clip:%s_trans",
- cuName.Data(),
- cuName.Data(),
- pcbName.Data()));
+ cudName.Data(),
+ cudName.Data(),
+ pcbdName.Data()));
TGeoShape* fmddChipShape =
- new TGeoCompositeShape(chipName.Data(),
+ new TGeoCompositeShape(chipdName.Data(),
Form("%s_inner*%s_clip:%s_trans",
- chipName.Data(),
- chipName.Data(),
- pcbName.Data()));
+ chipdName.Data(),
+ chipdName.Data(),
+ pcbdName.Data()));
fmddPcbShape->SetTitle(Form("FMD %s digitiser PCB", lName));
fmddCuShape->SetTitle(Form("FMD %s digitiser copper", lName));
fmddChipShape->SetTitle(Form("FMD %s digitiser chip", lName));
- TGeoVolume* fmddPcbVolume = new TGeoVolume(Form(fgkFMDDPCBName, id),
+ TString fmddPcbName = TString::Format(fgkFMDDPCBName, id);
+ TGeoVolume* fmddPcbVolume = new TGeoVolume(fmddPcbName,
fmddPcbShape, fPCB);
- TGeoVolume* fmddCuVolume = new TGeoVolume(Form(fgkFMDDCuName, id),
+ TString fmddCuName = TString::Format(fgkFMDDCuName, id);
+ TGeoVolume* fmddCuVolume = new TGeoVolume(fmddCuName,
fmddCuShape, fCopper);
- TGeoVolume* fmddChipVolume= new TGeoVolume(Form(fgkFMDDChipName, id),
+ TString fmddChipName = TString::Format(fgkFMDDChipName, id);
+ TGeoVolume* fmddChipVolume = new TGeoVolume(fmddChipName,
fmddChipShape, fChip);
fmddPcbVolume->SetTitle(Form("FMD %s digitiser PCB", lName));
fmddCuVolume->SetTitle(Form("FMD %s digitiser copper", lName));
TGeoVolume*
AliFMDGeometryBuilder::TensionBox()
{
+ //
+ // Get the tension box volume
+ //
+ //
+ // Return:
+ //
+ //
static TGeoVolumeAssembly* tensionBox = 0;
if (tensionBox) return tensionBox;
//____________________________________________________________________
TGeoVolume*
-AliFMDGeometryBuilder::DetectorGeometry(AliFMDDetector* d,
+AliFMDGeometryBuilder::DetectorGeometry(const AliFMDDetector* d,
TGeoVolume* topMother,
TGeoVolume* botMother,
Double_t zMother,
//____________________________________________________________________
TGeoVolume*
-AliFMDGeometryBuilder::FMD1Geometry(AliFMD1* fmd1,
+AliFMDGeometryBuilder::FMD1Geometry(const AliFMD1* fmd1,
TGeoVolume* innerTop,
TGeoVolume* innerBot)
{
Double_t z = fmd1->GetInnerZ();
// `Top' or `Outside' master volume
- TGeoVolume* fmd1TopVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
- fmd1->GetId(), 'T'));
+ TString fmd1TopName = TString::Format(fgkFMDName, fmd1->GetId(), 'T');
+ TGeoVolume* fmd1TopVolume = new TGeoVolumeAssembly(fmd1TopName);
fmd1TopVolume->SetTitle("FMD1 top half");
// `Bottom' or `Inside' master volume
- TGeoVolume* fmd1BotVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
- fmd1->GetId(), 'B'));
+ TString fmd1BotName = TString::Format(fgkFMDName, fmd1->GetId(), 'B');
+ TGeoVolume* fmd1BotVolume = new TGeoVolumeAssembly(fmd1BotName);
fmd1BotVolume->SetTitle("FMD1 bottom half");
// Basic detector geometry
{ 6.80, 24.50, 24.65 },
{ 6.80, 24.50, 26.00 },
{ 6.95, 24.50, 26.00 } };
- TGeoPcon* lidBaseS = new TGeoPcon("FMD1_lid_base", 0, 180, 12);
+ Double_t lidZStart = lidP[11][0];
+ TGeoPcon* lidBaseS = new TGeoPcon("FMD1_lid_base", 0, 180, 12);
for (size_t i = 0; i < 12; i++)
- lidBaseS->DefineSection(i, lidP[i][0], lidP[i][1], lidP[i][2]);
+ lidBaseS->DefineSection(i, lidP[i][0] - lidZStart, lidP[i][1], lidP[i][2]);
Double_t lidH[][2] = { { 7.84903, 24.15680 },
TString lidComp("FMD1_lid_base-(");
TGeoTranslation* trans = 0;
for (size_t i = 0; i < 4; i++) {
- trans = new TGeoTranslation(-lidH[i][0], lidH[i][1], 6.95-lidHL/2);
- trans->SetName(Form("FMD1_lid_hole_mat%d", 2*i+0));
+ trans = new TGeoTranslation(-lidH[i][0], lidH[i][1], /*6.95*/-lidHL/2);
+ trans->SetName(Form("FMD1_lid_hole_mat%d", int(2*i+0)));
trans->RegisterYourself();
- trans = new TGeoTranslation(+lidH[i][0], lidH[i][1], 6.95-lidHL/2);
- trans->SetName(Form("FMD1_lid_hole_mat%d", 2*i+1));
+ trans = new TGeoTranslation(+lidH[i][0], lidH[i][1], /*6.95*/-lidHL/2);
+ trans->SetName(Form("FMD1_lid_hole_mat%d", int(2*i+1)));
trans->RegisterYourself();
lidComp.Append(Form("FMD1_lid_hole:FMD1_lid_hole_mat%d+"
"FMD1_lid_hole:FMD1_lid_hole_mat%d%c",
- 2 * i, 2 * i + 1, i == 3 ? ')' : '+'));
+ int(2 * i), int(2 * i + 1), int(i == 3 ? ')' : '+')));
}
TGeoCompositeShape* lidS = new TGeoCompositeShape(lidComp.Data());
lidS->SetName("FMD1_lid");
lidV->SetTransparency(63);
// Place top cover
- Double_t lidZ = -(3.3 - r->GetModuleDepth() - r->GetModuleSpacing() / 2);
+ Double_t lidZ = (lidZStart -
+ (3.3 - r->GetModuleDepth() - r->GetModuleSpacing() / 2));
AliFMDDebug(1, ("FMD1 lid offset in Z=%f", lidZ));
for (Int_t i = 0; i < 2; i++) {
//____________________________________________________________________
TGeoVolume*
-AliFMDGeometryBuilder::FMD2Geometry(AliFMD2* fmd2,
+AliFMDGeometryBuilder::FMD2Geometry(const AliFMD2* fmd2,
TGeoVolume* innerTop,
TGeoVolume* innerBot,
TGeoVolume* outerTop,
// See also AliFMDGeometryBuilder::DetectorGeometry
//
if (!fmd2 || !innerTop || !innerBot || !outerTop || !outerBot) return 0;
- AliFMDRing* r = fmd2->GetOuter();
+ AliFMDRing* ring = fmd2->GetOuter();
Double_t z = fmd2->GetOuterZ();
Double_t framelr = 32.01; // fmd2->GetOuterHoneyHighR()+0.5;
Double_t framehr = 33.611; // fmd2->GetOuterHoneyHighR()+1.8;
// Double_t backth = 0.3;
Double_t backth = 0.03;
Double_t framelz = -(2.38
- - r->GetModuleDepth()
- - r->GetModuleSpacing() / 2);
+ - ring->GetModuleDepth()
+ - ring->GetModuleSpacing() / 2);
// Double_t framelz = -0.8;
// Double_t framehz = framelz + backth + framel;
Double_t coverlr = 4.3; // fmd2->GetInner()->GetLowR()+1;
Double_t coverhr = framehr; // - 1;
- TGeoVolume* fmd2TopVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
- fmd2->GetId(), 'T'));
- TGeoVolume* fmd2BotVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
- fmd2->GetId(), 'B'));
+ TString fmd2TopName = TString::Format(fgkFMDName, fmd2->GetId(), 'T');
+ TGeoVolume* fmd2TopVolume = new TGeoVolumeAssembly(fmd2TopName);
+ TString fmd2BotName = TString::Format(fgkFMDName, fmd2->GetId(), 'B');
+ TGeoVolume* fmd2BotVolume = new TGeoVolumeAssembly(fmd2BotName);
fmd2TopVolume->SetTitle("FMD2 top half");
fmd2BotVolume->SetTitle("FMD2 bottom half");
//____________________________________________________________________
TGeoVolume*
-AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
+AliFMDGeometryBuilder::FMD3Geometry(const AliFMD3* fmd3,
TGeoVolume* innerTop,
TGeoVolume* innerBot,
TGeoVolume* outerTop,
//__________________________________________________________________
// Basic detector set-up.
- TGeoVolume* fmd3TopVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
- fmd3->GetId(), 'T'));
- TGeoVolume* fmd3BotVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
- fmd3->GetId(), 'B'));
+ TString fmd3TopName = TString::Format(fgkFMDName, fmd3->GetId(), 'T');
+ TGeoVolume* fmd3TopVolume = new TGeoVolumeAssembly(fmd3TopName);
+ TString fmd3BotName = TString::Format(fgkFMDName, fmd3->GetId(), 'B');
+ TGeoVolume* fmd3BotVolume = new TGeoVolumeAssembly(fmd3BotName);
fmd3TopVolume->SetTitle("FMD3 top half");
fmd3BotVolume->SetTitle("FMD3 bottom half");
DetectorGeometry(fmd3, fmd3TopVolume, fmd3BotVolume, fmd3->GetInnerZ(),