Skip to content
Snippets Groups Projects
Commit dadada08 authored by Alfonso's avatar Alfonso
Browse files

quando gli gira va

parent 254ca916
Branches
No related tags found
No related merge requests found
......@@ -286,7 +286,7 @@ class DetectorConstruction : public G4VUserDetectorConstruction
G4Material* polypropMaterial;
G4Material* kapMaterial;
G4Material* alumMaterial;
G4Material* FR4;
G4Material* fr4Material;
};
......
......@@ -53,6 +53,8 @@ class PCBParameterisation : public G4VPVParameterisation
G4double fHeight;
G4double fThick;
G4int fSide;
G4Material* fr4Material;
};
......
......@@ -348,13 +348,13 @@ void DetectorConstruction::DefineMaterials()
G4Material* FR4 = new G4Material("FR4", density = 1.8*g/cm3, ncomponents=2);
FR4 -> AddMaterial(G4_SILICON_DIOXIDE, fractionmass=60*perCent);
FR4 -> AddMaterial(Epoxy_Resin, fractionmass=40*perCent);
fr4Material = FR4; // G4Material::GetMaterial("FR4");
// Default materials of the World: vacuum
defaultMaterial = Vacuum;
}
// Detector construction
G4VPhysicalVolume* DetectorConstruction::Construct()
{
......@@ -365,6 +365,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
G4SolidStore::GetInstance()->Clean();
// ! Experimental hall (world volume)
// Solid
......@@ -587,10 +588,10 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
// ! PCB
// Solid
G4double pcb_side_x = coll_side_x *cm;
G4double pcb_side_y = coll_side_y *cm;
G4double pcb_side_x = coll_side_x;
G4double pcb_side_y = coll_side_y;
G4double pcb_thick = 1.6 *mm; // ! si potrebbe mettere come parametro
G4double pcb_height = optCoupler_thick+sdd_thick+pcb_thick/2. *cm;
G4double pcb_height = optCoupler_thick+sdd_thick+pcb_thick;
G4Box* pcb_container_box = new G4Box("pcb_container_box", pcb_side_x/2., pcb_side_y/2., pcb_thick/2.);
......@@ -606,20 +607,31 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
false,
0);
// Solid
G4double pcb_elem_side_x = 3.*mm;
G4double pcb_elem_side_y = pcb_side_y;
G4cout << "Materiale FR4: " << fr4Material->GetName() << G4endl;
G4Box* pcb_box = new G4Box("pcb_box", pcb_elem_side_x/2., pcb_elem_side_y/2., pcb_thick/2.);
// Logical
pcb_log = new G4LogicalVolume(pcb_box, FR4, "pcb_log", 0, 0, 0);
pcb_log = new G4LogicalVolume(pcb_box, fr4Material, "pcb_log", 0, 0, 0);
// Physical
G4int n_rep = (n_side-1)/2; // repliche di PCB usando il numero di scintillatori per side
pcbParam = new PCBParameterisation(pcb_elem_side_x, pcb_elem_side_y, pcb_height, pcb_thick, n_rep);
G4cout << " pcb_elem_side_x " << pcb_elem_side_x/mm << G4endl;
G4cout << " pcb_elem_side_y " << pcb_elem_side_y/mm << G4endl;
G4cout << " pcb_height " << pcb_height << G4endl;
G4cout << " pcb_thick " << pcb_thick/mm << G4endl;
G4cout << " pcb_sie_x " << pcb_side_x << G4endl;
G4cout << " n_rep " << n_rep << G4endl;
pcb_phys = new G4PVParameterised("pcb_phys", // their name
pcb_log, // their logical volume
pcb_container_log, // Mother logical volume
......
......@@ -30,10 +30,11 @@ void PCBParameterisation::ComputeTransformation (const G4int copyNo, G4VPhysical
xPos = (-fLength)/2. +1.*cm + copyNo* 1.*cm; //sono al centro della barra capisci se indietreggiare di mezza barra
G4cout << "*** DEBUG ***: Replica number " << copyNo << G4endl;
G4cout << "*** DEBUG ***: " << xPos << " " << yPos << " " << zPos << G4endl;
G4cout << " copyNo " << copyNo << G4endl;
G4cout << " fSpacing " << fSpacing << G4endl;
G4cout << " zPos " << zPos << G4endl;
G4cout << " fLength " << fLength << G4endl;
G4cout << " fSpacing " << fSpacing << G4endl;
physVol->SetTranslation(G4ThreeVector(xPos, yPos, zPos));
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment