Fixed bub in BuildGeometry
authorvicinanz <vicinanz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Jul 2002 16:13:56 +0000 (16:13 +0000)
committervicinanz <vicinanz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Jul 2002 16:13:56 +0000 (16:13 +0000)
TOF/AliTOFv0.cxx
TOF/AliTOFv1.cxx
TOF/AliTOFv2.cxx
TOF/AliTOFv2FHoles.cxx
TOF/AliTOFv3.cxx
TOF/AliTOFv4.cxx
TOF/AliTOFv4T0.cxx

index 05c3f11441f05720f3562c89752fea9354c68717..16f3f75274239740d1e24e18c1b39a50bdd49a49 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.26  2002/05/08 13:24:50  vicinanz
+AliTOFanalyzeMatching.C macro added and minor changes to the AliTOF code
+
 Revision 1.25  2001/11/22 11:22:51  hristov
 Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
 
@@ -66,9 +69,7 @@ Introduction of the Copyright and cvs Log
 */
 
 ///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Time Of Flight: design of C.Williams                                     //
-//                                                                          //
+//
 //  This class contains the functions for version 0 of the Time Of Flight    //
 //  detector.                                                                //
 //
@@ -150,10 +151,10 @@ void AliTOFv0::BuildGeometry()
   //
   TNode *node, *top;
   const int kColorTOF  = 27;
-
+  
   // Find top TNODE
   top = gAlice->GetGeometry()->GetNode("alice");
-
+  
   // Position the different copies
   const Float_t krTof  =(fRmax+fRmin)/2;
   const Float_t khTof  = fRmax-fRmin;
@@ -161,65 +162,69 @@ void AliTOFv0::BuildGeometry()
   const Float_t kPi   = TMath::Pi();
   const Float_t kangle = 2*kPi/kNTof;
   Float_t ang;
-
+  
+  // define offset for nodes
+  Float_t zOffsetC = fZtof - fZlenC*0.5;
+  Float_t zOffsetB = fZtof - fZlenC - fZlenB*0.5;
+  Float_t zOffsetA = 0.;
   // Define TOF basic volume
   
   char nodeName0[7], nodeName1[7], nodeName2[7]; 
   char nodeName3[7], nodeName4[7], rotMatNum[7];
-
+  
   new TBRIK("S_TOF_C","TOF box","void",
-            120*0.5,khTof*0.5,fZlenC*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenC*0.5);
   new TBRIK("S_TOF_B","TOF box","void",
-            120*0.5,khTof*0.5,fZlenB*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenB*0.5);
   new TBRIK("S_TOF_A","TOF box","void",
-            120*0.5,khTof*0.5,fZlenA*0.5);
-
+            fStripLn*0.5,khTof*0.5,fZlenA*0.5);
+  
   for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
-     
-      if (nodeNum<10) {
-           sprintf(rotMatNum,"rot50%i",nodeNum);
-           sprintf(nodeName0,"FTO00%i",nodeNum);
-           sprintf(nodeName1,"FTO10%i",nodeNum);
-           sprintf(nodeName2,"FTO20%i",nodeNum);
-           sprintf(nodeName3,"FTO30%i",nodeNum);
-           sprintf(nodeName4,"FTO40%i",nodeNum);
-      }
-      if (nodeNum>9) {
-           sprintf(rotMatNum,"rot5%i",nodeNum);
-           sprintf(nodeName0,"FTO0%i",nodeNum);
-           sprintf(nodeName1,"FTO1%i",nodeNum);
-           sprintf(nodeName2,"FTO2%i",nodeNum);
-           sprintf(nodeName3,"FTO3%i",nodeNum);
-           sprintf(nodeName4,"FTO4%i",nodeNum);
-      }
-      new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
-      ang = (4.5-nodeNum) * kangle;
-
-      top->cd();
-      node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd(); 
-      node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
+    
+    if (nodeNum<10) {
+      sprintf(rotMatNum,"rot50%i",nodeNum);
+      sprintf(nodeName0,"FTO00%i",nodeNum);
+      sprintf(nodeName1,"FTO10%i",nodeNum);
+      sprintf(nodeName2,"FTO20%i",nodeNum);
+      sprintf(nodeName3,"FTO30%i",nodeNum);
+      sprintf(nodeName4,"FTO40%i",nodeNum);
+    }
+    if (nodeNum>9) {
+      sprintf(rotMatNum,"rot5%i",nodeNum);
+      sprintf(nodeName0,"FTO0%i",nodeNum);
+      sprintf(nodeName1,"FTO1%i",nodeNum);
+      sprintf(nodeName2,"FTO2%i",nodeNum);
+      sprintf(nodeName3,"FTO3%i",nodeNum);
+      sprintf(nodeName4,"FTO4%i",nodeNum);
+    }
+    
+    new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+    ang = (4.5-nodeNum) * kangle;
+    
+    top->cd();
+    node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd(); 
+    node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
   } // end loop on nodeNum
 }
 
