@@ -153,14 +153,19 @@ TGeoVolume* TRKLayer::createModule(std::string type, double width)
153153 int nChips = 4 ;
154154
155155 for (int iChip = 0 ; iChip < nChips; iChip++) {
156- TGeoVolume* chipVol = createChip (" flat" , mModuleWidth );
156+ TGeoVolume* chipVolLeft = createChip (" flat" , mModuleWidth / 2 );
157+ TGeoVolume* chipVolRight = createChip (" flat" , mModuleWidth / 2 ); // TO BE CHECKED !!!
157158
158159 // Put the chips in the correct position
159- TGeoCombiTrans* trans = new TGeoCombiTrans ();
160- trans->SetTranslation (0 , 0 , iChip * (mModuleWidth + 0.1 )); // TO BE CHECKED !!!
160+ TGeoCombiTrans* transLeft = new TGeoCombiTrans ();
161+ transLeft->SetTranslation (-mModuleWidth / 2 + 0.05 , 0 , iChip * (mModuleWidth + 0.1 )); // TO BE CHECKED !!!
162+ LOGP (info, " Inserting {} in {} " , chipVolLeft->GetName (), moduleVol->GetName ());
163+ moduleVol->AddNode (chipVolLeft, iChip * 2 , transLeft);
161164
162- LOGP (info, " Inserting {} in {} " , chipVol->GetName (), moduleVol->GetName ());
163- moduleVol->AddNode (chipVol, iChip, trans);
165+ TGeoCombiTrans* transRight = new TGeoCombiTrans ();
166+ transRight->SetTranslation (mModuleWidth / 2 - 0.05 , 0 , iChip * (mModuleWidth + 0.1 )); // TO BE CHECKED !!!
167+ LOGP (info, " Inserting {} in {} " , chipVolRight->GetName (), moduleVol->GetName ());
168+ moduleVol->AddNode (chipVolRight, iChip * 2 + 1 , transRight);
164169 }
165170 } else {
166171 LOGP (fatal, " Chip of type '{}' is not implemented" , type);
0 commit comments