Commit 67ac3d7f authored by Alex Ciabattoni's avatar Alex Ciabattoni
Browse files

Geometry COSI updates

parent 220261a6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -654,6 +654,12 @@ void MaterialsDefinition::DefineMaterials() {
    H2O = new G4Material("Water", density, 2);
    H2O->AddElement(elH, natoms=2);
    H2O->AddElement(elO, natoms=1);

    // wood
    wood = new G4Material(name="wood", density=0.9*g/cm3, ncomponents=3);
    wood->AddElement(elH , 4);
    wood->AddElement(elO , 1);
    wood->AddElement(elC , 2);
}


@@ -874,6 +880,9 @@ G4Material* MaterialsDefinition::GetMaterial(int index) {
    case 71:
        dummat = PVC;
        break;
    case 72:
        dummat = wood;
        break;
    }
    return dummat;
}
+1 −0
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ public:
    G4Material* PVC;
    
    G4Material* H2O;
    G4Material* wood;
    


+53 −1
Original line number Diff line number Diff line
@@ -1333,6 +1333,11 @@ G4VPhysicalVolume* GeometryCOSI_ACS::ConstructGeometry(G4VPhysicalVolume* World_
        gm.config->readInto(BGO_absl_type, "PHYS.COSI.BGO.ABSL.TYPE");
        G4cout << "PHYS.COSI.BGO.ABSL.TYPE: " << BGO_absl_type << G4endl;

        /* set if the BGO light yield is constant or not */
        G4int BGO_constant_yield = 1;
        gm.config->readInto(BGO_constant_yield, "PHYS.COSI.BGO.CONST.YIELD");
        G4cout << "PHYS.COSI.BGO.CONST.YIELD: " << BGO_constant_yield << G4endl;

        /* optical surface case */
        G4int setReflSurfaceType = 0;
        gm.config->readInto(setReflSurfaceType, "PHYS.ACS.OPTSURFACE.WRAPPER");
@@ -1349,6 +1354,12 @@ G4VPhysicalVolume* GeometryCOSI_ACS::ConstructGeometry(G4VPhysicalVolume* World_
        G4int plastic_sens = 0;
        gm.config->readInto(plastic_sens, "SENSITIVE.PLASTIC");
        G4cout << "SENSITIVE.PLASTIC: " << plastic_sens << G4endl;
        G4int Al_layer_sens = 0;
        gm.config->readInto(Al_layer_sens, "SENSITIVE.AL.LAYER");
        G4cout << "SENSITIVE.AL.LAYER: " << Al_layer_sens << G4endl;
        G4int table_sens = 0;
        gm.config->readInto(table_sens, "SENSITIVE.TABLE");
        G4cout << "SENSITIVE.TABLE: " << table_sens << G4endl;
        G4int refl3_sens = 0;
        gm.config->readInto(refl3_sens, "SENSITIVE.REFL3");
        G4cout << "SENSITIVE.REFL3: " << refl3_sens << G4endl;
@@ -1408,6 +1419,7 @@ G4VPhysicalVolume* GeometryCOSI_ACS::ConstructGeometry(G4VPhysicalVolume* World_
        bgo_mat = materials->GetMaterial(21);
        Al_mat = materials->GetMaterial(67);
        plastic_mat = materials->GetMaterial(71);
        wood_mat = materials->GetMaterial(72);
        ej560_mat = materials->GetMaterial(63); /* optical coupler */
        sy184_mat = materials->GetMaterial(63);
        refl1_mat = materials->GetMaterial(71); /* VM 2000 */
@@ -1476,7 +1488,13 @@ G4VPhysicalVolume* GeometryCOSI_ACS::ConstructGeometry(G4VPhysicalVolume* World_
        G4MaterialPropertiesTable* BGO_MPT = new G4MaterialPropertiesTable();
        
        // properties independent of energy
        if (BGO_constant_yield == 1) {
            BGO_MPT->AddConstProperty("SCINTILLATIONYIELD", 8.2/keV);
        } else {
            std::vector<G4double> BGO_Energy_Yield  = { 0.001 * keV, 32 * keV,  60* keV, 81 * keV, 246 * keV, 514 * keV, 1291 * keV };
            std::vector<G4double> BGO_Yield  = { 8.2*0.3/keV, 8.2*0.56/keV, 8.2*0.72/keV, 8.2/keV, 8.2/keV, 8.2/keV, 8.2/keV };
            BGO_MPT->AddProperty("SCINTILLATIONYIELD", BGO_Energy_Yield, BGO_Yield, false, false);
        }
        
        // decay time
        BGO_MPT->AddConstProperty("SCINTILLATIONTIMECONSTANT1", 300.*ns);
@@ -2885,6 +2903,40 @@ G4VPhysicalVolume* GeometryCOSI_ACS::ConstructGeometry(G4VPhysicalVolume* World_
            if (Al_sens == 1)
                gm.AddXYZDetector(log_Al);

            /* Aluminum layer */
            G4int Al_layer_copy = 7;

            G4double Al_layerX = 1000;
            G4double Al_layerY = 1000;
            G4double Al_layerZ = 2;

            G4Box* solid_Al_layer = new G4Box("solid_Al_layer", Al_layerX/2., Al_layerY/2., Al_layerZ/2.);
            G4LogicalVolume* log_Al_layer = new G4LogicalVolume(solid_Al_layer, Al_mat, "log_Al_layer");
            G4VPhysicalVolume* phys_Al_layer = new G4PVPlacement(0, G4ThreeVector(0., 0., -zlen-plasticZ-AlThick-Al_layerZ/2.), log_Al_layer, "Al_layer", log_chamber, false, Al_layer_copy, true);

            G4VisAttributes* VisAl_layer = new G4VisAttributes(G4Colour::Grey());
            log_Al_layer->SetVisAttributes(VisAl_layer);

            if (Al_layer_sens == 1)
                gm.AddXYZDetector(log_Al_layer);

            /* Wooden table */
            G4int table_copy = 7;

            G4double tableX = 1000;
            G4double tableY = 1000;
            G4double tableZ = 150;

            G4Box* solid_table = new G4Box("solid_table", tableX/2., tableY/2., tableZ/2.);
            G4LogicalVolume* log_table = new G4LogicalVolume(solid_table, wood_mat, "log_table");
            G4VPhysicalVolume* phys_table = new G4PVPlacement(0, G4ThreeVector(0., 0., -zlen-plasticZ-AlThick-Al_layerZ-tableZ/2.), log_table, "table", log_chamber, false, table_copy, true);

            G4VisAttributes* VisTable = new G4VisAttributes(G4Colour::Brown());
            log_table->SetVisAttributes(VisTable);

            if (table_sens == 1)
                gm.AddXYZDetector(log_table);

            /* Teflon PTFE */
            G4int tefl_copy = 10; 

+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ protected:
    G4Material* sy184_mat;
    G4Material* tefl_mat;
    G4Material* plastic_mat;
    G4Material* wood_mat;

private:
    
+21 −14
Original line number Diff line number Diff line
@@ -101,6 +101,12 @@ OPTPhys::OPTPhys()
    // Neutron tracking cut
    RegisterPhysics( new G4NeutronTrackingCut());

    /* optical physics */
    G4int setOptPhys = 1;
    gm.config->readInto(setOptPhys, "PHYS.COSI.OPT.ACTIVATE");
    G4cout << "PHYS.COSI.OPT.ACTIVATE: " << setOptPhys << G4endl;

    if (setOptPhys == 1) {
        G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
        auto opticalParams               = G4OpticalParameters::Instance();

@@ -115,6 +121,7 @@ OPTPhys::OPTPhys()
        opticalParams->SetCerenkovTrackSecondariesFirst(true);
        
        RegisterPhysics(opticalPhysics);
    }
    
    /*
    ///COSI (2)