index ed89f82149387e58a2c6100fc3f27dc04628d7a0..895fe2d8f1f5b5af7ce5795ff55e45ec1323d6c7 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.29  2002/06/24 14:09:12  vicinanz
+review on materials and
+
 Revision 1.28  2002/05/08 13:24:50  vicinanz
 AliTOFanalyzeMatching.C macro added and minor changes to the AliTOF code
 
@@ -79,9 +82,7 @@ Introduction of the Copyright and cvs Log
 */
 
 ///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Time Of Flight: design of C.Williams                                     //
-//                                                                                  //
+//
 //  This class contains the functions for version 1 of the Time Of Flight    //
 //  detector.                                                                //
 //
@@ -178,70 +179,74 @@ void AliTOFv1::BuildGeometry()
   const Float_t kangle = 2*kPi/kNTof;
   Float_t ang;
 
+  // define offset for nodes
+  Float_t zOffsetC = fZtof - fZlenC*0.5;
+  Float_t zOffsetB = fZtof - fZlenC - fZlenB*0.5;
+  Float_t zOffsetA = 0.;
   // Define TOF basic volume
   
   char nodeName0[7], nodeName1[7], nodeName2[7]; 
   char nodeName3[7], nodeName4[7], rotMatNum[7];
-
+  
   new TBRIK("S_TOF_C","TOF box","void",
-            120*0.5,khTof*0.5,fZlenC*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenC*0.5);
   new TBRIK("S_TOF_B","TOF box","void",
-            120*0.5,khTof*0.5,fZlenB*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenB*0.5);
   new TBRIK("S_TOF_A","TOF box","void",
-            120*0.5,khTof*0.5,fZlenA*0.5);
-
+            fStripLn*0.5,khTof*0.5,fZlenA*0.5);
+  
   for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
-     
-      if (nodeNum<10) {
-           sprintf(rotMatNum,"rot50%i",nodeNum);
-           sprintf(nodeName0,"FTO00%i",nodeNum);
-           sprintf(nodeName1,"FTO10%i",nodeNum);
-           sprintf(nodeName2,"FTO20%i",nodeNum);
-           sprintf(nodeName3,"FTO30%i",nodeNum);
-           sprintf(nodeName4,"FTO40%i",nodeNum);
-      }
-      if (nodeNum>9) {
-           sprintf(rotMatNum,"rot5%i",nodeNum);
-           sprintf(nodeName0,"FTO0%i",nodeNum);
-           sprintf(nodeName1,"FTO1%i",nodeNum);
-           sprintf(nodeName2,"FTO2%i",nodeNum);
-           sprintf(nodeName3,"FTO3%i",nodeNum);
-           sprintf(nodeName4,"FTO4%i",nodeNum);
-      }
-      new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
-      ang = (4.5-nodeNum) * kangle;
-
-      top->cd();
-      node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd(); 
-      node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-if (nodeNum<8 || nodeNum>12) {
+    
+    if (nodeNum<10) {
+      sprintf(rotMatNum,"rot50%i",nodeNum);
+      sprintf(nodeName0,"FTO00%i",nodeNum);
+      sprintf(nodeName1,"FTO10%i",nodeNum);
+      sprintf(nodeName2,"FTO20%i",nodeNum);
+      sprintf(nodeName3,"FTO30%i",nodeNum);
+      sprintf(nodeName4,"FTO40%i",nodeNum);
+    }
+    if (nodeNum>9) {
+      sprintf(rotMatNum,"rot5%i",nodeNum);
+      sprintf(nodeName0,"FTO0%i",nodeNum);
+      sprintf(nodeName1,"FTO1%i",nodeNum);
+      sprintf(nodeName2,"FTO2%i",nodeNum);
+      sprintf(nodeName3,"FTO3%i",nodeNum);
+      sprintf(nodeName4,"FTO4%i",nodeNum);
+    }
+    
+    new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+    ang = (4.5-nodeNum) * kangle;
+    
+    top->cd();
+    node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd(); 
+    node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    if (nodeNum<7 || nodeNum>11) {
       top->cd();
-      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
+      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum);
       node->SetLineColor(kColorTOF);
       fNodes->Add(node); 
-     } // Modules A which are not to be installed for PHOS holes.
+    } // Modules A which are not to be installed for PHOS holes.
   } // end loop on nodeNum
