Code for download: session5_start.tar.gz
Exercise:
- Complete implementation of the hit and sensitive detector classes for the Drift chamber (
EDChamberHit, EDChamberSD
) to account the following information when a charged track passed through the detector:- the chamber layer number
- the time when a particle hits chamber
- the hit local position (the position in the chamber volume frame)
- Hints:
- The code for the layer number is already implemented, add missing code for the other quantities
- To check if the hits are correctly accounted, add printing of the added hit data in
EDChamberHit::Print()
- Implement drawing Chamber hits:
- Add and implement
EDChamberHit::Draw()
function.(SeeB2TrackerHit
class inbasic/B2/B2a
example). - Activate drawing hits in
vis.mac
macro
- Add and implement
- Implement hit and sensitive detector classes for the EM calorimeter (
EDEmCalorimeterHit, EDEmCalorimeterSD
) to account the following information:- the layer number
- the total energy deposit in the layer (= the accumulated deposit from all particles).
To check your implementation, add printing of the calorimeter hit collection at the end of each event (in
EDEmCalorimeterSD::EndOfEvent()
), see the similar code inEDChamberSD
class) - Hints:
- See example B4/B4c how to account the energy deposit in a calorimeter
- In difference from Chamber hits, the Calorimeter hits have to be created in
EDEmCalorimeterSD::Initialize()
and updated inEDEmCalorimeterSD::ProcessHits()
.
Solution: session5_solution.tar.gz
Exercise ++:
The exercises marked as ++ are optional; they are recommended for participants who have already some experience with Geant4 and get some time left for practicing more than the basic exercise proposed above.
- There is no complementary exercise for this session.