57f6bca4f493e0a817c3330ef4079b2af60a7644
[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 /*
17 $Log$
18 Revision 1.62  2003/01/16 08:10:13  hristov
19 Correcting usage of string arrays (valgrind)
20
21 Revision 1.61  2002/11/21 23:05:27  alibrary
22 Removing AliMC and AliMCProcess
23
24 Revision 1.60  2002/10/22 14:45:47  alibrary
25 Introducing Riostream.h
26
27 Revision 1.59  2002/10/14 14:57:08  hristov
28 Merging the VirtualMC branch to the main development branch (HEAD)
29
30 Revision 1.53.6.4  2002/10/14 13:14:08  hristov
31 Updating VirtualMC to v3-09-02
32
33 Revision 1.58  2002/10/02 17:56:34  barbera
34 Bug in copy 37 of volume I570 corrected (thanks to J. Belikov)
35
36 Revision 1.57  2002/06/12 18:57:25  nilsen
37 Added TrackReference hits for ITS Mother volume at request of TRD and TOF.
38
39 Revision 1.56  2002/05/10 22:30:27  nilsen
40 fix to use default paramters for the SDD response.
41
42 Revision 1.55  2002/04/13 22:21:12  nilsen
43 New default value of noise for SDD simulations introduced.
44
45 Revision 1.54  2002/03/28 16:17:03  nilsen
46 Set new Geant Step size and related parameters for the ITS materials.
47
48 Revision 1.53  2001/11/28 01:35:45  nilsen
49 Using standard constructors instead of default constructors for Clusterfinder,
50 Response, and FastSimulator.
51
52 Revision 1.52  2001/10/22 11:00:54  hristov
53 New naming schema of the rotation matrices in BuildGeometry() to avoid redefinition in other detectors (R.Barbera)
54
55 Revision 1.51  2001/10/19 10:18:49  barbera
56 A typo corrected.
57
58 Revision 1.50  2001/10/18 12:25:07  barbera
59 Detailed geometry in BuildGeometry() commented out (450 MB needed to compile the file). Six cylinders put back but improved by comparison with the ITS coarse geometry
60
61 Revision 1.49  2001/10/18 03:09:21  barbera
62 The method BuildGeometry() has been completely rewritten. Now display.C can display the detailed ITS geometry instead of the old six dummy cylunders.
63
64 Revision 1.48  2001/10/17 04:35:32  barbera
65 Checks for the det and chip thickness modified in order to set the dafault values to 200 um if the user chosen values are outside the range 100-300 um
66
67 Revision 1.47  2001/10/04 22:33:39  nilsen
68 Fixed bugs in SetDefaults.
69
70 Revision 1.46  2001/10/01 19:34:08  nilsen
71 Fixed a bug in asigning detector types in SetDefaults under SSD layer 6.
72
73 Revision 1.45  2001/06/07 14:42:14  barbera
74 Both chip and det thicknesses set to [100,300]
75
76 Revision 1.44  2001/05/31 19:24:47  barbera
77 Default values of SPD detector and chip thickness set to 200 microns as defined by the Technical Board
78
79 Revision 1.43  2001/05/30 16:15:47  fca
80 Correct comparison wiht AliGeant3::Class() introduced. Thanks to I.Hrivnacova
81
82 Revision 1.42  2001/05/30 15:55:35  hristov
83 Strings compared instead of pointers
84
85 Revision 1.41  2001/05/30 14:04:31  hristov
86 Dynamic cast replaced (F.Carminati)
87
88 Revision 1.40  2001/05/25 15:59:59  morsch
89 Overlaps corrected. (R. Barbera)
90
91 Revision 1.38  2001/05/16 08:17:49  hristov
92 Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
93
94 Revision 1.37  2001/05/10 00:12:59  nilsen
95 Finished fixing up the default segmentation for the PPR geometry.
96
97 Revision 1.36  2001/05/09 01:02:21  nilsen
98 Finished fixing SetDefaults for the segmentation of SPD, SDD, and SSD.
99
100 Revision 1.35  2001/05/03 08:40:15  barbera
101 Volume ITSD slightly modified to be consistent with v5. Some improvement in the printouts. The last commit did not complete successfully.
102
103 Revision 1.33  2001/05/01 22:40:42  nilsen
104 Partical update of SetDefault.
105
106 Revision 1.32  2001/04/22 13:48:09  barbera
107 New values of media parameters and thickness of SPD end-ladder electronics as given by Fabio Formenti
108
109 Revision 1.31  2001/04/04 07:02:16  barbera
110 Position of the cylinders holding rails corrected
111
112 Revision 1.30  2001/03/29 22:02:30  barbera
113 Some changes to the services due to the new drawings from the engineers.
114
115 Revision 1.29  2001/03/29 05:28:56  barbera
116 Rails material changed from aluminum to carbon fiber according with the decision of the last Technical Board
117
118 Revision 1.28  2001/03/28 06:40:20  barbera
119 Central and services mother volumes made consistenf for detailed and coarse geometry. Switch for rails added to the coarse geometries
120
121 Revision 1.26  2001/03/23 00:12:23  nilsen
122 Set Reading of AliITSgeom data from Geant3 common blocks as the default and
123 not a .det file. Removed redundent calls to BuildGeometry.
124
125 Revision 1.25  2001/03/20 19:22:51  barbera
126 Flags for the rails and the cooling fluid added. Some changes in the volumes of the SSD cones after the meeting with the engineers in Torino.
127
128 Revision 1.23  2001/03/13 21:18:44  barbera
129 Some misleading comments removed
130
131 Revision 1.22  2001/03/13 18:13:30  barbera
132 Some mother volumes sligthly modified to eliminate an overlap with the absorber
133
134 Revision 1.21  2001/03/13 08:36:23  hristov
135 fabsf replaced by TMath::Abs
136
137 Revision 1.20  2001/03/13 00:17:41  barbera
138 New SDD geometry got grom F. Tosello and checked by the SDD engineers
139
140 Revision 1.19  2001/02/28 18:23:13  barbera
141 Setters and getters to set/get the detector and chip thickness on SPD layers added
142
143 Revision 1.18  2001/02/27 23:18:24  barbera
144 Full parameterization of detector and chip thicknesses for layer 1 and layer 2 of SPD as requested by the project leader
145
146 Revision 1.17  2001/02/19 22:14:55  nilsen
147 Fix for all 4 versions 11, 12, 21, and 22.
148
149 Revision 1.16  2001/02/19 20:10:34  barbera
150 Set option=2 and thickness=2 as default values --> SetMinorVersion=22
151
152 Revision 1.15  2001/02/19 19:44:00  barbera
153 Air density parameter corrected
154
155 Revision 1.14  2001/02/13 16:53:35  nilsen
156 Fixed a but when trying to use GEANT4. Needed to replace
157 if(!((TGeant3*)gMC)) with if(!(dynamic_casst<TGeant3*>(gMC)))
158 because just casting gMC to be TGeant3* even when it realy is a TGeant3 pointer
159 did not result in a zero value. For AliITSv5asymm and AliITSv5symm, needed
160 to fix a bug in the initilizers and a bug in BuildGeometry. This is now done
161 in the same way as in AliITSv5.cxx.
162
163 Revision 1.13  2001/02/09 20:06:26  nilsen
164 Fixed bug in distructor. Can't distroy fixxed length arrays. Thanks Peter.
165
166 Revision 1.12  2001/02/09 13:53:38  barbera
167 Int_t redefinition avoided
168
169 Revision 1.11  2001/02/09 06:55:38  barbera
170 SPD option re-set to B. It was A by mistake
171
172 Revision 1.10  2001/02/09 00:05:31  nilsen
173 Added fMajor/MinorVersion variables and made other changes to better make
174 use of the new code changes in AliITSgeom related classes.
175
176
177 Revision 1.9  2001/02/08 16:00:37  barbera
178 New thicknesses (300+300 um) added for SPD chips and detectors and set as default. Many other refinements.
179
180 Revision 1.8  2001/02/06 08:03:44  barbera
181 Material redefinition in SDD
182
183 Revision 1.7  2001/02/05 13:34:57  barbera
184 Updated version of the ITS detailed geometry
185
186 Revision 1.5  2001/01/30 09:23:13  hristov
187 Streamers removed (R.Brun)
188
189 Revision 1.4  2001/01/23 20:08:03  barbera
190 Option B for pixels implemented and set as default
191
192 Revision 1.3  2001/01/17 08:08:20  barbera
193 Some media parameters modified
194
195 Revision 1.1.2.1  2001/01/15 13:38:08  barbera
196 New ITS detailed geometry to be used for the PPR
197
198 */
199
200 ///////////////////////////////////////////////////////////////////////////////
201 //                                                                           //
202 //  Inner Traking System version PPR  asymmetric                             //
203 //  This class contains the base procedures for the Inner Tracking System    //
204 //                                                                           //
205 // Authors: R. Barbera                                                       //
206 // version 8.                                                                //
207 // Created  January 15 2001.                                                 //
208 //                                                                           //
209 //  NOTE: THIS IS THE  ASYMMETRIC PPR geometry of the ITS.                   //
210 //                                                                           //
211 ///////////////////////////////////////////////////////////////////////////////
212
213 // See AliITSvPPRasymm::StepManager().
214 #include <Riostream.h>
215 #include <stdio.h>
216 #include <stdlib.h>
217 #include <TMath.h>
218 #include <TGeometry.h>
219 #include <TNode.h>
220 #include <TTUBE.h>
221 #include <TTUBS.h>
222 #include <TPCON.h>
223 #include <TFile.h>    // only required for Tracking function?
224 #include <TCanvas.h>
225 #include <TObjArray.h>
226 #include <TLorentzVector.h>
227 #include <TObjString.h>
228 #include <TClonesArray.h>
229 #include <TBRIK.h>
230 #include <TSystem.h>
231
232 #include "AliRun.h"
233 #include "AliMagF.h"
234 #include "AliConst.h"
235 #include "AliITSGeant3Geometry.h"
236 #include "AliTrackReference.h"
237 #include "AliITShit.h"
238 #include "AliITS.h"
239 #include "AliITSvPPRasymm.h"
240 #include "AliITSgeom.h"
241 #include "AliITSgeomSPD.h"
242 #include "AliITSgeomSDD.h"
243 #include "AliITSgeomSSD.h"
244 #include "AliITSDetType.h"
245 #include "AliITSresponseSPD.h"
246 #include "AliITSresponseSDD.h"
247 #include "AliITSresponseSSD.h"
248 #include "AliITSsegmentationSPD.h"
249 #include "AliITSsegmentationSDD.h"
250 #include "AliITSsegmentationSSD.h"
251 #include "AliITSsimulationSPD.h"
252 #include "AliITSsimulationSDD.h"
253 #include "AliITSsimulationSSD.h"
254 #include "AliITSClusterFinderSPD.h"
255 #include "AliITSClusterFinderSDD.h"
256 #include "AliITSClusterFinderSSD.h"
257
258
259 ClassImp(AliITSvPPRasymm)
260  
261 //_____________________________________________________________________________
262 AliITSvPPRasymm::AliITSvPPRasymm() {
263 ////////////////////////////////////////////////////////////////////////
264 //    Standard default constructor for the ITS version 8.
265 ////////////////////////////////////////////////////////////////////////
266     Int_t i;
267
268     fIdN          = 0;
269     fIdName       = 0;
270     fIdSens       = 0;
271     fEuclidOut    = kFALSE; // Don't write Euclide file
272     fGeomDetOut   = kFALSE; // Don't write .det file
273     fGeomDetIn    = kFALSE; // Don't Read .det file
274     fMajorVersion = IsVersion();
275     fMinorVersion = -1;
276     for(i=0;i<60;i++) fRead[i] = '\0';
277     for(i=0;i<60;i++) fWrite[i] = '\0';
278     for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0';
279 }
280 //_____________________________________________________________________________
281 AliITSvPPRasymm::AliITSvPPRasymm(const char *name, const char *title) : AliITS(name, title){
282 ////////////////////////////////////////////////////////////////////////
283 //    Standard constructor for the ITS version 8.
284 ////////////////////////////////////////////////////////////////////////
285     Int_t i;
286
287     fIdN = 6;
288     fIdName = new TString[fIdN];
289     fIdName[0] = "ITS1";
290     fIdName[1] = "ITS2";
291     fIdName[2] = "ITS3";
292     fIdName[3] = "ITS4";
293     fIdName[4] = "ITS5";
294     fIdName[5] = "ITS6";
295     fIdSens    = new Int_t[fIdN];
296     for(i=0;i<fIdN;i++) fIdSens[i] = 0;
297     fMajorVersion = IsVersion();
298     fMinorVersion = 2;
299     fEuclidOut    = kFALSE; // Don't write Euclide file
300     fGeomDetOut   = kFALSE; // Don't write .det file
301     fGeomDetIn    = kFALSE; // Don't Read .det file
302     SetThicknessDet1();
303     SetThicknessDet2();
304     SetThicknessChip1();
305     SetThicknessChip2();                         
306
307     fEuclidGeometry="$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.euc";
308     strncpy(fEuclidGeomDet,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det",60);
309     strncpy(fRead,fEuclidGeomDet,60);
310     strncpy(fWrite,fEuclidGeomDet,60);
311 }
312 //____________________________________________________________________________
313 AliITSvPPRasymm::AliITSvPPRasymm(const AliITSvPPRasymm &source){
314 ////////////////////////////////////////////////////////////////////////
315 //     Copy Constructor for ITS version 8.
316 ////////////////////////////////////////////////////////////////////////
317     if(&source == this) return;
318     Warning("Copy Constructor","Not allowed to copy AliITSvPPRasymm");
319     return;
320 }
321 //_____________________________________________________________________________
322 AliITSvPPRasymm& AliITSvPPRasymm::operator=(const AliITSvPPRasymm &source){
323 ////////////////////////////////////////////////////////////////////////
324 //    Assignment operator for the ITS version 8.
325 ////////////////////////////////////////////////////////////////////////
326     if(&source == this) return *this;
327     Warning("= operator","Not allowed to copy AliITSvPPRasymm");
328     return *this;
329 }
330 //_____________________________________________________________________________
331 AliITSvPPRasymm::~AliITSvPPRasymm() {
332 ////////////////////////////////////////////////////////////////////////
333 //    Standard destructor for the ITS version 8.
334 ////////////////////////////////////////////////////////////////////////
335 }
336 //__________________________________________________________________________
337 void AliITSvPPRasymm::BuildGeometry(){
338 ////////////////////////////////////////////////////////////////////////
339 //    Geometry builder for the ITS version 8.
340 ////////////////////////////////////////////////////////////////////////
341     TNode *node, *top;
342     
343     const Int_t kColorITS=kYellow;
344     //
345     top = gAlice->GetGeometry()->GetNode("alice");
346
347
348     new TTUBE("S_layer1","Layer1 of ITS","void",3.8095,3.8095+1.03*9.36/100.,14.35);
349     top->cd();
350     node = new TNode("Layer1","Layer1","S_layer1",0,0,0,"");
351     node->SetLineColor(kColorITS);
352     fNodes->Add(node);
353
354     new TTUBE("S_layer2","Layer2 of ITS","void",7.,7.+1.03*9.36/100.,14.35);
355     top->cd();
356     node = new TNode("Layer2","Layer2","S_layer2",0,0,0,"");
357     node->SetLineColor(kColorITS);
358     fNodes->Add(node);
359
360     new TTUBE("S_layer3","Layer3 of ITS","void",15.,15.+0.94*9.36/100.,25.1);
361     top->cd();
362     node = new TNode("Layer3","Layer3","S_layer3",0,0,0,"");
363     node->SetLineColor(kColorITS);
364     fNodes->Add(node);
365
366     new TTUBE("S_layer4","Layer4 of ITS","void",24.1,24.1+0.95*9.36/100.,32.1);
367     top->cd();
368     node = new TNode("Layer4","Layer4","S_layer4",0,0,0,"");
369     node->SetLineColor(kColorITS);
370     fNodes->Add(node);
371
372     new TTUBE("S_layer5","Layer5 of ITS","void",38.5,38.5+0.91*9.36/100.,49.405);
373     top->cd();
374     node = new TNode("Layer5","Layer5","S_layer5",0,0,0,"");
375     node->SetLineColor(kColorITS);
376     fNodes->Add(node);
377
378     new TTUBE("S_layer6","Layer6 of ITS","void",43.5765,43.5765+0.87*9.36/100.,55.27);
379     top->cd();
380     node = new TNode("Layer6","Layer6","S_layer6",0,0,0,"");
381     node->SetLineColor(kColorITS);
382     fNodes->Add(node);
383
384
385 /*
386   // DETAILED GEOMETRY
387
388   TNode *sub1node, *sub2node, *sub3node, *sub4node, *sub5node;
389
390   // Define some variables for SPD
391
392   Float_t dits[100];
393   Float_t dits1[3], di101[3], di107[3], di10b[3];  // for layer 1 
394   Float_t di103[3], di10a[3];                      // for layer 1
395   Float_t dits2[3], di1d1[3], di1d7[3], di20b[3];  // for layer 2
396   Float_t di1d3[3], di20a[3];                      // for layer 2  
397
398   Float_t ddet1=200.;     // total detector thickness on layer 1 (micron)
399   Float_t dchip1=200.;    // total chip thickness on layer 1 (micron)
400   
401   Float_t ddet2=200.;     // total detector thickness on layer 2 (micron)                         
402   Float_t dchip2=200.;    // total chip thickness on layer 2 (micron)
403   
404   Float_t dbus=300.;      // total bus thickness on both layers (micron)
405
406   ddet1 = GetThicknessDet1();
407   ddet2 = GetThicknessDet2();
408   dchip1 = GetThicknessChip1();
409   dchip2 = GetThicknessChip2();    
410
411   cout << "par: " << ddet1 << " " << ddet2 << " " << ddet2 << " " << dchip1 << " " << dchip2 << endl; 
412
413   if(ddet1 < 100. || ddet1 > 300.) {
414      cout << "ITS - WARNING: the detector thickness for layer 1 is outside the range of [100,300] microns."
415           " The default value of 200 microns will be used." << endl;
416           ddet1=200.;
417   }
418   
419   if(ddet2 < 100. || ddet2 > 300.) {
420      cout << "ITS - WARNING: the detector thickness for layer 2 is outside the range of [100,300] microns."
421           " The default value of 200 microns will be used." << endl;
422           ddet2=200.;
423   }
424   
425   if(dchip1 < 100. || dchip1 > 300.) {
426      cout << "ITS - WARNING: the chip thickness for layer 1 is outside the range of [100,300] microns."
427           " The default value of 200 microns will be used." << endl;
428           dchip1=200.;
429   }
430   
431   if(dchip2 < 100. || dchip2 > 300.) {
432      cout << "ITS - WARNING: the chip thickness for layer 2 is outside the range of [100,300] microns."
433           " The default value of 200 microns will be used." << endl;
434           dchip2=200.;
435   }      
436    
437   cout << "ITS: Detector thickness on layer 1 is set to " << ddet1 << " microns." << endl;
438   cout << "ITS: Chip thickness on layer 1 is set to " << dchip1 << " microns." << endl;
439   cout << "ITS: Detector thickness on layer 2 is set to " << ddet2 << " microns." << endl;
440   cout << "ITS: Chip thickness on layer 2 is set to " << dchip2 << " microns." << endl;
441
442   ddet1  = ddet1*0.0001/2.; // conversion from tot length in um to half in cm
443   ddet2  = ddet2*0.0001/2.; // conversion from tot length in um to half in cm   
444   dchip1 = dchip1*0.0001/2.;// conversion from tot length in um to half in cm   
445   dchip2 = dchip2*0.0001/2.;// conversion from tot length in um to half in cm   
446   dbus   = dbus*0.0001/2.;  // conversion from tot length in um to half in cm       
447                 
448   Float_t deltax, deltay; 
449
450   Int_t thickness = fMinorVersion/10;
451   Int_t option    = fMinorVersion - 10*thickness;
452
453
454   // Define some variables for SDD
455   // SDD detector ladder
456
457   Float_t ySDD;
458   Float_t I302dits[3], I402dits[3], I004dits[3], I005dits[3];
459   Float_t Y_SDD_sep = 0.20;
460   Float_t Z_SDD_lay3[6] = {18.55, 10.95, 3.70, -3.70, -11.20, -18.35};
461   Float_t Z_SDD_lay4[8] = {25.75, 18.60, 11.00, 3.70, -3.70, -11.20, -18.45, -26.05};
462
463   // Rotation matrices
464     
465   // SPD - option 'a' 
466   
467   if (option == 1) {  
468   
469      new TRotMatrix("itsrot238","itsrot238",90.0,144.0,90.0,234.0,0.0,0.0);
470      new TRotMatrix("itsrot236","itsrot236",90.0,180.013702,90.0,270.013702,0.0,0.0);
471      new TRotMatrix("itsrot239","itsrot239",90.0,216.0,90.0,306.0,0.0,0.0);     
472      new TRotMatrix("itsrot233","itsrot233",90.0,252.000504,90.0,342.000488,0.0,0.0 );     
473      new TRotMatrix("itsrot240","itsrot240",90.0,288.0,90.0,18.0,0.0,0.0);
474      new TRotMatrix("itsrot241","itsrot241",90.0,324.0,90.0,54.0,0.0,0.0);          
475      new TRotMatrix("itsrot242","itsrot242",90.0,36.0,90.0,126.0,0.0,0.0); 
476      new TRotMatrix("itsrot234","itsrot234",90.0,71.9991,90.0,161.9991,0.0,0.0);     
477      new TRotMatrix("itsrot243","itsrot243",90.0,108.0,90.0,198.0,0.0,0.0);  
478      new TRotMatrix("itsrot244","itsrot244",90.0,180.0,90.0,270.0,0.0,0.0);
479      new TRotMatrix("itsrot245","itsrot245",90.0,162.0,90.0,252.0,0.0,0.0);
480      new TRotMatrix("itsrot246","itsrot246",90.0,310.0,90.0,40.0,0.0,0.0);
481      new TRotMatrix("itsrot247","itsrot247",90.0,319.0,90.0,49.0,0.0,0.0);
482      new TRotMatrix("itsrot248","itsrot248",90.0,328.0,90.0,58.0,0.0,0.0);
483      new TRotMatrix("itsrot249","itsrot249",90.0,337.0,90.0,67.0,0.0,0.0);     
484                  
485   }   
486
487   // SPD - option 'b' (this is the default)  
488
489   if (option == 2) {  
490   
491      new TRotMatrix("itsrot233","itsrot233",90.0,252.000504,90.0,342.000488,0.0,0.0);
492      new TRotMatrix("itsrot244","itsrot244",90.0,216.0,90.0,306.0,0.0,0.0);
493      new TRotMatrix("itsrot236","itsrot236",90.0,180.013702,90.0,270.013702,0.0,0.0);  
494      new TRotMatrix("itsrot245","itsrot245",90.0,36.0,90.0,126.0,0.0,0.0);     
495      new TRotMatrix("itsrot234","itsrot234",90.0,71.9991,90.0,161.9991,0.0,0.0);  
496      new TRotMatrix("itsrot246","itsrot246",90.0,108.0,90.0,198.0,0.0,0.0);    
497      new TRotMatrix("itsrot247","itsrot247",90.0,144.0,90.0,234.0,0.0,0.0);
498      new TRotMatrix("itsrot248","itsrot248",90.0,288.0,90.0,18.0,0.0,0.0);     
499      new TRotMatrix("itsrot249","itsrot249",90.0,324.0,90.0,54.0,0.0,0.0);       
500      new TRotMatrix("itsrot238","itsrot238",90.0,180.0,90.0,270.0,0.0,0.0);
501      new TRotMatrix("itsrot239","itsrot239",90.0,162.0,90.0,252.0,0.0,0.0);     
502      new TRotMatrix("itsrot240","itsrot240",90.0,310.0,90.0,40.0,0.0,0.0);
503      new TRotMatrix("itsrot241","itsrot241",90.0,319.0,90.0,49.0,0.0,0.0);
504      new TRotMatrix("itsrot242","itsrot242",90.0,328.0,90.0,58.0,0.0,0.0);
505      new TRotMatrix("itsrot243","itsrot243",90.0,337.0,90.0,67.0,0.0,0.0);
506
507   }   
508      
509   // SDD
510   
511   new TRotMatrix("itsrot321","itsrot321",90.0,12.86,90.0,102.86,0.0,0.0);        
512   new TRotMatrix("itsrot333","itsrot333",90.0,38.57,90.0,128.57,0.0,0.0);
513   new TRotMatrix("itsrot336","itsrot336",90.0,64.29,90.0,154.29,0.0,0.0);       
514   new TRotMatrix("itsrot350","itsrot350",90.0,90.0,90.0,180.0,0.0,0.0);    
515   new TRotMatrix("itsrot313","itsrot313",90.0,115.71,90.0,205.71,0.0,0.0);   
516   new TRotMatrix("itsrot311","itsrot311",90.0,141.43,90.0,231.43,0.0,0.0);
517   new TRotMatrix("itsrot310","itsrot310",90.0,167.14,90.0,257.14,0.0,0.0);  
518   new TRotMatrix("itsrot386","itsrot386",90.0,192.86,90.0,282.86,0.0,0.0);    
519   new TRotMatrix("itsrot309","itsrot309",90.0,218.57,90.0,308.57,0.0,0.0);  
520   new TRotMatrix("itsrot308","itsrot308",90.0,244.29,90.0,334.29,0.0,0.0);  
521   new TRotMatrix("itsrot356","itsrot356",90.0,270.0,90.0,0.0,0.0,0.0);   
522   new TRotMatrix("itsrot307","itsrot307",90.0,295.71,90.0,25.71,0.0,0.0);  
523   new TRotMatrix("itsrot306","itsrot306",90.0,321.43,90.0,51.43,0.0,0.0); 
524   new TRotMatrix("itsrot305","itsrot305",90.0,347.14,90.0,77.14,0.0,0.0);               
525   new TRotMatrix("itsrot335","itsrot335",90.0,8.18,90.0,98.18,0.0,0.0); 
526   new TRotMatrix("itsrot332","itsrot332",90.0,24.55,90.0,114.55,0.0,0.0);  
527   new TRotMatrix("itsrot331","itsrot331",90.0,40.91,90.0,130.91,0.0,0.0);        
528   new TRotMatrix("itsrot366","itsrot366",90.0,57.27,90.0,147.27,0.0,0.0);       
529   new TRotMatrix("itsrot330","itsrot330",90.0,73.64,90.0,163.64,0.0,0.0);          
530   new TRotMatrix("itsrot350","itsrot350",90.0,90.0,90.0,180.0,0.0,0.0);    
531   new TRotMatrix("itsrot329","itsrot329",90.0,106.36,90.0,196.36,0.0,0.0);  
532   new TRotMatrix("itsrot328","itsrot328",90.0,122.73,90.0,212.73,0.0,0.0);  
533   new TRotMatrix("itsrot327","itsrot327",90.0,139.09,90.0,229.09,0.0,0.0);  
534   new TRotMatrix("itsrot326","itsrot326",90.0,155.45,90.0,245.45,0.0,0.0); 
535   new TRotMatrix("itsrot325","itsrot325",90.0,171.82,90.0,261.82,0.0,0.0);  
536   new TRotMatrix("itsrot324","itsrot324",90.0,188.18,90.0,278.18,0.0,0.0);   
537   new TRotMatrix("itsrot323","itsrot323",90.0,204.55,90.0,294.55,0.0,0.0);   
538   new TRotMatrix("itsrot322","itsrot322",90.0,220.91,90.0,310.91,0.0,0.0);  
539   new TRotMatrix("itsrot320","itsrot320",90.0,237.27,90.0,327.27,0.0,0.0);  
540   new TRotMatrix("itsrot319","itsrot319",90.0,253.64,90.0,343.64,0.0,0.0);  
541   new TRotMatrix("itsrot318","itsrot318",90.0,270.0,90.0,360.0,0.0,0.0);  
542   new TRotMatrix("itsrot317","itsrot317",90.0,286.36,90.0,16.36,0.0,0.0);  
543   new TRotMatrix("itsrot316","itsrot316",90.0,302.73,90.0,32.73,0.0,0.0);       
544   new TRotMatrix("itsrot315","itsrot315",90.0,319.09,90.0,49.09,0.0,0.0);       
545   new TRotMatrix("itsrot314","itsrot314",90.0,335.45,90.0,65.45,0.0,0.0); 
546   new TRotMatrix("itsrot334","itsrot334",90.0,351.82,90.0,81.82,0.0,0.0);        
547       
548   //SSD 
549   
550   new TRotMatrix("itsrot504","itsrot504",90.0,127.06,90.0,217.06,0.0,0.0);  
551   new TRotMatrix("itsrot505","itsrot505",90.0,116.47,90.0,206.47,0.0,0.0);  
552   new TRotMatrix("itsrot506","itsrot506",90.0,105.88,90.0,195.88,0.0,0.0);  
553   new TRotMatrix("itsrot507","itsrot507",90.0,95.29,90.0,185.29,0.0,0.0);  
554   new TRotMatrix("itsrot508","itsrot508",90.0,84.71,90.0,174.71,0.0,0.0);
555   new TRotMatrix("itsrot509","itsrot509",90.0,74.12,90.0,164.12,0.0,0.0);
556   new TRotMatrix("itsrot510","itsrot510",90.0,63.53,90.0,153.53,0.0,0.0);  
557   new TRotMatrix("itsrot511","itsrot511",90.0,52.94,90.0,142.94,0.0,0.0);
558   new TRotMatrix("itsrot512","itsrot512",90.0,42.35,90.0,132.35,0.0,0.0);
559   new TRotMatrix("itsrot513","itsrot513",90.0,31.76,90.0,121.76,0.0,0.0); 
560   new TRotMatrix("itsrot653","itsrot653",90.0,21.18,90.0,111.18,0.0,0.0); 
561   new TRotMatrix("itsrot514","itsrot514",90.0,10.59,90.0,100.59,0.0,0.0);  
562   new TRotMatrix("itsrot515","itsrot515",90.0,349.41,90.0,79.41,0.0,0.0);  
563   new TRotMatrix("itsrot516","itsrot516",90.0,338.82,90.0,68.82,0.0,0.0);  
564   new TRotMatrix("itsrot517","itsrot517",90.0,328.24,90.0,58.24,0.0,0.0);  
565   new TRotMatrix("itsrot518","itsrot518",90.0,317.65,90.0,47.65,0.0,0.0);
566   new TRotMatrix("itsrot519","itsrot519",90.0,307.06,90.0,37.06,0.0,0.0);
567   new TRotMatrix("itsrot520","itsrot520",90.0,296.47,90.0,26.47,0.0,0.0);  
568   new TRotMatrix("itsrot521","itsrot521",90.0,285.88,90.0,15.88,0.0,0.0);
569   new TRotMatrix("itsrot522","itsrot522",90.0,275.29,90.0,5.29,0.0,0.0);
570   new TRotMatrix("itsrot523","itsrot523",90.0,264.71,90.0,354.71,0.0,0.0); 
571   new TRotMatrix("itsrot524","itsrot524",90.0,254.12,90.0,344.12,0.0,0.0);  
572   new TRotMatrix("itsrot525","itsrot525",90.0,243.53,90.0,333.53,0.0,0.0);  
573   new TRotMatrix("itsrot526","itsrot526",90.0,232.94,90.0,322.94,0.0,0.0);  
574   new TRotMatrix("itsrot527","itsrot527",90.0,222.35,90.0,312.35,0.0,0.0);  
575   new TRotMatrix("itsrot528","itsrot528",90.0,211.76,90.0,301.76,0.0,0.0);
576   new TRotMatrix("itsrot618","itsrot618",90.0,201.18,90.0,291.18,0.0,0.0); 
577   new TRotMatrix("itsrot529","itsrot529",90.0,190.59,90.0,280.59,0.0,0.0); 
578   new TRotMatrix("itsrot533","itsrot533",90.0,180.0,90.0,270.0,0.0,0.0);   
579   new TRotMatrix("itsrot530","itsrot530",90.0,169.41,90.0,259.41,0.0,0.0);  
580   new TRotMatrix("itsrot531","itsrot531",90.0,158.82,90.0,248.82,0.0,0.0);  
581   new TRotMatrix("itsrot501","itsrot501",90.0,148.24,90.0,238.24,0.0,0.0);
582   new TRotMatrix("itsrot503","itsrot503",90.0,137.65,90.0,227.65,0.0,0.0);         
583   new TRotMatrix("itsrot532","itsrot532",90.0,360.0,90.0,90.0,0.0,0.0);
584   new TRotMatrix("itsrot560","itsrot560",90.0,85.26,90.0,175.26,0.0,0.0);  
585   new TRotMatrix("itsrot561","itsrot561",90.0,94.74,90.0,184.74,0.0,0.0);
586   new TRotMatrix("itsrot562","itsrot562",90.0,104.21,90.0,194.21,0.0,0.0);
587   new TRotMatrix("itsrot563","itsrot563",90.0,113.68,90.0,203.68,0.0,0.0); 
588   new TRotMatrix("itsrot564","itsrot564",90.0,123.16,90.0,213.16,0.0,0.0);  
589   new TRotMatrix("itsrot565","itsrot565",90.0,132.63,90.0,222.63,0.0,0.0);  
590   new TRotMatrix("itsrot566","itsrot566",90.0,142.11,90.0,232.11,0.0,0.0);  
591   new TRotMatrix("itsrot567","itsrot567",90.0,151.58,90.0,241.58,0.0,0.0);  
592   new TRotMatrix("itsrot568","itsrot568",90.0,161.05,90.0,251.05,0.0,0.0);
593   new TRotMatrix("itsrot569","itsrot569",90.0,170.53,90.0,260.53,0.0,0.0);
594   new TRotMatrix("itsrot533","itsrot533",90.0,180.0,90.0,270.0,0.0,0.0); 
595   new TRotMatrix("itsrot534","itsrot534",90.0,189.47,90.0,279.47,0.0,0.0);  
596   new TRotMatrix("itsrot535","itsrot535",90.0,198.95,90.0,288.95,0.0,0.0);  
597   new TRotMatrix("itsrot623","itsrot623",90.0,208.42,90.0,298.42,0.0,0.0);  
598   new TRotMatrix("itsrot537","itsrot537",90.0,217.89,90.0,307.89,0.0,0.0);  
599   new TRotMatrix("itsrot538","itsrot538",90.0,227.37,90.0,317.37,0.0,0.0);
600   new TRotMatrix("itsrot539","itsrot539",90.0,236.84,90.0,326.84,0.0,0.0);
601   new TRotMatrix("itsrot540","itsrot540",90.0,246.32,90.0,336.32,0.0,0.0);  
602   new TRotMatrix("itsrot541","itsrot541",90.0,255.79,90.0,345.79,0.0,0.0);
603   new TRotMatrix("itsrot542","itsrot542",90.0,265.26,90.0,355.26,0.0,0.0);
604   new TRotMatrix("itsrot543","itsrot543",90.0,274.74,90.0,4.74,0.0,0.0); 
605   new TRotMatrix("itsrot544","itsrot544",90.0,284.21,90.0,14.21,0.0,0.0);  
606   new TRotMatrix("itsrot545","itsrot545",90.0,293.68,90.0,23.68,0.0,0.0);  
607   new TRotMatrix("itsrot546","itsrot546",90.0,303.16,90.0,33.16,0.0,0.0);  
608   new TRotMatrix("itsrot547","itsrot547",90.0,312.63,90.0,42.63,0.0,0.0);  
609   new TRotMatrix("itsrot548","itsrot548",90.0,322.11,90.0,52.11,0.0,0.0);
610   new TRotMatrix("itsrot549","itsrot549",90.0,331.58,90.0,61.58,0.0,0.0);
611   new TRotMatrix("itsrot550","itsrot550",90.0,341.05,90.0,71.05,0.0,0.0);  
612   new TRotMatrix("itsrot551","itsrot551",90.0,350.53,90.0,80.53,0.0,0.0);
613   new TRotMatrix("itsrot552","itsrot552",90.0,9.47,90.0,99.47,0.0,0.0);
614   new TRotMatrix("itsrot553","itsrot553",90.0,18.95,90.0,108.95,0.0,0.0);
615   new TRotMatrix("itsrot620","itsrot620",90.0,28.42,90.0,118.42,0.0,0.0);  
616   new TRotMatrix("itsrot555","itsrot555",90.0,37.89,90.0,127.89,0.0,0.0);  
617   new TRotMatrix("itsrot556","itsrot556",90.0,47.37,90.0,137.37,0.0,0.0);  
618   new TRotMatrix("itsrot557","itsrot557",90.0,56.84,90.0,146.84,0.0,0.0);  
619   new TRotMatrix("itsrot558","itsrot558",90.0,66.32,90.0,156.32,0.0,0.0);
620   new TRotMatrix("itsrot559","itsrot559",90.0,75.79,90.0,165.79,0.0,0.0);       
621   
622   
623   // --- Define SPD (option 'a') volumes ----------------------------
624   
625   // SPD - option 'a' 
626   // (this is NOT the default)
627   
628   if (option == 1) { 
629     
630     dits1[0] = 0.64;
631     dits1[1] = ddet1;
632     dits1[2] = 3.48;
633     new TBRIK("ITS1","ITS1","void",dits1[0],dits1[1],dits1[2]);
634     
635     dits2[0] = 0.64;
636     dits2[1] = ddet2;
637     dits2[2] = 3.48;
638     new TBRIK("ITS2","ITS2","void",dits2[0],dits2[1],dits2[2]);    
639     
640     di101[0] = 0.705;
641     di101[1] = ddet1;
642     di101[2] = 3.536;
643     new TBRIK("I101","I101","void",di101[0],di101[1],di101[2]);
644     
645     di1d1[0] = 0.705;
646     di1d1[1] = ddet2;
647     di1d1[2] = 3.536;
648     new TBRIK("I1D1","I1D1","void",di1d1[0],di1d1[1],di1d1[2]);    
649     
650     di103[0] = 0.793;
651     di103[1] = ddet1+dchip1;
652     di103[2] = 3.536;
653     new TBRIK("I103","I103","void",di103[0],di103[1],di103[2]);    
654     
655     di1d3[0] = 0.793;
656     di1d3[1] = ddet2+dchip2;
657     di1d3[2] = 3.536;
658     new TBRIK("I1D3","I1D3","void",di1d3[0],di1d3[1],di1d3[2]);        
659         
660     di10a[0] = 0.843;
661     di10a[1] = ddet1+dchip1+dbus+0.0025;  
662     di10a[2] = 19.344;
663     new TBRIK("I10A","I10A","void",di10a[0],di10a[1],di10a[2]); 
664     
665     di20a[0] = 0.843;
666     di20a[1] = ddet2+dchip2+dbus+0.0025;  
667     di20a[2] = 19.344;
668     new TBRIK("I20A","I20A","void",di20a[0],di20a[1],di20a[2]);     
669
670     dits[0] = 3.7;
671     dits[1] = 7.7;
672     dits[2] = 24;
673     dits[3] = 57;
674     dits[4] = 100;
675     new TTUBS("I12A","I12A","void",dits[0],dits[1],dits[2],dits[3],dits[4]);
676      
677     dits[0] = 3.7;
678     dits[1] = 7.75;
679     dits[2] = 26.1;
680     new TTUBE("IT12","IT12","void",dits[0],dits[1],dits[2]);  
681     
682   }
683   
684   // --- Define SPD (option 'b') volumes ----------------------------
685   
686   // SPD - option 'b' 
687   // (this is the default)
688
689   if (option == 2) {
690     
691     dits1[0] = 0.64;
692     dits1[1] = ddet1;
693     dits1[2] = 3.48;
694     new TBRIK("ITS1","ITS1","void",dits1[0],dits1[1],dits1[2]);
695     
696     dits2[0] = 0.64;
697     dits2[1] = ddet2;
698     dits2[2] = 3.48;
699     new TBRIK("ITS2","ITS2","void",dits2[0],dits2[1],dits2[2]);    
700     
701     di101[0] = 0.705;
702     di101[1] = ddet1;
703     di101[2] = 3.536;
704     new TBRIK("I101","I101","void",di101[0],di101[1],di101[2]);
705     
706     di1d1[0] = 0.705;
707     di1d1[1] = ddet2;
708     di1d1[2] = 3.536;
709     new TBRIK("I1D1","I1D1","void",di1d1[0],di1d1[1],di1d1[2]);    
710     
711     di107[0] = 0.793;
712     di107[1] = ddet1+dchip1;
713     di107[2] = 3.536;
714     new TBRIK("I107","I107","void",di107[0],di107[1],di107[2]);    
715     
716     di1d7[0] = 0.7975;
717     di1d7[1] = ddet2+dchip2;
718     di1d7[2] = 3.536;
719     new TBRIK("I1D7","I1D7","void",di1d7[0],di1d7[1],di1d7[2]);        
720         
721     di10b[0] = 0.843;
722     di10b[1] = ddet1+dchip1+dbus+0.0025;  
723     di10b[2] = 19.344;
724     new TBRIK("I10B","I10B","void",di10b[0],di10b[1],di10b[2]); 
725     
726     di20b[0] = 0.843;
727     di20b[1] = ddet2+dchip2+dbus+0.0025;  
728     di20b[2] = 19.344;
729     new TBRIK("I20B","I20B","void",di20b[0],di20b[1],di20b[2]);     
730
731     dits[0] = 3.7;
732     dits[1] = 7.7;
733     dits[2] = 24;
734     dits[3] = 57;
735     dits[4] = 100;
736     new TTUBS("I12B","I12B","void",dits[0],dits[1],dits[2],dits[3],dits[4]);
737      
738     dits[0] = 3.7;
739     dits[1] = 7.75;
740     dits[2] = 26.1;
741     new TTUBE("IT12","IT12","void",dits[0],dits[1],dits[2]);  
742          
743
744   }
745
746   // --- Define SDD volumes ------------------------------------------
747   
748   TPCON *it34 = new TPCON("IT34","IT34","void",0.,360.,6); 
749   it34->DefineSection(0,-34.6,23.49,28.); 
750   it34->DefineSection(1,-23.65,23.49,28.); 
751   it34->DefineSection(2,-23.65,14.59,28.); 
752   it34->DefineSection(3,23.65,14.59,28.); 
753   it34->DefineSection(4,23.65,23.49,28.); 
754   it34->DefineSection(5,34.6,23.49,28.);   
755   
756   I302dits[0] = 3.6250;
757   I302dits[1] = 0.0150;
758   I302dits[2] = 4.3794; 
759   new TBRIK("I302","I302","void",I302dits[0],I302dits[1],I302dits[2]);
760
761   I004dits[0] = I302dits[0]+0.005;
762   I004dits[1] = 2*I302dits[1]+Y_SDD_sep/2.;
763   I004dits[2] = TMath::Abs(Z_SDD_lay3[0]);
764   if (I004dits[2] < TMath::Abs(Z_SDD_lay3[5])) {
765     I004dits[2] = TMath::Abs(Z_SDD_lay3[5]);
766   }
767   I004dits[2] = I004dits[2] + I302dits[2];  
768   new TBRIK("I004","I004","void",I004dits[0],I004dits[1],I004dits[2]); 
769   
770   dits[0] = 3.50850;
771   dits[1] = 0.01499; 
772   dits[2] = 3.76320;  
773   new TBRIK("ITS3","ITS3","void",dits[0],dits[1],dits[2]);    
774  
775   I402dits[0] = 3.6250;
776   I402dits[1] = 0.0150;
777   I402dits[2] = 4.3794; 
778   new TBRIK("I402","I402","void",I402dits[0],I402dits[1],I402dits[2]);
779
780   I005dits[0] = I402dits[0]+0.005;
781   I005dits[1] = 2*I402dits[1]+Y_SDD_sep/2.;
782   I005dits[2] = TMath::Abs(Z_SDD_lay4[0]);
783   if (I005dits[2] < TMath::Abs(Z_SDD_lay4[7])) {
784     I005dits[2] = TMath::Abs(Z_SDD_lay4[7]);
785   }
786   I005dits[2] = I005dits[2] + I402dits[2];  
787   new TBRIK("I005","I005","void",I005dits[0],I005dits[1],I005dits[2]);   
788
789   dits[0] = 3.50850;
790   dits[1] = 0.01499; 
791   dits[2] = 3.76320;
792   new TBRIK("ITS4","ITS4","void",dits[0],dits[1],dits[2]);
793
794   
795   // --- Define SSD volumes ------------------------------------------
796   
797
798   TPCON *it56 = new TPCON("IT56","IT56","void",0.,360.,6); 
799   it56->DefineSection(0,-57.45,43.6,48.); 
800   it56->DefineSection(1,-49.15,43.6,48.); 
801   it56->DefineSection(2,-49.15,36.9,48.); 
802   it56->DefineSection(3,50.55,36.9,48.); 
803   it56->DefineSection(4,50.55,43.6,48.); 
804   it56->DefineSection(5,57.45,43.6,48.);    
805
806   dits[0] = 3.75;
807   dits[1] = 0.045;
808   dits[2] = 43.3;
809   new TBRIK("I565","I565","void",dits[0],dits[1],dits[2]);  
810
811   dits[0] = 3.75;
812   dits[1] = 0.045;
813   dits[2] = 50.975;
814   new TBRIK("I569","I569","void",dits[0],dits[1],dits[2]);  
815   
816   dits[0] = 3.75;
817   dits[1] = 0.015;
818   dits[2] = 2.1;
819   new TBRIK("I562","I562","void",dits[0],dits[1],dits[2]);      
820   
821   dits[0] = 3.75;
822   dits[1] = 0.015;
823   dits[2] = 2.1;
824   new TBRIK("I566","I566","void",dits[0],dits[1],dits[2]);        
825
826   dits[0] = 3.65;
827   dits[1] = 0.015;
828   dits[2] = 2;
829   new TBRIK("ITS5","ITS5","void",dits[0],dits[1],dits[2]); 
830
831   dits[0] = 3.65;
832   dits[1] = 0.015;
833   dits[2] = 2;
834   new TBRIK("ITS6","ITS6","void",dits[0],dits[1],dits[2]);  
835
836   //
837   
838   top->cd();
839
840   // --- Place SPD (option 'a') volumes into their mother volume 
841   
842   // SPD - option 'a' 
843   // (this is NOT the default)
844
845   if (option == 1) {
846
847
848   }
849   
850   
851   // --- Place SPD (option 'b') volumes into their mother volume 
852   
853   // SPD - option 'b' 
854   // (this is the default)
855
856   if (option == 2) { 
857   
858     // Place IT12 in Alice
859     //
860     node = new TNode("IT12","IT12","IT12",0.,0.,0.,"");
861     node->SetLineColor(kColorITS);
862     node->SetVisibility(0);
863     node->cd();    
864        //
865        // Place copy #1 of I12B in IT12
866        //
867        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"");
868        sub1node->SetLineColor(kColorITS);
869        sub1node->SetVisibility(0);
870        sub1node->cd();    
871           //
872           // Place copy #1 of I10B in I12B
873           //
874           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
875           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
876           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
877           sub2node->SetLineColor(kColorITS);
878           sub2node->SetVisibility(0);
879           sub2node->cd();
880              //
881              // Place copy #1 of I107 in I10B
882              //
883              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
884              sub3node->SetLineColor(kColorITS);
885              sub3node->SetVisibility(0);
886              sub3node->cd();
887                 //
888                 // Place copy #1 of I101 in I107
889                 //
890                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
891                 sub4node->SetLineColor(kColorITS);
892                 sub4node->SetVisibility(0);
893                 sub4node->cd();
894                    //               
895                    // Place copy #1 of ITS1 in I101
896                    //
897                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
898                    sub5node->SetLineColor(kColorITS);                   
899                    fNodes->Add(sub5node);
900                    sub4node->cd();   
901                 fNodes->Add(sub4node);  
902              sub3node->cd(); 
903              fNodes->Add(sub3node);
904              sub2node->cd(); 
905              //
906              // Place copy #2 of I107 in I10B
907              //
908              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
909              sub3node->SetLineColor(kColorITS);
910              sub3node->SetVisibility(0);
911              sub3node->cd();
912                 //
913                 // Place copy #1 of I101 in I107
914                 //
915                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
916                 sub4node->SetLineColor(kColorITS);
917                 sub4node->SetVisibility(0);
918                 sub4node->cd();             
919                    //
920                    // Place copy #1 of ITS1 in I101
921                    //
922                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
923                    sub5node->SetLineColor(kColorITS);                   
924                    fNodes->Add(sub5node);
925                    sub4node->cd();   
926                 fNodes->Add(sub4node);  
927              sub3node->cd(); 
928              fNodes->Add(sub3node);
929              sub2node->cd(); 
930              //
931              // Place copy #3 of I107 in I10B
932              //
933              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
934              sub3node->SetLineColor(kColorITS);
935              sub3node->SetVisibility(0);
936              sub3node->cd();
937                 //
938                 // Place copy #1 of I101 in I107
939                 //
940                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
941                 sub4node->SetLineColor(kColorITS);
942                 sub4node->SetVisibility(0);
943                 sub4node->cd();             
944                    //
945                    // Place copy #1 of ITS1 in I101
946                    //
947                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
948                    sub5node->SetLineColor(kColorITS);                   
949                    fNodes->Add(sub5node);
950                    sub4node->cd();   
951                 fNodes->Add(sub4node);  
952              sub3node->cd(); 
953              fNodes->Add(sub3node);
954              sub2node->cd(); 
955              //
956              // Place copy #4 of I107 in I10B
957              //
958              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
959              sub3node->SetLineColor(kColorITS);
960              sub3node->SetVisibility(0);
961              sub3node->cd();
962                 //
963                 // Place copy #1 of I101 in I107
964                 //
965                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
966                 sub4node->SetLineColor(kColorITS);
967                 sub4node->SetVisibility(0);
968                 sub4node->cd();             
969                    //
970                    // Place copy #1 of ITS1 in I101
971                    //
972                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
973                    sub5node->SetLineColor(kColorITS);                   
974                    fNodes->Add(sub5node);
975                    sub4node->cd();   
976                 fNodes->Add(sub4node);  
977              sub3node->cd(); 
978              fNodes->Add(sub3node);
979              sub2node->cd(); 
980           fNodes->Add(sub2node);        
981           sub1node->cd(); 
982           //
983           // Place copy #2 of I10B in I12B
984           //
985           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
986           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
987           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
988           sub2node->SetLineColor(kColorITS);
989           sub2node->SetVisibility(0);
990           sub2node->cd();
991              //
992              // Place copy #1 of I107 in I10B
993              //
994              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
995              sub3node->SetLineColor(kColorITS);
996              sub3node->SetVisibility(0);
997              sub3node->cd();
998                 //
999                 // Place copy #1 of I101 in I107
1000                 //
1001                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1002                 sub4node->SetLineColor(kColorITS);
1003                 sub4node->SetVisibility(0);
1004                 sub4node->cd();
1005                    //               
1006                    // Place copy #1 of ITS1 in I101
1007                    //
1008                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1009                    sub5node->SetLineColor(kColorITS);                   
1010                    fNodes->Add(sub5node);
1011                    sub4node->cd();   
1012                 fNodes->Add(sub4node);  
1013              sub3node->cd(); 
1014              fNodes->Add(sub3node);
1015              sub2node->cd(); 
1016              //
1017              // Place copy #2 of I107 in I10B
1018              //
1019              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
1020              sub3node->SetLineColor(kColorITS);
1021              sub3node->SetVisibility(0);
1022              sub3node->cd();
1023                 //
1024                 // Place copy #1 of I101 in I107
1025                 //
1026                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1027                 sub4node->SetLineColor(kColorITS);
1028                 sub4node->SetVisibility(0);
1029                 sub4node->cd();             
1030                    //
1031                    // Place copy #1 of ITS1 in I101
1032                    //
1033                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1034                    sub5node->SetLineColor(kColorITS);                   
1035                    fNodes->Add(sub5node);
1036                    sub4node->cd();   
1037                 fNodes->Add(sub4node);  
1038              sub3node->cd(); 
1039              fNodes->Add(sub3node);
1040              sub2node->cd(); 
1041              //
1042              // Place copy #3 of I107 in I10B
1043              //
1044              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
1045              sub3node->SetLineColor(kColorITS);
1046              sub3node->SetVisibility(0);
1047              sub3node->cd();
1048                 //
1049                 // Place copy #1 of I101 in I107
1050                 //
1051                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1052                 sub4node->SetLineColor(kColorITS);
1053                 sub4node->SetVisibility(0);
1054                 sub4node->cd();             
1055                    //
1056                    // Place copy #1 of ITS1 in I101
1057                    //
1058                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1059                    sub5node->SetLineColor(kColorITS);                   
1060                    fNodes->Add(sub5node);
1061                    sub4node->cd();   
1062                 fNodes->Add(sub4node);  
1063              sub3node->cd(); 
1064              fNodes->Add(sub3node);
1065              sub2node->cd(); 
1066              //
1067              // Place copy #4 of I107 in I10B
1068              //
1069              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
1070              sub3node->SetLineColor(kColorITS);
1071              sub3node->SetVisibility(0);
1072              sub3node->cd();
1073                 //
1074                 // Place copy #1 of I101 in I107
1075                 //
1076                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1077                 sub4node->SetLineColor(kColorITS);
1078                 sub4node->SetVisibility(0);
1079                 sub4node->cd();             
1080                    //
1081                    // Place copy #1 of ITS1 in I101
1082                    //
1083                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1084                    sub5node->SetLineColor(kColorITS);                   
1085                    fNodes->Add(sub5node);
1086                    sub4node->cd();   
1087                 fNodes->Add(sub4node);  
1088              sub3node->cd(); 
1089              fNodes->Add(sub3node);
1090              sub2node->cd(); 
1091           fNodes->Add(sub2node);        
1092           sub1node->cd(); 
1093           //
1094           // Place copy #1 of I20B in I12B
1095           //
1096           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
1097           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
1098           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
1099           sub2node->SetLineColor(kColorITS);
1100           sub2node->SetVisibility(0);
1101           sub2node->cd();
1102              //
1103              // Place copy #1 of I1D7 in I20B
1104              //
1105              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1106              sub3node->SetLineColor(kColorITS);
1107              sub3node->SetVisibility(0);
1108              sub3node->cd();
1109                 //
1110                 // Place copy #1 of I1D1 in I1D7
1111                 //
1112                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1113                 sub4node->SetLineColor(kColorITS);
1114                 sub4node->SetVisibility(0);
1115                 sub4node->cd();
1116                    //               
1117                    // Place copy #1 of ITS2 in I1D1
1118                    //
1119                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1120                    sub5node->SetLineColor(kColorITS);                   
1121                    fNodes->Add(sub5node);
1122                    sub4node->cd();   
1123                 fNodes->Add(sub4node);  
1124              sub3node->cd(); 
1125              fNodes->Add(sub3node);
1126              sub2node->cd(); 
1127              //
1128              // Place copy #2 of I1D7 in I20B
1129              //
1130              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1131              sub3node->SetLineColor(kColorITS);
1132              sub3node->SetVisibility(0);
1133              sub3node->cd();
1134                 //
1135                 // Place copy #1 of I1D1 in I1D7
1136                 //
1137                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1138                 sub4node->SetLineColor(kColorITS);
1139                 sub4node->SetVisibility(0);
1140                 sub4node->cd();             
1141                    //
1142                    // Place copy #1 of ITS2 in I1D1
1143                    //
1144                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1145                    sub5node->SetLineColor(kColorITS);                   
1146                    fNodes->Add(sub5node);
1147                    sub4node->cd();   
1148                 fNodes->Add(sub4node);  
1149              sub3node->cd(); 
1150              fNodes->Add(sub3node);
1151              sub2node->cd(); 
1152              //
1153              // Place copy #3 of I1D7 in I20B
1154              //
1155              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1156              sub3node->SetLineColor(kColorITS);
1157              sub3node->SetVisibility(0);
1158              sub3node->cd();
1159                 //
1160                 // Place copy #1 of I1D1 in I1D7
1161                 //
1162                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1163                 sub4node->SetLineColor(kColorITS);
1164                 sub4node->SetVisibility(0);
1165                 sub4node->cd();             
1166                    //
1167                    // Place copy #1 of ITS2 in I1D1
1168                    //
1169                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1170                    sub5node->SetLineColor(kColorITS);                   
1171                    fNodes->Add(sub5node);
1172                    sub4node->cd();   
1173                 fNodes->Add(sub4node);  
1174              sub3node->cd(); 
1175              fNodes->Add(sub3node);
1176              sub2node->cd(); 
1177              //
1178              // Place copy #4 of I1D7 in I20B
1179              //
1180              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1181              sub3node->SetLineColor(kColorITS);
1182              sub3node->SetVisibility(0);
1183              sub3node->cd();
1184                 //
1185                 // Place copy #1 of I1D1 in I1D7
1186                 //
1187                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1188                 sub4node->SetLineColor(kColorITS);
1189                 sub4node->SetVisibility(0);
1190                 sub4node->cd();             
1191                    //
1192                    // Place copy #1 of ITS2 in I1D1
1193                    //
1194                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1195                    sub5node->SetLineColor(kColorITS);                   
1196                    fNodes->Add(sub5node);
1197                    sub4node->cd();   
1198                 fNodes->Add(sub4node);  
1199              sub3node->cd(); 
1200              fNodes->Add(sub3node);
1201              sub2node->cd(); 
1202           fNodes->Add(sub2node);        
1203           sub1node->cd(); 
1204           //
1205           // Place copy #2 of I20B in I12B
1206           //
1207           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(49.*TMath::Pi()/180.);  
1208           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(49.*TMath::Pi()/180.);
1209           sub2node = new TNode("I20B","I20B","I20B",1.9612+deltax,6.9062+deltay,0.,"itsrot241");
1210           sub2node->SetLineColor(kColorITS);
1211           sub2node->SetVisibility(0);
1212           sub2node->cd();
1213              //
1214              // Place copy #1 of I1D7 in I20B
1215              //
1216              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1217              sub3node->SetLineColor(kColorITS);
1218              sub3node->SetVisibility(0);
1219              sub3node->cd();
1220                 //
1221                 // Place copy #1 of I1D1 in I1D7
1222                 //
1223                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1224                 sub4node->SetLineColor(kColorITS);
1225                 sub4node->SetVisibility(0);
1226                 sub4node->cd();
1227                    //               
1228                    // Place copy #1 of ITS2 in I1D1
1229                    //
1230                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1231                    sub5node->SetLineColor(kColorITS);                   
1232                    fNodes->Add(sub5node);
1233                    sub4node->cd();   
1234                 fNodes->Add(sub4node);  
1235              sub3node->cd(); 
1236              fNodes->Add(sub3node);
1237              sub2node->cd(); 
1238              //
1239              // Place copy #2 of I1D7 in I20B
1240              //
1241              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1242              sub3node->SetLineColor(kColorITS);
1243              sub3node->SetVisibility(0);
1244              sub3node->cd();
1245                 //
1246                 // Place copy #1 of I1D1 in I1D7
1247                 //
1248                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1249                 sub4node->SetLineColor(kColorITS);
1250                 sub4node->SetVisibility(0);
1251                 sub4node->cd();             
1252                    //
1253                    // Place copy #1 of ITS2 in I1D1
1254                    //
1255                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1256                    sub5node->SetLineColor(kColorITS);                   
1257                    fNodes->Add(sub5node);
1258                    sub4node->cd();   
1259                 fNodes->Add(sub4node);  
1260              sub3node->cd(); 
1261              fNodes->Add(sub3node);
1262              sub2node->cd(); 
1263              //
1264              // Place copy #3 of I1D7 in I20B
1265              //
1266              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1267              sub3node->SetLineColor(kColorITS);
1268              sub3node->SetVisibility(0);
1269              sub3node->cd();
1270                 //
1271                 // Place copy #1 of I1D1 in I1D7
1272                 //
1273                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1274                 sub4node->SetLineColor(kColorITS);
1275                 sub4node->SetVisibility(0);
1276                 sub4node->cd();             
1277                    //
1278                    // Place copy #1 of ITS2 in I1D1
1279                    //
1280                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1281                    sub5node->SetLineColor(kColorITS);                   
1282                    fNodes->Add(sub5node);
1283                    sub4node->cd();   
1284                 fNodes->Add(sub4node);  
1285              sub3node->cd(); 
1286              fNodes->Add(sub3node);
1287              sub2node->cd(); 
1288              //
1289              // Place copy #4 of I1D7 in I20B
1290              //
1291              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1292              sub3node->SetLineColor(kColorITS);
1293              sub3node->SetVisibility(0);
1294              sub3node->cd();
1295                 //
1296                 // Place copy #1 of I1D1 in I1D7
1297                 //
1298                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1299                 sub4node->SetLineColor(kColorITS);
1300                 sub4node->SetVisibility(0);
1301                 sub4node->cd();             
1302                    //
1303                    // Place copy #1 of ITS2 in I1D1
1304                    //
1305                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1306                    sub5node->SetLineColor(kColorITS);                   
1307                    fNodes->Add(sub5node);
1308                    sub4node->cd();   
1309                 fNodes->Add(sub4node);  
1310              sub3node->cd(); 
1311              fNodes->Add(sub3node);
1312              sub2node->cd(); 
1313           fNodes->Add(sub2node);        
1314           sub1node->cd(); 
1315           //
1316           // Place copy #3 of I20B in I12B
1317           //
1318           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(58.*TMath::Pi()/180.);  
1319           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(58.*TMath::Pi()/180.);
1320           sub2node = new TNode("I20B","I20B","I20B",0.8567+deltax,7.1279+deltay,0.,"itsrot242");
1321           sub2node->SetLineColor(kColorITS);
1322           sub2node->SetVisibility(0);
1323           sub2node->cd();
1324              //
1325              // Place copy #1 of I1D7 in I20B
1326              //
1327              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1328              sub3node->SetLineColor(kColorITS);
1329              sub3node->SetVisibility(0);
1330              sub3node->cd();
1331                 //
1332                 // Place copy #1 of I1D1 in I1D7
1333                 //
1334                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1335                 sub4node->SetLineColor(kColorITS);
1336                 sub4node->SetVisibility(0);
1337                 sub4node->cd();
1338                    //               
1339                    // Place copy #1 of ITS2 in I1D1
1340                    //
1341                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1342                    sub5node->SetLineColor(kColorITS);                   
1343                    fNodes->Add(sub5node);
1344                    sub4node->cd();   
1345                 fNodes->Add(sub4node);  
1346              sub3node->cd(); 
1347              fNodes->Add(sub3node);
1348              sub2node->cd(); 
1349              //
1350              // Place copy #2 of I1D7 in I20B
1351              //
1352              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1353              sub3node->SetLineColor(kColorITS);
1354              sub3node->SetVisibility(0);
1355              sub3node->cd();
1356                 //
1357                 // Place copy #1 of I1D1 in I1D7
1358                 //
1359                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1360                 sub4node->SetLineColor(kColorITS);
1361                 sub4node->SetVisibility(0);
1362                 sub4node->cd();             
1363                    //
1364                    // Place copy #1 of ITS2 in I1D1
1365                    //
1366                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1367                    sub5node->SetLineColor(kColorITS);                   
1368                    fNodes->Add(sub5node);
1369                    sub4node->cd();   
1370                 fNodes->Add(sub4node);  
1371              sub3node->cd(); 
1372              fNodes->Add(sub3node);
1373              sub2node->cd(); 
1374              //
1375              // Place copy #3 of I1D7 in I20B
1376              //
1377              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1378              sub3node->SetLineColor(kColorITS);
1379              sub3node->SetVisibility(0);
1380              sub3node->cd();
1381                 //
1382                 // Place copy #1 of I1D1 in I1D7
1383                 //
1384                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1385                 sub4node->SetLineColor(kColorITS);
1386                 sub4node->SetVisibility(0);
1387                 sub4node->cd();             
1388                    //
1389                    // Place copy #1 of ITS2 in I1D1
1390                    //
1391                    sub5node = new TNode("ITS2","ITS2","ITS2",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 #4 of I1D7 in I20B
1401              //
1402              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1403              sub3node->SetLineColor(kColorITS);
1404              sub3node->SetVisibility(0);
1405              sub3node->cd();
1406                 //
1407                 // Place copy #1 of I1D1 in I1D7
1408                 //
1409                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1410                 sub4node->SetLineColor(kColorITS);
1411                 sub4node->SetVisibility(0);
1412                 sub4node->cd();             
1413                    //
1414                    // Place copy #1 of ITS2 in I1D1
1415                    //
1416                    sub5node = new TNode("ITS2","ITS2","ITS2",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           fNodes->Add(sub2node);        
1425           sub1node->cd(); 
1426           //
1427           // Place copy #4 of I20B in I12B
1428           //
1429           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(67.*TMath::Pi()/180.);  
1430           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(67.*TMath::Pi()/180.);
1431           sub2node = new TNode("I20B","I20B","I20B",-0.2689+deltax,7.1742+deltay,0.,"itsrot243");
1432           sub2node->SetLineColor(kColorITS);
1433           sub2node->SetVisibility(0);
1434           sub2node->cd();
1435              //
1436              // Place copy #1 of I1D7 in I20B
1437              //
1438              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1439              sub3node->SetLineColor(kColorITS);
1440              sub3node->SetVisibility(0);
1441              sub3node->cd();
1442                 //
1443                 // Place copy #1 of I1D1 in I1D7
1444                 //
1445                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1446                 sub4node->SetLineColor(kColorITS);
1447                 sub4node->SetVisibility(0);
1448                 sub4node->cd();
1449                    //               
1450                    // Place copy #1 of ITS2 in I1D1
1451                    //
1452                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1453                    sub5node->SetLineColor(kColorITS);                   
1454                    fNodes->Add(sub5node);
1455                    sub4node->cd();   
1456                 fNodes->Add(sub4node);  
1457              sub3node->cd(); 
1458              fNodes->Add(sub3node);
1459              sub2node->cd(); 
1460              //
1461              // Place copy #2 of I1D7 in I20B
1462              //
1463              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1464              sub3node->SetLineColor(kColorITS);
1465              sub3node->SetVisibility(0);
1466              sub3node->cd();
1467                 //
1468                 // Place copy #1 of I1D1 in I1D7
1469                 //
1470                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1471                 sub4node->SetLineColor(kColorITS);
1472                 sub4node->SetVisibility(0);
1473                 sub4node->cd();             
1474                    //
1475                    // Place copy #1 of ITS2 in I1D1
1476                    //
1477                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1478                    sub5node->SetLineColor(kColorITS);                   
1479                    fNodes->Add(sub5node);
1480                    sub4node->cd();   
1481                 fNodes->Add(sub4node);  
1482              sub3node->cd(); 
1483              fNodes->Add(sub3node);
1484              sub2node->cd(); 
1485              //
1486              // Place copy #3 of I1D7 in I20B
1487              //
1488              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1489              sub3node->SetLineColor(kColorITS);
1490              sub3node->SetVisibility(0);
1491              sub3node->cd();
1492                 //
1493                 // Place copy #1 of I1D1 in I1D7
1494                 //
1495                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1496                 sub4node->SetLineColor(kColorITS);
1497                 sub4node->SetVisibility(0);
1498                 sub4node->cd();             
1499                    //
1500                    // Place copy #1 of ITS2 in I1D1
1501                    //
1502                    sub5node = new TNode("ITS2","ITS2","ITS2",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 #4 of I1D7 in I20B
1512              //
1513              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1514              sub3node->SetLineColor(kColorITS);
1515              sub3node->SetVisibility(0);
1516              sub3node->cd();
1517                 //
1518                 // Place copy #1 of I1D1 in I1D7
1519                 //
1520                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1521                 sub4node->SetLineColor(kColorITS);
1522                 sub4node->SetVisibility(0);
1523                 sub4node->cd();             
1524                    //
1525                    // Place copy #1 of ITS2 in I1D1
1526                    //
1527                    sub5node = new TNode("ITS2","ITS2","ITS2",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           fNodes->Add(sub2node);        
1536           sub1node->cd(); 
1537        fNodes->Add(sub1node);
1538        node->cd(); 
1539        //
1540        // Place copy #2 of I12B in IT12
1541        //
1542        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"itsrot245");
1543        sub1node->SetLineColor(kColorITS);
1544        sub1node->SetVisibility(0);
1545        sub1node->cd();    
1546           //
1547           // Place copy #1 of I10B in I12B
1548           //
1549           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
1550           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
1551           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
1552           sub2node->SetLineColor(kColorITS);
1553           sub2node->SetVisibility(0);
1554           sub2node->cd();
1555              //
1556              // Place copy #1 of I107 in I10B
1557              //
1558              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
1559              sub3node->SetLineColor(kColorITS);
1560              sub3node->SetVisibility(0);
1561              sub3node->cd();
1562                 //
1563                 // Place copy #1 of I101 in I107
1564                 //
1565                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1566                 sub4node->SetLineColor(kColorITS);
1567                 sub4node->SetVisibility(0);
1568                 sub4node->cd();
1569                    //               
1570                    // Place copy #1 of ITS1 in I101
1571                    //
1572                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1573                    sub5node->SetLineColor(kColorITS);                   
1574                    fNodes->Add(sub5node);
1575                    sub4node->cd();   
1576                 fNodes->Add(sub4node);  
1577              sub3node->cd(); 
1578              fNodes->Add(sub3node);
1579              sub2node->cd(); 
1580              //
1581              // Place copy #2 of I107 in I10B
1582              //
1583              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
1584              sub3node->SetLineColor(kColorITS);
1585              sub3node->SetVisibility(0);
1586              sub3node->cd();
1587                 //
1588                 // Place copy #1 of I101 in I107
1589                 //
1590                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1591                 sub4node->SetLineColor(kColorITS);
1592                 sub4node->SetVisibility(0);
1593                 sub4node->cd();             
1594                    //
1595                    // Place copy #1 of ITS1 in I101
1596                    //
1597                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1598                    sub5node->SetLineColor(kColorITS);                   
1599                    fNodes->Add(sub5node);
1600                    sub4node->cd();   
1601                 fNodes->Add(sub4node);  
1602              sub3node->cd(); 
1603              fNodes->Add(sub3node);
1604              sub2node->cd(); 
1605              //
1606              // Place copy #3 of I107 in I10B
1607              //
1608              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
1609              sub3node->SetLineColor(kColorITS);
1610              sub3node->SetVisibility(0);
1611              sub3node->cd();
1612                 //
1613                 // Place copy #1 of I101 in I107
1614                 //
1615                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1616                 sub4node->SetLineColor(kColorITS);
1617                 sub4node->SetVisibility(0);
1618                 sub4node->cd();             
1619                    //
1620                    // Place copy #1 of ITS1 in I101
1621                    //
1622                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1623                    sub5node->SetLineColor(kColorITS);                   
1624                    fNodes->Add(sub5node);
1625                    sub4node->cd();   
1626                 fNodes->Add(sub4node);  
1627              sub3node->cd(); 
1628              fNodes->Add(sub3node);
1629              sub2node->cd(); 
1630              //
1631              // Place copy #4 of I107 in I10B
1632              //
1633              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
1634              sub3node->SetLineColor(kColorITS);
1635              sub3node->SetVisibility(0);
1636              sub3node->cd();
1637                 //
1638                 // Place copy #1 of I101 in I107
1639                 //
1640                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1641                 sub4node->SetLineColor(kColorITS);
1642                 sub4node->SetVisibility(0);
1643                 sub4node->cd();             
1644                    //
1645                    // Place copy #1 of ITS1 in I101
1646                    //
1647                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1648                    sub5node->SetLineColor(kColorITS);                   
1649                    fNodes->Add(sub5node);
1650                    sub4node->cd();   
1651                 fNodes->Add(sub4node);  
1652              sub3node->cd(); 
1653              fNodes->Add(sub3node);
1654              sub2node->cd(); 
1655           fNodes->Add(sub2node);        
1656           sub1node->cd(); 
1657           //
1658           // Place copy #2 of I10B in I12B
1659           //
1660           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
1661           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
1662           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
1663           sub2node->SetLineColor(kColorITS);
1664           sub2node->SetVisibility(0);
1665           sub2node->cd();
1666              //
1667              // Place copy #1 of I107 in I10B
1668              //
1669              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
1670              sub3node->SetLineColor(kColorITS);
1671              sub3node->SetVisibility(0);
1672              sub3node->cd();
1673                 //
1674                 // Place copy #1 of I101 in I107
1675                 //
1676                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1677                 sub4node->SetLineColor(kColorITS);
1678                 sub4node->SetVisibility(0);
1679                 sub4node->cd();
1680                    //               
1681                    // Place copy #1 of ITS1 in I101
1682                    //
1683                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1684                    sub5node->SetLineColor(kColorITS);                   
1685                    fNodes->Add(sub5node);
1686                    sub4node->cd();   
1687                 fNodes->Add(sub4node);  
1688              sub3node->cd(); 
1689              fNodes->Add(sub3node);
1690              sub2node->cd(); 
1691              //
1692              // Place copy #2 of I107 in I10B
1693              //
1694              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
1695              sub3node->SetLineColor(kColorITS);
1696              sub3node->SetVisibility(0);
1697              sub3node->cd();
1698                 //
1699                 // Place copy #1 of I101 in I107
1700                 //
1701                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1702                 sub4node->SetLineColor(kColorITS);
1703                 sub4node->SetVisibility(0);
1704                 sub4node->cd();             
1705                    //
1706                    // Place copy #1 of ITS1 in I101
1707                    //
1708                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1709                    sub5node->SetLineColor(kColorITS);                   
1710                    fNodes->Add(sub5node);
1711                    sub4node->cd();   
1712                 fNodes->Add(sub4node);  
1713              sub3node->cd(); 
1714              fNodes->Add(sub3node);
1715              sub2node->cd(); 
1716              //
1717              // Place copy #3 of I107 in I10B
1718              //
1719              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
1720              sub3node->SetLineColor(kColorITS);
1721              sub3node->SetVisibility(0);
1722              sub3node->cd();
1723                 //
1724                 // Place copy #1 of I101 in I107
1725                 //
1726                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1727                 sub4node->SetLineColor(kColorITS);
1728                 sub4node->SetVisibility(0);
1729                 sub4node->cd();             
1730                    //
1731                    // Place copy #1 of ITS1 in I101
1732                    //
1733                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1734                    sub5node->SetLineColor(kColorITS);                   
1735                    fNodes->Add(sub5node);
1736                    sub4node->cd();   
1737                 fNodes->Add(sub4node);  
1738              sub3node->cd(); 
1739              fNodes->Add(sub3node);
1740              sub2node->cd(); 
1741              //
1742              // Place copy #4 of I107 in I10B
1743              //
1744              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
1745              sub3node->SetLineColor(kColorITS);
1746              sub3node->SetVisibility(0);
1747              sub3node->cd();
1748                 //
1749                 // Place copy #1 of I101 in I107
1750                 //
1751                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
1752                 sub4node->SetLineColor(kColorITS);
1753                 sub4node->SetVisibility(0);
1754                 sub4node->cd();             
1755                    //
1756                    // Place copy #1 of ITS1 in I101
1757                    //
1758                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
1759                    sub5node->SetLineColor(kColorITS);                   
1760                    fNodes->Add(sub5node);
1761                    sub4node->cd();   
1762                 fNodes->Add(sub4node);  
1763              sub3node->cd(); 
1764              fNodes->Add(sub3node);
1765              sub2node->cd(); 
1766           fNodes->Add(sub2node);        
1767           sub1node->cd(); 
1768           //
1769           // Place copy #1 of I20B in I12B
1770           //
1771           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
1772           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
1773           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
1774           sub2node->SetLineColor(kColorITS);
1775           sub2node->SetVisibility(0);
1776           sub2node->cd();
1777              //
1778              // Place copy #1 of I1D7 in I20B
1779              //
1780              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1781              sub3node->SetLineColor(kColorITS);
1782              sub3node->SetVisibility(0);
1783              sub3node->cd();
1784                 //
1785                 // Place copy #1 of I1D1 in I1D7
1786                 //
1787                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1788                 sub4node->SetLineColor(kColorITS);
1789                 sub4node->SetVisibility(0);
1790                 sub4node->cd();
1791                    //               
1792                    // Place copy #1 of ITS2 in I1D1
1793                    //
1794                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1795                    sub5node->SetLineColor(kColorITS);                   
1796                    fNodes->Add(sub5node);
1797                    sub4node->cd();   
1798                 fNodes->Add(sub4node);  
1799              sub3node->cd(); 
1800              fNodes->Add(sub3node);
1801              sub2node->cd(); 
1802              //
1803              // Place copy #2 of I1D7 in I20B
1804              //
1805              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1806              sub3node->SetLineColor(kColorITS);
1807              sub3node->SetVisibility(0);
1808              sub3node->cd();
1809                 //
1810                 // Place copy #1 of I1D1 in I1D7
1811                 //
1812                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1813                 sub4node->SetLineColor(kColorITS);
1814                 sub4node->SetVisibility(0);
1815                 sub4node->cd();             
1816                    //
1817                    // Place copy #1 of ITS2 in I1D1
1818                    //
1819                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1820                    sub5node->SetLineColor(kColorITS);                   
1821                    fNodes->Add(sub5node);
1822                    sub4node->cd();   
1823                 fNodes->Add(sub4node);  
1824              sub3node->cd(); 
1825              fNodes->Add(sub3node);
1826              sub2node->cd(); 
1827              //
1828              // Place copy #3 of I1D7 in I20B
1829              //
1830              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1831              sub3node->SetLineColor(kColorITS);
1832              sub3node->SetVisibility(0);
1833              sub3node->cd();
1834                 //
1835                 // Place copy #1 of I1D1 in I1D7
1836                 //
1837                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1838                 sub4node->SetLineColor(kColorITS);
1839                 sub4node->SetVisibility(0);
1840                 sub4node->cd();             
1841                    //
1842                    // Place copy #1 of ITS2 in I1D1
1843                    //
1844                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1845                    sub5node->SetLineColor(kColorITS);                   
1846                    fNodes->Add(sub5node);
1847                    sub4node->cd();   
1848                 fNodes->Add(sub4node);  
1849              sub3node->cd(); 
1850              fNodes->Add(sub3node);
1851              sub2node->cd(); 
1852              //
1853              // Place copy #4 of I1D7 in I20B
1854              //
1855              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1856              sub3node->SetLineColor(kColorITS);
1857              sub3node->SetVisibility(0);
1858              sub3node->cd();
1859                 //
1860                 // Place copy #1 of I1D1 in I1D7
1861                 //
1862                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1863                 sub4node->SetLineColor(kColorITS);
1864                 sub4node->SetVisibility(0);
1865                 sub4node->cd();             
1866                    //
1867                    // Place copy #1 of ITS2 in I1D1
1868                    //
1869                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1870                    sub5node->SetLineColor(kColorITS);                   
1871                    fNodes->Add(sub5node);
1872                    sub4node->cd();   
1873                 fNodes->Add(sub4node);  
1874              sub3node->cd(); 
1875              fNodes->Add(sub3node);
1876              sub2node->cd(); 
1877           fNodes->Add(sub2node);        
1878           sub1node->cd(); 
1879           //
1880           // Place copy #2 of I20B in I12B
1881           //
1882           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(49.*TMath::Pi()/180.);  
1883           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(49.*TMath::Pi()/180.);
1884           sub2node = new TNode("I20B","I20B","I20B",1.9612+deltax,6.9062+deltay,0.,"itsrot241");
1885           sub2node->SetLineColor(kColorITS);
1886           sub2node->SetVisibility(0);
1887           sub2node->cd();
1888              //
1889              // Place copy #1 of I1D7 in I20B
1890              //
1891              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
1892              sub3node->SetLineColor(kColorITS);
1893              sub3node->SetVisibility(0);
1894              sub3node->cd();
1895                 //
1896                 // Place copy #1 of I1D1 in I1D7
1897                 //
1898                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1899                 sub4node->SetLineColor(kColorITS);
1900                 sub4node->SetVisibility(0);
1901                 sub4node->cd();
1902                    //               
1903                    // Place copy #1 of ITS2 in I1D1
1904                    //
1905                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1906                    sub5node->SetLineColor(kColorITS);                   
1907                    fNodes->Add(sub5node);
1908                    sub4node->cd();   
1909                 fNodes->Add(sub4node);  
1910              sub3node->cd(); 
1911              fNodes->Add(sub3node);
1912              sub2node->cd(); 
1913              //
1914              // Place copy #2 of I1D7 in I20B
1915              //
1916              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
1917              sub3node->SetLineColor(kColorITS);
1918              sub3node->SetVisibility(0);
1919              sub3node->cd();
1920                 //
1921                 // Place copy #1 of I1D1 in I1D7
1922                 //
1923                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1924                 sub4node->SetLineColor(kColorITS);
1925                 sub4node->SetVisibility(0);
1926                 sub4node->cd();             
1927                    //
1928                    // Place copy #1 of ITS2 in I1D1
1929                    //
1930                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1931                    sub5node->SetLineColor(kColorITS);                   
1932                    fNodes->Add(sub5node);
1933                    sub4node->cd();   
1934                 fNodes->Add(sub4node);  
1935              sub3node->cd(); 
1936              fNodes->Add(sub3node);
1937              sub2node->cd(); 
1938              //
1939              // Place copy #3 of I1D7 in I20B
1940              //
1941              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
1942              sub3node->SetLineColor(kColorITS);
1943              sub3node->SetVisibility(0);
1944              sub3node->cd();
1945                 //
1946                 // Place copy #1 of I1D1 in I1D7
1947                 //
1948                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1949                 sub4node->SetLineColor(kColorITS);
1950                 sub4node->SetVisibility(0);
1951                 sub4node->cd();             
1952                    //
1953                    // Place copy #1 of ITS2 in I1D1
1954                    //
1955                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1956                    sub5node->SetLineColor(kColorITS);                   
1957                    fNodes->Add(sub5node);
1958                    sub4node->cd();   
1959                 fNodes->Add(sub4node);  
1960              sub3node->cd(); 
1961              fNodes->Add(sub3node);
1962              sub2node->cd(); 
1963              //
1964              // Place copy #4 of I1D7 in I20B
1965              //
1966              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
1967              sub3node->SetLineColor(kColorITS);
1968              sub3node->SetVisibility(0);
1969              sub3node->cd();
1970                 //
1971                 // Place copy #1 of I1D1 in I1D7
1972                 //
1973                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
1974                 sub4node->SetLineColor(kColorITS);
1975                 sub4node->SetVisibility(0);
1976                 sub4node->cd();             
1977                    //
1978                    // Place copy #1 of ITS2 in I1D1
1979                    //
1980                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
1981                    sub5node->SetLineColor(kColorITS);                   
1982                    fNodes->Add(sub5node);
1983                    sub4node->cd();   
1984                 fNodes->Add(sub4node);  
1985              sub3node->cd(); 
1986              fNodes->Add(sub3node);
1987              sub2node->cd(); 
1988           fNodes->Add(sub2node);        
1989           sub1node->cd(); 
1990           //
1991           // Place copy #3 of I20B in I12B
1992           //
1993           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(58.*TMath::Pi()/180.);  
1994           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(58.*TMath::Pi()/180.);
1995           sub2node = new TNode("I20B","I20B","I20B",0.8567+deltax,7.1279+deltay,0.,"itsrot242");
1996           sub2node->SetLineColor(kColorITS);
1997           sub2node->SetVisibility(0);
1998           sub2node->cd();
1999              //
2000              // Place copy #1 of I1D7 in I20B
2001              //
2002              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2003              sub3node->SetLineColor(kColorITS);
2004              sub3node->SetVisibility(0);
2005              sub3node->cd();
2006                 //
2007                 // Place copy #1 of I1D1 in I1D7
2008                 //
2009                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2010                 sub4node->SetLineColor(kColorITS);
2011                 sub4node->SetVisibility(0);
2012                 sub4node->cd();
2013                    //               
2014                    // Place copy #1 of ITS2 in I1D1
2015                    //
2016                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2017                    sub5node->SetLineColor(kColorITS);                   
2018                    fNodes->Add(sub5node);
2019                    sub4node->cd();   
2020                 fNodes->Add(sub4node);  
2021              sub3node->cd(); 
2022              fNodes->Add(sub3node);
2023              sub2node->cd(); 
2024              //
2025              // Place copy #2 of I1D7 in I20B
2026              //
2027              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2028              sub3node->SetLineColor(kColorITS);
2029              sub3node->SetVisibility(0);
2030              sub3node->cd();
2031                 //
2032                 // Place copy #1 of I1D1 in I1D7
2033                 //
2034                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2035                 sub4node->SetLineColor(kColorITS);
2036                 sub4node->SetVisibility(0);
2037                 sub4node->cd();             
2038                    //
2039                    // Place copy #1 of ITS2 in I1D1
2040                    //
2041                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2042                    sub5node->SetLineColor(kColorITS);                   
2043                    fNodes->Add(sub5node);
2044                    sub4node->cd();   
2045                 fNodes->Add(sub4node);  
2046              sub3node->cd(); 
2047              fNodes->Add(sub3node);
2048              sub2node->cd(); 
2049              //
2050              // Place copy #3 of I1D7 in I20B
2051              //
2052              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2053              sub3node->SetLineColor(kColorITS);
2054              sub3node->SetVisibility(0);
2055              sub3node->cd();
2056                 //
2057                 // Place copy #1 of I1D1 in I1D7
2058                 //
2059                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2060                 sub4node->SetLineColor(kColorITS);
2061                 sub4node->SetVisibility(0);
2062                 sub4node->cd();             
2063                    //
2064                    // Place copy #1 of ITS2 in I1D1
2065                    //
2066                    sub5node = new TNode("ITS2","ITS2","ITS2",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 #4 of I1D7 in I20B
2076              //
2077              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2078              sub3node->SetLineColor(kColorITS);
2079              sub3node->SetVisibility(0);
2080              sub3node->cd();
2081                 //
2082                 // Place copy #1 of I1D1 in I1D7
2083                 //
2084                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2085                 sub4node->SetLineColor(kColorITS);
2086                 sub4node->SetVisibility(0);
2087                 sub4node->cd();             
2088                    //
2089                    // Place copy #1 of ITS2 in I1D1
2090                    //
2091                    sub5node = new TNode("ITS2","ITS2","ITS2",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           fNodes->Add(sub2node);        
2100           sub1node->cd(); 
2101           //
2102           // Place copy #4 of I20B in I12B
2103           //
2104           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(67.*TMath::Pi()/180.);  
2105           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(67.*TMath::Pi()/180.);
2106           sub2node = new TNode("I20B","I20B","I20B",-0.2689+deltax,7.1742+deltay,0.,"itsrot243");
2107           sub2node->SetLineColor(kColorITS);
2108           sub2node->SetVisibility(0);
2109           sub2node->cd();
2110              //
2111              // Place copy #1 of I1D7 in I20B
2112              //
2113              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2114              sub3node->SetLineColor(kColorITS);
2115              sub3node->SetVisibility(0);
2116              sub3node->cd();
2117                 //
2118                 // Place copy #1 of I1D1 in I1D7
2119                 //
2120                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2121                 sub4node->SetLineColor(kColorITS);
2122                 sub4node->SetVisibility(0);
2123                 sub4node->cd();
2124                    //               
2125                    // Place copy #1 of ITS2 in I1D1
2126                    //
2127                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2128                    sub5node->SetLineColor(kColorITS);                   
2129                    fNodes->Add(sub5node);
2130                    sub4node->cd();   
2131                 fNodes->Add(sub4node);  
2132              sub3node->cd(); 
2133              fNodes->Add(sub3node);
2134              sub2node->cd(); 
2135              //
2136              // Place copy #2 of I1D7 in I20B
2137              //
2138              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2139              sub3node->SetLineColor(kColorITS);
2140              sub3node->SetVisibility(0);
2141              sub3node->cd();
2142                 //
2143                 // Place copy #1 of I1D1 in I1D7
2144                 //
2145                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2146                 sub4node->SetLineColor(kColorITS);
2147                 sub4node->SetVisibility(0);
2148                 sub4node->cd();             
2149                    //
2150                    // Place copy #1 of ITS2 in I1D1
2151                    //
2152                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2153                    sub5node->SetLineColor(kColorITS);                   
2154                    fNodes->Add(sub5node);
2155                    sub4node->cd();   
2156                 fNodes->Add(sub4node);  
2157              sub3node->cd(); 
2158              fNodes->Add(sub3node);
2159              sub2node->cd(); 
2160              //
2161              // Place copy #3 of I1D7 in I20B
2162              //
2163              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2164              sub3node->SetLineColor(kColorITS);
2165              sub3node->SetVisibility(0);
2166              sub3node->cd();
2167                 //
2168                 // Place copy #1 of I1D1 in I1D7
2169                 //
2170                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2171                 sub4node->SetLineColor(kColorITS);
2172                 sub4node->SetVisibility(0);
2173                 sub4node->cd();             
2174                    //
2175                    // Place copy #1 of ITS2 in I1D1
2176                    //
2177                    sub5node = new TNode("ITS2","ITS2","ITS2",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 #4 of I1D7 in I20B
2187              //
2188              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2189              sub3node->SetLineColor(kColorITS);
2190              sub3node->SetVisibility(0);
2191              sub3node->cd();
2192                 //
2193                 // Place copy #1 of I1D1 in I1D7
2194                 //
2195                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2196                 sub4node->SetLineColor(kColorITS);
2197                 sub4node->SetVisibility(0);
2198                 sub4node->cd();             
2199                    //
2200                    // Place copy #1 of ITS2 in I1D1
2201                    //
2202                    sub5node = new TNode("ITS2","ITS2","ITS2",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           fNodes->Add(sub2node);        
2211           sub1node->cd(); 
2212        fNodes->Add(sub1node);
2213        node->cd(); 
2214        //
2215        // Place copy #3 of I12B in IT12
2216        //
2217        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"itsrot234");
2218        sub1node->SetLineColor(kColorITS);
2219        sub1node->SetVisibility(0);
2220        sub1node->cd();    
2221           //
2222           // Place copy #1 of I10B in I12B
2223           //
2224           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
2225           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
2226           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
2227           sub2node->SetLineColor(kColorITS);
2228           sub2node->SetVisibility(0);
2229           sub2node->cd();
2230              //
2231              // Place copy #1 of I107 in I10B
2232              //
2233              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
2234              sub3node->SetLineColor(kColorITS);
2235              sub3node->SetVisibility(0);
2236              sub3node->cd();
2237                 //
2238                 // Place copy #1 of I101 in I107
2239                 //
2240                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2241                 sub4node->SetLineColor(kColorITS);
2242                 sub4node->SetVisibility(0);
2243                 sub4node->cd();
2244                    //               
2245                    // Place copy #1 of ITS1 in I101
2246                    //
2247                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2248                    sub5node->SetLineColor(kColorITS);                   
2249                    fNodes->Add(sub5node);
2250                    sub4node->cd();   
2251                 fNodes->Add(sub4node);  
2252              sub3node->cd(); 
2253              fNodes->Add(sub3node);
2254              sub2node->cd(); 
2255              //
2256              // Place copy #2 of I107 in I10B
2257              //
2258              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
2259              sub3node->SetLineColor(kColorITS);
2260              sub3node->SetVisibility(0);
2261              sub3node->cd();
2262                 //
2263                 // Place copy #1 of I101 in I107
2264                 //
2265                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2266                 sub4node->SetLineColor(kColorITS);
2267                 sub4node->SetVisibility(0);
2268                 sub4node->cd();             
2269                    //
2270                    // Place copy #1 of ITS1 in I101
2271                    //
2272                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2273                    sub5node->SetLineColor(kColorITS);                   
2274                    fNodes->Add(sub5node);
2275                    sub4node->cd();   
2276                 fNodes->Add(sub4node);  
2277              sub3node->cd(); 
2278              fNodes->Add(sub3node);
2279              sub2node->cd(); 
2280              //
2281              // Place copy #3 of I107 in I10B
2282              //
2283              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
2284              sub3node->SetLineColor(kColorITS);
2285              sub3node->SetVisibility(0);
2286              sub3node->cd();
2287                 //
2288                 // Place copy #1 of I101 in I107
2289                 //
2290                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2291                 sub4node->SetLineColor(kColorITS);
2292                 sub4node->SetVisibility(0);
2293                 sub4node->cd();             
2294                    //
2295                    // Place copy #1 of ITS1 in I101
2296                    //
2297                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2298                    sub5node->SetLineColor(kColorITS);                   
2299                    fNodes->Add(sub5node);
2300                    sub4node->cd();   
2301                 fNodes->Add(sub4node);  
2302              sub3node->cd(); 
2303              fNodes->Add(sub3node);
2304              sub2node->cd(); 
2305              //
2306              // Place copy #4 of I107 in I10B
2307              //
2308              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
2309              sub3node->SetLineColor(kColorITS);
2310              sub3node->SetVisibility(0);
2311              sub3node->cd();
2312                 //
2313                 // Place copy #1 of I101 in I107
2314                 //
2315                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2316                 sub4node->SetLineColor(kColorITS);
2317                 sub4node->SetVisibility(0);
2318                 sub4node->cd();             
2319                    //
2320                    // Place copy #1 of ITS1 in I101
2321                    //
2322                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2323                    sub5node->SetLineColor(kColorITS);                   
2324                    fNodes->Add(sub5node);
2325                    sub4node->cd();   
2326                 fNodes->Add(sub4node);  
2327              sub3node->cd(); 
2328              fNodes->Add(sub3node);
2329              sub2node->cd(); 
2330           fNodes->Add(sub2node);        
2331           sub1node->cd(); 
2332           //
2333           // Place copy #2 of I10B in I12B
2334           //
2335           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
2336           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
2337           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
2338           sub2node->SetLineColor(kColorITS);
2339           sub2node->SetVisibility(0);
2340           sub2node->cd();
2341              //
2342              // Place copy #1 of I107 in I10B
2343              //
2344              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
2345              sub3node->SetLineColor(kColorITS);
2346              sub3node->SetVisibility(0);
2347              sub3node->cd();
2348                 //
2349                 // Place copy #1 of I101 in I107
2350                 //
2351                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2352                 sub4node->SetLineColor(kColorITS);
2353                 sub4node->SetVisibility(0);
2354                 sub4node->cd();
2355                    //               
2356                    // Place copy #1 of ITS1 in I101
2357                    //
2358                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2359                    sub5node->SetLineColor(kColorITS);                   
2360                    fNodes->Add(sub5node);
2361                    sub4node->cd();   
2362                 fNodes->Add(sub4node);  
2363              sub3node->cd(); 
2364              fNodes->Add(sub3node);
2365              sub2node->cd(); 
2366              //
2367              // Place copy #2 of I107 in I10B
2368              //
2369              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
2370              sub3node->SetLineColor(kColorITS);
2371              sub3node->SetVisibility(0);
2372              sub3node->cd();
2373                 //
2374                 // Place copy #1 of I101 in I107
2375                 //
2376                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2377                 sub4node->SetLineColor(kColorITS);
2378                 sub4node->SetVisibility(0);
2379                 sub4node->cd();             
2380                    //
2381                    // Place copy #1 of ITS1 in I101
2382                    //
2383                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2384                    sub5node->SetLineColor(kColorITS);                   
2385                    fNodes->Add(sub5node);
2386                    sub4node->cd();   
2387                 fNodes->Add(sub4node);  
2388              sub3node->cd(); 
2389              fNodes->Add(sub3node);
2390              sub2node->cd(); 
2391              //
2392              // Place copy #3 of I107 in I10B
2393              //
2394              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
2395              sub3node->SetLineColor(kColorITS);
2396              sub3node->SetVisibility(0);
2397              sub3node->cd();
2398                 //
2399                 // Place copy #1 of I101 in I107
2400                 //
2401                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2402                 sub4node->SetLineColor(kColorITS);
2403                 sub4node->SetVisibility(0);
2404                 sub4node->cd();             
2405                    //
2406                    // Place copy #1 of ITS1 in I101
2407                    //
2408                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2409                    sub5node->SetLineColor(kColorITS);                   
2410                    fNodes->Add(sub5node);
2411                    sub4node->cd();   
2412                 fNodes->Add(sub4node);  
2413              sub3node->cd(); 
2414              fNodes->Add(sub3node);
2415              sub2node->cd(); 
2416              //
2417              // Place copy #4 of I107 in I10B
2418              //
2419              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
2420              sub3node->SetLineColor(kColorITS);
2421              sub3node->SetVisibility(0);
2422              sub3node->cd();
2423                 //
2424                 // Place copy #1 of I101 in I107
2425                 //
2426                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2427                 sub4node->SetLineColor(kColorITS);
2428                 sub4node->SetVisibility(0);
2429                 sub4node->cd();             
2430                    //
2431                    // Place copy #1 of ITS1 in I101
2432                    //
2433                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2434                    sub5node->SetLineColor(kColorITS);                   
2435                    fNodes->Add(sub5node);
2436                    sub4node->cd();   
2437                 fNodes->Add(sub4node);  
2438              sub3node->cd(); 
2439              fNodes->Add(sub3node);
2440              sub2node->cd(); 
2441           fNodes->Add(sub2node);        
2442           sub1node->cd(); 
2443           //
2444           // Place copy #1 of I20B in I12B
2445           //
2446           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
2447           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
2448           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
2449           sub2node->SetLineColor(kColorITS);
2450           sub2node->SetVisibility(0);
2451           sub2node->cd();
2452              //
2453              // Place copy #1 of I1D7 in I20B
2454              //
2455              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2456              sub3node->SetLineColor(kColorITS);
2457              sub3node->SetVisibility(0);
2458              sub3node->cd();
2459                 //
2460                 // Place copy #1 of I1D1 in I1D7
2461                 //
2462                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2463                 sub4node->SetLineColor(kColorITS);
2464                 sub4node->SetVisibility(0);
2465                 sub4node->cd();
2466                    //               
2467                    // Place copy #1 of ITS2 in I1D1
2468                    //
2469                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2470                    sub5node->SetLineColor(kColorITS);                   
2471                    fNodes->Add(sub5node);
2472                    sub4node->cd();   
2473                 fNodes->Add(sub4node);  
2474              sub3node->cd(); 
2475              fNodes->Add(sub3node);
2476              sub2node->cd(); 
2477              //
2478              // Place copy #2 of I1D7 in I20B
2479              //
2480              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2481              sub3node->SetLineColor(kColorITS);
2482              sub3node->SetVisibility(0);
2483              sub3node->cd();
2484                 //
2485                 // Place copy #1 of I1D1 in I1D7
2486                 //
2487                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2488                 sub4node->SetLineColor(kColorITS);
2489                 sub4node->SetVisibility(0);
2490                 sub4node->cd();             
2491                    //
2492                    // Place copy #1 of ITS2 in I1D1
2493                    //
2494                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2495                    sub5node->SetLineColor(kColorITS);                   
2496                    fNodes->Add(sub5node);
2497                    sub4node->cd();   
2498                 fNodes->Add(sub4node);  
2499              sub3node->cd(); 
2500              fNodes->Add(sub3node);
2501              sub2node->cd(); 
2502              //
2503              // Place copy #3 of I1D7 in I20B
2504              //
2505              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2506              sub3node->SetLineColor(kColorITS);
2507              sub3node->SetVisibility(0);
2508              sub3node->cd();
2509                 //
2510                 // Place copy #1 of I1D1 in I1D7
2511                 //
2512                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2513                 sub4node->SetLineColor(kColorITS);
2514                 sub4node->SetVisibility(0);
2515                 sub4node->cd();             
2516                    //
2517                    // Place copy #1 of ITS2 in I1D1
2518                    //
2519                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2520                    sub5node->SetLineColor(kColorITS);                   
2521                    fNodes->Add(sub5node);
2522                    sub4node->cd();   
2523                 fNodes->Add(sub4node);  
2524              sub3node->cd(); 
2525              fNodes->Add(sub3node);
2526              sub2node->cd(); 
2527              //
2528              // Place copy #4 of I1D7 in I20B
2529              //
2530              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2531              sub3node->SetLineColor(kColorITS);
2532              sub3node->SetVisibility(0);
2533              sub3node->cd();
2534                 //
2535                 // Place copy #1 of I1D1 in I1D7
2536                 //
2537                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2538                 sub4node->SetLineColor(kColorITS);
2539                 sub4node->SetVisibility(0);
2540                 sub4node->cd();             
2541                    //
2542                    // Place copy #1 of ITS2 in I1D1
2543                    //
2544                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2545                    sub5node->SetLineColor(kColorITS);                   
2546                    fNodes->Add(sub5node);
2547                    sub4node->cd();   
2548                 fNodes->Add(sub4node);  
2549              sub3node->cd(); 
2550              fNodes->Add(sub3node);
2551              sub2node->cd(); 
2552           fNodes->Add(sub2node);        
2553           sub1node->cd(); 
2554           //
2555           // Place copy #2 of I20B in I12B
2556           //
2557           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(49.*TMath::Pi()/180.);  
2558           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(49.*TMath::Pi()/180.);
2559           sub2node = new TNode("I20B","I20B","I20B",1.9612+deltax,6.9062+deltay,0.,"itsrot241");
2560           sub2node->SetLineColor(kColorITS);
2561           sub2node->SetVisibility(0);
2562           sub2node->cd();
2563              //
2564              // Place copy #1 of I1D7 in I20B
2565              //
2566              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2567              sub3node->SetLineColor(kColorITS);
2568              sub3node->SetVisibility(0);
2569              sub3node->cd();
2570                 //
2571                 // Place copy #1 of I1D1 in I1D7
2572                 //
2573                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2574                 sub4node->SetLineColor(kColorITS);
2575                 sub4node->SetVisibility(0);
2576                 sub4node->cd();
2577                    //               
2578                    // Place copy #1 of ITS2 in I1D1
2579                    //
2580                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2581                    sub5node->SetLineColor(kColorITS);                   
2582                    fNodes->Add(sub5node);
2583                    sub4node->cd();   
2584                 fNodes->Add(sub4node);  
2585              sub3node->cd(); 
2586              fNodes->Add(sub3node);
2587              sub2node->cd(); 
2588              //
2589              // Place copy #2 of I1D7 in I20B
2590              //
2591              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2592              sub3node->SetLineColor(kColorITS);
2593              sub3node->SetVisibility(0);
2594              sub3node->cd();
2595                 //
2596                 // Place copy #1 of I1D1 in I1D7
2597                 //
2598                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2599                 sub4node->SetLineColor(kColorITS);
2600                 sub4node->SetVisibility(0);
2601                 sub4node->cd();             
2602                    //
2603                    // Place copy #1 of ITS2 in I1D1
2604                    //
2605                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2606                    sub5node->SetLineColor(kColorITS);                   
2607                    fNodes->Add(sub5node);
2608                    sub4node->cd();   
2609                 fNodes->Add(sub4node);  
2610              sub3node->cd(); 
2611              fNodes->Add(sub3node);
2612              sub2node->cd(); 
2613              //
2614              // Place copy #3 of I1D7 in I20B
2615              //
2616              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2617              sub3node->SetLineColor(kColorITS);
2618              sub3node->SetVisibility(0);
2619              sub3node->cd();
2620                 //
2621                 // Place copy #1 of I1D1 in I1D7
2622                 //
2623                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2624                 sub4node->SetLineColor(kColorITS);
2625                 sub4node->SetVisibility(0);
2626                 sub4node->cd();             
2627                    //
2628                    // Place copy #1 of ITS2 in I1D1
2629                    //
2630                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2631                    sub5node->SetLineColor(kColorITS);                   
2632                    fNodes->Add(sub5node);
2633                    sub4node->cd();   
2634                 fNodes->Add(sub4node);  
2635              sub3node->cd(); 
2636              fNodes->Add(sub3node);
2637              sub2node->cd(); 
2638              //
2639              // Place copy #4 of I1D7 in I20B
2640              //
2641              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2642              sub3node->SetLineColor(kColorITS);
2643              sub3node->SetVisibility(0);
2644              sub3node->cd();
2645                 //
2646                 // Place copy #1 of I1D1 in I1D7
2647                 //
2648                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2649                 sub4node->SetLineColor(kColorITS);
2650                 sub4node->SetVisibility(0);
2651                 sub4node->cd();             
2652                    //
2653                    // Place copy #1 of ITS2 in I1D1
2654                    //
2655                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2656                    sub5node->SetLineColor(kColorITS);                   
2657                    fNodes->Add(sub5node);
2658                    sub4node->cd();   
2659                 fNodes->Add(sub4node);  
2660              sub3node->cd(); 
2661              fNodes->Add(sub3node);
2662              sub2node->cd(); 
2663           fNodes->Add(sub2node);        
2664           sub1node->cd(); 
2665           //
2666           // Place copy #3 of I20B in I12B
2667           //
2668           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(58.*TMath::Pi()/180.);  
2669           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(58.*TMath::Pi()/180.);
2670           sub2node = new TNode("I20B","I20B","I20B",0.8567+deltax,7.1279+deltay,0.,"itsrot242");
2671           sub2node->SetLineColor(kColorITS);
2672           sub2node->SetVisibility(0);
2673           sub2node->cd();
2674              //
2675              // Place copy #1 of I1D7 in I20B
2676              //
2677              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2678              sub3node->SetLineColor(kColorITS);
2679              sub3node->SetVisibility(0);
2680              sub3node->cd();
2681                 //
2682                 // Place copy #1 of I1D1 in I1D7
2683                 //
2684                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2685                 sub4node->SetLineColor(kColorITS);
2686                 sub4node->SetVisibility(0);
2687                 sub4node->cd();
2688                    //               
2689                    // Place copy #1 of ITS2 in I1D1
2690                    //
2691                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2692                    sub5node->SetLineColor(kColorITS);                   
2693                    fNodes->Add(sub5node);
2694                    sub4node->cd();   
2695                 fNodes->Add(sub4node);  
2696              sub3node->cd(); 
2697              fNodes->Add(sub3node);
2698              sub2node->cd(); 
2699              //
2700              // Place copy #2 of I1D7 in I20B
2701              //
2702              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2703              sub3node->SetLineColor(kColorITS);
2704              sub3node->SetVisibility(0);
2705              sub3node->cd();
2706                 //
2707                 // Place copy #1 of I1D1 in I1D7
2708                 //
2709                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2710                 sub4node->SetLineColor(kColorITS);
2711                 sub4node->SetVisibility(0);
2712                 sub4node->cd();             
2713                    //
2714                    // Place copy #1 of ITS2 in I1D1
2715                    //
2716                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2717                    sub5node->SetLineColor(kColorITS);                   
2718                    fNodes->Add(sub5node);
2719                    sub4node->cd();   
2720                 fNodes->Add(sub4node);  
2721              sub3node->cd(); 
2722              fNodes->Add(sub3node);
2723              sub2node->cd(); 
2724              //
2725              // Place copy #3 of I1D7 in I20B
2726              //
2727              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2728              sub3node->SetLineColor(kColorITS);
2729              sub3node->SetVisibility(0);
2730              sub3node->cd();
2731                 //
2732                 // Place copy #1 of I1D1 in I1D7
2733                 //
2734                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2735                 sub4node->SetLineColor(kColorITS);
2736                 sub4node->SetVisibility(0);
2737                 sub4node->cd();             
2738                    //
2739                    // Place copy #1 of ITS2 in I1D1
2740                    //
2741                    sub5node = new TNode("ITS2","ITS2","ITS2",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 #4 of I1D7 in I20B
2751              //
2752              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2753              sub3node->SetLineColor(kColorITS);
2754              sub3node->SetVisibility(0);
2755              sub3node->cd();
2756                 //
2757                 // Place copy #1 of I1D1 in I1D7
2758                 //
2759                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2760                 sub4node->SetLineColor(kColorITS);
2761                 sub4node->SetVisibility(0);
2762                 sub4node->cd();             
2763                    //
2764                    // Place copy #1 of ITS2 in I1D1
2765                    //
2766                    sub5node = new TNode("ITS2","ITS2","ITS2",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           fNodes->Add(sub2node);        
2775           sub1node->cd(); 
2776           //
2777           // Place copy #4 of I20B in I12B
2778           //
2779           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(67.*TMath::Pi()/180.);  
2780           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(67.*TMath::Pi()/180.);
2781           sub2node = new TNode("I20B","I20B","I20B",-0.2689+deltax,7.1742+deltay,0.,"itsrot243");
2782           sub2node->SetLineColor(kColorITS);
2783           sub2node->SetVisibility(0);
2784           sub2node->cd();
2785              //
2786              // Place copy #1 of I1D7 in I20B
2787              //
2788              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
2789              sub3node->SetLineColor(kColorITS);
2790              sub3node->SetVisibility(0);
2791              sub3node->cd();
2792                 //
2793                 // Place copy #1 of I1D1 in I1D7
2794                 //
2795                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2796                 sub4node->SetLineColor(kColorITS);
2797                 sub4node->SetVisibility(0);
2798                 sub4node->cd();
2799                    //               
2800                    // Place copy #1 of ITS2 in I1D1
2801                    //
2802                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2803                    sub5node->SetLineColor(kColorITS);                   
2804                    fNodes->Add(sub5node);
2805                    sub4node->cd();   
2806                 fNodes->Add(sub4node);  
2807              sub3node->cd(); 
2808              fNodes->Add(sub3node);
2809              sub2node->cd(); 
2810              //
2811              // Place copy #2 of I1D7 in I20B
2812              //
2813              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
2814              sub3node->SetLineColor(kColorITS);
2815              sub3node->SetVisibility(0);
2816              sub3node->cd();
2817                 //
2818                 // Place copy #1 of I1D1 in I1D7
2819                 //
2820                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2821                 sub4node->SetLineColor(kColorITS);
2822                 sub4node->SetVisibility(0);
2823                 sub4node->cd();             
2824                    //
2825                    // Place copy #1 of ITS2 in I1D1
2826                    //
2827                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
2828                    sub5node->SetLineColor(kColorITS);                   
2829                    fNodes->Add(sub5node);
2830                    sub4node->cd();   
2831                 fNodes->Add(sub4node);  
2832              sub3node->cd(); 
2833              fNodes->Add(sub3node);
2834              sub2node->cd(); 
2835              //
2836              // Place copy #3 of I1D7 in I20B
2837              //
2838              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
2839              sub3node->SetLineColor(kColorITS);
2840              sub3node->SetVisibility(0);
2841              sub3node->cd();
2842                 //
2843                 // Place copy #1 of I1D1 in I1D7
2844                 //
2845                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2846                 sub4node->SetLineColor(kColorITS);
2847                 sub4node->SetVisibility(0);
2848                 sub4node->cd();             
2849                    //
2850                    // Place copy #1 of ITS2 in I1D1
2851                    //
2852                    sub5node = new TNode("ITS2","ITS2","ITS2",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 #4 of I1D7 in I20B
2862              //
2863              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
2864              sub3node->SetLineColor(kColorITS);
2865              sub3node->SetVisibility(0);
2866              sub3node->cd();
2867                 //
2868                 // Place copy #1 of I1D1 in I1D7
2869                 //
2870                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
2871                 sub4node->SetLineColor(kColorITS);
2872                 sub4node->SetVisibility(0);
2873                 sub4node->cd();             
2874                    //
2875                    // Place copy #1 of ITS2 in I1D1
2876                    //
2877                    sub5node = new TNode("ITS2","ITS2","ITS2",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           fNodes->Add(sub2node);        
2886           sub1node->cd(); 
2887        fNodes->Add(sub1node);
2888        node->cd(); 
2889        //
2890        // Place copy #4 of I12B in IT12
2891        //
2892        sub1node = new TNode("I12B","I12B","I12B",0.,0.,0.,"itsrot246");
2893        sub1node->SetLineColor(kColorITS);
2894        sub1node->SetVisibility(0);
2895        sub1node->cd();    
2896           //
2897           // Place copy #1 of I10B in I12B
2898           //
2899           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(252.*TMath::Pi()/180.);  
2900           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(252.*TMath::Pi()/180.);
2901           sub2node = new TNode("I10B","I10B","I10B",1.4531+deltax,3.8152+deltay,0.,"itsrot239");
2902           sub2node->SetLineColor(kColorITS);
2903           sub2node->SetVisibility(0);
2904           sub2node->cd();
2905              //
2906              // Place copy #1 of I107 in I10B
2907              //
2908              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
2909              sub3node->SetLineColor(kColorITS);
2910              sub3node->SetVisibility(0);
2911              sub3node->cd();
2912                 //
2913                 // Place copy #1 of I101 in I107
2914                 //
2915                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2916                 sub4node->SetLineColor(kColorITS);
2917                 sub4node->SetVisibility(0);
2918                 sub4node->cd();
2919                    //               
2920                    // Place copy #1 of ITS1 in I101
2921                    //
2922                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2923                    sub5node->SetLineColor(kColorITS);                   
2924                    fNodes->Add(sub5node);
2925                    sub4node->cd();   
2926                 fNodes->Add(sub4node);  
2927              sub3node->cd(); 
2928              fNodes->Add(sub3node);
2929              sub2node->cd(); 
2930              //
2931              // Place copy #2 of I107 in I10B
2932              //
2933              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
2934              sub3node->SetLineColor(kColorITS);
2935              sub3node->SetVisibility(0);
2936              sub3node->cd();
2937                 //
2938                 // Place copy #1 of I101 in I107
2939                 //
2940                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2941                 sub4node->SetLineColor(kColorITS);
2942                 sub4node->SetVisibility(0);
2943                 sub4node->cd();             
2944                    //
2945                    // Place copy #1 of ITS1 in I101
2946                    //
2947                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2948                    sub5node->SetLineColor(kColorITS);                   
2949                    fNodes->Add(sub5node);
2950                    sub4node->cd();   
2951                 fNodes->Add(sub4node);  
2952              sub3node->cd(); 
2953              fNodes->Add(sub3node);
2954              sub2node->cd(); 
2955              //
2956              // Place copy #3 of I107 in I10B
2957              //
2958              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
2959              sub3node->SetLineColor(kColorITS);
2960              sub3node->SetVisibility(0);
2961              sub3node->cd();
2962                 //
2963                 // Place copy #1 of I101 in I107
2964                 //
2965                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2966                 sub4node->SetLineColor(kColorITS);
2967                 sub4node->SetVisibility(0);
2968                 sub4node->cd();             
2969                    //
2970                    // Place copy #1 of ITS1 in I101
2971                    //
2972                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2973                    sub5node->SetLineColor(kColorITS);                   
2974                    fNodes->Add(sub5node);
2975                    sub4node->cd();   
2976                 fNodes->Add(sub4node);  
2977              sub3node->cd(); 
2978              fNodes->Add(sub3node);
2979              sub2node->cd(); 
2980              //
2981              // Place copy #4 of I107 in I10B
2982              //
2983              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
2984              sub3node->SetLineColor(kColorITS);
2985              sub3node->SetVisibility(0);
2986              sub3node->cd();
2987                 //
2988                 // Place copy #1 of I101 in I107
2989                 //
2990                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
2991                 sub4node->SetLineColor(kColorITS);
2992                 sub4node->SetVisibility(0);
2993                 sub4node->cd();             
2994                    //
2995                    // Place copy #1 of ITS1 in I101
2996                    //
2997                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
2998                    sub5node->SetLineColor(kColorITS);                   
2999                    fNodes->Add(sub5node);
3000                    sub4node->cd();   
3001                 fNodes->Add(sub4node);  
3002              sub3node->cd(); 
3003              fNodes->Add(sub3node);
3004              sub2node->cd(); 
3005           fNodes->Add(sub2node);        
3006           sub1node->cd(); 
3007           //
3008           // Place copy #2 of I10B in I12B
3009           //
3010           deltax=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Cos(270.*TMath::Pi()/180.);  
3011           deltay=((ddet1-0.01/2.)+(dchip1-0.015/2.))*TMath::Sin(270.*TMath::Pi()/180.);
3012           sub2node = new TNode("I10B","I10B","I10B",0.203+deltax,3.8206+deltay,0.,"itsrot238");
3013           sub2node->SetLineColor(kColorITS);
3014           sub2node->SetVisibility(0);
3015           sub2node->cd();
3016              //
3017              // Place copy #1 of I107 in I10B
3018              //
3019              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],10.708,"");
3020              sub3node->SetLineColor(kColorITS);
3021              sub3node->SetVisibility(0);
3022              sub3node->cd();
3023                 //
3024                 // Place copy #1 of I101 in I107
3025                 //
3026                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
3027                 sub4node->SetLineColor(kColorITS);
3028                 sub4node->SetVisibility(0);
3029                 sub4node->cd();
3030                    //               
3031                    // Place copy #1 of ITS1 in I101
3032                    //
3033                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
3034                    sub5node->SetLineColor(kColorITS);                   
3035                    fNodes->Add(sub5node);
3036                    sub4node->cd();   
3037                 fNodes->Add(sub4node);  
3038              sub3node->cd(); 
3039              fNodes->Add(sub3node);
3040              sub2node->cd(); 
3041              //
3042              // Place copy #2 of I107 in I10B
3043              //
3044              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],3.536,"");
3045              sub3node->SetLineColor(kColorITS);
3046              sub3node->SetVisibility(0);
3047              sub3node->cd();
3048                 //
3049                 // Place copy #1 of I101 in I107
3050                 //
3051                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
3052                 sub4node->SetLineColor(kColorITS);
3053                 sub4node->SetVisibility(0);
3054                 sub4node->cd();             
3055                    //
3056                    // Place copy #1 of ITS1 in I101
3057                    //
3058                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
3059                    sub5node->SetLineColor(kColorITS);                   
3060                    fNodes->Add(sub5node);
3061                    sub4node->cd();   
3062                 fNodes->Add(sub4node);  
3063              sub3node->cd(); 
3064              fNodes->Add(sub3node);
3065              sub2node->cd(); 
3066              //
3067              // Place copy #3 of I107 in I10B
3068              //
3069              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-3.536,"");
3070              sub3node->SetLineColor(kColorITS);
3071              sub3node->SetVisibility(0);
3072              sub3node->cd();
3073                 //
3074                 // Place copy #1 of I101 in I107
3075                 //
3076                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
3077                 sub4node->SetLineColor(kColorITS);
3078                 sub4node->SetVisibility(0);
3079                 sub4node->cd();             
3080                    //
3081                    // Place copy #1 of ITS1 in I101
3082                    //
3083                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
3084                    sub5node->SetLineColor(kColorITS);                   
3085                    fNodes->Add(sub5node);
3086                    sub4node->cd();   
3087                 fNodes->Add(sub4node);  
3088              sub3node->cd(); 
3089              fNodes->Add(sub3node);
3090              sub2node->cd(); 
3091              //
3092              // Place copy #4 of I107 in I10B
3093              //
3094              sub3node = new TNode("I107","I107","I107",-0.0455,-di10b[1]+di107[1],-10.708,"");
3095              sub3node->SetLineColor(kColorITS);
3096              sub3node->SetVisibility(0);
3097              sub3node->cd();
3098                 //
3099                 // Place copy #1 of I101 in I107
3100                 //
3101                 sub4node = new TNode("I101","I101","I101",0.,ddet1,0.,"");
3102                 sub4node->SetLineColor(kColorITS);
3103                 sub4node->SetVisibility(0);
3104                 sub4node->cd();             
3105                    //
3106                    // Place copy #1 of ITS1 in I101
3107                    //
3108                    sub5node = new TNode("ITS1","ITS1","ITS1",0.,0.,0.,"");
3109                    sub5node->SetLineColor(kColorITS);                   
3110                    fNodes->Add(sub5node);
3111                    sub4node->cd();   
3112                 fNodes->Add(sub4node);  
3113              sub3node->cd(); 
3114              fNodes->Add(sub3node);
3115              sub2node->cd(); 
3116           fNodes->Add(sub2node);        
3117           sub1node->cd(); 
3118           //
3119           // Place copy #1 of I20B in I12B
3120           //
3121           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(40.*TMath::Pi()/180.);  
3122           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(40.*TMath::Pi()/180.);
3123           sub2node = new TNode("I20B","I20B","I20B",3.0174+deltax,6.5143+deltay,0.,"itsrot240");
3124           sub2node->SetLineColor(kColorITS);
3125           sub2node->SetVisibility(0);
3126           sub2node->cd();
3127              //
3128              // Place copy #1 of I1D7 in I20B
3129              //
3130              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
3131              sub3node->SetLineColor(kColorITS);
3132              sub3node->SetVisibility(0);
3133              sub3node->cd();
3134                 //
3135                 // Place copy #1 of I1D1 in I1D7
3136                 //
3137                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3138                 sub4node->SetLineColor(kColorITS);
3139                 sub4node->SetVisibility(0);
3140                 sub4node->cd();
3141                    //               
3142                    // Place copy #1 of ITS2 in I1D1
3143                    //
3144                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3145                    sub5node->SetLineColor(kColorITS);                   
3146                    fNodes->Add(sub5node);
3147                    sub4node->cd();   
3148                 fNodes->Add(sub4node);  
3149              sub3node->cd(); 
3150              fNodes->Add(sub3node);
3151              sub2node->cd(); 
3152              //
3153              // Place copy #2 of I1D7 in I20B
3154              //
3155              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
3156              sub3node->SetLineColor(kColorITS);
3157              sub3node->SetVisibility(0);
3158              sub3node->cd();
3159                 //
3160                 // Place copy #1 of I1D1 in I1D7
3161                 //
3162                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3163                 sub4node->SetLineColor(kColorITS);
3164                 sub4node->SetVisibility(0);
3165                 sub4node->cd();             
3166                    //
3167                    // Place copy #1 of ITS2 in I1D1
3168                    //
3169                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3170                    sub5node->SetLineColor(kColorITS);                   
3171                    fNodes->Add(sub5node);
3172                    sub4node->cd();   
3173                 fNodes->Add(sub4node);  
3174              sub3node->cd(); 
3175              fNodes->Add(sub3node);
3176              sub2node->cd(); 
3177              //
3178              // Place copy #3 of I1D7 in I20B
3179              //
3180              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
3181              sub3node->SetLineColor(kColorITS);
3182              sub3node->SetVisibility(0);
3183              sub3node->cd();
3184                 //
3185                 // Place copy #1 of I1D1 in I1D7
3186                 //
3187                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3188                 sub4node->SetLineColor(kColorITS);
3189                 sub4node->SetVisibility(0);
3190                 sub4node->cd();             
3191                    //
3192                    // Place copy #1 of ITS2 in I1D1
3193                    //
3194                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3195                    sub5node->SetLineColor(kColorITS);                   
3196                    fNodes->Add(sub5node);
3197                    sub4node->cd();   
3198                 fNodes->Add(sub4node);  
3199              sub3node->cd(); 
3200              fNodes->Add(sub3node);
3201              sub2node->cd(); 
3202              //
3203              // Place copy #4 of I1D7 in I20B
3204              //
3205              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
3206              sub3node->SetLineColor(kColorITS);
3207              sub3node->SetVisibility(0);
3208              sub3node->cd();
3209                 //
3210                 // Place copy #1 of I1D1 in I1D7
3211                 //
3212                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3213                 sub4node->SetLineColor(kColorITS);
3214                 sub4node->SetVisibility(0);
3215                 sub4node->cd();             
3216                    //
3217                    // Place copy #1 of ITS2 in I1D1
3218                    //
3219                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3220                    sub5node->SetLineColor(kColorITS);                   
3221                    fNodes->Add(sub5node);
3222                    sub4node->cd();   
3223                 fNodes->Add(sub4node);  
3224              sub3node->cd(); 
3225              fNodes->Add(sub3node);
3226              sub2node->cd(); 
3227           fNodes->Add(sub2node);        
3228           sub1node->cd(); 
3229           //
3230           // Place copy #2 of I20B in I12B
3231           //
3232           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(49.*TMath::Pi()/180.);  
3233           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(49.*TMath::Pi()/180.);
3234           sub2node = new TNode("I20B","I20B","I20B",1.9612+deltax,6.9062+deltay,0.,"itsrot241");
3235           sub2node->SetLineColor(kColorITS);
3236           sub2node->SetVisibility(0);
3237           sub2node->cd();
3238              //
3239              // Place copy #1 of I1D7 in I20B
3240              //
3241              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
3242              sub3node->SetLineColor(kColorITS);
3243              sub3node->SetVisibility(0);
3244              sub3node->cd();
3245                 //
3246                 // Place copy #1 of I1D1 in I1D7
3247                 //
3248                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3249                 sub4node->SetLineColor(kColorITS);
3250                 sub4node->SetVisibility(0);
3251                 sub4node->cd();
3252                    //               
3253                    // Place copy #1 of ITS2 in I1D1
3254                    //
3255                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3256                    sub5node->SetLineColor(kColorITS);                   
3257                    fNodes->Add(sub5node);
3258                    sub4node->cd();   
3259                 fNodes->Add(sub4node);  
3260              sub3node->cd(); 
3261              fNodes->Add(sub3node);
3262              sub2node->cd(); 
3263              //
3264              // Place copy #2 of I1D7 in I20B
3265              //
3266              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
3267              sub3node->SetLineColor(kColorITS);
3268              sub3node->SetVisibility(0);
3269              sub3node->cd();
3270                 //
3271                 // Place copy #1 of I1D1 in I1D7
3272                 //
3273                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3274                 sub4node->SetLineColor(kColorITS);
3275                 sub4node->SetVisibility(0);
3276                 sub4node->cd();             
3277                    //
3278                    // Place copy #1 of ITS2 in I1D1
3279                    //
3280                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3281                    sub5node->SetLineColor(kColorITS);                   
3282                    fNodes->Add(sub5node);
3283                    sub4node->cd();   
3284                 fNodes->Add(sub4node);  
3285              sub3node->cd(); 
3286              fNodes->Add(sub3node);
3287              sub2node->cd(); 
3288              //
3289              // Place copy #3 of I1D7 in I20B
3290              //
3291              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
3292              sub3node->SetLineColor(kColorITS);
3293              sub3node->SetVisibility(0);
3294              sub3node->cd();
3295                 //
3296                 // Place copy #1 of I1D1 in I1D7
3297                 //
3298                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3299                 sub4node->SetLineColor(kColorITS);
3300                 sub4node->SetVisibility(0);
3301                 sub4node->cd();             
3302                    //
3303                    // Place copy #1 of ITS2 in I1D1
3304                    //
3305                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3306                    sub5node->SetLineColor(kColorITS);                   
3307                    fNodes->Add(sub5node);
3308                    sub4node->cd();   
3309                 fNodes->Add(sub4node);  
3310              sub3node->cd(); 
3311              fNodes->Add(sub3node);
3312              sub2node->cd(); 
3313              //
3314              // Place copy #4 of I1D7 in I20B
3315              //
3316              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
3317              sub3node->SetLineColor(kColorITS);
3318              sub3node->SetVisibility(0);
3319              sub3node->cd();
3320                 //
3321                 // Place copy #1 of I1D1 in I1D7
3322                 //
3323                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3324                 sub4node->SetLineColor(kColorITS);
3325                 sub4node->SetVisibility(0);
3326                 sub4node->cd();             
3327                    //
3328                    // Place copy #1 of ITS2 in I1D1
3329                    //
3330                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3331                    sub5node->SetLineColor(kColorITS);                   
3332                    fNodes->Add(sub5node);
3333                    sub4node->cd();   
3334                 fNodes->Add(sub4node);  
3335              sub3node->cd(); 
3336              fNodes->Add(sub3node);
3337              sub2node->cd(); 
3338           fNodes->Add(sub2node);        
3339           sub1node->cd(); 
3340           //
3341           // Place copy #3 of I20B in I12B
3342           //
3343           deltax=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Cos(58.*TMath::Pi()/180.);  
3344           deltay=((ddet2-0.01/2.)+(dchip2-0.015/2.))*TMath::Sin(58.*TMath::Pi()/180.);
3345           sub2node = new TNode("I20B","I20B","I20B",0.8567+deltax,7.1279+deltay,0.,"itsrot242");
3346           sub2node->SetLineColor(kColorITS);
3347           sub2node->SetVisibility(0);
3348           sub2node->cd();
3349              //
3350              // Place copy #1 of I1D7 in I20B
3351              //
3352              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],10.708,"");
3353              sub3node->SetLineColor(kColorITS);
3354              sub3node->SetVisibility(0);
3355              sub3node->cd();
3356                 //
3357                 // Place copy #1 of I1D1 in I1D7
3358                 //
3359                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3360                 sub4node->SetLineColor(kColorITS);
3361                 sub4node->SetVisibility(0);
3362                 sub4node->cd();
3363                    //               
3364                    // Place copy #1 of ITS2 in I1D1
3365                    //
3366                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3367                    sub5node->SetLineColor(kColorITS);                   
3368                    fNodes->Add(sub5node);
3369                    sub4node->cd();   
3370                 fNodes->Add(sub4node);  
3371              sub3node->cd(); 
3372              fNodes->Add(sub3node);
3373              sub2node->cd(); 
3374              //
3375              // Place copy #2 of I1D7 in I20B
3376              //
3377              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],3.536,"");
3378              sub3node->SetLineColor(kColorITS);
3379              sub3node->SetVisibility(0);
3380              sub3node->cd();
3381                 //
3382                 // Place copy #1 of I1D1 in I1D7
3383                 //
3384                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3385                 sub4node->SetLineColor(kColorITS);
3386                 sub4node->SetVisibility(0);
3387                 sub4node->cd();             
3388                    //
3389                    // Place copy #1 of ITS2 in I1D1
3390                    //
3391                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3392                    sub5node->SetLineColor(kColorITS);                   
3393                    fNodes->Add(sub5node);
3394                    sub4node->cd();   
3395                 fNodes->Add(sub4node);  
3396              sub3node->cd(); 
3397              fNodes->Add(sub3node);
3398              sub2node->cd(); 
3399              //
3400              // Place copy #3 of I1D7 in I20B
3401              //
3402              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-3.536,"");
3403              sub3node->SetLineColor(kColorITS);
3404              sub3node->SetVisibility(0);
3405              sub3node->cd();
3406                 //
3407                 // Place copy #1 of I1D1 in I1D7
3408                 //
3409                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3410                 sub4node->SetLineColor(kColorITS);
3411                 sub4node->SetVisibility(0);
3412                 sub4node->cd();             
3413                    //
3414                    // Place copy #1 of ITS2 in I1D1
3415                    //
3416                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3417                    sub5node->SetLineColor(kColorITS);                   
3418                    fNodes->Add(sub5node);
3419                    sub4node->cd();   
3420                 fNodes->Add(sub4node);  
3421              sub3node->cd(); 
3422              fNodes->Add(sub3node);
3423              sub2node->cd(); 
3424              //
3425              // Place copy #4 of I1D7 in I20B
3426              //
3427              sub3node = new TNode("I1D7","I1D7","I1D7",-0.0455,-di20b[1]+di1d7[1],-10.708,"");
3428              sub3node->SetLineColor(kColorITS);
3429              sub3node->SetVisibility(0);
3430              sub3node->cd();
3431                 //
3432                 // Place copy #1 of I1D1 in I1D7
3433                 //
3434                 sub4node = new TNode("I1D1","I1D1","I1D1",0.,ddet2,0.,"");
3435                 sub4node->SetLineColor(kColorITS);
3436                 sub4node->SetVisibility(0);
3437                 sub4node->cd();             
3438                    //
3439                    // Place copy #1 of ITS2 in I1D1
3440                    //
3441                    sub5node = new TNode("ITS2","ITS2","ITS2",0.,0.,0.,"");
3442                    sub5node->SetLineColor(kColorITS);                   
3443                    fNodes->Add(sub5node);
3444                    sub4node->cd();   
3445                 fNodes->Add(sub4node);  
3446              sub3node->cd(); 
3447              fNodes->Add(sub3node);
3448              sub2node->cd(); 
3449           fNodes->Add(sub2node);        
3450           sub1node->cd();