-
+  
 }
+
 //_____________________________________________________________________________
 void AliTOFv1::CreateGeometry()
 {
index f3654896e5baeb0df8fd0d672bc584273d9388b6..a9732acb890504930dff247b3083794b33178db2 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.27  2002/06/24 14:09:12  vicinanz
+review on materials and
+
 Revision 1.26  2002/05/08 13:24:50  vicinanz
 AliTOFanalyzeMatching.C macro added and minor changes to the AliTOF code
 
@@ -72,9 +75,7 @@ Introduction of the Copyright and cvs Log
 */
 
 ///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Time Of Flight: design of C.Williams                                     
-//                                                                          
+//
 //  This class contains the functions for version 2 of the Time Of Flight    //
 //  detector.                                                                //
 //
@@ -157,10 +158,10 @@ void AliTOFv2::BuildGeometry()
   //
   TNode *node, *top;
   const int kColorTOF  = 27;
-
+  
   // Find top TNODE
   top = gAlice->GetGeometry()->GetNode("alice");
-
+  
   // Position the different copies
   const Float_t krTof  =(fRmax+fRmin)/2;
   const Float_t khTof  = fRmax-fRmin;
@@ -168,70 +169,74 @@ void AliTOFv2::BuildGeometry()
   const Float_t kPi   = TMath::Pi();
   const Float_t kangle = 2*kPi/kNTof;
   Float_t ang;
-
+  
+  // define offset for nodes
+  Float_t zOffsetC = fZtof - fZlenC*0.5;
+  Float_t zOffsetB = fZtof - fZlenC - fZlenB*0.5;
+  Float_t zOffsetA = 0.;
   // Define TOF basic volume
   
   char nodeName0[6], nodeName1[6], nodeName2[6]; 
   char nodeName3[6], nodeName4[6], rotMatNum[6];
-
+  
   new TBRIK("S_TOF_C","TOF box","void",
-            120*0.5,khTof*0.5,fZlenC*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenC*0.5);
   new TBRIK("S_TOF_B","TOF box","void",
-            120*0.5,khTof*0.5,fZlenB*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenB*0.5);
   new TBRIK("S_TOF_A","TOF box","void",
-            120*0.5,khTof*0.5,fZlenA*0.5);
-
+            fStripLn*0.5,khTof*0.5,fZlenA*0.5);
+  
   for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
