10 #include "EicGeoMap.h"
32 TGeoBBox *element =
new TGeoBBox(name,
39 velement->SetLineColor(kYellow);
40 velement->SetFillColor(kYellow);
63 Double_t alveoleThickness = 0.1*0.2;
64 Double_t cellEnvelopeWidth = detector->
get_cellFaceSize() + 2.*alveoleThickness;
65 Double_t cellEnvelopeLength = length + 2.*alveoleThickness;
67 TString nameAlveole =
name;
68 nameAlveole = nameAlveole.Append(
"Alveole");
70 TGeoBBox *alveole =
new TGeoBBox(nameAlveole,
73 cellEnvelopeLength/2.);
74 TGeoVolume *valveole =
new TGeoVolume(nameAlveole, alveole, detector->
GetMedium(
"CarbonFiber"));
77 TGeoBBox *crystal =
new TGeoBBox(name,
84 vcrystal->SetLineColor(kBlue);
85 vcrystal->SetFillColor(kBlue);
88 valveole->AddNode(vcrystal, 0,
new TGeoCombiTrans(0.0, 0.0, 0.0,
new TGeoRotation()));
90 valveole->SetLineColor(kBlue-1);
91 valveole->SetFillColor(kBlue-1);
102 lqs->set_numCellsY(nY);
104 lqs->set_cellFaceSize(size);
105 lqs->set_cellFaceLength(length);
107 lqs->set_beamLineOffset(zoffset);
108 lqs->set_xOffset(xoffset);
110 lqs->set_angle(angle);
112 lqs->set_nGroups(nlayers);
142 unsigned tcounter = 0;
145 TGeoVolume *cell = (TGeoVolume*)mcell->createCell(lqs,
"trackerCell");
153 lqs->AddLogicalVolumeGroup(nCellsX, nCellsY, lqs->get_nGroups());
155 for(
int ilay = 0; ilay<lqs->get_nGroups(); ilay++)
158 double offset = ilay*10. + 1. + 25./2.;
160 for(
unsigned ix=0; ix<nCellsX; ix++)
166 for(
unsigned iy=0; iy<nCellsY; iy++)
173 UInt_t geant[1] = {tcounter}, group=0, logical[3] = {ix, iy, ilay};
175 if(lqs->SetMappingTableEntry(gmapT, geant, group, logical))
177 cout <<
"Failed to set mapping table entry!" << endl;
182 lqs->GetTopVolume()->AddNode( cell, tcounter++,
new TGeoCombiTrans( xx, yy, offset,
new TGeoRotation()) );
199 unsigned tcounter = 0;
203 UInt_t lgroup = lqs->AddLogicalVolumeGroup(nCellsX, nCellsY);
205 TGeoVolume *cell = (TGeoVolume*)mcell->createCell(lqs,
"ecalCell", ecalTowerLength);
212 double offset = -(30. + 1. - ecalTowerLength/2.);
230 for(
unsigned ix=0; ix<nCellsX; ix++)
234 double xx = (
cellFaceSize + 2.*0.1*0.2)*(ix - (nCellsX-1)/2.);
236 for(
unsigned iy=0; iy<nCellsY; iy++)
238 double yy = (
cellFaceSize + 2.*0.1*0.2)*(iy - (nCellsY-1)/2.);
243 UInt_t geant[2] = {0, tcounter}, logical[2] = {ix, iy};
247 if(lqs->SetMappingTableEntry(gmapCr, geant+0, lgroup, logical) )
249 cout <<
"Failed to set mapping table entry!" << endl;
253 lqs->GetTopVolume()->AddNode( cell, tcounter++,
new TGeoCombiTrans( xx, yy, offset,
new TGeoRotation()) );
264 constructTrackerLayers();
265 constructEcalLayers();
267 TGeoRotation *rotator =
new TGeoRotation();
268 rotator->RotateY(totalAngle*TMath::RadToDeg());
270 lqs->SetTopVolumeTransformation(
new TGeoCombiTrans(xOffset, 0.,
beamLineOffset, rotator));
272 lqs->FinalizeOutput();