B1DetectorConstruction.cc 27.9 KB
Newer Older
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
//
// ********************************************************************
// * License and Disclaimer                                           *
// *                                                                  *
// * The  Geant4 software  is  copyright of the Copyright Holders  of *
// * the Geant4 Collaboration.  It is provided  under  the terms  and *
// * conditions of the Geant4 Software License,  included in the file *
// * LICENSE and available at  http://cern.ch/geant4/license .  These *
// * include a list of copyright holders.                             *
// *                                                                  *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work  make  any representation or  warranty, express or implied, *
// * regarding  this  software system or assume any liability for its *
// * use.  Please see the license in the file  LICENSE  and URL above *
// * for the full disclaimer and the limitation of liability.         *
// *                                                                  *
// * This  code  implementation is the result of  the  scientific and *
// * technical work of the GEANT4 collaboration.                      *
// * By using,  copying,  modifying or  distributing the software (or *
// * any work based  on the software)  you  agree  to acknowledge its *
// * use  in  resulting  scientific  publications,  and indicate your *
// * acceptance of all terms of the Geant4 Software license.          *
// ********************************************************************
//
//
/// \file B1DetectorConstruction.cc
/// \brief Implementation of the B1DetectorConstruction class

#include "B1DetectorConstruction.hh"
31
#include "B1SD.hh"
32 33 34 35 36 37 38 39 40 41 42 43

#include "G4RunManager.hh"
#include "G4NistManager.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4Cons.hh"
#include "G4Orb.hh"
#include "G4Sphere.hh"
#include "G4Trd.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4SystemOfUnits.hh"
44 45 46 47
#include "G4VSensitiveDetector.hh"
#include "G4Track.hh"


48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

B1DetectorConstruction::B1DetectorConstruction()
: G4VUserDetectorConstruction(),
  fScoringVolume(0)
{ }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

B1DetectorConstruction::~B1DetectorConstruction()
{ }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

G4VPhysicalVolume* B1DetectorConstruction::Construct()
64
{
65 66
  // Get nist material manager
  G4NistManager* nist = G4NistManager::Instance();
67 68


69 70 71 72
  // Option to switch on/off checking of volumes overlaps
  //
  G4bool checkOverlaps = true;

73
  //
74 75
  // World
  //
76
  //caracteristicas do cilíndro -> world
77
  G4double raio_i = 0;
78 79 80
  G4double raio_e = 25*m;
  G4double h_detector = 1*cm;
  G4double h = 50*m;
81 82 83
  G4double theta_0 = 0.*deg;
  G4double theta_f = 360.*deg;
  G4Material* world_mat = nist->FindOrBuildMaterial("G4_AIR");
84

85
  G4Tubs* cilindro = new G4Tubs("world", raio_i, raio_e, h, theta_0, theta_f);
86 87

  G4LogicalVolume* logicWorld =
88 89 90
    new G4LogicalVolume(cilindro,          //its solid
                        world_mat,           //its material
                        "World");            //its name
91 92

  G4VPhysicalVolume* physWorld =
93 94 95 96 97 98 99 100 101 102 103 104 105
    new G4PVPlacement(0,                     //no rotation
                      G4ThreeVector(),       //at (0,0,0)
                      logicWorld,            //its logical volume
                      "World",               //its name
                      0,                     //its mother  volume
                      false,                 //no boolean operation
                      0,                     //copy number
                      checkOverlaps);        //overlaps checking

  //
  //always return the physical World
  //
   fScoringVolume = logicWorld;
106 107 108 109 110

  //Criando detetor para ver partículas que chegam à superfície


  G4Tubs* detector = new G4Tubs("detector", raio_i, raio_e, h_detector, theta_0, theta_f);
111

112

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
  G4LogicalVolume* logicDetector1 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector1");

  G4LogicalVolume* logicDetector2 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector2");

  G4LogicalVolume* logicDetector3 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector3");

  G4LogicalVolume* logicDetector4 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector4");

G4LogicalVolume* logicDetector5 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector5");

G4LogicalVolume* logicDetector6 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector6");

G4LogicalVolume* logicDetector7 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector7");


G4LogicalVolume* logicDetector8 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector8");

G4LogicalVolume* logicDetector9 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector9");

G4LogicalVolume* logicDetector10 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector10");


G4LogicalVolume* logicDetector11 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector11");

G4LogicalVolume* logicDetector12 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector12");


G4LogicalVolume* logicDetector13 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector13");
G4LogicalVolume* logicDetector14 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector14");
G4LogicalVolume* logicDetector15 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector15");

G4LogicalVolume* logicDetector16 = new G4LogicalVolume(detector,
175
                                                      world_mat,
176 177 178 179 180 181 182 183
                                                      "detector16");
G4LogicalVolume* logicDetector17 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                      "detector17");