-     
-      if (nodeNum<10) {
-           sprintf(rotMatNum,"rot50%i",nodeNum);
-           sprintf(nodeName0,"FTO00%i",nodeNum);
-           sprintf(nodeName1,"FTO10%i",nodeNum);
-           sprintf(nodeName2,"FTO20%i",nodeNum);
-           sprintf(nodeName3,"FTO30%i",nodeNum);
-           sprintf(nodeName4,"FTO40%i",nodeNum);
-      }
-      if (nodeNum>9) {
-           sprintf(rotMatNum,"rot5%i",nodeNum);
-           sprintf(nodeName0,"FTO0%i",nodeNum);
-           sprintf(nodeName1,"FTO1%i",nodeNum);
-           sprintf(nodeName2,"FTO2%i",nodeNum);
-           sprintf(nodeName3,"FTO3%i",nodeNum);
-           sprintf(nodeName4,"FTO4%i",nodeNum);
-      }
-      new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
-      ang = (4.5-nodeNum) * kangle;
-
-      top->cd();
-      node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd(); 
-      node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-if (nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
-    {
-      top->cd();
-      node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-  } // Holes for RICH detector
-
-if ((nodeNum<8 || nodeNum>12) && nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
-    { 
-      top->cd();
-      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-     } // Holes for PHOS detector (+ Holes for RICH detector, central part)
+    
+    if (nodeNum<10) {
+      sprintf(rotMatNum,"rot50%i",nodeNum);
+      sprintf(nodeName0,"FTO00%i",nodeNum);
+      sprintf(nodeName1,"FTO10%i",nodeNum);
+      sprintf(nodeName2,"FTO20%i",nodeNum);
+      sprintf(nodeName3,"FTO30%i",nodeNum);
+      sprintf(nodeName4,"FTO40%i",nodeNum);
+    }
+    if (nodeNum>9) {
+      sprintf(rotMatNum,"rot5%i",nodeNum);
+      sprintf(nodeName0,"FTO0%i",nodeNum);
+      sprintf(nodeName1,"FTO1%i",nodeNum);
+      sprintf(nodeName2,"FTO2%i",nodeNum);
+      sprintf(nodeName3,"FTO3%i",nodeNum);
+      sprintf(nodeName4,"FTO4%i",nodeNum);
+    }
+    
+    new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+    ang = (4.5-nodeNum) * kangle;
+    
+    top->cd();
+    node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd(); 
+    node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    if (nodeNum !=1 && nodeNum!=17 && nodeNum !=18)
+      {
+       top->cd();
+       node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+       
+       top->cd();
+       node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+      } // Holes for RICH detector
+    
+    if ((nodeNum<7 || nodeNum>11) && nodeNum !=1 && nodeNum!=17 && nodeNum !=18)
+      
+       top->cd();
+       node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+      } // Holes for PHOS detector (+ Holes for RICH detector, central part)
   } // end loop on nodeNum
 }
 
index 4ab15c734a0c7dfd6d733083df58b7bc015c7640..a6fd5e5d4bdb9582f2b4213540146dcf16b34850 100644 (file)
@@ -16,9 +16,7 @@
 
 
 ///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Time Of Flight: design of C.Williams                                     
-//                                                                          
+//
 //  This class contains the functions for version 2 of the Time Of Flight    //
 //  detector.                                                                //
 //
@@ -100,10 +98,10 @@ void AliTOFv2FHoles::BuildGeometry()
   //
   TNode *node, *top;
   const int kColorTOF  = 27;
-
+  
   // Find top TNODE
   top = gAlice->GetGeometry()->GetNode("alice");
-
+  
   // Position the different copies
   const Float_t krTof  =(fRmax+fRmin)/2;
   const Float_t khTof  = fRmax-fRmin;
@@ -112,69 +110,79 @@ void AliTOFv2FHoles::BuildGeometry()
   const Float_t kangle = 2*kPi/kNTof;
   Float_t ang;
 
+  // fixing parameters as requested by FRAME v0 (Morsch 16-10-2001)
+  //Float_t zlenA = 124.;  // cm (A module length) original size 106.   enlarged   
+  Float_t zlenB = 154.;  // cm (B module length) original size 141.   enlarged
+  Float_t zlenC = 159.5; // cm (C module length) original size 175.5  reduced
+  Float_t ztof0 = 375.5; // total half-length of a TOF sector original size 371.5cm
+
+  Float_t zOffsetC = ztof0 - zlenC*0.5;
+  Float_t zOffsetB = ztof0 - zlenC - zlenB*0.5;
+  Float_t zOffsetA =    0.00;
+
   // Define TOF basic volume
   
   char nodeName0[6], nodeName1[6], nodeName2[6]; 
   char nodeName3[6], nodeName4[6], rotMatNum[6];
-
+  
   new TBRIK("S_TOF_C","TOF box","void",
-            120*0.5,khTof*0.5,fZlenC*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenC*0.5);
   new TBRIK("S_TOF_B","TOF box","void",
-            120*0.5,khTof*0.5,fZlenB*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenB*0.5);
   new TBRIK("S_TOF_A","TOF box","void",
-            120*0.5,khTof*0.5,fZlenA*0.5);
-
+            fStripLn*0.5,khTof*0.5,fZlenA*0.5);
+  
   for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
