Skip to content

Commit

Permalink
corrected doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
martinunland committed Aug 29, 2024
1 parent 48ea4d7 commit 014c79c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions documentation/extra_doc/0_common.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ This approach ensures a smooth integration of the photosensitive volume within t
```cpp
#include "OMSimSensitiveDetector.hh"
//... Assume the logical volume of your detector has been defined and is referred to as "lDetectorLV"
OMSimSensitiveDetector* lSensitiveDetector = new OMSimSensitiveDetector("myDetector", DetectorType::VolumePhotonDetector);
OMSimHitManager &lHitManager = OMSimHitManager::getInstance();
lHitManager.setNumberOfPMTs(1, lHitManager.getNextDetectorIndex());
registerSensitiveDetector(lDetectorLV, lSensitiveDetector);
OMSimSensitiveDetector* sensitiveDetector = new OMSimSensitiveDetector("myDetector", DetectorType::VolumePhotonDetector);
OMSimHitManager &hitManager = OMSimHitManager::getInstance();
hitManager.setNumberOfPMTs(1, hitManager.getNextDetectorIndex());
registerSensitiveDetector(lDetectorLV, sensitiveDetector);
```
In this case, `OMSimSensitiveDetector::ProcessHits` will store all absorbed photons. The number of photons absorbed will depend on the absorption length of the material connected to the logical volume. If you want it to be 100% efficient, use the material `RiAbs_Absorber`.
Expand Down

0 comments on commit 014c79c

Please sign in to comment.