With use of G4AnalysisManager
(see example B4/B4d ):
Create & fill histogram
Define a 1D histogram for the energy deposited per event for each calorimeter layer
Implement filling of histograms in the EmCalorimeterSD::EndOfEvent()
function.
Hint: To access the i-th calorimeter hit from fHitsCollection:
EmCalorimeterHit* hit = (EmCalorimeterHit*)(*fHitsCollection)[i];
Activate plotting of histograms using the UI command(s)
Create & fill ntuples
Define two ntuples representing the tracker chamber hits in each tracker chamber (one in the first arm and one in the second arm)
Implement filling of the ntuples in ChamberSD::ProcessHits();
fNtupleId
, in the ChamberSD
class which allows to associate each tracker chamber with one of created ntuplesInspect generated file in ROOT with the ROOT browser
root
Inspect the implementation of a command using G4GenericMessenger
in the EventAction
class, execute the command to inactivate verbose mode and run a new event
Implement a command to activate or inactivate the randomizing of the particle direction in the primary generator action using G4GenericMessenger
in an analogous way as the command in EventAction
G4GenericMessenger
object in PrimaryGeneratorAction
DeclareProperty
method to create setRandomize
command associated with already existing data member fRandomize
of a G4bool
type