Belle II Software development
SVDChargeSimulationCalibrations Class Reference

This class defines the dbobject and the methods to access SVD simulation calibrations; coupling constants and Geant4 electron weight. More...

#include <SVDChargeSimulationCalibrations.h>

Public Types

typedef SVDCalibrationsBase< SVDCalibrationsScalar< SVDChargeSimCal > > t_payload
 typedef of the SVDChargeSimulationCalibrations payload
 

Public Member Functions

 SVDChargeSimulationCalibrations ()
 Constructor, no input argument is required.
 
float getCouplingConstant (const VxdID &sensorID, const bool &isU, const std::string &couplingName) const
 Return coupling constant.
 
float getElectronWeight (const VxdID &sensorID, const bool &isU) const
 Return Geant4 electron weight.
 
TString getUniqueID ()
 returns the unique ID of the payload
 
bool isValid ()
 returns true if the m_aDBObtPtr is valid in the requested IoV
 

Static Public Attributes

static std::string name = std::string("SVDChargeSimulationCalibrations")
 name of the SVDChargeSimulationCalibrations payload
 

Private Attributes

DBObjPtr< t_payloadm_aDBObjPtr
 the SVDChargeSimulationCalibrations payload
 

Detailed Description

This class defines the dbobject and the methods to access SVD simulation calibrations; coupling constants and Geant4 electron weight.

Definition at line 26 of file SVDChargeSimulationCalibrations.h.

Member Typedef Documentation

◆ t_payload

Constructor & Destructor Documentation

◆ SVDChargeSimulationCalibrations()

Constructor, no input argument is required.

Definition at line 33 of file SVDChargeSimulationCalibrations.h.

34 {
35 m_aDBObjPtr.addCallback([ this ](const std::string&) -> void {
36 B2DEBUG(20, "SVDChargeSimulationCalibrations: from now on we are using " <<
37 this->m_aDBObjPtr -> get_uniqueID()); });
38
39 }
DBObjPtr< t_payload > m_aDBObjPtr
the SVDChargeSimulationCalibrations payload
static std::string name
name of the SVDChargeSimulationCalibrations payload

Member Function Documentation

◆ getCouplingConstant()

float getCouplingConstant ( const VxdID sensorID,
const bool &  isU,
const std::string &  couplingName 
) const
inline

Return coupling constant.

Input:

Parameters
sensorIDidentitiy of the sensor for which the calibration is required
isUsensor side, true for p (u) side, false for n (v) side
couplingNamecoupling name, specify which coupling to return. Possible values are: "C0" | Coupling from readout implant to its readout channel "C1" | Coupling from first neighbour implant (floating) to readout channel "C2" | Coupling from second neighbour implant (readout) to readout channel "C3" | Coupling from third neighbour implant (floating) to readout channel "APVCoupling" | Coupling between two adjacent channels done at APV level after charge sharing Output: float corresponding to a given coupling constant.

Definition at line 53 of file SVDChargeSimulationCalibrations.h.

54 {
55 float coupling_constant = 0;
56 try {
57 coupling_constant = m_aDBObjPtr->getReference(sensorID.getLayerNumber(), sensorID.getLadderNumber(),
58 sensorID.getSensorNumber(), m_aDBObjPtr->sideIndex(isU), 0).couplingConstant.at(couplingName);
59 } catch (const std::out_of_range& oor) {
60 B2ERROR("Cannot find coupling constant " << couplingName << " in database.");
61 }
62 return coupling_constant;
63 }

◆ getElectronWeight()

float getElectronWeight ( const VxdID sensorID,
const bool &  isU 
) const
inline

Return Geant4 electron weight.

Input:

Parameters
sensorIDidentitiy of the sensor for which the calibration is required
isUsensor side, true for p (u) side, false for n (v) side

Output: float corresponding to a Geant4-electron to real-electron weight.

Definition at line 72 of file SVDChargeSimulationCalibrations.h.

73 {
74 return m_aDBObjPtr->getReference(sensorID.getLayerNumber(), sensorID.getLadderNumber(),
75 sensorID.getSensorNumber(), m_aDBObjPtr->sideIndex(isU), 0).electronWeight;
76 }

◆ getUniqueID()

TString getUniqueID ( )
inline

returns the unique ID of the payload

Definition at line 79 of file SVDChargeSimulationCalibrations.h.

79{ return m_aDBObjPtr->get_uniqueID(); }

◆ isValid()

bool isValid ( )
inline

returns true if the m_aDBObtPtr is valid in the requested IoV

Definition at line 82 of file SVDChargeSimulationCalibrations.h.

82{ return m_aDBObjPtr.isValid(); }

Member Data Documentation

◆ m_aDBObjPtr

DBObjPtr<t_payload> m_aDBObjPtr
private

the SVDChargeSimulationCalibrations payload

Definition at line 85 of file SVDChargeSimulationCalibrations.h.

◆ name

std::string name = std::string("SVDChargeSimulationCalibrations")
static

name of the SVDChargeSimulationCalibrations payload

Definition at line 28 of file SVDChargeSimulationCalibrations.h.


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