1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| G4RotationMatrix* rotationMatrix_X = new G4RotationMatrix;
for(G4int x_col_num = 0; x_col_num <=NBD_colNb; x_col_num++){ if(x_col_num==0){ // the center colume NBDx = NBDx0; for(G4int y_row_num = 0; y_row_num <=NBD_rowNb; y_row_num++ ){ index// NBDx = NBDx0; indexNBDy = NBDy0+R*sin(y_row_num*theta); indexNBDz = NBDz0+R*(1-cos(y_row_num*theta));
indexif(y_row_num==0){ index // center position index rotationMatrix_X = new G4RotationMatrix; index rotationMatrix_X->rotateX(y_row_num*theta);
index new G4PVPlacement(rotationMatrix_X, //no rotation indexindexindex G4ThreeVector(NBDx,NBDy,NBDz), //at (0,0,0) indexindexindex logicAssembleNBD, //its logical volume indexindexindex "AssembleNBD", //its name indexindexindex expHall_logV, //its mother volume indexindexindex false, //no boolean operation indexindexindex 0, //copy number indexindexindex true); //overlaps checking index} indexelse{ index //+y++ index rotationMatrix_X = new G4RotationMatrix; index rotationMatrix_X->rotateX(-y_row_num*theta);
index new G4PVPlacement(rotationMatrix_X, //no rotation indexindexindex G4ThreeVector(NBDx,NBDy,NBDz), //at (0,0,0) indexindexindex logicAssembleNBD, //its logical volume indexindexindex "AssembleNBD", //its name indexindexindex expHall_logV, //its mother volume indexindexindex false, //no boolean operation indexindexindex 0, //copy number indexindexindex true); // overlaps checking index //-y++ index rotationMatrix_X = new G4RotationMatrix; index rotationMatrix_X->rotateX(y_row_num*theta); index new G4PVPlacement(rotationMatrix_X, //no rotation indexindexindex G4ThreeVector(NBDx,-NBDy,NBDz), //at (0,0,0) indexindexindex logicAssembleNBD, //its logical volume indexindexindex "AssembleNBD", //its name indexindexindex expHall_logV, //its mother volume indexindexindex false, //no boolean operation indexindexindex 0, //copy number indexindexindex true); // overlaps checking index} } ...
|