Hello @dsawkey
Now simulated 30*10^6 primary electrons, but I still don’t get scintillation photons…then I think the problem is the code …
In my DetecorConstruction
G4Material* scintillator = nist->FindOrBuildMaterial("G4_PLASTIC_SC_VINYLTOLUENE");
G4Box* PlastScint;
G4Material* ScintMat = scintillator;
PlastScint = new G4Box("PlastScint", 0.5*fScint_sizeX, 0.5*fScint_sizeY, 0.5*fScint_sizeZ);
logicScint = new G4LogicalVolume(PlastScint, ScintMat, "PlasticScintillator");
Then you see…I used the pre-set G4_PLASTIC_SC_VINYLTOLUENE
B1DetectorConstruction.cc (29.4 KB)
I tried to enable
/tracking/verbose 2
but in few seconds the file on which Geant4 writes the tracking was of approximately 1GB…so I don’t think that it’s possible to enable it…or is there a way to write the tracking only for opticalphoton???
EDIT
Hello @dsawkey
I tried to print the process in this way
if(NextVol && ThisVol->GetName()=="World" && NextVol->GetName()=="PlasticScintillator") {
G4String proc_name = step->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName();
G4cout << "Process " << proc_name << G4endl;
G4int n_scint = 0;
if(proc_name == "Scintillation"){
G4Scintillation* scint = new G4Scintillation("Scintillation");
n_scint = scint->GetNumPhotons();
analysisManager->FillNtupleDColumn(6,17, n_scint);
}
I simulated 300*10^6 primary electrons, but you see…I don’t get scintillation process
log.txt (360.3 KB)
maybe is it because I’m looking the step from the world to the scintillator?
But I also tried to look for steps into the scintillator i.e.
if(NextVol && ThisVol->GetName()=="PlasticScintillator" && NextVol->GetName()=="PlasticScintillator") {
but in this way it looks like that after few time, the simulation doesn’t continue the run (i.e. there aren’t error message, but it doesn’t process new events)…sorry if I’m in a hurry, but I need to make this work before than january 29
