]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliDIPOv3.cxx
- introduction of array of data structures for holding the sets of cuts
[u/mrichter/AliRoot.git] / STRUCT / AliDIPOv3.cxx
index 9104792ddbf4cc66168c601d1ea33a6325b6922c..b3513497d7ecdf14e0ba290a71e42423c9d2874c 100644 (file)
@@ -161,14 +161,14 @@ void AliDIPOv3::CreateSpectrometerDipole()
 
     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));
@@ -325,7 +325,7 @@ void AliDIPOv3::CreateSpectrometerDipole()
                                         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);
     
 
@@ -347,11 +347,11 @@ void AliDIPOv3::CreateSpectrometerDipole()
     asDCoilSupport->AddNode(voDCS04, 1, gGeoIdentity);    
     for (Int_t i = 0; i < 9; i++) 
     {
-       char name[16];
-       sprintf(name, "rotdcs%1d", i);
+       char nameR[16];
+       snprintf(nameR, 16, "rotdcs%1d", i);
        Float_t phi = Float_t(i) * 3.75;
-       TGeoRotation* rot   = new TGeoRotation(name, 90., phi, 90., 90. + phi,    0.,   0.);    
-       asDCoilSupport->AddNode(voDCS021, i, new TGeoCombiTrans(0., 0., -(sW - coilH)/2., rot));    
+       TGeoRotation* rot   = new TGeoRotation(nameR, 90., phi, 90., 90. + phi,    0.,   0.);   
+       asDCoilSupport->AddNode(voDCS021, i, new TGeoCombiTrans(0., 0.004, -(sW - coilH)/2., rot));    
     }
     
 
@@ -415,7 +415,7 @@ void AliDIPOv3::CreateSpectrometerDipole()
     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.));
     
     
 
@@ -452,7 +452,7 @@ void AliDIPOv3::CreateSpectrometerDipole()
     // 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);