-     
-      if (nodeNum<10) {
-           sprintf(rotMatNum,"rot50%i",nodeNum);
-           sprintf(nodeName0,"FTO00%i",nodeNum);
-           sprintf(nodeName1,"FTO10%i",nodeNum);
-           sprintf(nodeName2,"FTO20%i",nodeNum);
-           sprintf(nodeName3,"FTO30%i",nodeNum);
-           sprintf(nodeName4,"FTO40%i",nodeNum);
-      }
-      if (nodeNum>9) {
-           sprintf(rotMatNum,"rot5%i",nodeNum);
-           sprintf(nodeName0,"FTO0%i",nodeNum);
-           sprintf(nodeName1,"FTO1%i",nodeNum);
-           sprintf(nodeName2,"FTO2%i",nodeNum);
-           sprintf(nodeName3,"FTO3%i",nodeNum);
-           sprintf(nodeName4,"FTO4%i",nodeNum);
-      }
-      new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
-      ang = (4.5-nodeNum) * kangle;
-
-      top->cd();
-      node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd(); 
-      node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-if (nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
-    {
-      top->cd();
-      node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-  } // Holes for RICH detector
-
-if ((nodeNum<8 || nodeNum>12) && nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
-    { 
-      top->cd();
-      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-     } // Holes for PHOS detector (+ Holes for RICH detector, central part)
+    
+    if (nodeNum<10) {
+      sprintf(rotMatNum,"rot50%i",nodeNum);
+      sprintf(nodeName0,"FTO00%i",nodeNum);
+      sprintf(nodeName1,"FTO10%i",nodeNum);
+      sprintf(nodeName2,"FTO20%i",nodeNum);
+      sprintf(nodeName3,"FTO30%i",nodeNum);
+      sprintf(nodeName4,"FTO40%i",nodeNum);
+    }
+    if (nodeNum>9) {
+      sprintf(rotMatNum,"rot5%i",nodeNum);
+      sprintf(nodeName0,"FTO0%i",nodeNum);
+      sprintf(nodeName1,"FTO1%i",nodeNum);
+      sprintf(nodeName2,"FTO2%i",nodeNum);
+      sprintf(nodeName3,"FTO3%i",nodeNum);
+      sprintf(nodeName4,"FTO4%i",nodeNum);
+    }
+    
+    new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+    ang = (4.5-nodeNum) * kangle;
+    
+    top->cd();
+    node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd(); 
+    node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    if (nodeNum !=1 && nodeNum!=17 && nodeNum !=18)
+      {
+       top->cd();
+       node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+       
+       top->cd();
+       node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+      } // Holes for RICH detector
+    
+    if ((nodeNum<7 || nodeNum>11) && nodeNum !=1 && nodeNum!=17 && nodeNum !=18)
+      
+       top->cd();
+       node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+      } // Holes for PHOS detector (+ Holes for RICH detector, central part)
   } // end loop on nodeNum
 }
 
index 83f53193863c2086e14f047e5bd2cfdfef8352ca..1cbebd12a50f64fc2fcdbd260d321493c36fd804 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.27  2002/06/24 14:09:12  vicinanz
+review on materials and
+
 Revision 1.26  2002/05/08 13:24:50  vicinanz
 AliTOFanalyzeMatching.C macro added and minor changes to the AliTOF code
 
@@ -72,9 +75,7 @@ Introduction of the Copyright and cvs Log
 */
 
 ///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Time Of Flight: design of C.Williams                                    //
-//                                                                          //
+//
 //  This class contains the functions for version 3 of the Time Of Flight    //
 //  detector.                                                                //
 //
@@ -156,10 +157,10 @@ void AliTOFv3::BuildGeometry()
   //
   TNode *node, *top;
   const int kColorTOF  = 27;
-
+  
   // Find top TNODE
   top = gAlice->GetGeometry()->GetNode("alice");
-
+  
   // Position the different copies
   const Float_t krTof  =(fRmax+fRmin)/2;
   const Float_t khTof  = fRmax-fRmin;
@@ -167,70 +168,74 @@ void AliTOFv3::BuildGeometry()
   const Float_t kPi   = TMath::Pi();
   const Float_t kangle = 2*kPi/kNTof;
   Float_t ang;
