Belle II Software  release-08-01-10
SensitiveDetectorDebugHelper Class Reference

Small helper class to facilitate debugging of VXD::SensitiveDetector implementation. More...

#include <SensitiveDetectorDebugHelper.h>

Collaboration diagram for SensitiveDetectorDebugHelper:

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 SensitiveDetectorDebugHelpergetInstance ()
 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.
 
SensitiveDetectorDebugHelperoperator= (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
 

Detailed Description

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MAX_STEPS 

assume maximum number of steps per sensor traversal

MAX_HITS 

assume maximum number of simhits per sensor traversal

MAX_EDEP 

assume maximum number of energy deposition points per sensor traversal

SIZE_STEP 

number of values per step

SIZE_TRUE 

number of values per truehit

SIZE_HITS 

number of values per simhit

SIZE_EDEP 

number of values per energy deposition point

Definition at line 75 of file SensitiveDetectorDebugHelper.h.

75  {
77  MAX_STEPS = 5000,
79  MAX_HITS = 500,
81  MAX_EDEP = 10000,
82 
84  SIZE_STEP = 9,
86  SIZE_TRUE = 20,
88  SIZE_HITS = 13,
90  SIZE_EDEP = 2
91  };
@ MAX_EDEP
assume maximum number of energy deposition points per sensor traversal
@ MAX_HITS
assume maximum number of simhits per sensor traversal
@ SIZE_EDEP
number of values per energy deposition point
@ MAX_STEPS
assume maximum number of steps per sensor traversal

The documentation for this class was generated from the following files: