Belle II Software  release-05-01-25
TOPGeometryPar Class Reference

Singleton class for TOP Geometry Parameters. More...

#include <TOPGeometryPar.h>

Collaboration diagram for TOPGeometryPar:

Public Member Functions

virtual ~TOPGeometryPar ()
 Destructor.
 
void Initialize (const GearDir &content)
 Initialize from Gearbox (XML) More...
 
void Initialize ()
 Initialize from database.
 
bool isValid () const
 check if the geometry is available More...
 
const TOPGeometrygetGeometry () const
 Returns pointer to geometry object using Basf2 units. More...
 
const FrontEndMappergetFrontEndMapper () const
 Returns front-end mapper (mapping of SCROD's to positions within TOP modules) More...
 
const ChannelMappergetChannelMapper () const
 Returns default channel mapper (mapping of channels to pixels) More...
 
const ChannelMappergetChannelMapper (ChannelMapper::EType type) const
 Returns channel mapper (mapping of channels to pixels) - Gearbox only. More...
 
double getPMTEfficiencyEnvelope (double energy) const
 Returns PMT efficiency envelope, e.g. More...
 
double getPMTEfficiency (double energy, int moduleID, int pmtID, double x, double y) const
 Returns PMT pixel efficiency, a product of quantum and collection efficiency. More...
 
double getRelativePixelEfficiency (int moduleID, int pixelID) const
 Returns relative pixel efficiency (including CE, RQE and threshold efficiency) More...
 
unsigned getPMTType (int moduleID, int pmtID) const
 Returns PMT type at a given position. More...
 
const TOPNominalTTSgetTTS (int moduleID, int pmtID) const
 Returns TTS of a PMT at given position. More...
 

Static Public Member Functions

static TOPGeometryParInstance ()
 Static method to obtain the pointer to its instance. More...
 

Static Public Attributes

static const double c_hc = 1239.84193
 Planck constant times speed of light in [eV*nm].
 

Private Member Functions

 TOPGeometryPar ()
 Hidden constructor since it is a singleton class.
 
void finalizeInitialization ()
 finalize initialization
 
TOPGeometrycreateConfiguration (const GearDir &content)
 Create a parameter object from gearbox. More...
 
TOPGeoBarSegment createBarSegment (const GearDir &content, const std::string &serialNumber)
 Create a parameter object from gearbox for bar segment. More...
 
TOPGeoMirrorSegment createMirrorSegment (const GearDir &content, const std::string &serialNumber)
 Create a parameter object from gearbox for mirror segment. More...
 
TOPGeoPrism createPrism (const GearDir &content, const std::string &serialNumber)
 Create a parameter object from gearbox for prism. More...
 
std::string addNumber (const std::string &str, unsigned number)
 Adds number to string. More...
 
void clearCache ()
 Clears cache for PMT dependent QE data - function is used in call backs.
 
void setEnvelopeQE () const
 Constructs envelope of quantum efficiency from PMT data.
 
void mapPmtQEToPositions () const
 Maps PMT QE data to positions within the detector.
 
void mapPmtTypeToPositions () const
 Maps PMT type to positions within the detector.
 
void prepareRelEfficiencies () const
 Prepares a map of relative pixel efficiencies.
 
int getUniquePmtID (int moduleID, int pmtID) const
 Returns unique PMT ID within the detector. More...
 
int getUniquePixelID (int moduleID, int pixelID) const
 Returns unique pixel ID within the detector. More...
 
double integralOfQE (const std::vector< float > &qe, double ce, double lambdaFirst, double lambdaStep) const
 Returns integral of quantum efficiency over photon energies. More...
 

Private Attributes

TOPGeometrym_geo = 0
 geometry parameters from Gearbox
 
DBObjPtr< TOPGeometry > * m_geoDB = 0
 geometry parameters from database
 
bool m_fromDB = false
 parameters from database or Gearbox
 
bool m_valid = false
 true if geometry is available
 
bool m_oldPayload = false
 true if old payload found in DB
 
bool m_BfieldOn = true
 true if B field is on
 
FrontEndMapper m_frontEndMapper
 front end electronics mapper
 
ChannelMapper m_channelMapperIRS3B
 channel-pixel mapper
 
ChannelMapper m_channelMapperIRSX
 channel-pixel mapper
 
OptionalDBArray< TOPPmtInstallationm_pmtInstalled
 PMT installation data.
 
OptionalDBArray< TOPPmtQEm_pmtQEData
 quantum efficiencies
 
DBObjPtr< TOPCalChannelRQEm_channelRQE
 channel relative quantum effi.
 
DBObjPtr< TOPCalChannelThresholdEffm_thresholdEff
 channel threshold effi.
 
TOPNominalQE m_envelopeQE
 envelope quantum efficiency
 
std::map< int, const TOPPmtQE * > m_pmts
 QE data mapped to positions.
 
std::map< int, double > m_relEfficiencies
 pixel relative QE
 
std::map< int, unsigned > m_pmtTypes
 PMT types mapped to positions.
 

Static Private Attributes

static TOPGeometryPars_instance = 0
 Pointer to the class instance.
 

Detailed Description

Singleton class for TOP Geometry Parameters.

Definition at line 47 of file TOPGeometryPar.h.

Member Function Documentation

◆ addNumber()

std::string addNumber ( const std::string &  str,
unsigned  number 
)
private

Adds number to string.

Parameters
strstring
numbernumber to be added
Returns
string with a number

Definition at line 948 of file TOPGeometryPar.cc.

949  {
950  stringstream ss;
951  if (number < 10) {
952  ss << str << "0" << number;
953  } else {
954  ss << str << number;
955  }
956  string out;
957  ss >> out;
958  return out;
959  }

◆ createBarSegment()

TOPGeoBarSegment createBarSegment ( const GearDir content,
const std::string &  serialNumber 
)
private

Create a parameter object from gearbox for bar segment.

Parameters
contentXML data directory
serialNumberbar segment serial number

Definition at line 870 of file TOPGeometryPar.cc.

◆ createConfiguration()

TOPGeometry * createConfiguration ( const GearDir content)
private

Create a parameter object from gearbox.

Parameters
contentXML data directory

Definition at line 439 of file TOPGeometryPar.cc.

◆ createMirrorSegment()

TOPGeoMirrorSegment createMirrorSegment ( const GearDir content,
const std::string &  serialNumber 
)
private

Create a parameter object from gearbox for mirror segment.

Parameters
contentXML data directory
serialNumbermirror segment serial number

Definition at line 893 of file TOPGeometryPar.cc.

◆ createPrism()

TOPGeoPrism createPrism ( const GearDir content,
const std::string &  serialNumber 
)
private

Create a parameter object from gearbox for prism.

Parameters
contentXML data directory
serialNumberprism serial number

Definition at line 923 of file TOPGeometryPar.cc.

◆ getChannelMapper() [1/2]

const ChannelMapper& getChannelMapper ( ) const
inline

Returns default channel mapper (mapping of channels to pixels)

Returns
channel mapper object

Definition at line 95 of file TOPGeometryPar.h.

95 : return m_channelMapperIRS3B;

◆ getChannelMapper() [2/2]

const ChannelMapper& getChannelMapper ( ChannelMapper::EType  type) const
inline

Returns channel mapper (mapping of channels to pixels) - Gearbox only.

Returns
channel mapper object

Definition at line 101 of file TOPGeometryPar.h.

◆ getFrontEndMapper()

const FrontEndMapper& getFrontEndMapper ( ) const
inline

Returns front-end mapper (mapping of SCROD's to positions within TOP modules)

Returns
front-end mapper object

Definition at line 89 of file TOPGeometryPar.h.

◆ getGeometry()

const TOPGeometry * getGeometry ( ) const

Returns pointer to geometry object using Basf2 units.

Returns
pointer to geometry object

Definition at line 167 of file TOPGeometryPar.cc.

◆ getPMTEfficiency()

double getPMTEfficiency ( double  energy,
int  moduleID,
int  pmtID,
double  x,
double  y 
) const

Returns PMT pixel efficiency, a product of quantum and collection efficiency.

Parameters
energyphoton energy in [eV]
moduleIDslot ID
pmtIDPMT ID
xphoton detection position x in local PMT frame
yphoton detection position y in local PMT frame
Returns
the efficiency

Definition at line 191 of file TOPGeometryPar.cc.

◆ getPMTEfficiencyEnvelope()

double getPMTEfficiencyEnvelope ( double  energy) const

Returns PMT efficiency envelope, e.g.

at given photon energy the maximum over all PMT's of a product of quantum and collection efficiency.

Parameters
energyphoton energy in [eV]
Returns
the maximal efficiency

Definition at line 179 of file TOPGeometryPar.cc.

◆ getPMTType()

unsigned getPMTType ( int  moduleID,
int  pmtID 
) const

Returns PMT type at a given position.

Parameters
moduleIDslot ID
pmtIDPMT ID
Returns
PMT type

Definition at line 248 of file TOPGeometryPar.cc.

◆ getRelativePixelEfficiency()

double getRelativePixelEfficiency ( int  moduleID,
int  pixelID 
) const

Returns relative pixel efficiency (including CE, RQE and threshold efficiency)

Returns
pixel efficiency relative to nominal photocathode

Definition at line 225 of file TOPGeometryPar.cc.

◆ getTTS()

const TOPNominalTTS & getTTS ( int  moduleID,
int  pmtID 
) const

Returns TTS of a PMT at given position.

Parameters
moduleIDslot ID
pmtIDPMT ID
Returns
TTS

Definition at line 257 of file TOPGeometryPar.cc.

◆ getUniquePixelID()

int getUniquePixelID ( int  moduleID,
int  pixelID 
) const
inlineprivate

Returns unique pixel ID within the detector.

Parameters
moduleIDslot ID
pixelIDpixel ID
Returns
unique ID

Definition at line 247 of file TOPGeometryPar.h.

◆ getUniquePmtID()

int getUniquePmtID ( int  moduleID,
int  pmtID 
) const
inlineprivate

Returns unique PMT ID within the detector.

Parameters
moduleIDslot ID
pmtIDPMT ID
Returns
unique ID

Definition at line 236 of file TOPGeometryPar.h.

◆ Initialize()

void Initialize ( const GearDir content)

Initialize from Gearbox (XML)

Parameters
contentXML data directory

Definition at line 54 of file TOPGeometryPar.cc.

◆ Instance()

TOPGeometryPar * Instance ( )
static

Static method to obtain the pointer to its instance.

Returns
pointer to the instance of this class.

Definition at line 45 of file TOPGeometryPar.cc.

◆ integralOfQE()

double integralOfQE ( const std::vector< float > &  qe,
double  ce,
double  lambdaFirst,
double  lambdaStep 
) const
private

Returns integral of quantum efficiency over photon energies.

Parameters
qequantum efficiency data points
cecollection efficiency data points
lambdaFirstwavelenght of the first data point [nm]
lambdaStepwavelength step [nm]
Returns
integral [eV]

Definition at line 421 of file TOPGeometryPar.cc.

◆ isValid()

bool isValid ( ) const
inline

check if the geometry is available

Returns
true if available

Definition at line 77 of file TOPGeometryPar.h.


The documentation for this class was generated from the following files:
Belle2::TOP::TOPGeometryPar::m_channelMapperIRS3B
ChannelMapper m_channelMapperIRS3B
channel-pixel mapper
Definition: TOPGeometryPar.h:275