Code for download: session5_start.tar.gz
Exercise 5a:
- Complete the 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 time when a particle hits chamber
- the hit global position (the position in the world volume frame)
- Hints:
- The code for the time is already implemented, add code for the other quantity
- To check if the hits are correctly accounted, add printing of the added hit data in
EDChamberHit::Print() - The Chamber sensitive detectors are already created in the detector construction class.
Exercise 5b:
- Complete the hit and sensitive detector classes for the Drift chamber and add
- the chamber layer number
- Complete the implementation of the sensitive detector class for the EM calorimeter (
EDEmCalorimeterSD) to account the following information in the calorimeter hits (EDEmCalorimeterHit):- the layer number
- the total energy deposit in the layer (= the accumulated deposit from all particles).
- Hints:
- The class
EDEmCalorimeterHitis already implemented. - The EmCalorimeter sensitive detector is NOT yet created in the detector construction class.
- In difference from the Chamber hits, the Calorimeter hits are created in
EDEmCalorimeterSD::Initialize()and updated inEDEmCalorimeterSD::ProcessHits().- See also example B4/B4c how to account the energy deposit in a calorimeter.
- To control your implementation, add printing of the calorimeter hit collection at the end of each event (in
EDEmCalorimeterSD::EndOfEvent()), see the similar code inEDChamberSDclass)
- The class
Exercise 5c:
- Implement drawing Chamber hits:
- Add and implement
EDChamberHit::Draw()function.(SeeB2TrackerHitclass inbasic/B2/B2aexample). - Activate drawing hits in
vis.macmacro
- Add and implement
Solution: session5_solution.tar.gz