-
+  
+  // define offset for nodes
+  Float_t zOffsetC = fZtof - fZlenC*0.5;
+  Float_t zOffsetB = fZtof - fZlenC - fZlenB*0.5;
+  Float_t zOffsetA = 0.;
   // Define TOF basic volume
   
   char nodeName0[7], nodeName1[7], nodeName2[7]; 
   char nodeName3[7], nodeName4[7], rotMatNum[7];
-
+  
   new TBRIK("S_TOF_C","TOF box","void",
-            120*0.5,khTof*0.5,fZlenC*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenC*0.5);
   new TBRIK("S_TOF_B","TOF box","void",
-            120*0.5,khTof*0.5,fZlenB*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenB*0.5);
   new TBRIK("S_TOF_A","TOF box","void",
-            120*0.5,khTof*0.5,fZlenA*0.5);
-
+            fStripLn*0.5,khTof*0.5,fZlenA*0.5);
+  
   for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
-     
-      if (nodeNum<10) {
-           sprintf(rotMatNum,"rot50%i",nodeNum);
-           sprintf(nodeName0,"FTO00%i",nodeNum);
-           sprintf(nodeName1,"FTO10%i",nodeNum);
-           sprintf(nodeName2,"FTO20%i",nodeNum);
-           sprintf(nodeName3,"FTO30%i",nodeNum);
-           sprintf(nodeName4,"FTO40%i",nodeNum);
-      }
-      if (nodeNum>9) {
-           sprintf(rotMatNum,"rot5%i",nodeNum);
-           sprintf(nodeName0,"FTO0%i",nodeNum);
-           sprintf(nodeName1,"FTO1%i",nodeNum);
-           sprintf(nodeName2,"FTO2%i",nodeNum);
-           sprintf(nodeName3,"FTO3%i",nodeNum);
-           sprintf(nodeName4,"FTO4%i",nodeNum);
-      }
-      new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
-      ang = (4.5-nodeNum) * kangle;
-
-      top->cd();
-      node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd(); 
-      node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-if (nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
-    {
-      top->cd();
-      node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-  } // Holes for RICH detector
-
-if (nodeNum !=1 && nodeNum !=2 && nodeNum !=18)
-    { 
-      top->cd();
-      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-     } // Holes for RICH detector, central part
+    
+    if (nodeNum<10) {
+      sprintf(rotMatNum,"rot50%i",nodeNum);
+      sprintf(nodeName0,"FTO00%i",nodeNum);
+      sprintf(nodeName1,"FTO10%i",nodeNum);
+      sprintf(nodeName2,"FTO20%i",nodeNum);
+      sprintf(nodeName3,"FTO30%i",nodeNum);
+      sprintf(nodeName4,"FTO40%i",nodeNum);
+    }
+    if (nodeNum>9) {
+      sprintf(rotMatNum,"rot5%i",nodeNum);
+      sprintf(nodeName0,"FTO0%i",nodeNum);
+      sprintf(nodeName1,"FTO1%i",nodeNum);
+      sprintf(nodeName2,"FTO2%i",nodeNum);
+      sprintf(nodeName3,"FTO3%i",nodeNum);
+      sprintf(nodeName4,"FTO4%i",nodeNum);
+    }
+    
+    new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+    ang = (4.5-nodeNum) * kangle;
+    
+    top->cd();
+    node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd(); 
+    node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    if (nodeNum !=1 && nodeNum!=17 && nodeNum !=18)
+      {
+       top->cd();
+       node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+       
+       top->cd();
+       node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+      } // Holes for RICH detector
+    
+    if (nodeNum !=1 && nodeNum !=17 && nodeNum !=18)
+      
+       top->cd();
+       node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum);
+       node->SetLineColor(kColorTOF);
+       fNodes->Add(node); 
+      } // Holes for RICH detector, central part
   }
 }
 
index 6c1d205f5a021d2d14f481a4a73c22bae4f38d3e..22a0d59903f33bfe9563f795c945fad52ed8849a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.17  2002/06/24 14:09:12  vicinanz
+review on materials and
+
 Revision 1.16  2002/05/08 13:24:50  vicinanz
 AliTOFanalyzeMatching.C macro added and minor changes to the AliTOF code
 
