Scintillation processes for LS detectors

_Geant4 Version:_11.3.2
_Operating System:_Windows
_Compiler/Version:_mingw32_gcc 6.3.0
_CMake Version:_3.16


Goodmorning everyone. I’m new in Geant4 simulation and I’m trying to simulate the response of a liquid scintillator in a small cylinder hit by gammas. The geometry should be an aluminum box with inside the cylinder of liquid scintillator and two PMTs for the readout.
Unfortunately I can’t see any scintillation light (any optical photon) originated from the scintillation and I think that neither the scintillation nor any interaction between the gammas and the scintillation happen.

I have defined the physics as follows:

#include "PhysicsList.hh"
#include "G4EmStandardPhysics.hh"
#include "G4DecayPhysics.hh"
#include "G4OpticalPhysics.hh"
#include "G4EmExtraPhysics.hh"
#include "G4EmParameters.hh"
#include "G4EmStandardPhysics_option4.hh"
#include "G4SystemOfUnits.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4OpticalParameters.hh"
#include "G4OpticalPhoton.hh"
#include "G4ComptonScattering.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"


PhysicsList::PhysicsList()
{
    // 1. Fisica di base
    RegisterPhysics(new G4DecayPhysics());
    //______________________________________

    // 2. Fisica elettromagnetica standard
    RegisterPhysics(new G4EmStandardPhysics());
    RegisterPhysics(new G4EmStandardPhysics_option4());  // Fisica EM avanzata
    //______________________________________

    // 3. Altra fisica
    RegisterPhysics(new G4EmExtraPhysics());
    //______________________________________

    // 4. Fisica ottica
    auto opticalPhysics = new G4OpticalPhysics();
    auto opticalParams = G4OpticalParameters::Instance();

    // Scintillazione
    opticalParams->SetScintTrackSecondariesFirst(true);
    opticalParams->SetScintStackPhotons(true);
    opticalParams->SetScintByParticleType(true);
    opticalParams->SetProcessActivation("Scintillation", true);
    opticalParams->SetProcessActivation("Cerenkov", false);
    opticalParams->SetProcessActivation("OpAbsorption", true);
    opticalParams->SetProcessActivation("OpBoundary", true);
    opticalParams->SetProcessActivation("OpRayleigh", true);
    opticalParams->SetProcessActivation("OpWLS", false);
    opticalParams->SetVerboseLevel(2);  // Debug
    
    RegisterPhysics(opticalPhysics);}
PhysicsList::~PhysicsList() {}

void PhysicsList::ConstructParticle()
{
    // Costruisci particelle standard (inclusi i gamma)
    G4Gamma::GammaDefinition();
    G4OpticalPhoton::OpticalPhotonDefinition();
    G4VModularPhysicsList::ConstructParticle();
}

void PhysicsList::ConstructProcess()
{
    // processi base
    G4VModularPhysicsList::ConstructProcess();

    //processi per i gamma
    G4ProcessManager* pManager = G4Gamma::Gamma()->GetProcessManager();
    if (!pManager) {
        G4Exception("PhysicsList::ConstructProcess()", "Run0110", FatalException,
                  "Process manager per gamma non trovato!");
        return;
    }

    // tutti i processi registrati
    G4cout << "\n=== DEBUG: Processi registrati per gamma ===" << G4endl;
    G4ProcessVector* procs = pManager->GetProcessList();
    for(size_t i=0; i<procs->size(); ++i) {
        G4cout << "- " << (*procs)[i]->GetProcessName() << G4endl;
    }

    // Compton scattering
    if(!pManager->GetProcess("compt")) {
        pManager->AddDiscreteProcess(new G4ComptonScattering());
        G4cout << "Aggiunto processo: compton" << G4endl;
    }

    // effetto fotoelettrico
    if(!pManager->GetProcess("phot")) {
        pManager->AddDiscreteProcess(new G4PhotoElectricEffect());
        G4cout << "Aggiunto processo: photoelectric" << G4endl;
    }
}

void PhysicsList::SetCuts()
{
    // Tagli di default
    // SetCutValue(0.1 * mm, "gamma");
    SetCutValue(0.1 * mm, "e-");
    SetCutValue(0.1 * mm, "e+");
    // SetCutValue(0.01 * mm, "opticalphoton");
}

I have also defined the optical properties of the liquid scintillator as follows:

    const G4int num = 7;
    G4double energies[num] = {1.55*eV, 2.07*eV, 2.48*eV, 2.76*eV, 3.10*eV, 3.54*eV, 4.13*eV};

    // Proprietà scintillatore liquido
    G4double rIndexScint[num] = {1.48, 1.50, 1.52, 1.53, 1.54, 1.56, 1.58};
    G4double absLengthScint[num] = {5.*m, 6.*m, 7.*m, 8.*m, 7.*m, 6.*m, 5.*m};
    G4double scintFast[num] = {0.0, 0.2, 0.8, 1.0, 0.7, 0.3, 0.0};
    G4double scintSlow[num] = {0.0, 0.2, 0.8, 1.0, 0.7, 0.3, 0.0};

    G4MaterialPropertiesTable* scintMPT = new G4MaterialPropertiesTable();
    scintMPT->AddProperty("RINDEX", energies, rIndexScint, num);
    scintMPT->AddProperty("ABSLENGTH", energies, absLengthScint, num);
    scintMPT->AddProperty("FASTCOMPONENT", energies, scintFast, num, true);
    scintMPT->AddProperty("SLOWCOMPONENT", energies, scintSlow, num, true);
    scintMPT->AddConstProperty("SCINTILLATIONYIELD", 20000./MeV);
    scintMPT->AddConstProperty("RESOLUTIONSCALE", 1.0);
    scintMPT->AddConstProperty("FASTTIMECONSTANT", 8.*ns, true);
    scintMPT->AddConstProperty("SLOWTIMECONSTANT", 20.*ns, true);
    scintMPT->AddConstProperty("YIELDRATIO", 0.8, true);
    liquidScint->GetIonisation()->SetBirksConstant(0.05*mm/MeV);
    liquidScint->SetMaterialPropertiesTable(scintMPT);

Still I can’t see any scinitillation light
The particle source is set in the origin (0, 0, 0) and the center of the cylinder is set in (0, 0, 293.5 cm)

Does anybody know how to solve this problem? Is there something I’m missing in the physics and/or in the optical properties part? Or maybe the problem is somewhere else? Thank you in advance!

Start with the predefined physics lists with optical physics added, as in the examples in examples/extended/optical and described in manual.

You are probably missing an AddPhysics statement.

Thank you! I’ve tried with the predefined physics but both with the predefined lists and the custom one it seems like particles do not interact with the scintillator: why is this happening? I tried with different energies, different particles and different start position of the particles but I’ve never had an energy deposition in the scintillator. What am I missing? Something in the detector construction maybe?
The scintillator I’m using is G4_PLASTIC_SC_VINYLTOLUENE. (it is not the real one I want to simulate because I just wanted to make a trial with a random scintillator to enable scintillation light).
Thanks!!

Are secondary electrons being generated? I see you have a set cut value of 0.1 mm, maybe that is stopping you from generating secondary electrons? Since scintillation photons are generated along electron paths if you are not generating any electrons you won’t expect to see any optical photons.

Thanks! I’ve just tried to remove the cut values but I still can’t see any deposited energy in the scintillator. I really cannot understand if the problem is the physics or the construction of the detector… In my setup there is an aluminum box with air and the scintillator coupled to the PMTs inside: the electrons I shoot interacts with the air and they deposit energy there but they don’t interact with the scintillator at all.

What does your sensitive detector look like? Can you use the UI to visual your detector construction.

  G4double scintFast[num] = {0.0, 0.2, 0.8, 1.0, 0.7, 0.3, 0.0};
  G4double scintSlow[num] = {0.0, 0.2, 0.8, 1.0, 0.7, 0.3, 0.0};

I am not sure that these parameters can take 0 values.


This is my setup (white → cylinder, green → scintillator, red → pmt, yellow → photocathode)

The sensitive detector for the scintillator is the following:

#include "ScintillatorSensitiveDetector.hh"
#include "G4HCofThisEvent.hh"
#include "G4Step.hh"
#include "G4ThreeVector.hh"
#include "G4SDManager.hh"
#include "G4ios.hh"

ScintillatorSensitiveDetector::ScintillatorSensitiveDetector(G4String name)
: G4VSensitiveDetector(name), fHitsCollection(0), fHCID(-1) {
    collectionName.insert("ScintillatorHitsCollection");
}

ScintillatorSensitiveDetector::~ScintillatorSensitiveDetector() {}

void ScintillatorSensitiveDetector::Initialize(G4HCofThisEvent* HCE) {
    fHitsCollection = new ScintillatorHitsCollection(SensitiveDetectorName, collectionName[0]);
    if(fHCID < 0) {
        fHCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
    }
    HCE->AddHitsCollection(fHCID, fHitsCollection);
}

G4bool ScintillatorSensitiveDetector::ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist) {
    G4double edep = aStep->GetTotalEnergyDeposit();
    if(edep == 0.) return false;
    
    ScintillatorHit* newHit = new ScintillatorHit();
    newHit->SetEdep(edep);
    newHit->SetPos(aStep->GetPostStepPoint()->GetPosition());
    
    fHitsCollection->insert(newHit);
    
    return true;
}

void ScintillatorSensitiveDetector::EndOfEvent(G4HCofThisEvent*) {
    if(verboseLevel > 1) {
        G4int nHits = fHitsCollection->entries();
        G4cout << "Scintillator sensitive detector: " << nHits << " hits" << G4endl;
        for(G4int i=0; i<nHits; i++) {
            (*fHitsCollection)[i]->Print();
        }
    }
}

and it is associated to the liquid scintillator as follows:

    scintSD = new ScintillatorSensitiveDetector("ScintillatorSD");
    SDman->AddNewDetector(scintSD);
    logicScintillator->SetSensitiveDetector(scintSD);

thank you!!

What I have noticed with the optical properties is that their omission can cause silent undefined behavior. Since you can open the UI, can you try just manually shooting a particle dead on to the detector? The gamma interaction rate might be low but you could try a heavy ion