1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // Temporarily added to define part of the EMCal geometry
18 // necessary for the jet finder
19 // Author: Magali Estienne
20 // Magali.Estienne@cern.ch
25 // --- Root header files ---
27 #include <TGeoManager.h>
28 #include <TGeoMatrix.h>
31 // --- AliRoot header files ---
32 #include "AliJetDummyGeo.h"
34 ClassImp(AliJetDummyGeo)
36 AliJetDummyGeo::AliJetDummyGeo():
42 fNumberOfSuperModules(12),
43 fSteelFrontThick(0.0),
49 fPhiModuleSize(12.26 - fPhiGapForSM / Float_t(fNPhi)),
50 fEtaModuleSize(fPhiModuleSize),
55 fECPbRadThickness(0.16),
58 fNCellsInModule(fNPHIdiv*fNETAdiv),
59 fNCellsInSupMod(fNCellsInModule*fNPhi*fNZ),
60 fNCells(fNCellsInSupMod*fNumberOfSuperModules-fNCellsInSupMod),
61 fLongModuleSize(fNECLayers*(fECScintThick + fECPbRadThickness)),
62 f2Trd1Dx2(fEtaModuleSize + 2.*fLongModuleSize*TMath::Tan(fTrd1Angle*TMath::DegToRad()/2.)),
63 fShellThickness(TMath::Sqrt(fLongModuleSize*fLongModuleSize + f2Trd1Dx2*f2Trd1Dx2)+fSteelFrontThick),
64 fEtaMaxOfTRD1(0.67064) // Value extracted from ShishKebab
68 fParSM[0] = GetShellThickness()/2.;
69 fParSM[1] = GetPhiModuleSize() * GetNPhi()/2.;
72 fZLength = 2.*ZFromEtaR(fIPDistance+fShellThickness,fArm1EtaMax); // Z coverage
73 fEnvelop[0] = fIPDistance; // mother volume inner radius
74 fEnvelop[1] = fIPDistance + fShellThickness; // mother volume outer r.
75 fEnvelop[2] = 1.00001*fZLength; // add some padding for mother volume.
77 // SM phi boundaries - (0,1),(2,3) .. (10,11) - has the same boundaries; Nov 7, 2006
78 fPhiBoundariesOfSM.Set(fNumberOfSuperModules);
79 fPhiCentersOfSM.Set(fNumberOfSuperModules/2);
80 fPhiBoundariesOfSM[0] = TMath::PiOver2() - TMath::ATan2(fParSM[1] , fIPDistance); // 1th and 2th modules)
81 fPhiBoundariesOfSM[1] = TMath::PiOver2() + TMath::ATan2(fParSM[1] , fIPDistance);
82 fPhiCentersOfSM[0] = TMath::PiOver2();
83 for(int i=1; i<=4; i++) { // from 2th ro 9th
84 fPhiBoundariesOfSM[2*i] = fPhiBoundariesOfSM[0] + 20.*TMath::DegToRad()*i;
85 fPhiBoundariesOfSM[2*i+1] = fPhiBoundariesOfSM[1] + 20.*TMath::DegToRad()*i;
86 fPhiCentersOfSM[i] = fPhiCentersOfSM[0] + 20.*TMath::DegToRad()*i;
88 fPhiBoundariesOfSM[11] = 190.*TMath::DegToRad();
89 fPhiBoundariesOfSM[10] = fPhiBoundariesOfSM[11] - TMath::ATan2((fParSM[1]) , fIPDistance);
90 fPhiCentersOfSM[5] = (fPhiBoundariesOfSM[10]+fPhiBoundariesOfSM[11])/2.;
92 // for(int i=0; i<fNumberOfSuperModules; i++) fMatrixOfSM[i] = 0;
94 fCentersOfCellsEtaDir.Set(fNZ*fNETAdiv);
95 fCentersOfCellsXDir.Set(fNZ*fNETAdiv);
96 fCentersOfCellsPhiDir.Set(fNPhi*fNPHIdiv);
97 fEtaCentersOfCells.Set(fNZ*fNETAdiv*fNPhi*fNPHIdiv);
98 fPhiCentersOfCells.Set(fNPhi*fNPHIdiv);
100 int nphism = GetNumberOfSuperModules()/2;
101 double dphi = (GetArm1PhiMax() - GetArm1PhiMin())/nphism;
102 double rpos = (GetEnvelop(0) + GetEnvelop(1))/2.;
103 double phi, phiRad, xpos, ypos, zpos;
104 for(int i=0; i<nphism; i++){
105 phi = GetArm1PhiMin() + dphi*(2*i+1)/2.; // phi= 90, 110, 130, 150, 170, 190
106 phiRad = phi*TMath::Pi()/180.;
107 xpos = rpos * TMath::Cos(phiRad);
108 ypos = rpos * TMath::Sin(phiRad);
111 xpos += (fParSM[1]/2. * TMath::Sin(phiRad));
112 ypos -= (fParSM[1]/2. * TMath::Cos(phiRad));
116 TGeoRotation *geoRot0 = new TGeoRotation("geoRot0", 90.0, phi, 90.0, 90.0+phi, 0.0, 0.0);
117 fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
118 xpos,ypos, zpos, geoRot0);
121 double phiy = 90. + phi + 180.;
122 if(phiy>=360.) phiy -= 360.;
123 TGeoRotation *geoRot1 = new TGeoRotation("geoRot1", 90.0, phi, 90.0, phiy, 180.0, 0.0);
124 fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
125 xpos,ypos,-zpos, geoRot1);
130 AliJetDummyGeo::AliJetDummyGeo(const AliJetDummyGeo& geom):
132 fArm1PhiMin(geom.fArm1PhiMin),
133 fArm1PhiMax(geom.fArm1PhiMax),
134 fArm1EtaMin(geom.fArm1EtaMin),
135 fArm1EtaMax(geom.fArm1EtaMax),
136 fNumberOfSuperModules(geom.fNumberOfSuperModules),
137 fSteelFrontThick(geom.fSteelFrontThick),
138 fIPDistance(geom.fIPDistance),
139 fPhiGapForSM(geom.fPhiGapForSM),
142 fPhiModuleSize(geom.fPhiModuleSize),
143 fEtaModuleSize(geom.fEtaModuleSize),
144 fNPHIdiv(geom.fNPHIdiv),
145 fNETAdiv(geom.fNETAdiv),
146 fNECLayers(geom.fNECLayers),
147 fECScintThick(geom.fECScintThick),
148 fECPbRadThickness(geom.fECPbRadThickness),
149 fSampling(geom.fSampling),
150 fTrd1Angle(geom.fTrd1Angle),
151 fNCellsInModule(geom.fNCellsInModule),
152 fNCellsInSupMod(geom.fNCellsInSupMod),
153 fNCells(geom.fNCells),
154 fLongModuleSize(geom.fLongModuleSize),
155 f2Trd1Dx2(geom.f2Trd1Dx2),
156 fShellThickness(geom.fShellThickness),
157 fEtaMaxOfTRD1(geom.fEtaMaxOfTRD1)
161 fParSM[0] = GetShellThickness()/2.;
162 fParSM[1] = GetPhiModuleSize() * GetNPhi()/2.;
165 // SM phi boundaries - (0,1),(2,3) .. (10,11) - has the same boundaries; Nov 7, 2006
166 fPhiBoundariesOfSM.Set(fNumberOfSuperModules);
167 fPhiCentersOfSM.Set(fNumberOfSuperModules/2);
168 fPhiBoundariesOfSM[0] = TMath::PiOver2() - TMath::ATan2(fParSM[1] , fIPDistance); // 1th and 2th modules)
169 fPhiBoundariesOfSM[1] = TMath::PiOver2() + TMath::ATan2(fParSM[1] , fIPDistance);
170 fPhiCentersOfSM[0] = TMath::PiOver2();
171 for(int i=1; i<=4; i++) { // from 2th ro 9th
172 fPhiBoundariesOfSM[2*i] = fPhiBoundariesOfSM[0] + 20.*TMath::DegToRad()*i;
173 fPhiBoundariesOfSM[2*i+1] = fPhiBoundariesOfSM[1] + 20.*TMath::DegToRad()*i;
174 fPhiCentersOfSM[i] = fPhiCentersOfSM[0] + 20.*TMath::DegToRad()*i;
176 fPhiBoundariesOfSM[11] = 190.*TMath::DegToRad();
177 fPhiBoundariesOfSM[10] = fPhiBoundariesOfSM[11] - TMath::ATan2((fParSM[1]) , fIPDistance);
178 fPhiCentersOfSM[5] = (fPhiBoundariesOfSM[10]+fPhiBoundariesOfSM[11])/2.;
180 // for(int i=0; i<fNumberOfSuperModules; i++) fMatrixOfSM[i] = 0;
182 fCentersOfCellsEtaDir.Set(fNZ*fNETAdiv);
183 fCentersOfCellsXDir.Set(fNZ*fNETAdiv);
184 fCentersOfCellsPhiDir.Set(fNPhi*fNPHIdiv);
185 fEtaCentersOfCells.Set(fNZ*fNETAdiv*fNPhi*fNPHIdiv);
186 fPhiCentersOfCells.Set(fNPhi*fNPHIdiv);
188 int nphism = GetNumberOfSuperModules()/2;
189 double dphi = (GetArm1PhiMax() - GetArm1PhiMin())/nphism;
190 double rpos = (GetEnvelop(0) + GetEnvelop(1))/2.;
191 double phi, phiRad, xpos, ypos, zpos;
192 for(int i=0; i<nphism; i++){
193 phi = GetArm1PhiMin() + dphi*(2*i+1)/2.; // phi= 90, 110, 130, 150, 170, 190
194 phiRad = phi*TMath::Pi()/180.;
195 xpos = rpos * TMath::Cos(phiRad);
196 ypos = rpos * TMath::Sin(phiRad);
199 xpos += (fParSM[1]/2. * TMath::Sin(phiRad));
200 ypos -= (fParSM[1]/2. * TMath::Cos(phiRad));
204 TGeoRotation *geoRot0 = new TGeoRotation("geoRot0", 90.0, phi, 90.0, 90.0+phi, 0.0, 0.0);
205 fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
206 xpos,ypos, zpos, geoRot0);
209 double phiy = 90. + phi + 180.;
210 if(phiy>=360.) phiy -= 360.;
211 TGeoRotation *geoRot1 = new TGeoRotation("geoRot1", 90.0, phi, 90.0, phiy, 180.0, 0.0);
212 fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
213 xpos,ypos,-zpos, geoRot1);
222 AliJetDummyGeo::~AliJetDummyGeo()
225 delete [] fMatrixOfSM;
228 //------------------------------------------------------------------------------------
229 void AliJetDummyGeo::EtaPhiFromIndex(Int_t absId, Float_t& eta, Float_t& phi)
231 // Nov 16, 2006- float to double
232 // version for TRD1 only
233 static TVector3 vglob;
234 GetGlobal(absId, vglob);
240 //------------------------------------------------------------------------------------
241 void AliJetDummyGeo::GetGlobal(const Double_t *loc, Double_t *glob, int ind) const
243 // Figure out the global numbering of a given supermodule from the
245 // Alice numbering - Jun 03,2006
246 // if(fMatrixOfSM[0] == 0) GetTransformationForSM();
248 if(ind>=0 && ind < GetNumberOfSuperModules()) {
249 fMatrixOfSM[ind]->LocalToMaster(loc, glob);
253 //------------------------------------------------------------------------------------
254 void AliJetDummyGeo::GetGlobal(Int_t absId , double glob[3]) const
256 // Alice numbering scheme - Jun 03, 2006
257 static Int_t nSupMod, nModule, nIphi, nIeta;
258 static double loc[3];
260 glob[0]=glob[1]=glob[2]=0.0; // bad case
261 if(RelPosCellInSModule(absId, loc)) {
262 GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
263 fMatrixOfSM[nSupMod]->LocalToMaster(loc, glob);
267 //------------------------------------------------------------------------------------
268 void AliJetDummyGeo::GetGlobal(Int_t absId , TVector3 &vglob) const
270 // Alice numbering scheme - Jun 03, 2006
271 static Double_t glob[3];
273 GetGlobal(absId, glob);
274 vglob.SetXYZ(glob[0], glob[1], glob[2]);
278 //------------------------------------------------------------------------------------
279 Bool_t AliJetDummyGeo::RelPosCellInSModule(Int_t absId, Double_t loc[3]) const
281 // Alice numbering scheme - Jun 03, 2006
282 loc[0] = loc[1] = loc[2]=0.0;
283 if(RelPosCellInSModule(absId, loc[0],loc[1],loc[2])) {
289 //------------------------------------------------------------------------------------
290 Bool_t AliJetDummyGeo::RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const
292 // Look to see what the relative position inside a given cell is
294 // Alice numbering scheme - Jun 08, 2006
296 // absId - cell is as in Geant, 0<= absId < fNCells;
298 // xr,yr,zr - x,y,z coordinates of cell with absId inside SM
300 // Shift index taking into account the difference between standard SM
301 // and SM of half size in phi direction
302 const Int_t kPhiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
303 static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
304 if(!CheckAbsCellId(absId)) return kFALSE;
306 GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
307 GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta);
309 xr = fCentersOfCellsXDir.At(ieta);
310 zr = fCentersOfCellsEtaDir.At(ieta);
313 yr = fCentersOfCellsPhiDir.At(iphi);
315 yr = fCentersOfCellsPhiDir.At(iphi + kPhiIndexShift);
321 //------------------------------------------------------------------------------------
322 Bool_t AliJetDummyGeo::CheckAbsCellId(Int_t absId) const
324 // May 31, 2006; only trd1 now
325 if(absId<0 || absId >= fNCells) return kFALSE;
329 //------------------------------------------------------------------------------------
330 Bool_t AliJetDummyGeo::GetCellIndex(Int_t absId,Int_t &nSupMod,Int_t &nModule,Int_t &nIphi,Int_t &nIeta) const
332 // 21-sep-04; 19-oct-05;
333 // May 31, 2006; ALICE numbering scheme:
336 // absId - cell is as in Geant, 0<= absId < fNCells;
338 // nSupMod - super module(SM) number, 0<= nSupMod < fNumberOfSuperModules;
339 // nModule - module number in SM, 0<= nModule < fNCellsInSupMod/fNCellsInSupMod or(/2) for tow last SM (10th and 11th);
340 // nIphi - cell number in phi driection inside module; 0<= nIphi < fNPHIdiv;
341 // nIeta - cell number in eta driection inside module; 0<= nIeta < fNETAdiv;
343 static Int_t tmp=0, sm10=0;
344 if(!CheckAbsCellId(absId)) return kFALSE;
346 sm10 = fNCellsInSupMod*10;
347 if(absId >= sm10) { // 110 degree case; last two supermodules
348 nSupMod = (absId-sm10) / (fNCellsInSupMod/2) + 10;
349 tmp = (absId-sm10) % (fNCellsInSupMod/2);
351 nSupMod = absId / fNCellsInSupMod;
352 tmp = absId % fNCellsInSupMod;
355 nModule = tmp / fNCellsInModule;
356 tmp = tmp % fNCellsInModule;
357 nIphi = tmp / fNPHIdiv;
358 nIeta = tmp % fNPHIdiv;
363 //------------------------------------------------------------------------------------
364 void AliJetDummyGeo::GetCellPhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta, int &iphi, int &ieta) const
367 // Added nSupMod; Nov 25, 05
368 // Alice numbering scheme - Jun 01,2006
370 // nSupMod - super module(SM) number, 0<= nSupMod < fNumberOfSuperModules;
371 // nModule - module number in SM, 0<= nModule < fNCellsInSupMod/fNCellsInSupMod or(/2) for tow last SM (10th and 11th);
372 // nIphi - cell number in phi driection inside module; 0<= nIphi < fNPHIdiv;
373 // nIeta - cell number in eta driection inside module; 0<= nIeta < fNETAdiv;
376 // ieta, iphi - indexes of cell(tower) in two dimensional grid of SM
377 // ieta - have to change from 0 to (fNZ*fNETAdiv-1)
378 // iphi - have to change from 0 to (fNPhi*fNPHIdiv-1 or fNPhi*fNPHIdiv/2-1)
380 static Int_t iphim, ietam;
382 GetModulePhiEtaIndexInSModule(nSupMod,nModule, iphim, ietam);
383 // ieta = ietam*fNETAdiv + (1-nIeta); // x(module) = -z(SM)
384 ieta = ietam*fNETAdiv + (fNETAdiv - 1 - nIeta); // x(module) = -z(SM)
385 iphi = iphim*fNPHIdiv + nIphi; // y(module) = y(SM)
390 //------------------------------------------------------------------------------------
391 void AliJetDummyGeo::GetModulePhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, int &iphim, int &ietam) const
393 // added nSupMod; - 19-oct-05 !
394 // Alice numbering scheme - Jun 01,2006
395 // ietam, iphi - indexes of module in two dimensional grid of SM
396 // ietam - have to change from 0 to fNZ-1
397 // iphim - have to change from 0 to nphi-1 (fNPhi-1 or fNPhi/2-1)
400 if(nSupMod>=10) nphi = fNPhi/2;
403 ietam = nModule/nphi;
404 iphim = nModule%nphi;
407 //------------------------------------------------------------------------------------
408 Bool_t AliJetDummyGeo::GetAbsCellIdFromEtaPhi(Double_t eta, Double_t phi, Int_t &absId) const
411 // stay here - phi problem as usual
412 static Int_t nSupMod, i, ieta, iphi, etaShift, nphi;
413 static Double_t absEta=0.0, d=0.0, dmin=0.0, phiLoc;
414 absId = nSupMod = - 1;
415 if(SuperModuleNumberFromEtaPhi(eta, phi, nSupMod)) {
417 phi = TVector2::Phi_0_2pi(phi);
418 phiLoc = phi - fPhiCentersOfSM[nSupMod/2];
419 nphi = fPhiCentersOfCells.GetSize();
421 phiLoc = phi - 190.*TMath::DegToRad();
425 dmin = TMath::Abs(fPhiCentersOfCells[0]-phiLoc);
427 for(i=1; i<nphi; i++) {
428 d = TMath::Abs(fPhiCentersOfCells[i] - phiLoc);
434 // odd SM are turned with respect of even SM - reverse indexes
437 absEta = TMath::Abs(eta);
438 etaShift = iphi*fCentersOfCellsEtaDir.GetSize();
439 dmin = TMath::Abs(fEtaCentersOfCells[etaShift]-absEta);
441 for(i=1; i<fCentersOfCellsEtaDir.GetSize(); i++) {
442 d = TMath::Abs(fEtaCentersOfCells[i+etaShift] - absEta);
449 if(eta<0) iphi = (nphi-1) - iphi;
450 absId = GetAbsCellIdFromCellIndexes(nSupMod, iphi, ieta);
457 //------------------------------------------------------------------------------------
458 Bool_t AliJetDummyGeo::SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi, Int_t &nSupMod) const
460 // Return false if phi belongs a phi cracks between SM
464 if(TMath::Abs(eta) > fEtaMaxOfTRD1) return kFALSE;
466 phi = TVector2::Phi_0_2pi(phi); // move phi to (0,2pi) boundaries
468 if(phi>=fPhiBoundariesOfSM[2*i] && phi<=fPhiBoundariesOfSM[2*i+1]) {
470 if(eta < 0.0) nSupMod++;
477 //------------------------------------------------------------------------------------
478 Int_t AliJetDummyGeo::GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const
480 // Transition from super module number(nSupMod) and cell indexes (ieta,iphi) to absId
481 static Int_t ietam, iphim, nModule;
482 static Int_t nIeta, nIphi; // cell indexes in module
484 GetModuleIndexesFromCellIndexesInSModule(nSupMod, iphi, ieta, ietam, iphim, nModule);
486 nIeta = ieta%fNETAdiv;
487 nIeta = fNETAdiv - 1 - nIeta;
488 nIphi = iphi%fNPHIdiv;
490 return GetAbsCellId(nSupMod, nModule, nIphi, nIeta);
493 //------------------------------------------------------------------------------------
494 void AliJetDummyGeo::GetModuleIndexesFromCellIndexesInSModule(Int_t nSupMod, Int_t iphi, Int_t ieta,
495 Int_t &iphim, Int_t &ietam, Int_t &nModule) const
497 // Transition from cell indexes (ieta,iphi) to module indexes (ietam,iphim, nModule)
499 nphi = GetNumberOfModuleInPhiDirection(nSupMod);
501 ietam = ieta/fNETAdiv;
502 iphim = iphi/fNPHIdiv;
503 nModule = ietam * nphi + iphim;
506 //------------------------------------------------------------------------------------
507 Int_t AliJetDummyGeo::GetAbsCellId(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta) const
511 // 13-oct-05; 110 degree case
512 // May 31, 2006; ALICE numbering scheme:
513 // 0 <= nSupMod < fNumberOfSuperModules
514 // 0 <= nModule < fNPHI * fNZ ( fNPHI * fNZ/2 for fKey110DEG=1)
515 // 0 <= nIphi < fNPHIdiv
516 // 0 <= nIeta < fNETAdiv
517 // 0 <= absid < fNCells
518 static Int_t id=0; // have to change from 0 to fNCells-1
519 if(nSupMod >= 10) { // 110 degree case; last two supermodules
520 id = fNCellsInSupMod*10 + (fNCellsInSupMod/2)*(nSupMod-10);
522 id = fNCellsInSupMod*nSupMod;
524 id += fNCellsInModule *nModule;
525 id += fNPHIdiv *nIphi;
527 if(id<0 || id >= fNCells) {
528 id = -TMath::Abs(id); // if negative something wrong
533 //------------------------------------------------------------------------------------
534 Bool_t AliJetDummyGeo::GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const
536 // 0<= nPhiSec <=4; phi in rad
537 // 0; gap boundaries between 0th&2th | 1th&3th SM
538 // 1; gap boundaries between 2th&4th | 3th&5th SM
539 // 2; gap boundaries between 4th&6th | 5th&7th SM
540 // 3; gap boundaries between 6th&8th | 7th&9th SM
541 // 4; gap boundaries between 8th&10th | 9th&11th SM
542 if(nPhiSec<0 || nPhiSec >4) return kFALSE;
543 phiMin = fPhiBoundariesOfSM[2*nPhiSec+1];
544 phiMax = fPhiBoundariesOfSM[2*nPhiSec+2];
548 //------------------------------------------------------------------------------------
549 void AliJetDummyGeo::GetTransformationForSM()
551 // Uses the geometry manager to load the transformation matrix
552 // for the supermodules
553 // Unused after 19 Jan, 2007 - keep for compatibility;
556 static Bool_t transInit=kFALSE;
557 if(transInit) return;
560 if(gGeoManager == 0) {
561 Info("CreateTransformationForSM() "," Load geometry : TGeoManager::Import()");
565 TGeoNode *tn = gGeoManager->GetTopNode();
566 TGeoNode *node=0, *xen1 = 0;
567 for(i=0; i<tn->GetNdaughters(); i++) {
568 node = tn->GetDaughter(i);
569 TString ns(node->GetName());
570 if(ns.Contains(GetNameOfEMCALEnvelope())) {
577 Info("CreateTransformationForSM() "," geometry has not EMCAL envelope with name %s",
578 GetNameOfEMCALEnvelope());
581 printf(" i %i : EMCAL Envelope is %s : #SM %i \n", i, xen1->GetName(), xen1->GetNdaughters());
582 for(i=0; i<xen1->GetNdaughters(); i++) {
583 TGeoNodeMatrix *sm = (TGeoNodeMatrix*)xen1->GetDaughter(i);
584 fMatrixOfSM[i] = sm->GetMatrix();
586 printf("transInit %d: ", transInit);