@@ -72,8 +75,6 @@ Introduction of the Copyright and cvs Log
 */
 
 ///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Time Of Flight: design of C.Williams
 //
 //  This class contains the functions for version 4 of the Time Of Flight    //
 //  detector.                                                                //
@@ -156,10 +157,10 @@ void AliTOFv4::BuildGeometry()
   //
   TNode *node, *top;
   const int kColorTOF  = 27;
-
+  
   // Find top TNODE
   top = gAlice->GetGeometry()->GetNode("alice");
-
+  
   // Position the different copies
   const Float_t krTof  =(fRmax+fRmin)/2;
   const Float_t khTof  = fRmax-fRmin;
@@ -167,65 +168,69 @@ void AliTOFv4::BuildGeometry()
   const Float_t kPi   = TMath::Pi();
   const Float_t kangle = 2*kPi/kNTof;
   Float_t ang;
-
+  
+  // define offset for nodes
+  Float_t zOffsetC = fZtof - fZlenC*0.5;
+  Float_t zOffsetB = fZtof - fZlenC - fZlenB*0.5;
+  Float_t zOffsetA = 0.;
   // Define TOF basic volume
   
   char nodeName0[7], nodeName1[7], nodeName2[7]; 
   char nodeName3[7], nodeName4[7], rotMatNum[7];
-
+  
   new TBRIK("S_TOF_C","TOF box","void",
-            120*0.5,khTof*0.5,fZlenC*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenC*0.5);
   new TBRIK("S_TOF_B","TOF box","void",
-            120*0.5,khTof*0.5,fZlenB*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenB*0.5);
   new TBRIK("S_TOF_A","TOF box","void",
-            120*0.5,khTof*0.5,fZlenA*0.5);
-
+            fStripLn*0.5,khTof*0.5,fZlenA*0.5);
+  
   for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
-     
-      if (nodeNum<10) {
-           sprintf(rotMatNum,"rot50%i",nodeNum);
-           sprintf(nodeName0,"FTO00%i",nodeNum);
-           sprintf(nodeName1,"FTO10%i",nodeNum);
-           sprintf(nodeName2,"FTO20%i",nodeNum);
-           sprintf(nodeName3,"FTO30%i",nodeNum);
-           sprintf(nodeName4,"FTO40%i",nodeNum);
-      }
-      if (nodeNum>9) {
-           sprintf(rotMatNum,"rot5%i",nodeNum);
-           sprintf(nodeName0,"FTO0%i",nodeNum);
-           sprintf(nodeName1,"FTO1%i",nodeNum);
-           sprintf(nodeName2,"FTO2%i",nodeNum);
-           sprintf(nodeName3,"FTO3%i",nodeNum);
-           sprintf(nodeName4,"FTO4%i",nodeNum);
-      }
-      new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
-      ang = (4.5-nodeNum) * kangle;
-
-      top->cd();
-      node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd(); 
-      node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
+    
+    if (nodeNum<10) {
+      sprintf(rotMatNum,"rot50%i",nodeNum);
+      sprintf(nodeName0,"FTO00%i",nodeNum);
+      sprintf(nodeName1,"FTO10%i",nodeNum);
+      sprintf(nodeName2,"FTO20%i",nodeNum);
+      sprintf(nodeName3,"FTO30%i",nodeNum);
+      sprintf(nodeName4,"FTO40%i",nodeNum);
+    }
+    if (nodeNum>9) {
+      sprintf(rotMatNum,"rot5%i",nodeNum);
+      sprintf(nodeName0,"FTO0%i",nodeNum);
+      sprintf(nodeName1,"FTO1%i",nodeNum);
+      sprintf(nodeName2,"FTO2%i",nodeNum);
+      sprintf(nodeName3,"FTO3%i",nodeNum);
+      sprintf(nodeName4,"FTO4%i",nodeNum);
+    }
+    
+    new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+    ang = (4.5-nodeNum) * kangle;
+    
+    top->cd();
+    node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd(); 
+    node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
   } // end loop on nodeNum
 }
 
index fc74aa6c527ba00c5c9bf398290ce784c21c98af..34c7ea086520cb5f72c9f386c1756ec59a5c908c 100644 (file)
@@ -15,8 +15,6 @@
 
 
 ///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Time Of Flight: design of C.Williams
 //
 //  This class contains the functions for version 4 of the Time Of Flight    //
 //  detector.                                                                //
