 |
Belle II Software
release-05-02-19
|
11 #include <vxd/simulation/SensitiveDetectorDebugHelper.h>
12 #include <framework/gearbox/Unit.h>
30 m_file =
new TFile(
"debug-vxdsensitivedetector.root",
"RECREATE");
31 m_tree =
new TTree(
"sensortraversal",
"Debug info for VXD Sensitive Detector implementation");
33 #define ADDBRANCH__(name,var,type) m_tree->Branch(#name,&m_info.var,#type)
34 #define ADDBARRAY__(name,var,n,type) ADDBRANCH__(name,var,name[n]/type)
35 #define ADDBRANCH(x,type) ADDBRANCH__(x,x,x/type)
36 #define ADDBARRAY(x,n,type) ADDBARRAY__(x,x,n,type)
38 ADDBRANCH(sensorID, I);
40 ADDBRANCH(contained, I);
41 ADDBRANCH(primary, I);
44 ADDBARRAY(stepInfo, stepN, D);
46 ADDBARRAY(trueInfo, trueN, D);
48 ADDBARRAY(edepInfo, edepN, D);
49 ADDBRANCH(simhitN, I);
50 ADDBARRAY(simhitInfo, simhitN, D);
@ MAX_STEPS
assume maximum number of steps per sensor traversal
Class to uniquely identify a any structure of the PXD and SVD.
@ MAX_HITS
assume maximum number of simhits per sensor traversal
float getExitU() const
Return local u coordinate of hit at the endpoint of the track.
Class to keep track of the traversal of the sensitive volume for one track.
int trueN
number of values used in trueInfo
SensitiveDetectorDebugHelper()
Singleton class: private constructor.
float getEntryV() const
Return local v coordinate of the start point of the track.
TFile * m_file
ROOT File to write information to.
Class VXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
double getLength() const
get flight length so far
float getEntryW() const
Return local w coordinate of the start point of the track.
double length
track length
void addSimHit(const VXDSimHit *simhit, int startPoint, int endPoint)
Write the information normally used when creating SimHits to the entry.
double stepInfo[SIZE_STEP *MAX_STEPS]
values for the step points
@ SIZE_HITS
number of values per simhit
@ SIZE_TRUE
number of values per truehit
std::vector< std::pair< float, float > > getElectronsConstantNumber(double electronsPerStep) const
Get the electron deposition with constant number of electrons between sampling points.
int getPDGCode() const
get PDG code of the particle
int sensorID
id of the sensor for the current track
TTree * m_tree
ROOT Tree to write information to.
int edepN
number of values used in edepInfo
TVector3 getPosOut() const
Return the end point of the electron deposition in local coordinates.
@ SIZE_STEP
number of values per step
Abstract base class for different kinds of events.
float getV() const
Return local v coordinate of hit.
float getW() const
Return local w coordinate of hit.
double edepInfo[SIZE_EDEP *MAX_EDEP]
values for the energy deposition
TVector3 getPosIn() const
Return the start point of the electron deposition in local coordinates.
float getExitV() const
Return local v coordinate of hit at the endpoint of the track.
std::vector< std::pair< float, float > > getElectronProfile() const
Get the decoded electron profile.
void addTrueHit(const VXDTrueHit *truehit)
Write the information normally used when creating TrueHits to the entry.
void startTraversal(VxdID sensorID, const SensorTraversal &traversal)
Start writing a new sensor traversal: Geant4 steps will be added to the ROOT entry.
double trueInfo[SIZE_TRUE]
values for the truehit
bool isPrimary() const
return whether the track belongs to a primary particle
float getGlobalTime() const override
Return the time of the electron deposition.
static SensitiveDetectorDebugHelper & getInstance()
Singleton class: get instance.
struct Belle2::VXD::SensitiveDetectorDebugHelper::info m_info
object to store all variables
int stepN
number of values used in stepInfo
TVector3 getEntryMomentum() const
Return momentum at the start point of the track.
float getEntryU() const
Return local u coordinate of hit when entering silicon.
float getEnergyDep() const
Return energy deposited during traversal of sensor.
TVector3 getExitMomentum() const
Return momentum at the endpoint of the track.
int pdg
pdg code for the current track
float getU() const
Return local u coordinate of hit.
std::vector< std::pair< float, float > > getElectronsConstantDistance(double length) const
Get the electron deposition along constant stepsize.
float getExitW() const
Return local w coordinate of hit at the endpoint of the track.
int primary
whether or not the track is from a primary particle
float getGlobalTime() const
Return the time when the track reached its midpoint.
TVector3 getMomentum() const
Return momentum at the midpoint of the track.
int simhitN
number of values used in simhitInfo
bool isContained() const
return whether the track was contained in the volume so far
double simhitInfo[SIZE_HITS *MAX_HITS]
values for the simhits
int contained
whether or not the track was contained in the senitive volume
static const double um
[micrometers]
Class VXDSimHit - Geant4 simulated hit for the VXD.