Corrected setting of magnetic field
[u/mrichter/AliRoot.git] / ITS / AliITSvPPRasymm.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 ///////////////////////////////////////////////////////////////////////////////
19 //                                                                           //
20 //  Inner Traking System version PPR  asymmetric                             //
21 //  This class contains the base procedures for the Inner Tracking System    //
22 //                                                                           //
23 // Authors: R. Barbera                                                       //
24 // version 8.                                                                //
25 // Created  January 15 2001.                                                 //
26 //                                                                           //
27 //  NOTE: THIS IS THE  ASYMMETRIC PPR geometry of the ITS.                   //
28 //                                                                           //
29 ///////////////////////////////////////////////////////////////////////////////
30
31 // See AliITSvPPRasymm::StepManager().
32 #include <Riostream.h>
33 #include <stdio.h>
34 #include <stdlib.h>
35
36 #include <TBRIK.h>
37 //#include <TCanvas.h>
38 #include <TClonesArray.h>
39 //#include <TFile.h>    // only required for Tracking function?
40 #include <TGeometry.h>
41 #include <TLorentzVector.h>
42 #include <TMath.h>
43 #include <TNode.h>
44 //#include <TObjArray.h>
45 //#include <TObjString.h>
46 #include <TPCON.h>
47 //#include <TSystem.h>
48 #include <TTUBE.h>
49 #include <TTUBS.h>
50 #include <TVirtualMC.h>
51
52 #include "AliRun.h"
53 #include "AliMagF.h"
54 #include "AliConst.h"
55 #include "AliITSGeant3Geometry.h"
56 #include "AliTrackReference.h"
57 #include "AliITShit.h"
58 #include "AliITS.h"
59 #include "AliITSvPPRasymm.h"
60 #include "AliITSgeom.h"
61 #include "AliITSgeomSDD.h"
62 #include "AliITSgeomSPD.h"
63 #include "AliITSgeomSSD.h"
64 #include "AliITShit.h"
65 #include "AliITSresponseSDD.h"
66 #include "AliITSresponseSPD.h"
67 #include "AliITSresponseSSD.h"
68 #include "AliITSsegmentationSDD.h"
69 #include "AliITSsegmentationSPD.h"
70 #include "AliITSsegmentationSSD.h"
71 #include "AliITSsimulationSDD.h"
72 #include "AliITSsimulationSPD.h"
73 #include "AliITSsimulationSSD.h"
74 #include "AliITSvPPRasymm.h"
75 #include "AliMC.h"
76
77
78 ClassImp(AliITSvPPRasymm)
79  
80 //_____________________________________________________________________________
81 AliITSvPPRasymm::AliITSvPPRasymm() {
82 ////////////////////////////////////////////////////////////////////////
83 //    Standard default constructor for the ITS version 8.
84 ////////////////////////////////////////////////////////////////////////
85     Int_t i;
86
87     fIdN          = 0;
88     fIdName       = 0;
89     fIdSens       = 0;
90     fEuclidOut    = kFALSE; // Don't write Euclide file
91     fGeomDetOut   = kFALSE; // Don't write .det file
92     fGeomDetIn    = kFALSE; // Don't Read .det file
93     fMajorVersion = IsVersion();
94     fMinorVersion = -1;
95     for(i=0;i<60;i++) fRead[i] = '\0';
96     for(i=0;i<60;i++) fWrite[i] = '\0';
97     for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0';
98 }
99 //_____________________________________________________________________________
100 AliITSvPPRasymm::AliITSvPPRasymm(const char *name, const char *title) : AliITS(name, title){
101 ////////////////////////////////////////////////////////////////////////
102 //    Standard constructor for the ITS version 8.
103 ////////////////////////////////////////////////////////////////////////
104     Int_t i;
105
106     fIdN = 6;
107     fIdName = new TString[fIdN];
108     fIdName[0] = "ITS1";
109     fIdName[1] = "ITS2";
110     fIdName[2] = "ITS3";
111     fIdName[3] = "ITS4";
112     fIdName[4] = "ITS5";
113     fIdName[5] = "ITS6";
114     fIdSens    = new Int_t[fIdN];
115     for(i=0;i<fIdN;i++) fIdSens[i] = 0;
116     fMajorVersion = IsVersion();
117     fMinorVersion = 2;
118     fEuclidOut    = kFALSE; // Don't write Euclide file
119     fGeomDetOut   = kFALSE; // Don't write .det file
120     fGeomDetIn    = kFALSE; // Don't Read .det file
121     SetThicknessDet1();
122     SetThicknessDet2();
123     SetThicknessChip1();
124     SetThicknessChip2();                         
125
126     fEuclidGeometry="$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.euc";
127     strncpy(fEuclidGeomDet,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det",60);
128     strncpy(fRead,fEuclidGeomDet,60);
129     strncpy(fWrite,fEuclidGeomDet,60);
130 }
131 //____________________________________________________________________________
132 AliITSvPPRasymm::AliITSvPPRasymm(const AliITSvPPRasymm &source):AliITS(source){
133 ////////////////////////////////////////////////////////////////////////
134 //     Copy Constructor for ITS version 8.
135 ////////////////////////////////////////////////////////////////////////
136     if(&source == this) return;
137     Warning("Copy Constructor","Not allowed to copy AliITSvPPRasymm");
138     return;
139 }
140 //_____________________________________________________________________________
141 AliITSvPPRasymm& AliITSvPPRasymm::operator=(const AliITSvPPRasymm &source){
142 ////////////////////////////////////////////////////////////////////////
143 //    Assignment operator for the ITS version 8.
144 ////////////////////////////////////////////////////////////////////////
145     if(&source == this) return *this;
146     Warning("= operator","Not allowed to copy AliITSvPPRasymm");
147     return *this;
148 }
149 //_____________________________________________________________________________
150 AliITSvPPRasymm::~AliITSvPPRasymm() {
151 ////////////////////////////////////////////////////////////////////////
152 //    Standard destructor for the ITS version 8.
153 ////////////////////////////////////////////////////////////////////////
154 }
155 //__________________________________________________________________________
156 void AliITSvPPRasymm::BuildGeometry(){
157 ////////////////////////////////////////////////////////////////////////
158 //    Geometry builder for the ITS version 8.
159 ////////////////////////////////////////////////////////////////////////
160     TNode *node, *top;
161     
162     const Int_t kColorITS=kYellow;
163     //
164     top = gAlice->GetGeometry()->GetNode("alice");
165
166
167     new TTUBE("S_layer1","Layer1 of ITS","void",3.8095,3.8095+1.03*9.36/100.,14.35);
168     top->cd();
169     node = new TNode("Layer1","Layer1","S_layer1",0,0,0,"");
170     node->SetLineColor(kColorITS);
171     fNodes->Add(node);
172
173     new TTUBE("S_layer2","Layer2 of ITS","void",7.,7.+1.03*9.36/100.,14.35);
174     top->cd();
175     node = new TNode("Layer2","Layer2","S_layer2",0,0,0,"");
176     node->SetLineColor(kColorITS);
177     fNodes->Add(node);
178
179     new TTUBE("S_layer3","Layer3 of ITS","void",15.,15.+0.94*9.36/100.,25.1);
180     top->cd();
181     node = new TNode("Layer3","Layer3","S_layer3",0,0,0,"");
182     node->SetLineColor(kColorITS);
183     fNodes->Add(node);
184
185     new TTUBE("S_layer4","Layer4 of ITS","void",24.1,24.1+0.95*9.36/100.,32.1);
186     top->cd();
187     node = new TNode("Layer4","Layer4","S_layer4",0,0,0,"");
188     node->SetLineColor(kColorITS);
189     fNodes->Add(node);
190
191     new TTUBE("S_layer5","Layer5 of ITS","void",38.5,38.5+0.91*9.36/100.,49.405);
192     top->cd();
193     node = new TNode("Layer5","Layer5","S_layer5",0,0,0,"");
194     node->SetLineColor(kColorITS);
195     fNodes->Add(node);
196
197     new TTUBE("S_layer6","Layer6 of ITS","void",43.5765,43.5765+0.87*9.36/100.,55.27);
198     top->cd();
199     node = new TNode("Layer6","Layer6","S_layer6",0,0,0,"");
200     node->SetLineColor(kColorITS);
201     fNodes->Add(node);
202
203
204 /*
205   // DETAILED GEOMETRY
206
207   TNode *sub1node, *sub2node, *sub3node, *sub4node, *sub5node;
208
209   // Define some variables for SPD
210
211   Float_t dits[100];
212   Float_t dits1[3], di101[3], di107[3], di10b[3];  // for layer 1 
213   Float_t di103[3], di10a[3];                      // for layer 1
214   Float_t dits2[3], di1d1[3], di1d7[3], di20b[3];  // for layer 2
215   Float_t di1d3[3], di20a[3];                      // for layer 2  
216
217   Float_t ddet1=200.;     // total detector thickness on layer 1 (micron)
218   Float_t dchip1=200.;    // total chip thickness on layer 1 (micron)
219   
220   Float_t ddet2=200.;     // total detector thickness on layer 2 (micron)                         
221   Float_t dchip2=200.;    // total chip thickness on layer 2 (micron)
222   
223   Float_t dbus=300.;      // total bus thickness on both layers (micron)
224
225   ddet1 = GetThicknessDet1();
226   ddet2 = GetThicknessDet2();
227   dchip1 = GetThicknessChip1();
228   dchip2 = GetThicknessChip2();    
229
230   cout << "par: " << ddet1 << " " << ddet2 << " " << ddet2 << " " << dchip1 << " " << dchip2 << endl; 
231
232   if(ddet1 < 100. || ddet1 > 300.) {
233      cout << "ITS - WARNING: the detector thickness for layer 1 is outside the range of [100,300] microns."
234           " The default value of 200 microns will be used." << endl;
235           ddet1=200.;
236   }
237   
238   if(ddet2 < 100. || ddet2 > 300.) {
239      cout << "ITS - WARNING: the detector thickness for layer 2 is outside the range of [100,300] microns."
240           " The default value of 200 microns will be used." << endl;
241           ddet2=200.;
242   }
243   
244   if(dchip1 < 100. || dchip1 > 300.) {
245      cout << "ITS - WARNING: the chip thickness for layer 1 is outside the range of [100,300] microns."
246           " The default value of 200 microns will be used." << endl;
247           dchip1=200.;
248   }
249   
250   if(dchip2 < 100. || dchip2 > 300.) {
251      cout << "ITS - WARNING: the chip thickness for layer 2 is outside the range of [100,300] microns."
252           " The default value of 200 microns will be used." << endl;
253           dchip2=200.;
254   }      
255    
256   cout << "ITS: Detector thickness on layer 1 is set to " << ddet1 << " microns." << endl;
257   cout << "ITS: Chip thickness on layer 1 is set to " << dchip1 << " microns." << endl;
258   cout << "ITS: Detector thickness on layer 2 is set to " << ddet2 << " microns." << endl;
259   cout << "ITS: Chip thickness on layer 2 is set to " << dchip2 << " microns." << endl;
260
261   ddet1  = ddet1*0.0001/2.; // conversion from tot length in um to half in cm
262   ddet2  = ddet2*0.0001/2.; // conversion from tot length in um to half in cm   
263   dchip1 = dchip1*0.0001/2.;// conversion from tot length in um to half in cm   
264   dchip2 = dchip2*0.0001/2.;// conversion from tot length in um to half in cm   
265   dbus   = dbus*0.0001/2.;  // conversion from tot length in um to half in cm       
266                 
267   Float_t deltax, deltay; 
268
269   Int_t thickness = fMinorVersion/10;
270   Int_t option    = fMinorVersion - 10*thickness;
271
272
273   // Define some variables for SDD
274   // SDD detector ladder
275
276   Float_t ySDD;
277   Float_t I302dits[3], I402dits[3], I004dits[3], I005dits[3];
278   Float_t Y_SDD_sep = 0.20;
279   Float_t Z_SDD_lay3[6] = {18.55, 10.95, 3.70, -3.70, -11.20, -18.35};
280   Float_t Z_SDD_lay4[8] = {25.75, 18.60, 11.00, 3.70, -3.70, -11.20, -18.45, -26.05};
281
282   // Rotation matrices
283     
284   // SPD - option 'a' 
285   
286   if (option == 1) {  
287   
288      new TRotMatrix("itsrot238","itsrot238",90.0,144.0,90.0,234.0,0.0,0.0);
289      new TRotMatrix("itsrot236","itsrot236",90.0,180.013702,90.0,270.013702,0.0,0.0);
290      new TRotMatrix("itsrot239","itsrot239",90.0,216.0,90.0,306.0,0.0,0.0);     
291      new TRotMatrix("itsrot233","itsrot233",90.0,252.000504,90.0,342.000488,0.0,0.0 );     
292      new TRotMatrix("itsrot240","itsrot240",90.0,288.0,90.0,18.0,0.0,0.0);
293      new TRotMatrix("itsrot241","itsrot241",90.0,324.0,90.0,54.0,0.0,0.0);          
294      new TRotMatrix("itsrot242","itsrot242",90.0,36.0,90.0,126.0,0.0,0.0); 
295      new TRotMatrix("itsrot234","itsrot234",90.0,71.9991,90.0,161.9991,0.0,0.0);     
296      new TRotMatrix("itsrot243","itsrot243",90.0,108.0,90.0,198.0,0.0,0.0);  
297      new TRotMatrix("itsrot244","itsrot244",90.0,180.0,90.0,270.0,0.0,0.0);
298      new TRotMatrix("itsrot245","itsrot245",90.0,162.0,90.0,252.0,0.0,0.0);
299      new TRotMatrix("itsrot246","itsrot246",90.0,310.0,90.0,40.0,0.0,0.0);
300      new TRotMatrix("itsrot247","itsrot247",90.0,319.0,90.0,49.0,0.0,0.0);
301      new TRotMatrix("itsrot248","itsrot248",90.0,328.0,90.0,58.0,0.0,0.0);
302      new TRotMatrix("itsrot249","itsrot249",90.0,337.0,90.0,67.0,0.0,0.0);     
303                  
304   }   
305
306   // SPD - option 'b' (this is the default)  
307
308   if (option == 2) {  
309   
310      new TRotMatrix("itsrot233","itsrot233",90.0,252.000504,90.0,342.000488,0.0,0.0);
311      new TRotMatrix("itsrot244","itsrot244",90.0,216.0,90.0,306.0,0.0,0.0);
312      new TRotMatrix("itsrot236","itsrot236",90.0,180.013702,90.0,270.013702,0.0,0.0);  
313      new TRotMatrix("itsrot245","itsrot245",90.0,36.0,90.0,126.0,0.0,0.0);     
314      new TRotMatrix("itsrot234","itsrot234",90.0,71.9991,90.0,161.9991,0.0,0.0);  
315      new TRotMatrix("itsrot246","itsrot246",90.0,108.0,90.0,198.0,0.0,0.0);    
316      new TRotMatrix("itsrot247","itsrot247",90.0,144.0,90.0,234.0,0.0,0.0);
317      new TRotMatrix("itsrot248","itsrot248",90.0,288.0,90.0,18.0,0.0,0.0);     
318      new TRotMatrix("itsrot249","itsrot249",90.0,324.0,90.0,54.0,0.0,0.0);       
319      new TRotMatrix("itsrot238","itsrot238",90.0,180.0,90.0,270.0,0.0,0.0);
320      new TRotMatrix("itsrot239","itsrot239",90.0,162.0,90.0,252.0,0.0,0.0);     
321      new TRotMatrix("itsrot240","itsrot240",90.0,310.0,90.0,40.0,0.0,0.0);
322      new TRotMatrix("itsrot241","itsrot241",90.0,319.0,90.0,49.0,0.0,0.0);
323      new TRotMatrix("itsrot242","itsrot242",90.0,328.0,90.0,58.0,0.0,0.0);
324      new TRotMatrix("itsrot243","itsrot243",90.0,337.0,90.0,67.0,0.0,0.0);
325
326   }   
327      
328   // SDD
329   
330   new TRotMatrix("itsrot321","itsrot321",90.0,12.86,90.0,102.86,0.0,0.0);        
331   new TRotMatrix("itsrot333","itsrot333",90.0,38.57,90.0,128.57,0.0,0.0);
332   new TRotMatrix("itsrot336","itsrot336",90.0,64.29,90.0,154.29,0.0,0.0);       
333   new TRotMatrix("itsrot350","itsrot350",90.0,90.0,90.0,180.0,0.0,0.0);    
334   new TRotMatrix("itsrot313","itsrot313",90.0,115.71,90.0,205.71,0.0,0.0);   
335   new TRotMatrix("itsrot311","itsrot311",90.0,141.43,90.0,231.43,0.0,0.0);
336   new TRotMatrix("itsrot310","itsrot310",90.0,167.14,90.0,257.14,0.0,0.0);  
337   new TRotMatrix("itsrot386","itsrot386",90.0,192.86,90.0,282.86,0.0,0.0);    
338   new TRotMatrix("itsrot309","itsrot309",90.0,218.57,90.0,308.57,0.0,0.0);  
339   new TRotMatrix("itsrot308","itsrot308",90.0,244.29,90.0,334.29,0.0,0.0);  
340   new TRotMatrix("itsrot356","itsrot356",90.0,270.0,90.0,0.0,0.0,0.0);   
341   new TRotMatrix("itsrot307","itsrot307",90.0,295.71,90.0,25.71,0.0,0.0);  
342   new TRotMatrix("itsrot306","itsrot306",90.0,321.43,90.0,51.43,0.0,0.0); 
343   new TRotMatrix("itsrot305","itsrot305",90.0,347.14,90.0,77.14,0.0,0.0);               
344   new TRotMatrix("itsrot335","itsrot335",90.0,8.18,90.0,98.18,0.0,0.0); 
345   new TRotMatrix("itsrot332","itsrot332",90.0,24.55,90.0,114.55,0.0,0.0);  
346   new TRotMatrix("itsrot331","itsrot331",90.0,40.91,90.0,130.91,0.0,0.0);        
347   new TRotMatrix("itsrot366","itsrot366",90.0,57.27,90.0,147.27,0.0,0.0);       
348   new TRotMatrix("itsrot330","itsrot330",90.0,73.64,90.0,163.64,0.0,0.0);          
349   new TRotMatrix("itsrot350","itsrot350",90.0,90.0,90.0,180.0,0.0,0.0);    
350   new TRotMatrix("itsrot329","itsrot329",90.0,106.36,90.0,196.36,0.0,0.0);  
351   new TRotMatrix("itsrot328","itsrot328",90.0,122.73,90.0,212.73,0.0,0.0);  
352   new TRotMatrix("itsrot327","itsrot327",90.0,139.09,90.0,229.09,0.0,0.0);  
353   new TRotMatrix("itsrot326","itsrot326",90.0,155.45,90.0,245.45,0.0,0.0); 
354   new TRotMatrix("itsrot325","itsrot325",90.0,171.82,90.0,261.82,0.0,0.0);  
355   new TRotMatrix("itsrot324","itsrot324",90.0,188.18,90.0,278.18,0.0,0.0);   
356   new TRotMatrix("itsrot323","itsrot323",90.0,204.55,90.0,294.55,0.0,0.0);   
357   new TRotMatrix("itsrot322","itsrot322",90.0,220.91,90.0,310.91,0.0,0.0);  
358   new TRotMatrix("itsrot320","itsrot320",90.0,237.27,90.0,327.27,0.0,0.0);  
359   new TRotMatrix("itsrot319","itsrot319",90.0,253.64,90.0,343.64,0.0,0.0);  
360   new TRotMatrix("itsrot318","itsrot318",90.0,270.0,90.0,360.0,0.0,0.0);  
361   new TRotMatrix("itsrot317","itsrot317",90.0,286.36,90.0,16.36,0.0,0.0);  
362   new TRotMatrix("itsrot316","itsrot316",90.0,302.73,90.0,32.73,0.0,0.0);       
363   new TRotMatrix("itsrot315","itsrot315",90.0,319.09,90.0,49.09,0.0,0.0);       
364   new TRotMatrix("itsrot314","itsrot314",90.0,335.45,90.0,65.45,0.0,0.0); 
365   new TRotMatrix("itsrot334","itsrot334",90.0,351.82,90.0,81.82,0.0,0.0);        
366       
367   //SSD 
368   
369   new TRotMatrix("itsrot504","itsrot504",90.0,127.06,90.0,217.06,0.0,0.0);  
370   new TRotMatrix("itsrot505","itsrot505",90.0,116.47,90.0,206.47,0.0,0.0);  
371   new TRotMatrix("itsrot506","itsrot506",90.0,105.88,90.0,195.88,0.0,0.0);  
372   new TRotMatrix("itsrot507","itsrot507",90.0,95.29,90.0,185.29,0.0,0.0);  
373   new TRotMatrix("itsrot508","itsrot508",90.0,84.71,90.0,174.71,0.0,0.0);
374   new TRotMatrix("itsrot509","itsrot509",90.0,74.12,90.0,164.12,0.0,0.0);
375   new TRotMatrix("itsrot510","itsrot510",90.0,63.53,90.0,153.53,0.0,0.0);  
376   new TRotMatrix("itsrot511","itsrot511",90.0,52.94,90.0,142.94,0.0,0.0);
377   new TRotMatrix("itsrot512","itsrot512",90.0,42.35,90.0,132.35,0.0,0.0);
378   new TRotMatrix("itsrot513","itsrot513",90.0,31.76,90.0,121.76,0.0,0.0); 
379   new TRotMatrix("itsrot653","itsrot653",90.0,21.18,90.0,111.18,0.0,0.0); 
380   new TRotMatrix("itsrot514","itsrot514",90.0,10.59,90.0,100.59,0.0,0.0);  
381   new TRotMatrix("itsrot515","itsrot515",90.0,349.41,90.0,79.41,0.0,0.0);  
382   new TRotMatrix("itsrot516","itsrot516",90.0,338.82,90.0,68.82,0.0,0.0);  
383   new TRotMatrix("itsrot517","itsrot517",90.0,328.24,90.0,58.24,0.0,0.0);  
384   new TRotMatrix("itsrot518","itsrot518",90.0,317.65,90.0,47.65,0.0,0.0);
385   new TRotMatrix("itsrot519","itsrot519",90.0,307.06,90.0,37.06,0.0,0.0);
386   new TRotMatrix("itsrot520","itsrot520",90.0,296.47,90.0,26.47,0.0,0.0);  
387   new TRotMatrix("itsrot521","itsrot521",90.0,285.88,90.0,15.88,0.0,0.0);
388   new TRotMatrix("itsrot522","itsrot522",90.0,275.29,90.0,5.29,0.0,0.0);
389   new TRotMatrix("itsrot523","itsrot523",90.0,264.71,90.0,354.71,0.0,0.0); 
390   new TRotMatrix("itsrot524","itsrot524",90.0,254.12,90.0,344.12,0.0,0.0);  
391   new TRotMatrix("itsrot525","itsrot525",90.0,243.53,90.0,333.53,0.0,0.0);  
392   new TRotMatrix("itsrot526","itsrot526",90.0,232.94,90.0,322.94,0.0,0.0);  
393   new TRotMatrix("itsrot527","itsrot527",90.0,222.35,90.0,312.35,0.0,0.0);  
394   new TRotMatrix("itsrot528","itsrot528",90.0,211.76,90.0,301.76,0.0,0.0);
395   new TRotMatrix("itsrot618","itsrot618",90.0,201.18,90.0,291.18,0.0,0.0); 
396   new TRotMatrix("itsrot529","itsrot529",90.0,190.59,90.0,280.59,0.0,0.0); 
397   new TRotMatrix("itsrot533","itsrot533",90.0,180.0,90.0,270.0,0.0,0.0);   
398   new TRotMatrix("itsrot530","itsrot530",90.0,169.41,90.0,259.41,0.0,0.0);  
399   new TRotMatrix("itsrot531","itsrot531",90.0,158.82,90.0,248.82,0.0,0.0);  
400   new TRotMatrix("itsrot501","itsrot501",90.0,148.24,90.0,238.24,0.0,0.0);
401   new TRotMatrix("itsrot503","itsrot503",90.0,137.65,90.0,227.65,0.0,0.0);         
402   new TRotMatrix("itsrot532","itsrot532",90.0,360.0,90.0,90.0,0.0,0.0);
403   new TRotMatrix("itsrot560","itsrot560",90.0,85.26,90.0,175.26,0.0,0.0);  
404   new TRotMatrix("itsrot561","itsrot561",90.0,94.74,90.0,184.74,0.0,0.0);
405   new TRotMatrix("itsrot562","itsrot562",90.0,104.21,90.0,194.21,0.0,0.0);
406   new TRotMatrix("itsrot563","itsrot563",90.0,113.68,90.0,203.68,0.0,0.0); 
407   new TRotMatrix("itsrot564","itsrot564",90.0,123.16,90.0,213.16,0.0,0.0);  
408   new TRotMatrix("itsrot565","itsrot565",90.0,132.63,90.0,222.63,0.0,0.0);  
409   new TRotMatrix("itsrot566","itsrot566",90.0,142.11,90.0,232.11,0.0,0.0);  
410   new TRotMatrix("itsrot567","itsrot567",90.0,151.58,90.0,241.58,0.0,0.0);  
411   new TRotMatrix("itsrot568","itsrot568",90.0,161.05,90.0,251.05,0.0,0.0);
412   new TRotMatrix("itsrot569","itsrot569",90.0,170.53,90.0,260.53,0.0,0.0);
413   new TRotMatrix("itsrot533","itsrot533",90.0,180.0,90.0,270.0,0.0,0.0); 
414   new TRotMatrix("itsrot534","itsrot534",90.0,189.47,90.0,279.47,0.0,0.0);  
415   new TRotMatrix("itsrot535","itsrot535",90.0,198.95,90.0,288.95,0.0,0.0);  
416   new TRotMatrix("itsrot623","itsrot623",90.0,208.42,90.0,298.42,0.0,0.0);  
417   new TRotMatrix("itsrot537","itsrot537",90.0,217.89,90.0,307.89,0.0,0.0);  
418   new TRotMatrix("itsrot538","itsrot538",90.0,227.37,90.0,317.37,0.0,0.0);
419   new TRotMatrix("itsrot539","itsrot539",90.0,236.84,90.0,326.84,0.0,0.0);
420   new TRotMatrix("itsrot540","itsrot540",90.0,246.32,90.0,336.32,0.0,0.0);  
421   new TRotMatrix("itsrot541","itsrot541",90.0,255.79,90.0,345.79,0.0,0.0);
422   new TRotMatrix("itsrot542","itsrot542",90.0,265.26,90.0,355.26,0.0,0.0);
423   new TRotMatrix("itsrot543","itsrot543",90.0,274.74,90.0,4.74,0.0,0.0); 
424   new TRotMatrix("itsrot544","itsrot544",90.0,284.21,90.0,14.21,0.0,0.0);  
425   new TRotMatrix("itsrot545","itsrot545",90.0,293.68,90.0,23.68,0.0,0.0);  
426   new TRotMatrix("itsrot546","itsrot546",90.0,303.16,90.0,33.16,0.0,0.0);  
427   new TRotMatrix("itsrot547","itsrot547",90.0,312.63,90.0,42.63,0.0,0.0);  
428   new TRotMatrix("itsrot548","itsrot548",90.0,322.11,90.0,52.11,0.0,0.0);
429   new TRotMatrix("itsrot549","itsrot549",90.0,331.58,90.0,61.58,0.0,0.0);
430   new TRotMatrix("itsrot550","itsrot550",90.0,341.05,90.0,71.05,0.0,0.0);  
431   new TRotMatrix("itsrot551","itsrot551",90.0,350.53,90.0,80.53,0.0,0.0);
432   new TRotMatrix("itsrot552","itsrot552",90.0,9.47,90.0,99.47,0.0,0.0);
433   new TRotMatrix("itsrot553","itsrot553",90.0,18.95,90.0,108.95,0.0,0.0);
434   new TRotMatrix("itsrot620","itsrot620",90.0,28.42,90.0,118.42,0.0,0.0);  
435   new TRotMatrix("itsrot555","itsrot555",90.0,37.89,90.0,127.89,0.0,0.0);  
436   new TRotMatrix("itsrot556","itsrot556",90.0,47.37,90.0,137.37,0.0,0.0);  
437   new TRotMatrix("itsrot557","itsrot557",90.0,56.84,90.0,146.84,0.0,0.0);  
438   new TRotMatrix("itsrot558","itsrot558",90.0,66.32,90.0,156.32,0.0,0.0);
439   new TRotMatrix("itsrot559","itsrot559",90.0,75.79,90.0,165.79,0.0,0.0);       
440   
441   
442   // --- Define SPD (option 'a') volumes ----------------------------
443   
444   // SPD - option 'a' 
445   // (this is NOT the default)
446   
447   if (option == 1) { 
448     
449     dits1[0] = 0.64;
450     dits1[1] = ddet1;
451     dits1[2] = 3.48;
452     new TBRIK("ITS1","ITS1","void",dits1[0],dits1[1],dits1[2]);
453     
454     dits2[0] = 0.64;
455     dits2[1] = ddet2;
456     dits2[2] = 3.48;
457     new TBRIK("ITS2","ITS2","void",dits2[0],dits2[1],dits2[2]);    
458     
459     di101[0] = 0.705;
460     di101[1] = ddet1;
461     di101[2] = 3.536;
462     new TBRIK("I101","I101","void",di101[0],di101[1],di101[2]);
463     
464     di1d1[0] = 0.705;
465     di1d1[1] = ddet2;
466     di1d1[2] = 3.536;
467     new TBRIK("I1D1","I1D1","void",di1d1[0],di1d1[1],di1d1[2]);    
468     
469     di103[0] = 0.793;
470     di103[1] = ddet1+dchip1;
471     di103[2] = 3.536;
472     new TBRIK("I103","I103","void",di103[0],di103[1],di103[2]);    
473     
474     di1d3[0] = 0.793;
475     di1d3[1] = ddet2+dchip2;
476     di1d3[2] = 3.536;
477     new TBRIK("I1D3","I1D3","void",di1d3[0],di1d3[1],di1d3[2]);        
478         
479     di10a[0] = 0.843;
480     di10a[1] = ddet1+dchip1+dbus+0.0025;  
481     di10a[2] = 19.344;
482     new TBRIK("I10A","I10A","void",di10a[0],di10a[1],di10a[2]); 
483     
484     di20a[0] = 0.843;
485     di20a[1] = ddet2+dchip2+dbus+0.0025;  
486     di20a[2] = 19.344;
487     new TBRIK("I20A","I20A","void",di20a[0],di20a[1],di20a[2]);     
488
489     dits[0] = 3.7;
490     dits[1] = 7.7;
491     dits[2] = 24;
492     dits[3] = 57;
493     dits[4] = 100;
494     new TTUBS("I12A","I12A","void",dits[0],dits[1],dits[2],dits[3],dits[4]);
495      
496     dits[0] = 3.7;
497     dits[1] = 7.75;
498     dits[2] = 26.1;
499     new TTUBE("IT12","IT12","void",dits[0],dits[1],dits[2]);  
500     
501   }
502   
503   // --- Define SPD (option 'b') volumes ----------------------------
504   
505   // SPD - option 'b' 
506   // (this is the default)
507
508   if (option == 2) {
509     
510     dits1[0] = 0.64;
511     dits1[1] = ddet1;
512     dits1[2] = 3.48;
513     new TBRIK("ITS1","ITS1","void",dits1[0],dits1[1],dits1[2]);
514     
515     dits2[0] = 0.64;
516     dits2[1] = ddet2;
517     dits2[2] = 3.48;
518     new TBRIK("ITS2","ITS2","void",dits2[0],dits2[1],dits2[2]);    
519     
520     di101[0] = 0.705;
521     di101[1] = ddet1;
522     di101[2] = 3.536;
523     new TBRIK("I101","I101","void",di101[0],di101[1],di101[2]);
524     
525     di1d1[0] = 0.705;
526     di1d1[1] = ddet2;
527     di1d1[2] = 3.536;
528     new TBRIK("I1D1","I1D1","void",di1d1[0],di1d1[1],di1d1[2]);    
529     
530     di107[0] = 0.793;
531     di107[1] = ddet1+dchip1;
532     di107[2] = 3.536;
533     new TBRIK("I107","I107","void",di107[0],di107[1],di107[2]);    
534     
535     di1d7[0] = 0.7975;
536     di1d7[1] = ddet2+dchip2;
537     di1d7[2] = 3.536;
538     new TBRIK("I1D7","I1D7","void",di1d7[0],di1d7[1],di1d7[2]);        
539         
540     di10b[0] = 0.843;
541     di10b[1] = ddet1+dchip1+dbus+0.0025;  
542     di10b[2] = 19.344;
543     new TBRIK("I10B","I10B","void",di10b[0],di10b[1],di10b[2]); 
544     
545     di20b[0] = 0.843;
546     di20b[1] = ddet2+dchip2+dbus+0.0025;  
547     di20b[2] = 19.344;
548     new TBRIK("I20B","I20B","void",di20b[0],di20b[1],di20b[2]);     
549
550     dits[0] = 3.7;
551     dits[1] = 7.7;
552     dits[2] = 24;
553     dits[3] = 57;
554     dits[4] = 100;
555     new TTUBS("I12B","I12B","void",dits[0],dits[1],dits[2],dits[3],dits[4]);
556      
557     dits[0] = 3.7;
558     dits[1] = 7.75;
559     dits[2] = 26.1;
560     new TTUBE("IT12","IT12","void",dits[0],dits[1],dits[2]);  
561          
562
563   }
564
565   // --- Define SDD volumes ------------------------------------------
566   
567   TPCON *it34 = new TPCON("IT34","IT34","void",0.,360.,6); 
568   it34->DefineSection(0,-34.6,23.49,28.); 
569   it34->DefineSection(1,-23.65,23.49,28.); 
570   it34->DefineSection(2,-23.65,14.59,28.); 
571   it34->DefineSection(3,23.65,14.59,28.); 
572   it34->DefineSection(4,23.65,23.49,28.); 
573   it34->DefineSection(5,34.6,23.49,28.);   
574   
575   I302dits[0] = 3.6250;
576   I302dits[1] = 0.0150;
577   I302dits[2] = 4.3794; 
578   new TBRIK("I302","I302","void",I302dits[0],I302dits[1],I302dits[2]);
579
580   I004dits[0] = I302dits[0]+0.005;
581   I004dits[1] = 2*I302dits[1]+Y_SDD_sep/2.;
582   I004dits[2] = TMath::Abs(Z_SDD_lay3[0]);
583   if (I004dits[2] < TMath::Abs(Z_SDD_lay3[5])) {
584     I004dits[2] = TMath::Abs(Z_SDD_lay3[5]);
585   }
586   I004dits[2] = I004dits[2] + I302dits[2];  
587   new TBRIK("I004","I004","void",I004dits[0],I004dits[1],I004dits[2]); 
588   
589   dits[0] = 3.50850;
590   dits[1] = 0.01499; 
591   dits[2] = 3.76320;  
592   new TBRIK("ITS3","ITS3","void",dits[0],dits[1],dits[2]);    
593  
594   I402dits[0] = 3.6250;
595   I402dits[1] = 0.0150;
596   I402dits[2] = 4.3794; 
597   new TBRIK("I402","I402","void",I402dits[0],I402dits[1],I402dits[2]);
598
599   I005dits[0] = I402dits[0]+0.005;
600   I005dits[1] = 2*I402dits[1]+Y_SDD_sep/2.;
601   I005dits[2] = TMath::Abs(Z_SDD_lay4[0]);
602   if (I005dits[2] < TMath::Abs(Z_SDD_lay4[7])) {
603     I005dits[2] = TMath::Abs(Z_SDD_lay4[7]);
604   }
605   I005dits[2] = I005dits[2] + I402dits[2];  
606   new TBRIK("I005","I005","void",I005dits[0],I005dits[1],I005dits[2]);   
607
608   dits[0] = 3.50850;
609   dits[1] = 0.01499; 
610   dits[2] = 3.76320;
611   new TBRIK("ITS4","ITS4","void",dits[0],dits[1],dits[2]);
612
613   
614   // --- Define SSD volumes ------------------------------------------
615   
616
617   TPCON *it56 = new TPCON("IT56","IT56","void",0.,360.,6); 
618   it56->DefineSection(0,-57.45,43.6,48.); 
619   it56->DefineSection(1,-49.15,43.6,48.); 
620   it56->DefineSection(2,-49.15,36.9,48.); 
621   it56->DefineSection(3,50.55,36.9,48.); 
622   it56->DefineSection(4,50.55,43.6,48.); 
623   it56->DefineSection(5,57.45,43.6,48.);    
624
625   dits[0] = 3.75;
626   dits[1] = 0.045;
627   dits[2] = 43.3;
628   new TBRIK("I565","I565","void",dits[0],dits[1],dits[2]);  
629
630   dits[0] = 3.75;
631   dits[1] = 0.045;
632   dits[2] = 50.975;
633   new TBRIK("I569","I569","void",dits[0],dits[1],dits[2]);  
634   
635   dits[0] = 3.75;
636   dits[1] = 0.015;
637   dits[2] = 2.1;
638   new TBRIK("I562","I562","void",dits[0],dits[1],dits[2]);      
639   
640   dits[0] = 3.75;
641   dits[1] = 0.015;
642   dits[2] = 2.1;
643   new TBRIK("I566","I566","void",dits[0],dits[1],dits[2]);        
644
645   dits[0] = 3.65;
646   dits[1] = 0.015;
647   dits[2] = 2;
648   new TBRIK("ITS5","ITS5","void",dits[0],dits[1],dits[2]); 
649
650   dits[0] = 3.65;
651   dits[1] = 0.015;
652   dits[2] = 2;
653   new TBRIK("ITS6","ITS6","void",dits[0],dits[1],dits[2]);  
654
655   //
656   
657   top->cd();
658
659   // --- Place SPD (option 'a') volumes into their mother volume 
660   
661   // SPD - option 'a' 
662   // (this is NOT the default)
663
664   if (option == 1) {
665
666
667   }
668   
669   
670   // --- Place SPD (option 'b') volumes into their mother volume 
671   
672   // SPD - option 'b' 
673   // (this is the default)
674
675   if (option == 2) { 
676   
677     // Place IT12 in Alice
678     //
679     node = new TNode("IT12","IT12","IT12",0.,0.,0.,"");
680     node->SetLineColor(kColorITS);
681     node->SetVisibility(0);
682     node->cd();    
683        //
684        // Place copy #1 of I12B in IT12
685        //
686        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"");
687        sub1node->SetLineColor(kColorITS);
688        sub1node->SetVisibility(0);
689        sub1node->cd();    
690           //
691           // Place copy #1 of I10B in I12B
692           //
693           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
694           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
695           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
696           sub2node->SetLineColor(kColorITS);
697           sub2node->SetVisibility(0);
698           sub2node->cd();
699              //
700              // Place copy #1 of I107 in I10B
701              //
702              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
703              sub3node->SetLineColor(kColorITS);
704              sub3node->SetVisibility(0);
705              sub3node->cd();
706                 //
707                 // Place copy #1 of I101 in I107
708                 //
709                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
710                 sub4node->SetLineColor(kColorITS);
711                 sub4node->SetVisibility(0);
712                 sub4node->cd();
713                    //               
714                    // Place copy #1 of ITS1 in I101
715                    //
716                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
717                    sub5node->SetLineColor(kColorITS);                   
718                    fNodes->Add(sub5node);
719                    sub4node->cd();   
720                 fNodes->Add(sub4node);  
721              sub3node->cd(); 
722              fNodes->Add(sub3node);
723              sub2node->cd(); 
724              //
725              // Place copy #2 of I107 in I10B
726              //
727              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
728              sub3node->SetLineColor(kColorITS);
729              sub3node->SetVisibility(0);
730              sub3node->cd();
731                 //
732                 // Place copy #1 of I101 in I107
733                 //
734                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
735                 sub4node->SetLineColor(kColorITS);
736                 sub4node->SetVisibility(0);
737                 sub4node->cd();             
738                    //
739                    // Place copy #1 of ITS1 in I101
740                    //
741                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
742                    sub5node->SetLineColor(kColorITS);                   
743                    fNodes->Add(sub5node);
744                    sub4node->cd();   
745                 fNodes->Add(sub4node);  
746              sub3node->cd(); 
747              fNodes->Add(sub3node);
748              sub2node->cd(); 
749              //
750              // Place copy #3 of I107 in I10B
751              //
752              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
753              sub3node->SetLineColor(kColorITS);
754              sub3node->SetVisibility(0);
755              sub3node->cd();
756                 //
757                 // Place copy #1 of I101 in I107
758                 //
759                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
760                 sub4node->SetLineColor(kColorITS);
761                 sub4node->SetVisibility(0);
762                 sub4node->cd();             
763                    //
764                    // Place copy #1 of ITS1 in I101
765                    //
766                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
767                    sub5node->SetLineColor(kColorITS);                   
768                    fNodes->Add(sub5node);
769                    sub4node->cd();   
770                 fNodes->Add(sub4node);  
771              sub3node->cd(); 
772              fNodes->Add(sub3node);
773              sub2node->cd(); 
774              //
775              // Place copy #4 of I107 in I10B
776              //
777              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
778              sub3node->SetLineColor(kColorITS);
779              sub3node->SetVisibility(0);
780              sub3node->cd();
781                 //
782                 // Place copy #1 of I101 in I107
783                 //
784                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
785                 sub4node->SetLineColor(kColorITS);
786                 sub4node->SetVisibility(0);
787                 sub4node->cd();             
788                    //
789                    // Place copy #1 of ITS1 in I101
790                    //
791                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
792                    sub5node->SetLineColor(kColorITS);                   
793                    fNodes->Add(sub5node);
794                    sub4node->cd();   
795                 fNodes->Add(sub4node);  
796              sub3node->cd(); 
797              fNodes->Add(sub3node);
798              sub2node->cd(); 
799           fNodes->Add(sub2node);        
800           sub1node->cd(); 
801           //
802           // Place copy #2 of I10B in I12B
803           //
804           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
805           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
806           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
807           sub2node->SetLineColor(kColorITS);
808           sub2node->SetVisibility(0);
809           sub2node->cd();
810              //
811              // Place copy #1 of I107 in I10B
812              //
813              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
814              sub3node->SetLineColor(kColorITS);
815              sub3node->SetVisibility(0);
816              sub3node->cd();
817                 //
818                 // Place copy #1 of I101 in I107
819                 //
820                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
821                 sub4node->SetLineColor(kColorITS);
822                 sub4node->SetVisibility(0);
823                 sub4node->cd();
824                    //               
825                    // Place copy #1 of ITS1 in I101
826                    //
827                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
828                    sub5node->SetLineColor(kColorITS);                   
829                    fNodes->Add(sub5node);
830                    sub4node->cd();   
831                 fNodes->Add(sub4node);  
832              sub3node->cd(); 
833              fNodes->Add(sub3node);
834              sub2node->cd(); 
835              //
836              // Place copy #2 of I107 in I10B
837              //
838              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
839              sub3node->SetLineColor(kColorITS);
840              sub3node->SetVisibility(0);
841              sub3node->cd();
842                 //
843                 // Place copy #1 of I101 in I107
844                 //
845                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
846                 sub4node->SetLineColor(kColorITS);
847                 sub4node->SetVisibility(0);
848                 sub4node->cd();             
849                    //
850                    // Place copy #1 of ITS1 in I101
851                    //
852                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
853                    sub5node->SetLineColor(kColorITS);                   
854                    fNodes->Add(sub5node);
855                    sub4node->cd();   
856                 fNodes->Add(sub4node);  
857              sub3node->cd(); 
858              fNodes->Add(sub3node);
859              sub2node->cd(); 
860              //
861              // Place copy #3 of I107 in I10B
862              //
863              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
864              sub3node->SetLineColor(kColorITS);
865              sub3node->SetVisibility(0);
866              sub3node->cd();
867                 //
868                 // Place copy #1 of I101 in I107
869                 //
870                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
871                 sub4node->SetLineColor(kColorITS);
872                 sub4node->SetVisibility(0);
873                 sub4node->cd();             
874                    //
875                    // Place copy #1 of ITS1 in I101
876                    //
877                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
878                    sub5node->SetLineColor(kColorITS);                   
879                    fNodes->Add(sub5node);
880                    sub4node->cd();   
881                 fNodes->Add(sub4node);  
882              sub3node->cd(); 
883              fNodes->Add(sub3node);
884              sub2node->cd(); 
885              //
886              // Place copy #4 of I107 in I10B
887              //
888              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
889              sub3node->SetLineColor(kColorITS);
890              sub3node->SetVisibility(0);
891              sub3node->cd();
892                 //
893                 // Place copy #1 of I101 in I107
894                 //
895                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
896                 sub4node->SetLineColor(kColorITS);
897                 sub4node->SetVisibility(0);
898                 sub4node->cd();             
899                    //
900                    // Place copy #1 of ITS1 in I101
901                    //
902                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
903                    sub5node->SetLineColor(kColorITS);                   
904                    fNodes->Add(sub5node);
905                    sub4node->cd();   
906                 fNodes->Add(sub4node);  
907              sub3node->cd(); 
908              fNodes->Add(sub3node);
909              sub2node->cd(); 
910           fNodes->Add(sub2node);        
911           sub1node->cd(); 
912           //
913           // Place copy #1 of I20B in I12B
914           //
915           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
916           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
917           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
918           sub2node->SetLineColor(kColorITS);
919           sub2node->SetVisibility(0);
920           sub2node->cd();
921              //
922              // Place copy #1 of I1D7 in I20B
923              //
924              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
925              sub3node->SetLineColor(kColorITS);
926              sub3node->SetVisibility(0);
927              sub3node->cd();
928                 //
929                 // Place copy #1 of I1D1 in I1D7
930                 //
931                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
932                 sub4node->SetLineColor(kColorITS);
933                 sub4node->SetVisibility(0);
934                 sub4node->cd();
935                    //               
936                    // Place copy #1 of ITS2 in I1D1
937                    //
938                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
939                    sub5node->SetLineColor(kColorITS);                   
940                    fNodes->Add(sub5node);
941                    sub4node->cd();   
942                 fNodes->Add(sub4node);  
943              sub3node->cd(); 
944              fNodes->Add(sub3node);
945              sub2node->cd(); 
946              //
947              // Place copy #2 of I1D7 in I20B
948              //
949              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
950              sub3node->SetLineColor(kColorITS);
951              sub3node->SetVisibility(0);
952              sub3node->cd();
953                 //
954                 // Place copy #1 of I1D1 in I1D7
955                 //
956                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
957                 sub4node->SetLineColor(kColorITS);
958                 sub4node->SetVisibility(0);
959                 sub4node->cd();             
960                    //
961                    // Place copy #1 of ITS2 in I1D1
962                    //
963                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
964                    sub5node->SetLineColor(kColorITS);                   
965                    fNodes->Add(sub5node);
966                    sub4node->cd();   
967                 fNodes->Add(sub4node);  
968              sub3node->cd(); 
969              fNodes->Add(sub3node);
970              sub2node->cd(); 
971              //
972              // Place copy #3 of I1D7 in I20B
973              //
974              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
975              sub3node->SetLineColor(kColorITS);
976              sub3node->SetVisibility(0);
977              sub3node->cd();
978                 //
979                 // Place copy #1 of I1D1 in I1D7
980                 //
981                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
982                 sub4node->SetLineColor(kColorITS);
983                 sub4node->SetVisibility(0);
984                 sub4node->cd();             
985                    //
986                    // Place copy #1 of ITS2 in I1D1
987                    //
988                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
989                    sub5node->SetLineColor(kColorITS);                   
990                    fNodes->Add(sub5node);
991                    sub4node->cd();   
992                 fNodes->Add(sub4node);  
993              sub3node->cd(); 
994              fNodes->Add(sub3node);
995              sub2node->cd(); 
996              //
997              // Place copy #4 of I1D7 in I20B
998              //
999              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1000              sub3node->SetLineColor(kColorITS);
1001              sub3node->SetVisibility(0);
1002              sub3node->cd();
1003                 //
1004                 // Place copy #1 of I1D1 in I1D7
1005                 //
1006                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1007                 sub4node->SetLineColor(kColorITS);
1008                 sub4node->SetVisibility(0);
1009                 sub4node->cd();             
1010                    //
1011                    // Place copy #1 of ITS2 in I1D1
1012                    //
1013                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1014                    sub5node->SetLineColor(kColorITS);                   
1015                    fNodes->Add(sub5node);
1016                    sub4node->cd();   
1017                 fNodes->Add(sub4node);  
1018              sub3node->cd(); 
1019              fNodes->Add(sub3node);
1020              sub2node->cd(); 
1021           fNodes->Add(sub2node);        
1022           sub1node->cd(); 
1023           //
1024           // Place copy #2 of I20B in I12B
1025           //
1026           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(49.*TMath::Pi()/180.);  
1027           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(49.*TMath::Pi()/180.);
1028           sub2node = new TNode("I20B","I20B","I20B",1.9612+deltax,6.9062+deltay,0.,"itsrot241");
1029           sub2node->SetLineColor(kColorITS);
1030           sub2node->SetVisibility(0);
1031           sub2node->cd();
1032              //
1033              // Place copy #1 of I1D7 in I20B
1034              //
1035              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1036              sub3node->SetLineColor(kColorITS);
1037              sub3node->SetVisibility(0);
1038              sub3node->cd();
1039                 //
1040                 // Place copy #1 of I1D1 in I1D7
1041                 //
1042                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1043                 sub4node->SetLineColor(kColorITS);
1044                 sub4node->SetVisibility(0);
1045                 sub4node->cd();
1046                    //               
1047                    // Place copy #1 of ITS2 in I1D1
1048                    //
1049                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1050                    sub5node->SetLineColor(kColorITS);                   
1051                    fNodes->Add(sub5node);
1052                    sub4node->cd();   
1053                 fNodes->Add(sub4node);  
1054              sub3node->cd(); 
1055              fNodes->Add(sub3node);
1056              sub2node->cd(); 
1057              //
1058              // Place copy #2 of I1D7 in I20B
1059              //
1060              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1061              sub3node->SetLineColor(kColorITS);
1062              sub3node->SetVisibility(0);
1063              sub3node->cd();
1064                 //
1065                 // Place copy #1 of I1D1 in I1D7
1066                 //
1067                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1068                 sub4node->SetLineColor(kColorITS);
1069                 sub4node->SetVisibility(0);
1070                 sub4node->cd();             
1071                    //
1072                    // Place copy #1 of ITS2 in I1D1
1073                    //
1074                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1075                    sub5node->SetLineColor(kColorITS);                   
1076                    fNodes->Add(sub5node);
1077                    sub4node->cd();   
1078                 fNodes->Add(sub4node);  
1079              sub3node->cd(); 
1080              fNodes->Add(sub3node);
1081              sub2node->cd(); 
1082              //
1083              // Place copy #3 of I1D7 in I20B
1084              //
1085              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1086              sub3node->SetLineColor(kColorITS);
1087              sub3node->SetVisibility(0);
1088              sub3node->cd();
1089                 //
1090                 // Place copy #1 of I1D1 in I1D7
1091                 //
1092                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1093                 sub4node->SetLineColor(kColorITS);
1094                 sub4node->SetVisibility(0);
1095                 sub4node->cd();             
1096                    //
1097                    // Place copy #1 of ITS2 in I1D1
1098                    //
1099                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1100                    sub5node->SetLineColor(kColorITS);                   
1101                    fNodes->Add(sub5node);
1102                    sub4node->cd();   
1103                 fNodes->Add(sub4node);  
1104              sub3node->cd(); 
1105              fNodes->Add(sub3node);
1106              sub2node->cd(); 
1107              //
1108              // Place copy #4 of I1D7 in I20B
1109              //
1110              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1111              sub3node->SetLineColor(kColorITS);
1112              sub3node->SetVisibility(0);
1113              sub3node->cd();
1114                 //
1115                 // Place copy #1 of I1D1 in I1D7
1116                 //
1117                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1118                 sub4node->SetLineColor(kColorITS);
1119                 sub4node->SetVisibility(0);
1120                 sub4node->cd();             
1121                    //
1122                    // Place copy #1 of ITS2 in I1D1
1123                    //
1124                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1125                    sub5node->SetLineColor(kColorITS);                   
1126                    fNodes->Add(sub5node);
1127                    sub4node->cd();   
1128                 fNodes->Add(sub4node);  
1129              sub3node->cd(); 
1130              fNodes->Add(sub3node);
1131              sub2node->cd(); 
1132           fNodes->Add(sub2node);        
1133           sub1node->cd(); 
1134           //
1135           // Place copy #3 of I20B in I12B
1136           //
1137           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(58.*TMath::Pi()/180.);  
1138           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(58.*TMath::Pi()/180.);
1139           sub2node = new TNode("I20B","I20B","I20B",0.8567+deltax,7.1279+deltay,0.,"itsrot242");
1140           sub2node->SetLineColor(kColorITS);
1141           sub2node->SetVisibility(0);
1142           sub2node->cd();
1143              //
1144              // Place copy #1 of I1D7 in I20B
1145              //
1146              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1147              sub3node->SetLineColor(kColorITS);
1148              sub3node->SetVisibility(0);
1149              sub3node->cd();
1150                 //
1151                 // Place copy #1 of I1D1 in I1D7
1152                 //
1153                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1154                 sub4node->SetLineColor(kColorITS);
1155                 sub4node->SetVisibility(0);
1156                 sub4node->cd();
1157                    //               
1158                    // Place copy #1 of ITS2 in I1D1
1159                    //
1160                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1161                    sub5node->SetLineColor(kColorITS);                   
1162                    fNodes->Add(sub5node);
1163                    sub4node->cd();   
1164                 fNodes->Add(sub4node);  
1165              sub3node->cd(); 
1166              fNodes->Add(sub3node);
1167              sub2node->cd(); 
1168              //
1169              // Place copy #2 of I1D7 in I20B
1170              //
1171              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1172              sub3node->SetLineColor(kColorITS);
1173              sub3node->SetVisibility(0);
1174              sub3node->cd();
1175                 //
1176                 // Place copy #1 of I1D1 in I1D7
1177                 //
1178                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1179                 sub4node->SetLineColor(kColorITS);
1180                 sub4node->SetVisibility(0);
1181                 sub4node->cd();             
1182                    //
1183                    // Place copy #1 of ITS2 in I1D1
1184                    //
1185                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1186                    sub5node->SetLineColor(kColorITS);                   
1187                    fNodes->Add(sub5node);
1188                    sub4node->cd();   
1189                 fNodes->Add(sub4node);  
1190              sub3node->cd(); 
1191              fNodes->Add(sub3node);
1192              sub2node->cd(); 
1193              //
1194              // Place copy #3 of I1D7 in I20B
1195              //
1196              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1197              sub3node->SetLineColor(kColorITS);
1198              sub3node->SetVisibility(0);
1199              sub3node->cd();
1200                 //
1201                 // Place copy #1 of I1D1 in I1D7
1202                 //
1203                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1204                 sub4node->SetLineColor(kColorITS);
1205                 sub4node->SetVisibility(0);
1206                 sub4node->cd();             
1207                    //
1208                    // Place copy #1 of ITS2 in I1D1
1209                    //
1210                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1211                    sub5node->SetLineColor(kColorITS);                   
1212                    fNodes->Add(sub5node);
1213                    sub4node->cd();   
1214                 fNodes->Add(sub4node);  
1215              sub3node->cd(); 
1216              fNodes->Add(sub3node);
1217              sub2node->cd(); 
1218              //
1219              // Place copy #4 of I1D7 in I20B
1220              //
1221              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1222              sub3node->SetLineColor(kColorITS);
1223              sub3node->SetVisibility(0);
1224              sub3node->cd();
1225                 //
1226                 // Place copy #1 of I1D1 in I1D7
1227                 //
1228                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1229                 sub4node->SetLineColor(kColorITS);
1230                 sub4node->SetVisibility(0);
1231                 sub4node->cd();             
1232                    //
1233                    // Place copy #1 of ITS2 in I1D1
1234                    //
1235                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1236                    sub5node->SetLineColor(kColorITS);                   
1237                    fNodes->Add(sub5node);
1238                    sub4node->cd();   
1239                 fNodes->Add(sub4node);  
1240              sub3node->cd(); 
1241              fNodes->Add(sub3node);
1242              sub2node->cd(); 
1243           fNodes->Add(sub2node);        
1244           sub1node->cd(); 
1245           //
1246           // Place copy #4 of I20B in I12B
1247           //
1248           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(67.*TMath::Pi()/180.);  
1249           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(67.*TMath::Pi()/180.);
1250           sub2node = new TNode("I20B","I20B","I20B",-0.2689+deltax,7.1742+deltay,0.,"itsrot243");
1251           sub2node->SetLineColor(kColorITS);
1252           sub2node->SetVisibility(0);
1253           sub2node->cd();
1254              //
1255              // Place copy #1 of I1D7 in I20B
1256              //
1257              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1258              sub3node->SetLineColor(kColorITS);
1259              sub3node->SetVisibility(0);
1260              sub3node->cd();
1261                 //
1262                 // Place copy #1 of I1D1 in I1D7
1263                 //
1264                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1265                 sub4node->SetLineColor(kColorITS);
1266                 sub4node->SetVisibility(0);
1267                 sub4node->cd();
1268                    //               
1269                    // Place copy #1 of ITS2 in I1D1
1270                    //
1271                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1272                    sub5node->SetLineColor(kColorITS);                   
1273                    fNodes->Add(sub5node);
1274                    sub4node->cd();   
1275                 fNodes->Add(sub4node);  
1276              sub3node->cd(); 
1277              fNodes->Add(sub3node);
1278              sub2node->cd(); 
1279              //
1280              // Place copy #2 of I1D7 in I20B
1281              //
1282              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1283              sub3node->SetLineColor(kColorITS);
1284              sub3node->SetVisibility(0);
1285              sub3node->cd();
1286                 //
1287                 // Place copy #1 of I1D1 in I1D7
1288                 //
1289                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1290                 sub4node->SetLineColor(kColorITS);
1291                 sub4node->SetVisibility(0);
1292                 sub4node->cd();             
1293                    //
1294                    // Place copy #1 of ITS2 in I1D1
1295                    //
1296                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1297                    sub5node->SetLineColor(kColorITS);                   
1298                    fNodes->Add(sub5node);
1299                    sub4node->cd();   
1300                 fNodes->Add(sub4node);  
1301              sub3node->cd(); 
1302              fNodes->Add(sub3node);
1303              sub2node->cd(); 
1304              //
1305              // Place copy #3 of I1D7 in I20B
1306              //
1307              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1308              sub3node->SetLineColor(kColorITS);
1309              sub3node->SetVisibility(0);
1310              sub3node->cd();
1311                 //
1312                 // Place copy #1 of I1D1 in I1D7
1313                 //
1314                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1315                 sub4node->SetLineColor(kColorITS);
1316                 sub4node->SetVisibility(0);
1317                 sub4node->cd();             
1318                    //
1319                    // Place copy #1 of ITS2 in I1D1
1320                    //
1321                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1322                    sub5node->SetLineColor(kColorITS);                   
1323                    fNodes->Add(sub5node);
1324                    sub4node->cd();   
1325                 fNodes->Add(sub4node);  
1326              sub3node->cd(); 
1327              fNodes->Add(sub3node);
1328              sub2node->cd(); 
1329              //
1330              // Place copy #4 of I1D7 in I20B
1331              //
1332              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1333              sub3node->SetLineColor(kColorITS);
1334              sub3node->SetVisibility(0);
1335              sub3node->cd();
1336                 //
1337                 // Place copy #1 of I1D1 in I1D7
1338                 //
1339                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1340                 sub4node->SetLineColor(kColorITS);
1341                 sub4node->SetVisibility(0);
1342                 sub4node->cd();             
1343                    //
1344                    // Place copy #1 of ITS2 in I1D1
1345                    //
1346                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1347                    sub5node->SetLineColor(kColorITS);                   
1348                    fNodes->Add(sub5node);
1349                    sub4node->cd();   
1350                 fNodes->Add(sub4node);  
1351              sub3node->cd(); 
1352              fNodes->Add(sub3node);
1353              sub2node->cd(); 
1354           fNodes->Add(sub2node);        
1355           sub1node->cd(); 
1356        fNodes->Add(sub1node);
1357        node->cd(); 
1358        //
1359        // Place copy #2 of I12B in IT12
1360        //
1361        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"itsrot245");
1362        sub1node->SetLineColor(kColorITS);
1363        sub1node->SetVisibility(0);
1364        sub1node->cd();    
1365           //
1366           // Place copy #1 of I10B in I12B
1367           //
1368           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
1369           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
1370           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
1371           sub2node->SetLineColor(kColorITS);
1372           sub2node->SetVisibility(0);
1373           sub2node->cd();
1374              //
1375              // Place copy #1 of I107 in I10B
1376              //
1377              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
1378              sub3node->SetLineColor(kColorITS);
1379              sub3node->SetVisibility(0);
1380              sub3node->cd();
1381                 //
1382                 // Place copy #1 of I101 in I107
1383                 //
1384                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1385                 sub4node->SetLineColor(kColorITS);
1386                 sub4node->SetVisibility(0);
1387                 sub4node->cd();
1388                    //               
1389                    // Place copy #1 of ITS1 in I101
1390                    //
1391                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1392                    sub5node->SetLineColor(kColorITS);                   
1393                    fNodes->Add(sub5node);
1394                    sub4node->cd();   
1395                 fNodes->Add(sub4node);  
1396              sub3node->cd(); 
1397              fNodes->Add(sub3node);
1398              sub2node->cd(); 
1399              //
1400              // Place copy #2 of I107 in I10B
1401              //
1402              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
1403              sub3node->SetLineColor(kColorITS);
1404              sub3node->SetVisibility(0);
1405              sub3node->cd();
1406                 //
1407                 // Place copy #1 of I101 in I107
1408                 //
1409                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1410                 sub4node->SetLineColor(kColorITS);
1411                 sub4node->SetVisibility(0);
1412                 sub4node->cd();             
1413                    //
1414                    // Place copy #1 of ITS1 in I101
1415                    //
1416                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1417                    sub5node->SetLineColor(kColorITS);                   
1418                    fNodes->Add(sub5node);
1419                    sub4node->cd();   
1420                 fNodes->Add(sub4node);  
1421              sub3node->cd(); 
1422              fNodes->Add(sub3node);
1423              sub2node->cd(); 
1424              //
1425              // Place copy #3 of I107 in I10B
1426              //
1427              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
1428              sub3node->SetLineColor(kColorITS);
1429              sub3node->SetVisibility(0);
1430              sub3node->cd();
1431                 //
1432                 // Place copy #1 of I101 in I107
1433                 //
1434                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1435                 sub4node->SetLineColor(kColorITS);
1436                 sub4node->SetVisibility(0);
1437                 sub4node->cd();             
1438                    //
1439                    // Place copy #1 of ITS1 in I101
1440                    //
1441                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1442                    sub5node->SetLineColor(kColorITS);                   
1443                    fNodes->Add(sub5node);
1444                    sub4node->cd();   
1445                 fNodes->Add(sub4node);  
1446              sub3node->cd(); 
1447              fNodes->Add(sub3node);
1448              sub2node->cd(); 
1449              //
1450              // Place copy #4 of I107 in I10B
1451              //
1452              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
1453              sub3node->SetLineColor(kColorITS);
1454              sub3node->SetVisibility(0);
1455              sub3node->cd();
1456                 //
1457                 // Place copy #1 of I101 in I107
1458                 //
1459                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1460                 sub4node->SetLineColor(kColorITS);
1461                 sub4node->SetVisibility(0);
1462                 sub4node->cd();             
1463                    //
1464                    // Place copy #1 of ITS1 in I101
1465                    //
1466                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1467                    sub5node->SetLineColor(kColorITS);                   
1468                    fNodes->Add(sub5node);
1469                    sub4node->cd();   
1470                 fNodes->Add(sub4node);  
1471              sub3node->cd(); 
1472              fNodes->Add(sub3node);
1473              sub2node->cd(); 
1474           fNodes->Add(sub2node);        
1475           sub1node->cd(); 
1476           //
1477           // Place copy #2 of I10B in I12B
1478           //
1479           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
1480           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
1481           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
1482           sub2node->SetLineColor(kColorITS);
1483           sub2node->SetVisibility(0);
1484           sub2node->cd();
1485              //
1486              // Place copy #1 of I107 in I10B
1487              //
1488              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
1489              sub3node->SetLineColor(kColorITS);
1490              sub3node->SetVisibility(0);
1491              sub3node->cd();
1492                 //
1493                 // Place copy #1 of I101 in I107
1494                 //
1495                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1496                 sub4node->SetLineColor(kColorITS);
1497                 sub4node->SetVisibility(0);
1498                 sub4node->cd();
1499                    //               
1500                    // Place copy #1 of ITS1 in I101
1501                    //
1502                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1503                    sub5node->SetLineColor(kColorITS);                   
1504                    fNodes->Add(sub5node);
1505                    sub4node->cd();   
1506                 fNodes->Add(sub4node);  
1507              sub3node->cd(); 
1508              fNodes->Add(sub3node);
1509              sub2node->cd(); 
1510              //
1511              // Place copy #2 of I107 in I10B
1512              //
1513              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
1514              sub3node->SetLineColor(kColorITS);
1515              sub3node->SetVisibility(0);
1516              sub3node->cd();
1517                 //
1518                 // Place copy #1 of I101 in I107
1519                 //
1520                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1521                 sub4node->SetLineColor(kColorITS);
1522                 sub4node->SetVisibility(0);
1523                 sub4node->cd();             
1524                    //
1525                    // Place copy #1 of ITS1 in I101
1526                    //
1527                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1528                    sub5node->SetLineColor(kColorITS);                   
1529                    fNodes->Add(sub5node);
1530                    sub4node->cd();   
1531                 fNodes->Add(sub4node);  
1532              sub3node->cd(); 
1533              fNodes->Add(sub3node);
1534              sub2node->cd(); 
1535              //
1536              // Place copy #3 of I107 in I10B
1537              //
1538              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
1539              sub3node->SetLineColor(kColorITS);
1540              sub3node->SetVisibility(0);
1541              sub3node->cd();
1542                 //
1543                 // Place copy #1 of I101 in I107
1544                 //
1545                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1546                 sub4node->SetLineColor(kColorITS);
1547                 sub4node->SetVisibility(0);
1548                 sub4node->cd();             
1549                    //
1550                    // Place copy #1 of ITS1 in I101
1551                    //
1552                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1553                    sub5node->SetLineColor(kColorITS);                   
1554                    fNodes->Add(sub5node);
1555                    sub4node->cd();   
1556                 fNodes->Add(sub4node);  
1557              sub3node->cd(); 
1558              fNodes->Add(sub3node);
1559              sub2node->cd(); 
1560              //
1561              // Place copy #4 of I107 in I10B
1562              //
1563              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
1564              sub3node->SetLineColor(kColorITS);
1565              sub3node->SetVisibility(0);
1566              sub3node->cd();
1567                 //
1568                 // Place copy #1 of I101 in I107
1569                 //
1570                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1571                 sub4node->SetLineColor(kColorITS);
1572                 sub4node->SetVisibility(0);
1573                 sub4node->cd();             
1574                    //
1575                    // Place copy #1 of ITS1 in I101
1576                    //
1577                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1578                    sub5node->SetLineColor(kColorITS);                   
1579                    fNodes->Add(sub5node);
1580                    sub4node->cd();   
1581                 fNodes->Add(sub4node);  
1582              sub3node->cd(); 
1583              fNodes->Add(sub3node);
1584              sub2node->cd(); 
1585           fNodes->Add(sub2node);        
1586           sub1node->cd(); 
1587           //
1588           // Place copy #1 of I20B in I12B
1589           //
1590           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
1591           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
1592           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
1593           sub2node->SetLineColor(kColorITS);
1594           sub2node->SetVisibility(0);
1595           sub2node->cd();
1596              //
1597              // Place copy #1 of I1D7 in I20B
1598              //
1599              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1600              sub3node->SetLineColor(kColorITS);
1601              sub3node->SetVisibility(0);
1602              sub3node->cd();
1603                 //
1604                 // Place copy #1 of I1D1 in I1D7
1605                 //
1606                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1607                 sub4node->SetLineColor(kColorITS);
1608                 sub4node->SetVisibility(0);
1609                 sub4node->cd();
1610                    //               
1611                    // Place copy #1 of ITS2 in I1D1
1612                    //
1613                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1614                    sub5node->SetLineColor(kColorITS);                   
1615                    fNodes->Add(sub5node);
1616                    sub4node->cd();   
1617                 fNodes->Add(sub4node);  
1618              sub3node->cd(); 
1619              fNodes->Add(sub3node);
1620              sub2node->cd(); 
1621              //
1622              // Place copy #2 of I1D7 in I20B
1623              //
1624              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1625              sub3node->SetLineColor(kColorITS);
1626              sub3node->SetVisibility(0);
1627              sub3node->cd();
1628                 //
1629                 // Place copy #1 of I1D1 in I1D7
1630                 //
1631                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1632                 sub4node->SetLineColor(kColorITS);
1633                 sub4node->SetVisibility(0);
1634                 sub4node->cd();             
1635                    //
1636                    // Place copy #1 of ITS2 in I1D1
1637                    //
1638                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1639                    sub5node->SetLineColor(kColorITS);                   
1640                    fNodes->Add(sub5node);
1641                    sub4node->cd();   
1642                 fNodes->Add(sub4node);  
1643              sub3node->cd(); 
1644              fNodes->Add(sub3node);
1645              sub2node->cd(); 
1646              //
1647              // Place copy #3 of I1D7 in I20B
1648              //
1649              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1650              sub3node->SetLineColor(kColorITS);
1651              sub3node->SetVisibility(0);
1652              sub3node->cd();
1653                 //
1654                 // Place copy #1 of I1D1 in I1D7
1655                 //
1656                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1657                 sub4node->SetLineColor(kColorITS);
1658                 sub4node->SetVisibility(0);
1659                 sub4node->cd();             
1660                    //
1661                    // Place copy #1 of ITS2 in I1D1
1662                    //
1663                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1664                    sub5node->SetLineColor(kColorITS);                   
1665                    fNodes->Add(sub5node);
1666                    sub4node->cd();   
1667                 fNodes->Add(sub4node);  
1668              sub3node->cd(); 
1669              fNodes->Add(sub3node);
1670              sub2node->cd(); 
1671              //
1672              // Place copy #4 of I1D7 in I20B
1673              //
1674              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1675              sub3node->SetLineColor(kColorITS);
1676              sub3node->SetVisibility(0);
1677              sub3node->cd();
1678                 //
1679                 // Place copy #1 of I1D1 in I1D7
1680                 //
1681                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1682                 sub4node->SetLineColor(kColorITS);
1683                 sub4node->SetVisibility(0);
1684                 sub4node->cd();             
1685                    //
1686                    // Place copy #1 of ITS2 in I1D1
1687                    //
1688                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1689                    sub5node->SetLineColor(kColorITS);                   
1690                    fNodes->Add(sub5node);
1691                    sub4node->cd();   
1692                 fNodes->Add(sub4node);  
1693              sub3node->cd(); 
1694              fNodes->Add(sub3node);
1695              sub2node->cd(); 
1696           fNodes->Add(sub2node);        
1697           sub1node->cd(); 
1698           //
1699           // Place copy #2 of I20B in I12B
1700           //
1701           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(49.*TMath::Pi()/180.);  
1702           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(49.*TMath::Pi()/180.);
1703           sub2node = new TNode("I20B","I20B","I20B",1.9612+deltax,6.9062+deltay,0.,"itsrot241");
1704           sub2node->SetLineColor(kColorITS);
1705           sub2node->SetVisibility(0);
1706           sub2node->cd();
1707              //
1708              // Place copy #1 of I1D7 in I20B
1709              //
1710              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1711              sub3node->SetLineColor(kColorITS);
1712              sub3node->SetVisibility(0);
1713              sub3node->cd();
1714                 //
1715                 // Place copy #1 of I1D1 in I1D7
1716                 //
1717                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1718                 sub4node->SetLineColor(kColorITS);
1719                 sub4node->SetVisibility(0);
1720                 sub4node->cd();
1721                    //               
1722                    // Place copy #1 of ITS2 in I1D1
1723                    //
1724                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1725                    sub5node->SetLineColor(kColorITS);                   
1726                    fNodes->Add(sub5node);
1727                    sub4node->cd();   
1728                 fNodes->Add(sub4node);  
1729              sub3node->cd(); 
1730              fNodes->Add(sub3node);
1731              sub2node->cd(); 
1732              //
1733              // Place copy #2 of I1D7 in I20B
1734              //
1735              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1736              sub3node->SetLineColor(kColorITS);
1737              sub3node->SetVisibility(0);
1738              sub3node->cd();
1739                 //
1740                 // Place copy #1 of I1D1 in I1D7
1741                 //
1742                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1743                 sub4node->SetLineColor(kColorITS);
1744                 sub4node->SetVisibility(0);
1745                 sub4node->cd();             
1746                    //
1747                    // Place copy #1 of ITS2 in I1D1
1748                    //
1749                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1750                    sub5node->SetLineColor(kColorITS);                   
1751                    fNodes->Add(sub5node);
1752                    sub4node->cd();   
1753                 fNodes->Add(sub4node);  
1754              sub3node->cd(); 
1755              fNodes->Add(sub3node);
1756              sub2node->cd(); 
1757              //
1758              // Place copy #3 of I1D7 in I20B
1759              //
1760              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1761              sub3node->SetLineColor(kColorITS);
1762              sub3node->SetVisibility(0);
1763              sub3node->cd();
1764                 //
1765                 // Place copy #1 of I1D1 in I1D7
1766                 //
1767                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1768                 sub4node->SetLineColor(kColorITS);
1769                 sub4node->SetVisibility(0);
1770                 sub4node->cd();             
1771                    //
1772                    // Place copy #1 of ITS2 in I1D1
1773                    //
1774                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1775                    sub5node->SetLineColor(kColorITS);                   
1776                    fNodes->Add(sub5node);
1777                    sub4node->cd();   
1778                 fNodes->Add(sub4node);  
1779              sub3node->cd(); 
1780              fNodes->Add(sub3node);
1781              sub2node->cd(); 
1782              //
1783              // Place copy #4 of I1D7 in I20B
1784              //
1785              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1786              sub3node->SetLineColor(kColorITS);
1787              sub3node->SetVisibility(0);
1788              sub3node->cd();
1789                 //
1790                 // Place copy #1 of I1D1 in I1D7
1791                 //
1792                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1793                 sub4node->SetLineColor(kColorITS);
1794                 sub4node->SetVisibility(0);
1795                 sub4node->cd();             
1796                    //
1797                    // Place copy #1 of ITS2 in I1D1
1798                    //
1799                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1800                    sub5node->SetLineColor(kColorITS);                   
1801                    fNodes->Add(sub5node);
1802                    sub4node->cd();   
1803                 fNodes->Add(sub4node);  
1804              sub3node->cd(); 
1805              fNodes->Add(sub3node);
1806              sub2node->cd(); 
1807           fNodes->Add(sub2node);        
1808           sub1node->cd(); 
1809           //
1810           // Place copy #3 of I20B in I12B
1811           //
1812           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(58.*TMath::Pi()/180.);  
1813           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(58.*TMath::Pi()/180.);
1814           sub2node = new TNode("I20B","I20B","I20B",0.8567+deltax,7.1279+deltay,0.,"itsrot242");
1815           sub2node->SetLineColor(kColorITS);
1816           sub2node->SetVisibility(0);
1817           sub2node->cd();
1818              //
1819              // Place copy #1 of I1D7 in I20B
1820              //
1821              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1822              sub3node->SetLineColor(kColorITS);
1823              sub3node->SetVisibility(0);
1824              sub3node->cd();
1825                 //
1826                 // Place copy #1 of I1D1 in I1D7
1827                 //
1828                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1829                 sub4node->SetLineColor(kColorITS);
1830                 sub4node->SetVisibility(0);
1831                 sub4node->cd();
1832                    //               
1833                    // Place copy #1 of ITS2 in I1D1
1834                    //
1835                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1836                    sub5node->SetLineColor(kColorITS);                   
1837                    fNodes->Add(sub5node);
1838                    sub4node->cd();   
1839                 fNodes->Add(sub4node);  
1840              sub3node->cd(); 
1841              fNodes->Add(sub3node);
1842              sub2node->cd(); 
1843              //
1844              // Place copy #2 of I1D7 in I20B
1845              //
1846              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1847              sub3node->SetLineColor(kColorITS);
1848              sub3node->SetVisibility(0);
1849              sub3node->cd();
1850                 //
1851                 // Place copy #1 of I1D1 in I1D7
1852                 //
1853                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1854                 sub4node->SetLineColor(kColorITS);
1855                 sub4node->SetVisibility(0);
1856                 sub4node->cd();             
1857                    //
1858                    // Place copy #1 of ITS2 in I1D1
1859                    //
1860                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1861                    sub5node->SetLineColor(kColorITS);                   
1862                    fNodes->Add(sub5node);
1863                    sub4node->cd();   
1864                 fNodes->Add(sub4node);  
1865              sub3node->cd(); 
1866              fNodes->Add(sub3node);
1867              sub2node->cd(); 
1868              //
1869              // Place copy #3 of I1D7 in I20B
1870              //
1871              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1872              sub3node->SetLineColor(kColorITS);
1873              sub3node->SetVisibility(0);
1874              sub3node->cd();
1875                 //
1876                 // Place copy #1 of I1D1 in I1D7
1877                 //
1878                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1879                 sub4node->SetLineColor(kColorITS);
1880                 sub4node->SetVisibility(0);
1881                 sub4node->cd();             
1882                    //
1883                    // Place copy #1 of ITS2 in I1D1
1884                    //
1885                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1886                    sub5node->SetLineColor(kColorITS);                   
1887                    fNodes->Add(sub5node);
1888                    sub4node->cd();   
1889                 fNodes->Add(sub4node);  
1890              sub3node->cd(); 
1891              fNodes->Add(sub3node);
1892              sub2node->cd(); 
1893              //
1894              // Place copy #4 of I1D7 in I20B
1895              //
1896              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1897              sub3node->SetLineColor(kColorITS);
1898              sub3node->SetVisibility(0);
1899              sub3node->cd();
1900                 //
1901                 // Place copy #1 of I1D1 in I1D7
1902                 //
1903                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1904                 sub4node->SetLineColor(kColorITS);
1905                 sub4node->SetVisibility(0);
1906                 sub4node->cd();             
1907                    //
1908                    // Place copy #1 of ITS2 in I1D1
1909                    //
1910                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1911                    sub5node->SetLineColor(kColorITS);                   
1912                    fNodes->Add(sub5node);
1913                    sub4node->cd();   
1914                 fNodes->Add(sub4node);  
1915              sub3node->cd(); 
1916              fNodes->Add(sub3node);
1917              sub2node->cd(); 
1918           fNodes->Add(sub2node);        
1919           sub1node->cd(); 
1920           //
1921           // Place copy #4 of I20B in I12B
1922           //
1923           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(67.*TMath::Pi()/180.);  
1924           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(67.*TMath::Pi()/180.);
1925           sub2node = new TNode("I20B","I20B","I20B",-0.2689+deltax,7.1742+deltay,0.,"itsrot243");
1926           sub2node->SetLineColor(kColorITS);
1927           sub2node->SetVisibility(0);
1928           sub2node->cd();
1929              //
1930              // Place copy #1 of I1D7 in I20B
1931              //
1932              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1933              sub3node->SetLineColor(kColorITS);
1934              sub3node->SetVisibility(0);
1935              sub3node->cd();
1936                 //
1937                 // Place copy #1 of I1D1 in I1D7
1938                 //
1939                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1940                 sub4node->SetLineColor(kColorITS);
1941                 sub4node->SetVisibility(0);
1942                 sub4node->cd();
1943                    //               
1944                    // Place copy #1 of ITS2 in I1D1
1945                    //
1946                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1947                    sub5node->SetLineColor(kColorITS);                   
1948                    fNodes->Add(sub5node);
1949                    sub4node->cd();   
1950                 fNodes->Add(sub4node);  
1951              sub3node->cd(); 
1952              fNodes->Add(sub3node);
1953              sub2node->cd(); 
1954              //
1955              // Place copy #2 of I1D7 in I20B
1956              //
1957              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1958              sub3node->SetLineColor(kColorITS);
1959              sub3node->SetVisibility(0);
1960              sub3node->cd();
1961                 //
1962                 // Place copy #1 of I1D1 in I1D7
1963                 //
1964                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1965                 sub4node->SetLineColor(kColorITS);
1966                 sub4node->SetVisibility(0);
1967                 sub4node->cd();             
1968                    //
1969                    // Place copy #1 of ITS2 in I1D1
1970                    //
1971                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1972                    sub5node->SetLineColor(kColorITS);                   
1973                    fNodes->Add(sub5node);
1974                    sub4node->cd();   
1975                 fNodes->Add(sub4node);  
1976              sub3node->cd(); 
1977              fNodes->Add(sub3node);
1978              sub2node->cd(); 
1979              //
1980              // Place copy #3 of I1D7 in I20B
1981              //
1982              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1983              sub3node->SetLineColor(kColorITS);
1984              sub3node->SetVisibility(0);
1985              sub3node->cd();
1986                 //
1987                 // Place copy #1 of I1D1 in I1D7
1988                 //
1989                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1990                 sub4node->SetLineColor(kColorITS);
1991                 sub4node->SetVisibility(0);
1992                 sub4node->cd();             
1993                    //
1994                    // Place copy #1 of ITS2 in I1D1
1995                    //
1996                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1997                    sub5node->SetLineColor(kColorITS);                   
1998                    fNodes->Add(sub5node);
1999                    sub4node->cd();   
2000                 fNodes->Add(sub4node);  
2001              sub3node->cd(); 
2002              fNodes->Add(sub3node);
2003              sub2node->cd(); 
2004              //
2005              // Place copy #4 of I1D7 in I20B
2006              //
2007              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2008              sub3node->SetLineColor(kColorITS);
2009              sub3node->SetVisibility(0);
2010              sub3node->cd();
2011                 //
2012                 // Place copy #1 of I1D1 in I1D7
2013                 //
2014                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2015                 sub4node->SetLineColor(kColorITS);
2016                 sub4node->SetVisibility(0);
2017                 sub4node->cd();             
2018                    //
2019                    // Place copy #1 of ITS2 in I1D1
2020                    //
2021                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2022                    sub5node->SetLineColor(kColorITS);                   
2023                    fNodes->Add(sub5node);
2024                    sub4node->cd();   
2025                 fNodes->Add(sub4node);  
2026              sub3node->cd(); 
2027              fNodes->Add(sub3node);
2028              sub2node->cd(); 
2029           fNodes->Add(sub2node);        
2030           sub1node->cd(); 
2031        fNodes->Add(sub1node);
2032        node->cd(); 
2033        //
2034        // Place copy #3 of I12B in IT12
2035        //
2036        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"itsrot234");
2037        sub1node->SetLineColor(kColorITS);
2038        sub1node->SetVisibility(0);
2039        sub1node->cd();    
2040           //
2041           // Place copy #1 of I10B in I12B
2042           //
2043           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
2044           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
2045           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
2046           sub2node->SetLineColor(kColorITS);
2047           sub2node->SetVisibility(0);
2048           sub2node->cd();
2049              //
2050              // Place copy #1 of I107 in I10B
2051              //
2052              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
2053              sub3node->SetLineColor(kColorITS);
2054              sub3node->SetVisibility(0);
2055              sub3node->cd();
2056                 //
2057                 // Place copy #1 of I101 in I107
2058                 //
2059                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2060                 sub4node->SetLineColor(kColorITS);
2061                 sub4node->SetVisibility(0);
2062                 sub4node->cd();
2063                    //               
2064                    // Place copy #1 of ITS1 in I101
2065                    //
2066                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2067                    sub5node->SetLineColor(kColorITS);                   
2068                    fNodes->Add(sub5node);
2069                    sub4node->cd();   
2070                 fNodes->Add(sub4node);  
2071              sub3node->cd(); 
2072              fNodes->Add(sub3node);
2073              sub2node->cd(); 
2074              //
2075              // Place copy #2 of I107 in I10B
2076              //
2077              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
2078              sub3node->SetLineColor(kColorITS);
2079              sub3node->SetVisibility(0);
2080              sub3node->cd();
2081                 //
2082                 // Place copy #1 of I101 in I107
2083                 //
2084                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2085                 sub4node->SetLineColor(kColorITS);
2086                 sub4node->SetVisibility(0);
2087                 sub4node->cd();             
2088                    //
2089                    // Place copy #1 of ITS1 in I101
2090                    //
2091                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2092                    sub5node->SetLineColor(kColorITS);                   
2093                    fNodes->Add(sub5node);
2094                    sub4node->cd();   
2095                 fNodes->Add(sub4node);  
2096              sub3node->cd(); 
2097              fNodes->Add(sub3node);
2098              sub2node->cd(); 
2099              //
2100              // Place copy #3 of I107 in I10B
2101              //
2102              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
2103              sub3node->SetLineColor(kColorITS);
2104              sub3node->SetVisibility(0);
2105              sub3node->cd();
2106                 //
2107                 // Place copy #1 of I101 in I107
2108                 //
2109                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2110                 sub4node->SetLineColor(kColorITS);
2111                 sub4node->SetVisibility(0);
2112                 sub4node->cd();             
2113                    //
2114                    // Place copy #1 of ITS1 in I101
2115                    //
2116                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2117                    sub5node->SetLineColor(kColorITS);                   
2118                    fNodes->Add(sub5node);
2119                    sub4node->cd();   
2120                 fNodes->Add(sub4node);  
2121              sub3node->cd(); 
2122              fNodes->Add(sub3node);
2123              sub2node->cd(); 
2124              //
2125              // Place copy #4 of I107 in I10B
2126              //
2127              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
2128              sub3node->SetLineColor(kColorITS);
2129              sub3node->SetVisibility(0);
2130              sub3node->cd();
2131                 //
2132                 // Place copy #1 of I101 in I107
2133                 //
2134                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2135                 sub4node->SetLineColor(kColorITS);
2136                 sub4node->SetVisibility(0);
2137                 sub4node->cd();             
2138                    //
2139                    // Place copy #1 of ITS1 in I101
2140                    //
2141                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2142                    sub5node->SetLineColor(kColorITS);                   
2143                    fNodes->Add(sub5node);
2144                    sub4node->cd();   
2145                 fNodes->Add(sub4node);  
2146              sub3node->cd(); 
2147              fNodes->Add(sub3node);
2148              sub2node->cd(); 
2149           fNodes->Add(sub2node);        
2150           sub1node->cd(); 
2151           //
2152           // Place copy #2 of I10B in I12B
2153           //
2154           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
2155           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
2156           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
2157           sub2node->SetLineColor(kColorITS);
2158           sub2node->SetVisibility(0);
2159           sub2node->cd();
2160              //
2161              // Place copy #1 of I107 in I10B
2162              //
2163              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
2164              sub3node->SetLineColor(kColorITS);
2165              sub3node->SetVisibility(0);
2166              sub3node->cd();
2167                 //
2168                 // Place copy #1 of I101 in I107
2169                 //
2170                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2171                 sub4node->SetLineColor(kColorITS);
2172                 sub4node->SetVisibility(0);
2173                 sub4node->cd();
2174                    //               
2175                    // Place copy #1 of ITS1 in I101
2176                    //
2177                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2178                    sub5node->SetLineColor(kColorITS);                   
2179                    fNodes->Add(sub5node);
2180                    sub4node->cd();   
2181                 fNodes->Add(sub4node);  
2182              sub3node->cd(); 
2183              fNodes->Add(sub3node);
2184              sub2node->cd(); 
2185              //
2186              // Place copy #2 of I107 in I10B
2187              //
2188              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
2189              sub3node->SetLineColor(kColorITS);
2190              sub3node->SetVisibility(0);
2191              sub3node->cd();
2192                 //
2193                 // Place copy #1 of I101 in I107
2194                 //
2195                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2196                 sub4node->SetLineColor(kColorITS);
2197                 sub4node->SetVisibility(0);
2198                 sub4node->cd();             
2199                    //
2200                    // Place copy #1 of ITS1 in I101
2201                    //
2202                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2203                    sub5node->SetLineColor(kColorITS);                   
2204                    fNodes->Add(sub5node);
2205                    sub4node->cd();   
2206                 fNodes->Add(sub4node);  
2207              sub3node->cd(); 
2208              fNodes->Add(sub3node);
2209              sub2node->cd(); 
2210              //
2211              // Place copy #3 of I107 in I10B
2212              //
2213              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
2214              sub3node->SetLineColor(kColorITS);
2215              sub3node->SetVisibility(0);
2216              sub3node->cd();
2217                 //
2218                 // Place copy #1 of I101 in I107
2219                 //
2220                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2221                 sub4node->SetLineColor(kColorITS);
2222                 sub4node->SetVisibility(0);
2223                 sub4node->cd();             
2224                    //
2225                    // Place copy #1 of ITS1 in I101
2226                    //
2227                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2228                    sub5node->SetLineColor(kColorITS);                   
2229                    fNodes->Add(sub5node);
2230                    sub4node->cd();   
2231                 fNodes->Add(sub4node);  
2232              sub3node->cd(); 
2233              fNodes->Add(sub3node);
2234              sub2node->cd(); 
2235              //
2236              // Place copy #4 of I107 in I10B
2237              //
2238              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
2239              sub3node->SetLineColor(kColorITS);
2240              sub3node->SetVisibility(0);
2241              sub3node->cd();
2242                 //
2243                 // Place copy #1 of I101 in I107
2244                 //
2245                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2246                 sub4node->SetLineColor(kColorITS);
2247                 sub4node->SetVisibility(0);
2248                 sub4node->cd();             
2249                    //
2250                    // Place copy #1 of ITS1 in I101
2251                    //
2252                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2253                    sub5node->SetLineColor(kColorITS);                   
2254                    fNodes->Add(sub5node);
2255                    sub4node->cd();   
2256                 fNodes->Add(sub4node);  
2257              sub3node->cd(); 
2258              fNodes->Add(sub3node);
2259              sub2node->cd(); 
2260           fNodes->Add(sub2node);        
2261           sub1node->cd(); 
2262           //
2263           // Place copy #1 of I20B in I12B
2264           //
2265           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
2266           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
2267           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
2268           sub2node->SetLineColor(kColorITS);
2269           sub2node->SetVisibility(0);
2270           sub2node->cd();
2271              //
2272              // Place copy #1 of I1D7 in I20B
2273              //
2274              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2275              sub3node->SetLineColor(kColorITS);
2276              sub3node->SetVisibility(0);
2277              sub3node->cd();
2278                 //
2279                 // Place copy #1 of I1D1 in I1D7
2280                 //
2281                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2282                 sub4node->SetLineColor(kColorITS);
2283                 sub4node->SetVisibility(0);
2284                 sub4node->cd();
2285                    //               
2286                    // Place copy #1 of ITS2 in I1D1
2287                    //
2288                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2289                    sub5node->SetLineColor(kColorITS);                   
2290                    fNodes->Add(sub5node);
2291                    sub4node->cd();   
2292                 fNodes->Add(sub4node);  
2293              sub3node->cd(); 
2294              fNodes->Add(sub3node);
2295              sub2node->cd(); 
2296              //
2297              // Place copy #2 of I1D7 in I20B
2298              //
2299              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2300              sub3node->SetLineColor(kColorITS);
2301              sub3node->SetVisibility(0);
2302              sub3node->cd();
2303                 //
2304                 // Place copy #1 of I1D1 in I1D7
2305                 //
2306                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2307                 sub4node->SetLineColor(kColorITS);
2308                 sub4node->SetVisibility(0);
2309                 sub4node->cd();             
2310                    //
2311                    // Place copy #1 of ITS2 in I1D1
2312                    //
2313                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2314                    sub5node->SetLineColor(kColorITS);                   
2315                    fNodes->Add(sub5node);
2316                    sub4node->cd();   
2317                 fNodes->Add(sub4node);  
2318              sub3node->cd(); 
2319              fNodes->Add(sub3node);
2320              sub2node->cd(); 
2321              //
2322              // Place copy #3 of I1D7 in I20B
2323              //
2324              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2325              sub3node->SetLineColor(kColorITS);
2326              sub3node->SetVisibility(0);
2327              sub3node->cd();
2328                 //
2329                 // Place copy #1 of I1D1 in I1D7
2330                 //
2331                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2332                 sub4node->SetLineColor(kColorITS);
2333                 sub4node->SetVisibility(0);
2334                 sub4node->cd();             
2335                    //
2336                    // Place copy #1 of ITS2 in I1D1
2337                    //
2338                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2339                    sub5node->SetLineColor(kColorITS);                   
2340                    fNodes->Add(sub5node);
2341                    sub4node->cd();   
2342                 fNodes->Add(sub4node);  
2343              sub3node->cd(); 
2344              fNodes->Add(sub3node);
2345              sub2node->cd(); 
2346              //
2347              // Place copy #4 of I1D7 in I20B
2348              //
2349              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2350              sub3node->SetLineColor(kColorITS);
2351              sub3node->SetVisibility(0);
2352              sub3node->cd();
2353                 //
2354                 // Place copy #1 of I1D1 in I1D7
2355                 //
2356                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2357                 sub4node->SetLineColor(kColorITS);
2358                 sub4node->SetVisibility(0);
2359                 sub4node->cd();             
2360                    //
2361                    // Place copy #1 of ITS2 in I1D1
2362                    //
2363                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2364                    sub5node->SetLineColor(kColorITS);                   
2365                    fNodes->Add(sub5node);
2366                    sub4node->cd();   
2367                 fNodes->Add(sub4node);  
2368              sub3node->cd(); 
2369              fNodes->Add(sub3node);
2370              sub2node->cd(); 
2371           fNodes->Add(sub2node);        
2372           sub1node->cd(); 
2373           //
2374           // Place copy #2 of I20B in I12B
2375           //
2376           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(49.*TMath::Pi()/180.);  
2377           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(49.*TMath::Pi()/180.);
2378           sub2node = new TNode("I20B","I20B","I20B",1.9612+deltax,6.9062+deltay,0.,"itsrot241");
2379           sub2node->SetLineColor(kColorITS);
2380           sub2node->SetVisibility(0);
2381           sub2node->cd();
2382              //
2383              // Place copy #1 of I1D7 in I20B
2384              //
2385              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2386              sub3node->SetLineColor(kColorITS);
2387              sub3node->SetVisibility(0);
2388              sub3node->cd();
2389                 //
2390                 // Place copy #1 of I1D1 in I1D7
2391                 //
2392                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2393                 sub4node->SetLineColor(kColorITS);
2394                 sub4node->SetVisibility(0);
2395                 sub4node->cd();
2396                    //               
2397                    // Place copy #1 of ITS2 in I1D1
2398                    //
2399                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2400                    sub5node->SetLineColor(kColorITS);                   
2401                    fNodes->Add(sub5node);
2402                    sub4node->cd();   
2403                 fNodes->Add(sub4node);  
2404              sub3node->cd(); 
2405              fNodes->Add(sub3node);
2406              sub2node->cd(); 
2407              //
2408              // Place copy #2 of I1D7 in I20B
2409              //
2410              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2411              sub3node->SetLineColor(kColorITS);
2412              sub3node->SetVisibility(0);
2413              sub3node->cd();
2414                 //
2415                 // Place copy #1 of I1D1 in I1D7
2416                 //
2417                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2418                 sub4node->SetLineColor(kColorITS);
2419                 sub4node->SetVisibility(0);
2420                 sub4node->cd();             
2421                    //
2422                    // Place copy #1 of ITS2 in I1D1
2423                    //
2424                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2425                    sub5node->SetLineColor(kColorITS);                   
2426                    fNodes->Add(sub5node);
2427                    sub4node->cd();   
2428                 fNodes->Add(sub4node);  
2429              sub3node->cd(); 
2430              fNodes->Add(sub3node);
2431              sub2node->cd(); 
2432              //
2433              // Place copy #3 of I1D7 in I20B
2434              //
2435              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2436              sub3node->SetLineColor(kColorITS);
2437              sub3node->SetVisibility(0);
2438              sub3node->cd();
2439                 //
2440                 // Place copy #1 of I1D1 in I1D7
2441                 //
2442                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2443                 sub4node->SetLineColor(kColorITS);
2444                 sub4node->SetVisibility(0);
2445                 sub4node->cd();             
2446                    //
2447                    // Place copy #1 of ITS2 in I1D1
2448                    //
2449                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2450                    sub5node->SetLineColor(kColorITS);                   
2451                    fNodes->Add(sub5node);
2452                    sub4node->cd();   
2453                 fNodes->Add(sub4node);  
2454              sub3node->cd(); 
2455              fNodes->Add(sub3node);
2456              sub2node->cd(); 
2457              //
2458              // Place copy #4 of I1D7 in I20B
2459              //
2460              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2461              sub3node->SetLineColor(kColorITS);
2462              sub3node->SetVisibility(0);
2463              sub3node->cd();
2464                 //
2465                 // Place copy #1 of I1D1 in I1D7
2466                 //
2467                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2468                 sub4node->SetLineColor(kColorITS);
2469                 sub4node->SetVisibility(0);
2470                 sub4node->cd();             
2471                    //
2472                    // Place copy #1 of ITS2 in I1D1
2473                    //
2474                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2475                    sub5node->SetLineColor(kColorITS);                   
2476                    fNodes->Add(sub5node);
2477                    sub4node->cd();   
2478                 fNodes->Add(sub4node);  
2479              sub3node->cd(); 
2480              fNodes->Add(sub3node);
2481              sub2node->cd(); 
2482           fNodes->Add(sub2node);        
2483           sub1node->cd(); 
2484           //
2485           // Place copy #3 of I20B in I12B
2486           //
2487           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(58.*TMath::Pi()/180.);  
2488           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(58.*TMath::Pi()/180.);
2489           sub2node = new TNode("I20B","I20B","I20B",0.8567+deltax,7.1279+deltay,0.,"itsrot242");
2490           sub2node->SetLineColor(kColorITS);
2491           sub2node->SetVisibility(0);
2492           sub2node->cd();
2493              //
2494              // Place copy #1 of I1D7 in I20B
2495              //
2496              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2497              sub3node->SetLineColor(kColorITS);
2498              sub3node->SetVisibility(0);
2499              sub3node->cd();
2500                 //
2501                 // Place copy #1 of I1D1 in I1D7
2502                 //
2503                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2504                 sub4node->SetLineColor(kColorITS);
2505                 sub4node->SetVisibility(0);
2506                 sub4node->cd();
2507                    //               
2508                    // Place copy #1 of ITS2 in I1D1
2509                    //
2510                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2511                    sub5node->SetLineColor(kColorITS);                   
2512                    fNodes->Add(sub5node);
2513                    sub4node->cd();   
2514                 fNodes->Add(sub4node);  
2515              sub3node->cd(); 
2516              fNodes->Add(sub3node);
2517              sub2node->cd(); 
2518              //
2519              // Place copy #2 of I1D7 in I20B
2520              //
2521              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2522              sub3node->SetLineColor(kColorITS);
2523              sub3node->SetVisibility(0);
2524              sub3node->cd();
2525                 //
2526                 // Place copy #1 of I1D1 in I1D7
2527                 //
2528                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2529                 sub4node->SetLineColor(kColorITS);
2530                 sub4node->SetVisibility(0);
2531                 sub4node->cd();             
2532                    //
2533                    // Place copy #1 of ITS2 in I1D1
2534                    //
2535                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2536                    sub5node->SetLineColor(kColorITS);                   
2537                    fNodes->Add(sub5node);
2538                    sub4node->cd();   
2539                 fNodes->Add(sub4node);  
2540              sub3node->cd(); 
2541              fNodes->Add(sub3node);
2542              sub2node->cd(); 
2543              //
2544              // Place copy #3 of I1D7 in I20B
2545              //
2546              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2547              sub3node->SetLineColor(kColorITS);
2548              sub3node->SetVisibility(0);
2549              sub3node->cd();
2550                 //
2551                 // Place copy #1 of I1D1 in I1D7
2552                 //
2553                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2554                 sub4node->SetLineColor(kColorITS);
2555                 sub4node->SetVisibility(0);
2556                 sub4node->cd();             
2557                    //
2558                    // Place copy #1 of ITS2 in I1D1
2559                    //
2560                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2561                    sub5node->SetLineColor(kColorITS);                   
2562                    fNodes->Add(sub5node);
2563                    sub4node->cd();   
2564                 fNodes->Add(sub4node);  
2565              sub3node->cd(); 
2566              fNodes->Add(sub3node);
2567              sub2node->cd(); 
2568              //
2569              // Place copy #4 of I1D7 in I20B
2570              //
2571              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2572              sub3node->SetLineColor(kColorITS);
2573              sub3node->SetVisibility(0);
2574              sub3node->cd();
2575                 //
2576                 // Place copy #1 of I1D1 in I1D7
2577                 //
2578                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2579                 sub4node->SetLineColor(kColorITS);
2580                 sub4node->SetVisibility(0);
2581                 sub4node->cd();             
2582                    //
2583                    // Place copy #1 of ITS2 in I1D1
2584                    //
2585                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2586                    sub5node->SetLineColor(kColorITS);                   
2587                    fNodes->Add(sub5node);
2588                    sub4node->cd();   
2589                 fNodes->Add(sub4node);  
2590              sub3node->cd(); 
2591              fNodes->Add(sub3node);
2592              sub2node->cd(); 
2593           fNodes->Add(sub2node);        
2594           sub1node->cd(); 
2595           //
2596           // Place copy #4 of I20B in I12B
2597           //
2598           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(67.*TMath::Pi()/180.);  
2599           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(67.*TMath::Pi()/180.);
2600           sub2node = new TNode("I20B","I20B","I20B",-0.2689+deltax,7.1742+deltay,0.,"itsrot243");
2601           sub2node->SetLineColor(kColorITS);
2602           sub2node->SetVisibility(0);
2603           sub2node->cd();
2604              //
2605              // Place copy #1 of I1D7 in I20B
2606              //
2607              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2608              sub3node->SetLineColor(kColorITS);
2609              sub3node->SetVisibility(0);
2610              sub3node->cd();
2611                 //
2612                 // Place copy #1 of I1D1 in I1D7
2613                 //
2614                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2615                 sub4node->SetLineColor(kColorITS);
2616                 sub4node->SetVisibility(0);
2617                 sub4node->cd();
2618                    //               
2619                    // Place copy #1 of ITS2 in I1D1
2620                    //
2621                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2622                    sub5node->SetLineColor(kColorITS);                   
2623                    fNodes->Add(sub5node);
2624                    sub4node->cd();   
2625                 fNodes->Add(sub4node);  
2626              sub3node->cd(); 
2627              fNodes->Add(sub3node);
2628              sub2node->cd(); 
2629              //
2630              // Place copy #2 of I1D7 in I20B
2631              //
2632              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2633              sub3node->SetLineColor(kColorITS);
2634              sub3node->SetVisibility(0);
2635              sub3node->cd();
2636                 //
2637                 // Place copy #1 of I1D1 in I1D7
2638                 //
2639                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2640                 sub4node->SetLineColor(kColorITS);
2641                 sub4node->SetVisibility(0);
2642                 sub4node->cd();             
2643                    //
2644                    // Place copy #1 of ITS2 in I1D1
2645                    //
2646                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2647                    sub5node->SetLineColor(kColorITS);                   
2648                    fNodes->Add(sub5node);
2649                    sub4node->cd();   
2650                 fNodes->Add(sub4node);  
2651              sub3node->cd(); 
2652              fNodes->Add(sub3node);
2653              sub2node->cd(); 
2654              //
2655              // Place copy #3 of I1D7 in I20B
2656              //
2657              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2658              sub3node->SetLineColor(kColorITS);
2659              sub3node->SetVisibility(0);
2660              sub3node->cd();
2661                 //
2662                 // Place copy #1 of I1D1 in I1D7
2663                 //
2664                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2665                 sub4node->SetLineColor(kColorITS);
2666                 sub4node->SetVisibility(0);
2667                 sub4node->cd();             
2668                    //
2669                    // Place copy #1 of ITS2 in I1D1
2670                    //
2671                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2672                    sub5node->SetLineColor(kColorITS);                   
2673                    fNodes->Add(sub5node);
2674                    sub4node->cd();   
2675                 fNodes->Add(sub4node);  
2676              sub3node->cd(); 
2677              fNodes->Add(sub3node);
2678              sub2node->cd(); 
2679              //
2680              // Place copy #4 of I1D7 in I20B
2681              //
2682              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2683              sub3node->SetLineColor(kColorITS);
2684              sub3node->SetVisibility(0);
2685              sub3node->cd();
2686                 //
2687                 // Place copy #1 of I1D1 in I1D7
2688                 //
2689                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2690                 sub4node->SetLineColor(kColorITS);
2691                 sub4node->SetVisibility(0);
2692                 sub4node->cd();             
2693                    //
2694                    // Place copy #1 of ITS2 in I1D1
2695                    //
2696                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2697                    sub5node->SetLineColor(kColorITS);                   
2698                    fNodes->Add(sub5node);
2699                    sub4node->cd();   
2700                 fNodes->Add(sub4node);  
2701              sub3node->cd(); 
2702              fNodes->Add(sub3node);
2703              sub2node->cd(); 
2704           fNodes->Add(sub2node);        
2705           sub1node->cd(); 
2706        fNodes->Add(sub1node);
2707        node->cd(); 
2708        //
2709        // Place copy #4 of I12B in IT12
2710        //
2711        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"itsrot246");
2712        sub1node->SetLineColor(kColorITS);
2713        sub1node->SetVisibility(0);
2714        sub1node->cd();    
2715           //
2716           // Place copy #1 of I10B in I12B
2717           //
2718           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
2719           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
2720           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
2721           sub2node->SetLineColor(kColorITS);
2722           sub2node->SetVisibility(0);
2723           sub2node->cd();
2724              //
2725              // Place copy #1 of I107 in I10B
2726              //
2727              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
2728              sub3node->SetLineColor(kColorITS);
2729              sub3node->SetVisibility(0);
2730              sub3node->cd();
2731                 //
2732                 // Place copy #1 of I101 in I107
2733                 //
2734                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2735                 sub4node->SetLineColor(kColorITS);
2736                 sub4node->SetVisibility(0);
2737                 sub4node->cd();
2738                    //               
2739                    // Place copy #1 of ITS1 in I101
2740                    //
2741                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2742                    sub5node->SetLineColor(kColorITS);                   
2743                    fNodes->Add(sub5node);
2744                    sub4node->cd();   
2745                 fNodes->Add(sub4node);  
2746              sub3node->cd(); 
2747              fNodes->Add(sub3node);
2748              sub2node->cd(); 
2749              //
2750              // Place copy #2 of I107 in I10B
2751              //
2752              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
2753              sub3node->SetLineColor(kColorITS);
2754              sub3node->SetVisibility(0);
2755              sub3node->cd();
2756                 //
2757                 // Place copy #1 of I101 in I107
2758                 //
2759                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2760                 sub4node->SetLineColor(kColorITS);
2761                 sub4node->SetVisibility(0);
2762                 sub4node->cd();             
2763                    //
2764                    // Place copy #1 of ITS1 in I101
2765                    //
2766                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2767                    sub5node->SetLineColor(kColorITS);                   
2768                    fNodes->Add(sub5node);
2769                    sub4node->cd();   
2770                 fNodes->Add(sub4node);  
2771              sub3node->cd(); 
2772              fNodes->Add(sub3node);
2773              sub2node->cd(); 
2774              //
2775              // Place copy #3 of I107 in I10B
2776              //
2777              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
2778              sub3node->SetLineColor(kColorITS);
2779              sub3node->SetVisibility(0);
2780              sub3node->cd();
2781                 //
2782                 // Place copy #1 of I101 in I107
2783                 //
2784                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2785                 sub4node->SetLineColor(kColorITS);
2786                 sub4node->SetVisibility(0);
2787                 sub4node->cd();             
2788                    //
2789                    // Place copy #1 of ITS1 in I101
2790                    //
2791                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2792                    sub5node->SetLineColor(kColorITS);                   
2793                    fNodes->Add(sub5node);
2794                    sub4node->cd();   
2795                 fNodes->Add(sub4node);  
2796              sub3node->cd(); 
2797              fNodes->Add(sub3node);
2798              sub2node->cd(); 
2799              //
2800              // Place copy #4 of I107 in I10B
2801              //
2802              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
2803              sub3node->SetLineColor(kColorITS);
2804              sub3node->SetVisibility(0);
2805              sub3node->cd();
2806                 //
2807                 // Place copy #1 of I101 in I107
2808                 //
2809                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2810                 sub4node->SetLineColor(kColorITS);
2811                 sub4node->SetVisibility(0);
2812                 sub4node->cd();             
2813                    //
2814                    // Place copy #1 of ITS1 in I101
2815                    //
2816                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2817                    sub5node->SetLineColor(kColorITS);                   
2818                    fNodes->Add(sub5node);
2819                    sub4node->cd();   
2820                 fNodes->Add(sub4node);  
2821              sub3node->cd(); 
2822              fNodes->Add(sub3node);
2823              sub2node->cd(); 
2824           fNodes->Add(sub2node);        
2825           sub1node->cd(); 
2826           //
2827           // Place copy #2 of I10B in I12B
2828           //
2829           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
2830           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
2831           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
2832           sub2node->SetLineColor(kColorITS);
2833           sub2node->SetVisibility(0);
2834           sub2node->cd();
2835              //
2836              // Place copy #1 of I107 in I10B
2837              //
2838              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
2839              sub3node->SetLineColor(kColorITS);
2840              sub3node->SetVisibility(0);
2841              sub3node->cd();
2842                 //
2843                 // Place copy #1 of I101 in I107
2844                 //
2845                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2846                 sub4node->SetLineColor(kColorITS);
2847                 sub4node->SetVisibility(0);
2848                 sub4node->cd();
2849                    //               
2850                    // Place copy #1 of ITS1 in I101
2851                    //
2852                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2853                    sub5node->SetLineColor(kColorITS);                   
2854                    fNodes->Add(sub5node);
2855                    sub4node->cd();   
2856                 fNodes->Add(sub4node);  
2857              sub3node->cd(); 
2858              fNodes->Add(sub3node);
2859              sub2node->cd(); 
2860              //
2861              // Place copy #2 of I107 in I10B
2862              //
2863              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
2864              sub3node->SetLineColor(kColorITS);
2865              sub3node->SetVisibility(0);
2866              sub3node->cd();
2867                 //
2868                 // Place copy #1 of I101 in I107
2869                 //
2870                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2871                 sub4node->SetLineColor(kColorITS);
2872                 sub4node->SetVisibility(0);
2873                 sub4node->cd();             
2874                    //
2875                    // Place copy #1 of ITS1 in I101
2876                    //
2877                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2878                    sub5node->SetLineColor(kColorITS);                   
2879                    fNodes->Add(sub5node);
2880                    sub4node->cd();   
2881                 fNodes->Add(sub4node);  
2882              sub3node->cd(); 
2883              fNodes->Add(sub3node);
2884              sub2node->cd(); 
2885              //
2886              // Place copy #3 of I107 in I10B
2887              //
2888              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
2889              sub3node->SetLineColor(kColorITS);
2890              sub3node->SetVisibility(0);
2891              sub3node->cd();
2892                 //
2893                 // Place copy #1 of I101 in I107
2894                 //
2895                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2896                 sub4node->SetLineColor(kColorITS);
2897                 sub4node->SetVisibility(0);
2898                 sub4node->cd();             
2899                    //
2900                    // Place copy #1 of ITS1 in I101
2901                    //
2902                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2903                    sub5node->SetLineColor(kColorITS);                   
2904                    fNodes->Add(sub5node);
2905                    sub4node->cd();   
2906                 fNodes->Add(sub4node);  
2907              sub3node->cd(); 
2908              fNodes->Add(sub3node);
2909              sub2node->cd(); 
2910              //
2911              // Place copy #4 of I107 in I10B
2912              //
2913              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
2914              sub3node->SetLineColor(kColorITS);
2915              sub3node->SetVisibility(0);
2916              sub3node->cd();
2917                 //
2918                 // Place copy #1 of I101 in I107
2919                 //
2920                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2921                 sub4node->SetLineColor(kColorITS);
2922                 sub4node->SetVisibility(0);
2923                 sub4node->cd();             
2924                    //
2925                    // Place copy #1 of ITS1 in I101
2926                    //
2927                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2928                    sub5node->SetLineColor(kColorITS);                   
2929                    fNodes->Add(sub5node);
2930                    sub4node->cd();   
2931                 fNodes->Add(sub4node);  
2932              sub3node->cd(); 
2933              fNodes->Add(sub3node);
2934              sub2node->cd(); 
2935           fNodes->Add(sub2node);        
2936           sub1node->cd(); 
2937           //
2938           // Place copy #1 of I20B in I12B
2939           //
2940           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
2941           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
2942           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
2943           sub2node->SetLineColor(kColorITS);
2944           sub2node->SetVisibility(0);
2945           sub2node->cd();
2946              //
2947              // Place copy #1 of I1D7 in I20B
2948              //
2949              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2950              sub3node->SetLineColor(kColorITS);
2951              sub3node->SetVisibility(0);
2952              sub3node->cd();
2953                 //
2954                 // Place copy #1 of I1D1 in I1D7
2955                 //
2956                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2957                 sub4node->SetLineColor(kColorITS);
2958                 sub4node->SetVisibility(0);
2959                 sub4node->cd();
2960                    //               
2961                    // Place copy #1 of ITS2 in I1D1
2962                    //
2963                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2964                    sub5node->SetLineColor(kColorITS);                   
2965                    fNodes->Add(sub5node);
2966                    sub4node->cd();   
2967                 fNodes->Add(sub4node);  
2968              sub3node->cd(); 
2969              fNodes->Add(sub3node);
2970              sub2node->cd(); 
2971              //
2972              // Place copy #2 of I1D7 in I20B
2973              //
2974              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2975              sub3node->SetLineColor(kColorITS);
2976              sub3node->SetVisibility(0);
2977              sub3node->cd();
2978                 //
2979                 // Place copy #1 of I1D1 in I1D7
2980                 //
2981                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2982                 sub4node->SetLineColor(kColorITS);
2983                 sub4node->SetVisibility(0);
2984                 sub4node->cd();             
2985                    //
2986                    // Place copy #1 of ITS2 in I1D1
2987                    //
2988                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2989                    sub5node->SetLineColor(kColorITS);                   
2990                    fNodes->Add(sub5node);
2991                    sub4node->cd();   
2992                 fNodes->Add(sub4node);  
2993              sub3node->cd();