@@ -93,10 +91,10 @@ void AliTOFv4T0::BuildGeometry()
   //
   TNode *node, *top;
   const int kColorTOF  = 27;
-
+  
   // Find top TNODE
   top = gAlice->GetGeometry()->GetNode("alice");
-
+  
   // Position the different copies
   const Float_t krTof  =(fRmax+fRmin)/2;
   const Float_t khTof  = fRmax-fRmin;
@@ -104,65 +102,69 @@ void AliTOFv4T0::BuildGeometry()
   const Float_t kPi   = TMath::Pi();
   const Float_t kangle = 2*kPi/kNTof;
   Float_t ang;
-
+  
+  // define offset for nodes
+  Float_t zOffsetC = fZtof - fZlenC*0.5;
+  Float_t zOffsetB = fZtof - fZlenC - fZlenB*0.5;
+  Float_t zOffsetA = 0.;
   // Define TOF basic volume
   
   char nodeName0[7], nodeName1[7], nodeName2[7]; 
   char nodeName3[7], nodeName4[7], rotMatNum[7];
-
+  
   new TBRIK("S_TOF_C","TOF box","void",
-            120*0.5,khTof*0.5,fZlenC*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenC*0.5);
   new TBRIK("S_TOF_B","TOF box","void",
-            120*0.5,khTof*0.5,fZlenB*0.5);
+            fStripLn*0.5,khTof*0.5,fZlenB*0.5);
   new TBRIK("S_TOF_A","TOF box","void",
-            120*0.5,khTof*0.5,fZlenA*0.5);
-
+            fStripLn*0.5,khTof*0.5,fZlenA*0.5);
+  
   for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
-     
-      if (nodeNum<10) {
-           sprintf(rotMatNum,"rot50%i",nodeNum);
-           sprintf(nodeName0,"FTO00%i",nodeNum);
-           sprintf(nodeName1,"FTO10%i",nodeNum);
-           sprintf(nodeName2,"FTO20%i",nodeNum);
-           sprintf(nodeName3,"FTO30%i",nodeNum);
-           sprintf(nodeName4,"FTO40%i",nodeNum);
-      }
-      if (nodeNum>9) {
-           sprintf(rotMatNum,"rot5%i",nodeNum);
-           sprintf(nodeName0,"FTO0%i",nodeNum);
-           sprintf(nodeName1,"FTO1%i",nodeNum);
-           sprintf(nodeName2,"FTO2%i",nodeNum);
-           sprintf(nodeName3,"FTO3%i",nodeNum);
-           sprintf(nodeName4,"FTO4%i",nodeNum);
-      }
-      new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
-      ang = (4.5-nodeNum) * kangle;
-
-      top->cd();
-      node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd(); 
-      node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
-
-      top->cd();
-      node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
+    
+    if (nodeNum<10) {
+      sprintf(rotMatNum,"rot50%i",nodeNum);
+      sprintf(nodeName0,"FTO00%i",nodeNum);
+      sprintf(nodeName1,"FTO10%i",nodeNum);
+      sprintf(nodeName2,"FTO20%i",nodeNum);
+      sprintf(nodeName3,"FTO30%i",nodeNum);
+      sprintf(nodeName4,"FTO40%i",nodeNum);
+    }
+    if (nodeNum>9) {
+      sprintf(rotMatNum,"rot5%i",nodeNum);
+      sprintf(nodeName0,"FTO0%i",nodeNum);
+      sprintf(nodeName1,"FTO1%i",nodeNum);
+      sprintf(nodeName2,"FTO2%i",nodeNum);
+      sprintf(nodeName3,"FTO3%i",nodeNum);
+      sprintf(nodeName4,"FTO4%i",nodeNum);
+    }
+    
+    new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+    ang = (4.5-nodeNum) * kangle;
 
-      top->cd();
-      node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
-      node->SetLineColor(kColorTOF);
-      fNodes->Add(node); 
+    top->cd();
+    node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd(); 
+    node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
+    
+    top->cd();
+    node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum);
+    node->SetLineColor(kColorTOF);
+    fNodes->Add(node); 
   } // end loop on nodeNum
 }