Belle II Software
release-08-01-10
|
Small helper class to facilitate debugging of VXD::SensitiveDetector implementation. More...
#include <SensitiveDetectorDebugHelper.h>
Classes | |
struct | info |
struct with all the branches needed More... | |
Public Member Functions | |
void | startTraversal (VxdID sensorID, const SensorTraversal &traversal) |
Start writing a new sensor traversal: Geant4 steps will be added to the ROOT entry. | |
void | addTrueHit (const VXDTrueHit *truehit) |
Write the information normally used when creating TrueHits to the entry. | |
void | addSimHit (const VXDSimHit *simhit, int startPoint, int endPoint) |
Write the information normally used when creating SimHits to the entry. | |
void | finishTraversal () |
Finish the entry by calling Fill() | |
Static Public Member Functions | |
static SensitiveDetectorDebugHelper & | getInstance () |
Singleton class: get instance. | |
Private Types | |
enum | { MAX_STEPS = 5000 , MAX_HITS = 500 , MAX_EDEP = 10000 , SIZE_STEP = 9 , SIZE_TRUE = 20 , SIZE_HITS = 13 , SIZE_EDEP = 2 } |
Private Member Functions | |
SensitiveDetectorDebugHelper () | |
Singleton class: private constructor. | |
SensitiveDetectorDebugHelper (const SensitiveDetectorDebugHelper &)=delete | |
Singleton class: no copy constructor. | |
SensitiveDetectorDebugHelper & | operator= (const SensitiveDetectorDebugHelper &)=delete |
Singleton class: no assignment operator. | |
~SensitiveDetectorDebugHelper () | |
Destructor: write root file. | |
Private Attributes | |
TFile * | m_file {0} |
ROOT File to write information to. | |
TTree * | m_tree {0} |
ROOT Tree to write information to. | |
struct Belle2::VXD::SensitiveDetectorDebugHelper::info | m_info |
object to store all variables | |
Small helper class to facilitate debugging of VXD::SensitiveDetector implementation.
This file will write a root file containing the Geant4 Step information as well as the information used for TrueHit and SimHit creation to check whether these are consistent. Normally this class should not be in use, a define can be set in VXD::SensitiveDetectorBase to enable its use.
This class is designed to make access very easy in python using numpy, e.g. the SimHits can be obtained as numpy array from the tree using
tree.GetEntry(i) simhits = np.array(tree.simhitInfo).reshape((-1, 13)) # HIT_SIZE=13
Definition at line 41 of file SensitiveDetectorDebugHelper.h.
|
private |
Definition at line 75 of file SensitiveDetectorDebugHelper.h.