#include <TGeoVolume.h>
#include <TGeoMedium.h>
#include <TGeoMatrix.h>
+#include <TGeoArb8.h>
#include <TGeoBBox.h>
#include <TGeoTube.h>
#include <TGeoCone.h>
Float_t riD0 = (kZDipoleF - 5.) * TMath::Tan(2. * kDegrad) + 0.2;
- Float_t riD1 = 30.;
+ Float_t riD1 = 28.9;
Float_t riD2 = 35.8;
Float_t riD3 = riD2 + (kZDipoleR - zst) * TMath::Tan(2. * kDegrad);
Float_t riD4 = riD2 + (kZDipoleR - zst + 5.) * TMath::Tan(2. * kDegrad);
shDDIP1->DefineSection(4, zst , riD2, rcst);
shDDIP1->DefineSection(5, kZDipoleR , riD3, rcD2);
shDDIP1->DefineSection(6, (kZDipoleR + 5.), riD4, rcD2);
-
- TGeoBBox* shDDIP2 = new TGeoBBox(164., 182., 36.);
+
+ // JC Ch6 is 2x5cm longer than Ch5
+ // TGeoBBox* shDDIP2 = new TGeoBBox(164., 182., 36.);
+ Double_t xD0 = 162.;
+ Double_t xD1 = 171.;
+ Double_t yD0 = 182.;
+ Double_t zD0 = 36.;
+
+ Double_t xy[16] = {0};
+ xy[0] = -xD0; xy[1] = -yD0;
+ xy[2] = -xD0; xy[3] = yD0;
+ xy[4] = xD0; xy[5] = yD0;
+ xy[6] = xD0; xy[7] = -yD0;
+ xy[8] = -xD1; xy[9] = -yD0;
+ xy[10] = -xD1; xy[11] = yD0;
+ xy[12] = xD1; xy[13] = yD0;
+ xy[14] = xD1; xy[15] = -yD0;
+ TGeoArb8* shDDIP2 = new TGeoArb8(zD0, xy);
shDDIP2->SetName("shDDIP2");
TGeoTranslation* trDDIP2 = new TGeoTranslation("trDDIP2", 0., 0., kZDipole - 12.);
trDDIP2->RegisterYourself();
TGeoVolumeAssembly* asYoke = new TGeoVolumeAssembly("DYoke");
// Base
- char name[32];
+ char name[16];
Float_t lx0 = gapWidthFront + 2. * blockHeight;
Float_t lx = lx0;
TGeoVolumeAssembly* asYokeBase = new TGeoVolumeAssembly("DYokeBase");
for (Int_t i = 0; i < 7; i++) {
- sprintf(name, "DYokeBaseBlock%1d", i);
- TGeoVolume* voBaseBlock = new TGeoVolume(name,
+ snprintf(name, 16, "DYokeBaseBlock%1d", i);
+ TGeoVolume* voBaseBlock = new TGeoVolume(name,
new TGeoBBox(lx/2., blockHeight/2., blockLength/2.),
kMedSteel);
asYokeBase->AddNode(voBaseBlock, 1, new TGeoTranslation(0., 0., Float_t(i - 3) * blockLength));
new TGeoTubeSeg(coilRo, coilRo + 3.125, sW/2., 21., 51.),
kMedAlu);
TGeoVolume* voDCS021 = new TGeoVolume("DCS021",
- new TGeoConeSeg(sW/2., coilRo, 320., coilRo, coilRo + 2., 21., 21.4),
+ new TGeoConeSeg(sW/2., coilRo + 3.124, 320., coilRo + 3.125, coilRo + 5.125, 21., 21.4),
kMedAlu);
for (Int_t i = 0; i < 9; i++)
{
char nameR[16];
- sprintf(nameR, "rotdcs%1d", i);
+ snprintf(nameR, 16, "rotdcs%1d", i);
Float_t phi = Float_t(i) * 3.75;
TGeoRotation* rot = new TGeoRotation(nameR, 90., phi, 90., 90. + phi, 0., 0.);
- asDCoilSupport->AddNode(voDCS021, i, new TGeoCombiTrans(0., 0., -(sW - coilH)/2., rot));
+ asDCoilSupport->AddNode(voDCS021, i, new TGeoCombiTrans(0., 0.004, -(sW - coilH)/2., rot));
}
asHS->AddNode(voHS1, 1, gGeoIdentity);
asHS->AddNode(voHS2, 1, new TGeoTranslation(0., +14., 0.));
asHS->AddNode(voHS2, 2, new TGeoTranslation(0., -14., 0.));
- asHS->AddNode(voHS3, 1, new TGeoTranslation(0., -hsH/2. - 14., hsLength/2. - 25./2.));
+ asHS->AddNode(voHS3, 1, new TGeoTranslation(0., -hsH/2. - 14. -1.5, hsLength/2. - 25./2.));
// Hanger (Support)
dy = gapHeight/2. + blockHeight + 14.;
- asDipole->AddNode(asHS, 1, new TGeoTranslation(0., dy, ((zHanger2 - kZDipole - yokeLength/2.) + 25./2.)/2.));
+ asDipole->AddNode(asHS, 1, new TGeoTranslation(0., dy + 1.5, ((zHanger2 - kZDipole - yokeLength/2.) + 25./2.)/2.));
asDipole->SetVisContainers(1);