Commit 27a0f8dd authored by Alex Ciabattoni's avatar Alex Ciabattoni
Browse files

Geometry COSI updates

parent 566b9702
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
@@ -1438,6 +1438,12 @@ G4VPhysicalVolume* GeometryCOSI_ACS::ConstructGeometry(G4VPhysicalVolume* World_
        G4int aligner_sens = 0;
        gm.config->readInto(aligner_sens, "SENSITIVE.ALIGNER");
        G4cout << "SENSITIVE.ALIGNER: " << aligner_sens << G4endl;  
        G4int casing_sens = 0;
        gm.config->readInto(casing_sens, "SENSITIVE.CASING");
        G4cout << "SENSITIVE.CASING: " << casing_sens << G4endl;  
        G4int foam_source_sens = 0;
        gm.config->readInto(foam_source_sens, "SENSITIVE.FOAM.SOURCE");
        G4cout << "SENSITIVE.FOAM.SOURCE: " << foam_source_sens << G4endl;  
        G4int refl3_sens_BGO1 = 0;
        gm.config->readInto(refl3_sens_BGO1, "SENSITIVE.REFL3_BGO1");
        G4cout << "SENSITIVE.REFL3_BGO1: " << refl3_sens_BGO1 << G4endl;
@@ -5416,6 +5422,61 @@ G4VPhysicalVolume* GeometryCOSI_ACS::ConstructGeometry(G4VPhysicalVolume* World_
                    gm.AddXYZDetector(log_foam);
            }
            if (Am241_or_Cs137 == 0 && is_collimated == 0) {
                /* Plastic casing aroung source */
                G4int casing_copy = 45;
                G4double casingX = 10.;
                G4double casingY = 10.;
                G4double casingZ = 5.;
                G4double casingThick = 1.;
                G4double casing_posX = 0.;
                G4double casing_posY = 0.;
                G4double casing_posZ = 16.4602 + casingZ/2.;
                G4Box* solid_casing_notsub = new G4Box("solid_casing_notsub", casingX/2., casingY/2., casingZ/2.);
                G4Box* casing_cavity = new G4Box("casing_cavity", casingX/2.-casingThick, casingY/2.-casingThick, casingZ/2.-casingThick);
                G4SubtractionSolid* solid_casing = new G4SubtractionSolid("solid_casing", solid_casing_notsub, casing_cavity, 0, G4ThreeVector(0., 0., 0.));
                
                G4LogicalVolume* log_casing = new G4LogicalVolume(solid_casing, plastic_mat, "log_casing");
                G4VPhysicalVolume* phys_casing = new G4PVPlacement(0, G4ThreeVector(casing_posX, casing_posY, casing_posZ), log_casing, "casing", log_chamber, false, casing_copy, true);
                
                G4VisAttributes* VisCasing = new G4VisAttributes(G4Colour::White());
                log_casing->SetVisAttributes(VisCasing);
                if (casing_sens == 1)
                    gm.AddXYZDetector(log_casing);
                /* Foam aroung source */
                G4int foam_source_copy = 46;
                G4double foam_sourceX = casingX-casingThick*2.;
                G4double foam_sourceY = casingY-casingThick*2.;
                G4double foam_sourceZ = casingZ-casingThick*2.;
                G4double foam_cavityThick = 1.;
                G4double foam_source_posX = 0.;
                G4double foam_source_posY = 0.;
                G4double foam_source_posZ = casing_posZ;
                G4Box* solid_foam_source_notsub = new G4Box("solid_foam_source_notsub", foam_sourceX/2., foam_sourceY/2., foam_sourceZ/2.);
                G4Tubs* foam_source_cavity = new G4Tubs("foam_cavity", 0., 2.5, foam_cavityThick/2., 0., 360.);
                G4SubtractionSolid* solid_foam_source = new G4SubtractionSolid("solid_foam_source", solid_foam_source_notsub, foam_source_cavity, 0, G4ThreeVector(0., 0., 0.));
                
                G4LogicalVolume* log_foam_source = new G4LogicalVolume(solid_foam_source, foam_mat, "log_foam_source");
                G4VPhysicalVolume* phys_foam_source = new G4PVPlacement(0, G4ThreeVector(foam_source_posX, foam_source_posY, foam_source_posZ), log_foam_source, "foam_source", log_chamber, false, foam_source_copy, true);
                
                G4VisAttributes* VisFoam_source = new G4VisAttributes(G4Colour::Brown());
                log_foam_source->SetVisAttributes(VisFoam_source);
                if (foam_source_sens == 1)
                    gm.AddXYZDetector(log_foam_source);                
            }
            if (is_collimated == 1) {
                /* 3D printed aligner */