Belle II Software  release-08-01-10
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...
 
double getPhaseIndex (double energy) const
 Returns phase refractive index of quartz at given photon energy. More...
 
double getGroupIndex (double energy) const
 Returns group refractive index of quartz at given photon energy. More...
 
double getPhaseIndexDerivative (double energy) const
 Returns the derivative (dn/dE) of phase refractive index of quartz at given photon energy. More...
 
double getGroupIndexDerivative (double energy) const
 Returns the derivative (dn_g/dE) of group refractive index of quartz at given photon energy. More...
 
double getAbsorptionLength (double energy) const
 Returns bulk absorption lenght of quartz at given photon energy. 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...
 
double refractiveIndex (double lambda) const
 Quartz refractive index (SellMeier equation) 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 35 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 946 of file TOPGeometryPar.cc.

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

◆ 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 868 of file TOPGeometryPar.cc.

◆ createConfiguration()

TOPGeometry * createConfiguration ( const GearDir content)
private

Create a parameter object from gearbox.

Parameters
contentXML data directory

Definition at line 437 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 891 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 921 of file TOPGeometryPar.cc.

◆ getAbsorptionLength()

double getAbsorptionLength ( double  energy) const
inline

Returns bulk absorption lenght of quartz at given photon energy.

Parameters
energyphoton energy [eV]
Returns
bulk absorption lenght

Definition at line 340 of file TOPGeometryPar.h.

341  {
342  double lambda = c_hc / energy;
343  return 15100 * pow(lambda / 405, 4); // Alan Schwartz, 2013 (private comunication)
344  }
static const double c_hc
Planck constant times speed of light in [eV*nm].

◆ getChannelMapper() [1/2]

const ChannelMapper& getChannelMapper ( ) const
inline

Returns default channel mapper (mapping of channels to pixels)

Returns
channel mapper object

Definition at line 83 of file TOPGeometryPar.h.

◆ 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 89 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 77 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 165 of file TOPGeometryPar.cc.

◆ getGroupIndex()

double getGroupIndex ( double  energy) const

Returns group refractive index of quartz at given photon energy.

Parameters
energyphoton energy [eV]
Returns
group refractive index

Definition at line 981 of file TOPGeometryPar.cc.

◆ getGroupIndexDerivative()

double getGroupIndexDerivative ( double  energy) const
inline

Returns the derivative (dn_g/dE) of group refractive index of quartz at given photon energy.

Parameters
energyphoton energy [eV]
Returns
group refractive index

Definition at line 334 of file TOPGeometryPar.h.

◆ getPhaseIndex()

double getPhaseIndex ( double  energy) const

Returns phase refractive index of quartz at given photon energy.

Parameters
energyphoton energy [eV]
Returns
phase refractive index

Definition at line 975 of file TOPGeometryPar.cc.

◆ getPhaseIndexDerivative()

double getPhaseIndexDerivative ( double  energy) const
inline

Returns the derivative (dn/dE) of phase refractive index of quartz at given photon energy.

Parameters
energyphoton energy [eV]
Returns
derivative of phase refractive index

Definition at line 328 of file TOPGeometryPar.h.

◆ 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 189 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 177 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 246 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 223 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 255 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 270 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 259 of file TOPGeometryPar.h.

◆ Initialize()

void Initialize ( const GearDir content)

Initialize from Gearbox (XML)

Parameters
contentXML data directory

Definition at line 52 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 43 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 419 of file TOPGeometryPar.cc.

◆ isValid()

bool isValid ( ) const
inline

check if the geometry is available

Returns
true if available

Definition at line 65 of file TOPGeometryPar.h.

◆ refractiveIndex()

double refractiveIndex ( double  lambda) const
private

Quartz refractive index (SellMeier equation)

Parameters
lambdaphoton wavelength [nm]
Returns
refractive index

Definition at line 959 of file TOPGeometryPar.cc.


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