G4LogicalVolume* logicDetector18 = new G4LogicalVolume(detector,
                                                        world_mat,
                                                      "detector18");
184

185 186 187
G4LogicalVolume* logicDetector19 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                     "detector19");
188

189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248

G4LogicalVolume* logicDetector20 = new G4LogicalVolume(detector,
                                                       world_mat,
                                                      "detector20");

G4LogicalVolume* logicDetector21 = new G4LogicalVolume(detector,
                                                       world_mat,
                                                      "detector21");

G4LogicalVolume* logicDetector22 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                    "detector22");

G4LogicalVolume* logicDetector23 = new G4LogicalVolume(detector,
                                                       world_mat,
                                                     "detector23");


G4LogicalVolume* logicDetector24 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                     "detector24");

G4LogicalVolume* logicDetector25 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                    "detector25");

G4LogicalVolume* logicDetector26 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                   "detector26");


G4LogicalVolume* logicDetector27 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                    "detector27");

G4LogicalVolume* logicDetector28 = new G4LogicalVolume(detector,
                                                      world_mat,
                                                    "detector28");

G4LogicalVolume* logicDetector29 = new G4LogicalVolume(detector,
                                                        world_mat,
                                                        "detector29");

G4LogicalVolume* logicDetector30 = new G4LogicalVolume(detector,
                                                        world_mat,
                                                      "detector30");

G4LogicalVolume* logicDetector31 = new G4LogicalVolume(detector,
                                                        world_mat,
                                                     "detector31");

G4LogicalVolume* logicDetector32 = new G4LogicalVolume(detector,
                                                       world_mat,
                                                     "detector32");


G4double safe_distance = 0.003*km;
G4int num_detector = 32;
G4double total_safe = h_detector + safe_distance;
G4double delta_h = (2*h - 2*safe_distance - 4*h_detector)/(num_detector - 1);
249 250 251 252
G4double initial_pos = -h + total_safe;
G4double final_pos = h - total_safe;
size = h;
delta = delta_h;
253
//colocando mais detetores
254
G4double pos1 = initial_pos;
255

256
positions.push_back(pos1);
257

258
   new G4PVPlacement(0,
259
                     G4ThreeVector(0,0,(initial_pos)),
260 261 262 263 264 265 266
                     logicDetector1,
                     "detector1",
                      logicWorld,
                      false,
                      1,
                      checkOverlaps);

