Hands-on
Code for download: session5_start.tar.gz
Hands-on 5a:
Extend the implementation of the hit for the Drift chamber (ChamberHit) to account the following information when a charged track passed through the detector:
- the layer number
- the time when a particle hits chamber
- the hit global position (the position in the world volume frame)
Update the sensitive detector classes for the Drift chamber (ChamberSD) to account the global position.
The layer number will be completed in Hands-on 5b.
Hints:
- The code for the time is already implemented, add the code for the other quantity
- To check if the hits are correctly accounted, add printing of the added hit data in
ChamberHit::Print()
Hands-on 5b:
Complete the implementation of the sensitive detector class for the the Drift chamber (ChamberSD) to account also the layer number.
Complete the implementation of the sensitive detector class for the EM calorimeter (EmCalorimeterSD) to account the following information in the calorimeter hits (EmCalorimeterHit):
- the layer number
- the total energy deposit in the layer (= the accumulated deposit from all particles).
Hints:
-
The class
EmCalorimeterHitis already implemented. -
In difference from the Chamber hits, the Calorimeter hits are created in
EmCalorimeterSD::Initialize()and updated inEmCalorimeterSD::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 end of each event (in
EmCalorimeterSD::EndOfEvent()), see the similar code inChamberSDclass)
Hands-on 5c:
Implement drawing of Chamber hits:
-
Add and implement the
ChamberHit::Draw()function.(SeeB2TrackerHitclass inbasic/B2/B2aexample). -
Activate drawing hits in
vis.macmacro