BC501A Scintillator detector

Dear GEANT4 Users,

I am new to GEANT4.

Can anyone point me to the example in Geant4 for Scintillation detector like the BC501A or any organic based detector?

My purpose is to find energy deposit by neutron in scintillator detector.

You can use example B1 and modify the shape and material of the SHAPE1, SHAPE2, ENVELOPE volumes as needed for what geometry you wish to use. BC501A is chemically the same as NE213 (it is just a different designation label) which is essential just G4_XYLENE from the perspective of energy deposited.

I am doing the same.

In exampleB1.cc file: I modified:

G4RunManager* runManager = new G4RunManager;
runManager->SetUserInitialization(new MyDetectorConstruction());

G4VModularPhysicsList* physics = new QGSP_BIC_HP;
G4OpticalParameters* MyOpticalParameters = new G4OpticalParameters();
physics->RegisterPhysics( MyOpticalParameters );




After running, I am getting errors:

/home/suraj/Desktop/INTERNSHIP/GEANT4/BC501A/BC501ASimulation/exampleB1.cc: In function ‘int main(int, char**)’:
/home/suraj/Desktop/INTERNSHIP/GEANT4/BC501A/BC501ASimulation/exampleB1.cc:36:70: error: ‘G4OpticalParameters::G4OpticalParameters()’ is private within this context
G4OpticalParameters* MyOpticalParameters = new G4OpticalParameters();
In file included from /home/suraj/Geant4/geant4.10.07.p01-install/include/Geant4/G4OpticalPhysics.hh:46,
from /home/suraj/Desktop/INTERNSHIP/GEANT4/BC501A/BC501ASimulation/exampleB1.cc:10:
/home/suraj/Geant4/geant4.10.07.p01-install/include/Geant4/G4OpticalParameters.hh:190:3: note: declared private here

/home/suraj/Desktop/INTERNSHIP/GEANT4/BC501A/BC501ASimulation/exampleB1.cc:37:49: error: no matching function for call to ‘G4VModularPhysicsList::RegisterPhysics(G4OpticalParameters*&)’
physics->RegisterPhysics( MyOpticalParameters );
In file included from /home/suraj/Desktop/INTERNSHIP/GEANT4/BC501A/BC501ASimulation/exampleB1.cc:9:
/home/suraj/Geant4/geant4.10.07.p01-install/include/Geant4/G4VModularPhysicsList.hh:116:8: note: candidate: ‘void G4VModularPhysicsList::RegisterPhysics(G4VPhysicsConstructor*)’
void RegisterPhysics(G4VPhysicsConstructor*);

/home/suraj/Geant4/geant4.10.07.p01-install/include/Geant4/G4VModularPhysicsList.hh:116:8: note: no known conversion for argument 1 from ‘G4OpticalParameters*’ to ‘G4VPhysicsConstructor*’
make[2]: *** [CMakeFiles/exampleB1.dir/build.make:76: CMakeFiles/exampleB1.dir/exampleB1.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/exampleB1.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I am using G4OpticalParameters.hh at the place of G4OpticalPhysics.hh because it is given:

// the methods given are kept for backwards compatibility, and are to be
// removed in future. Please use the methods in 
// G4OpticalParameters instead.

Hi, You do not need optical physics tp measure energy deposited by a particle in a scintillator. All the necessary physics is in the B1 example. You do not need optical properties for the scintillator; only its chemical composition. Energy deposited is calculated in B1SteppingAction, and is summed in B1EventAction and B1RunAction. The B1 example outputs results as dose/run but energy deposited is calculated in the code and can be output or manipulated as you wish.

You only need optical physics if you are trying to calculate numbers of scintillation photons and optical photon transport due to an ionizing particle in a scintillator. It is a different problem and for that you should look at the OpNovice and other examples in your distribution’s examples/extended/ folder. For that you also need a bunch of scintillation and other optical properties for your scintillator material and optical transport materials (e.g., glass).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.