267 268
G4double pos2 = (initial_pos + delta_h);
positions.push_back(pos2);
269
   new G4PVPlacement(0,
270
                     G4ThreeVector(0,0,(pos2)),
271 272 273 274 275 276 277
                     logicDetector2,
                     "detector2",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

278 279
G4double pos3 = (initial_pos + 2*delta_h);
positions.push_back(pos3);
280

281
  new G4PVPlacement(0,
282
                     G4ThreeVector(0,0,(pos3)),
283 284 285 286 287 288 289
                     logicDetector3,
                     "detector3",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

290 291 292
G4double pos4 = (initial_pos + 3*delta_h);
positions.push_back(pos4);
G4cout << h << G4endl;
293
   new G4PVPlacement(0,
294
                    G4ThreeVector(0,0,(pos4)),
295 296 297 298 299 300 301
                     logicDetector4,
                     "detector4",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

302 303 304 305

G4double  pos5 = (initial_pos + 4*delta_h);
positions.push_back(pos5);

306
    new G4PVPlacement(0,
307
                     G4ThreeVector(0,0,(pos5)),
308 309 310 311 312 313 314
                     logicDetector5,
                     "detector5",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

315 316 317 318

G4double pos6 = (initial_pos + 5*delta_h);
positions.push_back(pos6);

319
    new G4PVPlacement(0,
320
                     G4ThreeVector(0,0,(pos6)),
321 322 323 324 325 326 327
                     logicDetector6,
                     "detector6",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

328 329 330
G4double pos7 = (initial_pos + 6*delta_h);
positions.push_back(pos7);

331
    new G4PVPlacement(0,
332
                     G4ThreeVector(0,0,(pos7)),
333 334 335 336 337 338 339
                     logicDetector7,
                     "detector7",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

340 341
G4double pos8 = (initial_pos + 7*delta_h);
positions.push_back(pos8);
342 343

    new G4PVPlacement(0,
344
                     G4ThreeVector(0,0,(pos8)),
345 346 347 348 349 350 351
                     logicDetector8,
                     "detector8",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

352 353 354
G4double pos9 = (initial_pos + 8*delta_h);
positions.push_back(pos9);

355
   new G4PVPlacement(0,
356
                     G4ThreeVector(0,0,(pos9)),
357 358 359 360 361 362 363
                     logicDetector9,
                     "detector9",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

364 365 366
G4double pos10 = (initial_pos + 9*delta_h);
positions.push_back(pos10);

367
   new G4PVPlacement(0,
368
                     G4ThreeVector(0,0,pos10),
369 370 371 372 373 374 375
                     logicDetector10,
                     "detector10",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

376 377 378
G4double pos11 = (initial_pos + 10*delta_h);
positions.push_back(pos11);

379
   new G4PVPlacement(0,
380
                     G4ThreeVector(0,0,pos11),
381 382 383 384 385 386
                     logicDetector11,
                     "detector11",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);
387 388 389 390

G4double pos12 = (initial_pos + 11*delta_h);
positions.push_back(pos12);

391
  new G4PVPlacement(0,
392
                     G4ThreeVector(0,0,pos12),
393 394 395 396 397 398
                     logicDetector12,
                     "detector12",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);
399 400 401 402

G4double pos13 = (initial_pos + 12*delta_h);
positions.push_back(pos13);

403
  new G4PVPlacement(0,
404
                     G4ThreeVector(0,0,pos13),
405 406 407 408 409 410 411
                     logicDetector13,
                     "detector13",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

412 413 414
G4double pos14 = (initial_pos + 13*delta_h);
positions.push_back(pos14);

415
   new G4PVPlacement(0,
416
                     G4ThreeVector(0,0,pos14),
417 418 419 420 421 422 423
                     logicDetector14,
                     "detector14",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

424 425 426
G4double pos15 = (initial_pos + 14*delta_h);
positions.push_back(pos15);

427
 new G4PVPlacement(0,
428
                     G4ThreeVector(0,0,pos15),
429 430 431 432 433 434 435
                     logicDetector15,
                     "detector15",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

436 437 438
G4double pos16 = (initial_pos + 15*delta_h);
positions.push_back(pos16);

439
 new G4PVPlacement(0,
440
                     G4ThreeVector(0,0,pos16),
441 442 443 444 445 446 447
                     logicDetector16,
                     "detector16",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

448 449 450
G4double pos17 = (initial_pos + 16*delta_h);
positions.push_back(pos17);

451
new G4PVPlacement(0,
452
                     G4ThreeVector(0,0,pos17),
453 454 455 456 457 458 459
                     logicDetector17,
                     "detector17",
                      logicWorld,
                      false,
                      1,
                     checkOverlaps);

460 461 462
G4double pos18 = (initial_pos + 17*delta_h);
positions.push_back(pos18);

463
new G4PVPlacement(0,
464
                  G4ThreeVector(0,0,pos18),
465 466 467 468 469 470 471 472
                  logicDetector18,
                  "detector18",
                  logicWorld,
                  false,
                  1,
                  checkOverlaps);


473

474 475
G4double pos19 = (initial_pos + 18*delta_h);
positions.push_back(pos19);
476 477

new G4PVPlacement(0,
478
                  G4ThreeVector(0,0,(pos19)),
479 480 481 482 483 484
                  logicDetector19,
                  "detector19",
                  logicWorld,
                  false,
                  1,
                  checkOverlaps);
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648

G4double pos20 = (initial_pos + 19*delta_h);
positions.push_back(pos20);

new G4PVPlacement(0,
                G4ThreeVector(0,0,(pos20)),
                logicDetector20,
               "detector20",
                logicWorld,
                false,
                1,
               checkOverlaps);

G4double pos21 = (initial_pos + 20*delta_h);
positions.push_back(pos21);

new G4PVPlacement(0,
                  G4ThreeVector(0,0,(pos21)),
                  logicDetector21,
                  "detector21",
                  logicWorld,
                  false,
                   1,
                  checkOverlaps);

G4double pos22 = (initial_pos + 21*delta_h);
positions.push_back(pos22);

new G4PVPlacement(0,
                  G4ThreeVector(0,0,(pos22)),
                  logicDetector22,
                  "detector22",
                  logicWorld,
                    false,
                    1,
                  checkOverlaps);

G4double pos23 = (initial_pos + 22*delta_h);
positions.push_back(pos23);

new G4PVPlacement(0,
                 G4ThreeVector(0,0,(pos23)),
                logicDetector23,
                "detector23",
                logicWorld,
                false,
                 1,
                checkOverlaps);

G4double pos24 = (initial_pos + 23*delta_h);
positions.push_back(pos24);

new G4PVPlacement(0,
                G4ThreeVector(0,0,(pos24)),
                  logicDetector24,
                  "detector24",
                  logicWorld,
                    false,
                      1,
                checkOverlaps);

G4double pos25 = (initial_pos + 24*delta_h);
positions.push_back(pos25);

  new G4PVPlacement(0,
                    G4ThreeVector(0,0,(pos25)),
                    logicDetector25,
                    "detector25",
                    logicWorld,
                      false,
                        1,
                    checkOverlaps);

G4double pos26 = (initial_pos + 25*delta_h);
positions.push_back(pos26);

new G4PVPlacement(0,
                 G4ThreeVector(0,0,(pos26)),
                logicDetector26,
                "detector26",
                logicWorld,
                  false,
                  1,
              checkOverlaps);

G4double pos27 = (initial_pos + 26*delta_h);
positions.push_back(pos27);

new G4PVPlacement(0,
                G4ThreeVector(0,0,(pos27)),
                 logicDetector27,
                "detector27",
                logicWorld,
                  false,
                    1,
                checkOverlaps);

G4double pos28 = (initial_pos + 27*delta_h);
positions.push_back(pos28);

new G4PVPlacement(0,
                  G4ThreeVector(0,0,(pos28)),
                 logicDetector28,
                  "detector28",
                  logicWorld,
                  false,
                    1,
                  checkOverlaps);

G4double pos29 = (initial_pos + 28*delta_h);
positions.push_back(pos29);

new G4PVPlacement(0,
                G4ThreeVector(0,0,(pos29)),
                 logicDetector29,
                "detector29",
                logicWorld,
                  false,
                    1,
                checkOverlaps);

G4double pos30 = (initial_pos + 29*delta_h);
positions.push_back(pos30);

new G4PVPlacement(0,
                 G4ThreeVector(0,0,(pos30)),
                logicDetector30,
                "detector30",
                  logicWorld,
                  false,
                    1,
                checkOverlaps);

G4double pos31 = (initial_pos + 30*delta_h);
positions.push_back(pos31);

new G4PVPlacement(0,
                  G4ThreeVector(0,0,(pos31)),
                  logicDetector31,
                  "detector31",
                  logicWorld,
                    false,
                      1,
                    checkOverlaps);

G4double pos32 = (initial_pos + 31*delta_h);
positions.push_back(pos32);

new G4PVPlacement(0,
                  G4ThreeVector(0,0,(pos32)),
                  logicDetector32,
                  "detector32",
                  logicWorld,
                    false,
                      1,
                  checkOverlaps);








649 650 651 652

    //fScoringDetector = logicDetector;

   //associando à um sensitive G4VSensitiveDetecto
653
  auto sdman = G4SDManager::GetSDMpointer();
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745

  G4String SDname1;
  auto sensitive1 = new B1SD(SDname1 = "SD1");
  sdman->AddNewDetector(sensitive1);
  logicDetector1->SetSensitiveDetector(sensitive1);

  G4String SDname2;
  auto sensitive2 = new B1SD(SDname2 = "SD2");
  sdman->AddNewDetector(sensitive2);
  logicDetector2->SetSensitiveDetector(sensitive2);

 G4String SDname3;
  auto sensitive3 = new B1SD(SDname3 = "SD3");
  sdman->AddNewDetector(sensitive3);
  logicDetector3->SetSensitiveDetector(sensitive3);

G4String SDname4;
  auto sensitive4 = new B1SD(SDname4 = "SD4");
  sdman->AddNewDetector(sensitive4);
  logicDetector4->SetSensitiveDetector(sensitive4);

G4String SDname5;
  auto sensitive5 = new B1SD(SDname5 = "SD5");
  sdman->AddNewDetector(sensitive5);
  logicDetector5->SetSensitiveDetector(sensitive5);

G4String SDname6;
  auto sensitive6 = new B1SD(SDname6 = "SD6");
  sdman->AddNewDetector(sensitive6);
  logicDetector6->SetSensitiveDetector(sensitive6);

G4String SDname7;
  auto sensitive7 = new B1SD(SDname7 = "SD7");
  sdman->AddNewDetector(sensitive7);
  logicDetector7->SetSensitiveDetector(sensitive7);

G4String SDname8;
  auto sensitive8 = new B1SD(SDname8 = "SD8");
  sdman->AddNewDetector(sensitive8);
  logicDetector8->SetSensitiveDetector(sensitive8);

G4String SDname9;
  auto sensitive9 = new B1SD(SDname9 = "SD9");
  sdman->AddNewDetector(sensitive9);
  logicDetector9->SetSensitiveDetector(sensitive9);

G4String SDname10;
  auto sensitive10 = new B1SD(SDname10 = "SD10");
  sdman->AddNewDetector(sensitive10);
  logicDetector10->SetSensitiveDetector(sensitive10);

G4String SDname11;
  auto sensitive11 = new B1SD(SDname11 = "SD11");
  sdman->AddNewDetector(sensitive11);
  logicDetector11->SetSensitiveDetector(sensitive11);

G4String SDname12;
  auto sensitive12 = new B1SD(SDname12 = "SD12");
  sdman->AddNewDetector(sensitive12);
  logicDetector12->SetSensitiveDetector(sensitive12);

G4String SDname13;
  auto sensitive13 = new B1SD(SDname13 = "SD13");
  sdman->AddNewDetector(sensitive13);
  logicDetector13->SetSensitiveDetector(sensitive13);

G4String SDname14;
  auto sensitive14 = new B1SD(SDname14 = "SD14");
  sdman->AddNewDetector(sensitive14);
  logicDetector14->SetSensitiveDetector(sensitive14);


G4String SDname15;
  auto sensitive15 = new B1SD(SDname15 = "SD15");
  sdman->AddNewDetector(sensitive15);
  logicDetector15->SetSensitiveDetector(sensitive15);

G4String SDname16;
  auto sensitive16 = new B1SD(SDname16 = "SD16");
  sdman->AddNewDetector(sensitive16);
  logicDetector16->SetSensitiveDetector(sensitive16);

G4String SDname17;
  auto sensitive17 = new B1SD(SDname17 = "SD17");
  sdman->AddNewDetector(sensitive17);
  logicDetector17->SetSensitiveDetector(sensitive17);

  G4String SDname18;
  auto sensitive18 = new B1SD(SDname18= "SD18");
  sdman->AddNewDetector(sensitive18);
  logicDetector18->SetSensitiveDetector(sensitive18);

746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817
  G4String SDname19;
  auto sensitive19 = new B1SD(SDname19= "SD19");
  sdman->AddNewDetector(sensitive19);
  logicDetector19->SetSensitiveDetector(sensitive19);

  G4String SDname20;
  auto sensitive20 = new B1SD(SDname20= "SD20");
  sdman->AddNewDetector(sensitive20);
  logicDetector20->SetSensitiveDetector(sensitive20);

  G4String SDname21;
  auto sensitive21 = new B1SD(SDname21= "SD21");
  sdman->AddNewDetector(sensitive21);
  logicDetector21->SetSensitiveDetector(sensitive21);

  G4String SDname22;
  auto sensitive22 = new B1SD(SDname22= "SD22");
  sdman->AddNewDetector(sensitive22);
  logicDetector22->SetSensitiveDetector(sensitive22);

  G4String SDname23;
  auto sensitive23 = new B1SD(SDname23= "SD23");
  sdman->AddNewDetector(sensitive23);
  logicDetector23->SetSensitiveDetector(sensitive23);

  G4String SDname24;
  auto sensitive24 = new B1SD(SDname24= "SD24");
  sdman->AddNewDetector(sensitive24);
  logicDetector24->SetSensitiveDetector(sensitive24);

  G4String SDname25;
  auto sensitive25 = new B1SD(SDname25= "SD25");
  sdman->AddNewDetector(sensitive25);
  logicDetector25->SetSensitiveDetector(sensitive25);

  G4String SDname26;
  auto sensitive26 = new B1SD(SDname26= "SD26");
  sdman->AddNewDetector(sensitive26);
  logicDetector26->SetSensitiveDetector(sensitive26);

  G4String SDname27;
  auto sensitive27 = new B1SD(SDname27= "SD27");
  sdman->AddNewDetector(sensitive27);
  logicDetector27->SetSensitiveDetector(sensitive27);


  G4String SDname28;
  auto sensitive28 = new B1SD(SDname28= "SD28");
  sdman->AddNewDetector(sensitive28);
  logicDetector28->SetSensitiveDetector(sensitive28);

  G4String SDname29;
  auto sensitive29 = new B1SD(SDname29= "SD29");
  sdman->AddNewDetector(sensitive29);
  logicDetector29->SetSensitiveDetector(sensitive29);

  G4String SDname30;
  auto sensitive30 = new B1SD(SDname30= "SD30");
  sdman->AddNewDetector(sensitive30);
  logicDetector30->SetSensitiveDetector(sensitive30);

  G4String SDname31;
  auto sensitive31 = new B1SD(SDname31= "SD31");
  sdman->AddNewDetector(sensitive31);
  logicDetector31->SetSensitiveDetector(sensitive31);

  G4String SDname32;
  auto sensitive32 = new B1SD(SDname32= "SD32");
  sdman->AddNewDetector(sensitive32);
  logicDetector32->SetSensitiveDetector(sensitive32);


818

819 820 821 822
    //colocando cor vermelha para detector
  G4VisAttributes* worldVisAtt1 = new G4VisAttributes(G4Colour(1.0,0.0,0.0));
  worldVisAtt1->SetVisibility(true);

823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840
  logicDetector1->SetVisAttributes(worldVisAtt1);
  logicDetector2->SetVisAttributes(worldVisAtt1);
  logicDetector3->SetVisAttributes(worldVisAtt1);
  logicDetector4->SetVisAttributes(worldVisAtt1);
  logicDetector5->SetVisAttributes(worldVisAtt1);
  logicDetector6->SetVisAttributes(worldVisAtt1);
  logicDetector7->SetVisAttributes(worldVisAtt1);
  logicDetector8->SetVisAttributes(worldVisAtt1);
  logicDetector9->SetVisAttributes(worldVisAtt1);
  logicDetector10->SetVisAttributes(worldVisAtt1);
  logicDetector11->SetVisAttributes(worldVisAtt1);
  logicDetector12->SetVisAttributes(worldVisAtt1);
  logicDetector13->SetVisAttributes(worldVisAtt1);
  logicDetector14->SetVisAttributes(worldVisAtt1);
  logicDetector15->SetVisAttributes(worldVisAtt1);
  logicDetector16->SetVisAttributes(worldVisAtt1);
  logicDetector17->SetVisAttributes(worldVisAtt1);
  logicDetector18->SetVisAttributes(worldVisAtt1);
841 842 843 844 845 846 847 848 849 850 851 852 853 854
  logicDetector19->SetVisAttributes(worldVisAtt1);
  logicDetector20->SetVisAttributes(worldVisAtt1);
  logicDetector21->SetVisAttributes(worldVisAtt1);
  logicDetector22->SetVisAttributes(worldVisAtt1);
  logicDetector23->SetVisAttributes(worldVisAtt1);
  logicDetector24->SetVisAttributes(worldVisAtt1);
  logicDetector25->SetVisAttributes(worldVisAtt1);
  logicDetector26->SetVisAttributes(worldVisAtt1);
  logicDetector27->SetVisAttributes(worldVisAtt1);
  logicDetector28->SetVisAttributes(worldVisAtt1);
  logicDetector29->SetVisAttributes(worldVisAtt1);
  logicDetector30->SetVisAttributes(worldVisAtt1);
  logicDetector31->SetVisAttributes(worldVisAtt1);
  logicDetector32->SetVisAttributes(worldVisAtt1);
855

856 857 858
  return physWorld;
}

859

860
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......