Wrong Entry Number in TBrowser

Hello, I have setup that consists of a scintillator of 30cm^3 and an aluminium wrap that wraps the scintillator at everywhere except a little hole of 6mmx6mmx0.42 mm with a thickness of 0.075mm I placed my sensitive detector on exactly that hole of aluminium wrap and its size are 6mmx6mmx0.42mm . when I sent muons to this setup I see(by removing S.D. and wrap) scintillator produces so many optical photons but sensitive detector does not detect any of them and returns empty root files. Also as entries it only show the amount of muons I sent to the setup. A little information: My TrackerSD->ProcessHits returns false unless theTrack->GetDefinition() != G4OpticalPhoton::OpticalPhotonDefinition(). At this point I have spent weeks to this problem and I am desperate for help. I am suspicious of doing something wrong in optical surfaces but I don’t know.
DetectorConstruction.cc (14.6 KB)
TrackerSD.cc (3.7 KB)

Energy-entries

_Geant4 Version:_11.1.2
_Operating System:_Ubunutu 20.04

Hi,
to detect optical photons you could use a “G4OpticalSurface”. You need to assign an efficiency in the Material Properties Table, assign this surface to the logical volume you want to detect photons (or the border between two physical volumes) and count (and save in a tree) the detections in the SteppingAction.
You can find this in the OpNovice example under the extended/optical examples.

Hello and thanks for your response,

I atteched my TrackerSD.cc and DetectorConstruction.cc files and unfortunatley did what you said it was like this:

//------------------------------Optical Surface of sipm-scint------------------ 

    G4OpticalSurface* OpSurface_for_sipm = new G4OpticalSurface("scintillator_sipm_Surface");
    
    //G4LogicalBorderSurface* Surface = new G4LogicalBorderSurface("Scint1Surface", phys_scint1, phys_surface_scint1, OpSurface);
    
    OpSurface_for_sipm->SetType(dielectric_dielectric);
    //OpSurface->SetFinish(polishedfrontpainted);
    OpSurface_for_sipm->SetFinish(polished);
    OpSurface_for_sipm->SetModel(unified);
    OpSurface_for_sipm->SetSigmaAlpha(0.1*deg); // no known
    
    std::vector<G4double> pp_of_Si           = {  1.86 * eV, 7.79 * eV };//taken from: /examples/extended/optical/wls/src/WLSMaterials.cc
    
    
    std::vector<G4double> rindex_of_Si = { 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46}; // taken from: /examples/extended/optical/wls/src/WLSMaterials.cc
    std::vector<G4double> reflectivity = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,};
    std::vector<G4double> efficiency   = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5};

    G4MaterialPropertiesTable* opSurfaceProperty_for_sipm = new G4MaterialPropertiesTable();

    //opSurfaceProperty->AddProperty("REFLECTIVITY", photonEnergy, reflectivity);
    opSurfaceProperty->AddProperty("EFFICIENCY", photonEnergy, efficiency);
    opSurfaceProperty_for_sipm->AddProperty("RINDEX", photonEnergy, rindex_of_Si);
    opSurfaceProperty_for_sipm->AddProperty("ABSLENGTH", photonEnergy, absClad);
    OpSurface_for_sipm->SetMaterialPropertiesTable(opSurfaceProperty_for_sipm);
    
    G4LogicalBorderSurface* Surface_sipm = new G4LogicalBorderSurface("Scint1Surface", phys_scint1, phys_sipm1, OpSurface_for_sipm);

and while having this I see no optical photons being measured in my root file results. I see opticalphotons touching the sensitive detector with visual menu.

Hi,
for the method I suggested you don’t need a sensitive detector. You have to count/save the detection interactions in the SteppingAction class. Have a look at the OpNovice examples: there you can see how to count the detected optical photons. To save the events you need, you could also use a “G4AnalysysManager”, defining the ntuple in the RunAction class and calling a fill in SteppingAction.

Also, try to comment some properties:
-SigmaAlpa: i’m not sure “deg” is the unit it wants, it may be a problem
-reflectivity: if it is 0 all photons are absorbed, should be 1 as by default
-refractive index: shouldn’t be needed, if you defined it for the sipm material (you could try to comment it just to check)

Hello once again,

First of all I am sorry for not properly understanding you, your recommendations seem so logical to me, I will try them all and return to you. Thank you very much for your response.