/** * @file SolidMPPC.cc * @author Ibrahin Pinera * @date 2016 SoLid - University of Antwerp */ #include "SolidMPPC.hh" #include "SolidMaterials.hh" #include "G4Material.hh" #include "G4MaterialTable.hh" #include "G4LogicalBorderSurface.hh" #include "G4OpBoundaryProcess.hh" #include "G4ThreeVector.hh" #include "G4VisAttributes.hh" #include "G4Transform3D.hh" #include "G4Box.hh" #include "G4PVPlacement.hh" #include "G4UnitsTable.hh" #include "G4LogicalBorderSurface.hh" #include "G4LogicalSkinSurface.hh" #include "G4SystemOfUnits.hh" #include "G4PhysicalConstants.hh" #include SolidMPPC::SolidMPPC(G4int verboseLevel) { m_verboseLevel = verboseLevel; m_mppcSize = 3*mm; m_mppcThickness = 0.3*mm; } SolidMPPC::~SolidMPPC() {} G4LogicalVolume *SolidMPPC::MPPCConstruction() { G4Material * mate; // make colours ********************************************************* G4Colour white (1.0, 1.0, 1.0) ; G4Colour white_t (1.0, 1.0, 1.0, .95) ; G4Colour grey (0.5, 0.5, 0.5) ; G4Colour lgrey (.75, .75, .75) ; G4Colour red (1.0, 0.0, 0.0) ; G4Colour blue (0.0, 0.0, 1.0) ; G4Colour blue_t (0.0, 0.0, 1.0, .75) ; G4Colour cyan (0.0, 1.0, 1.0, 0.5) ; G4Colour magenta (1.0, 0.0, 1.0) ; G4Colour yellow (1.0, 1.0, 0.0) ; G4Colour lblue (0.0, 0.0, .75) ; G4Colour black (0.0, 0.0, 0.0) ; G4Colour green (0.0, 1.0, 0.0, 0.5) ; G4Colour lgreen (0.0, .75, 0.0) ; //Build MPPC mate = G4Material::GetMaterial("MPPCFilm"); G4Box * mppcBox = new G4Box("mppcBox",0.5*m_mppcSize,0.5*m_mppcThickness,0.5*m_mppcSize); logMPPC = new G4LogicalVolume(mppcBox,mate,"logMPPC",0,0,0); G4VisAttributes* vatMPPC= new G4VisAttributes(yellow); vatMPPC->SetVisibility(true); vatMPPC->SetForceSolid(true); logMPPC->SetVisAttributes(vatMPPC); if(m_verboseLevel>0){ G4cout << "**************VOLUME MASS****************" << G4endl; G4cout << "MPPC: mass=" << logMPPC->GetMass()/g << ", volume=" << mppcBox->GetCubicVolume()/cm3 << G4endl; G4cout << "MPPC: TOTmass=" << 288.*logMPPC->GetMass()/g << ", volume=" << 288.*mppcBox->GetCubicVolume()/cm3 << G4endl; G4cout << "**********END VOLUME MASS****************" << G4endl; } /* G4double fMPPCPolish = 1.; // G4double fMPPCReflectivity = 0.; G4OpticalSurface* photonDetSurface = new G4OpticalSurface("PhotonDetSurface", glisur, ground, dielectric_metal, fMPPCPolish); G4int MPPCentries = 0; G4double MPPCenergy[500]; G4double MPPCindex[500]; G4double MPPCreflect[500]; G4double MPPCdetect[500]; // G4double MPPCAbsLength[500]; G4double MPPCEff[500]; G4double indexconst = 1.59; G4double reflectconst = 0.0; // G4double MPPCAbsLengthConst = 1e-20*m; std::ifstream ReadMPPC; G4String MPPCfile = "./properties/MPPC-PDE-vs-wavelength.txt"; ReadMPPC.open(MPPCfile); if (ReadMPPC.is_open()){ while(!ReadMPPC.eof()){ G4String filler; G4double wavelength; ReadMPPC >> wavelength >> filler >> MPPCdetect[MPPCentries]; MPPCenergy[MPPCentries] = (1240/wavelength)*eV; MPPCindex[MPPCentries] = indexconst; MPPCreflect[MPPCentries] = reflectconst; // MPPCAbsLength[MPPCentries] = MPPCAbsLengthConst; MPPCEff[MPPCentries] = 1.0; MPPCentries++; } } else G4cout << "Error opening file: " << MPPCfile << G4endl; ReadMPPC.close(); G4MaterialPropertiesTable *mppcMPT = new G4MaterialPropertiesTable(); //mppcMPT->AddProperty("ABSLENGTH",MPPCenergy,MPPCAbsLength,MPPCentries); mppcMPT->AddProperty("EFFICIENCY",MPPCenergy,MPPCEff,MPPCentries); mppcMPT->AddProperty("REFLECTIVITY",MPPCenergy,MPPCreflect,MPPCentries); mppcMPT->AddProperty("RINDEX",MPPCenergy,MPPCindex,MPPCentries); photonDetSurface->SetMaterialPropertiesTable(mppcMPT); new G4LogicalSkinSurface("PhotonDetSurface",logMPPC,photonDetSurface); */ return logMPPC; }