Project
Loading...
Searching...
No Matches
o2::its3::TopologyDictionary Class Reference

#include <TopologyDictionary.h>

Public Member Functions

 TopologyDictionary ()
 
 TopologyDictionary (const std::string &fileName)
 
void reset () noexcept
 Resets internal structures.
 
void resetMaps (bool IB=true) noexcept
 
void writeBinaryFile (const std::string &outputFile)
 Prints the dictionary in a binary file.
 
void readBinaryFile (const std::string &fileName)
 Reads the dictionary from a binary file.
 
void readFromFile (const std::string &fileName)
 
void print () const noexcept
 
float getXCOG (int n, bool IB=true) const
 Returns the x position of the COG for the n_th element.
 
float getErrX (int n, bool IB=true) const
 Returns the error on the x position of the COG for the n_th element.
 
float getZCOG (int n, bool IB=true) const
 Returns the z position of the COG for the n_th element.
 
float getErrZ (int n, bool IB=true) const
 Returns the error on the z position of the COG for the n_th element.
 
float getErr2X (int n, bool IB=true) const
 Returns the error^2 on the x position of the COG for the n_th element.
 
float getErr2Z (int n, bool IB=true) const
 Returns the error^2 on the z position of the COG for the n_th element.
 
unsigned long getHash (int n, bool IB=true) const
 Returns the hash of the n_th element.
 
int getNpixels (int n, bool IB=true) const
 Returns the number of fired pixels of the n_th element.
 
double getFrequency (int n, bool IB=true) const
 Returns the frequency of the n_th element;.
 
bool isGroup (int n, bool IB=true) const
 Returns true if the element corresponds to a group of rare topologies.
 
const itsmft::ClusterPatterngetPattern (int n, bool IB=true) const
 Returns the pattern of the topology.
 
TH1F * getTopologyDistribution (const std::string_view hname, bool IB=true) const
 Fills a hostogram with the distribution of the IDs.
 
int getSize (bool IB) const
 Returns the number of elements in the dicionary;.
 
template<typename T = float>
math_utils::Point3D< T > getClusterCoordinates (const itsmft::CompClusterExt &cl) const
 Returns the local position of a compact cluster.
 

Static Public Member Functions

template<typename T = float>
static math_utils::Point3D< T > getClusterCoordinates (const itsmft::CompClusterExt &cl, const itsmft::ClusterPattern &patt, bool isGroup=true)
 Returns the local position of a compact cluster.
 
static TopologyDictionaryloadFrom (const std::string &fileName="", const std::string &objName="ccdb_object")
 

Static Public Attributes

static constexpr int RowClassSpan = 4
 Row span of the classes of rare topologies.
 
static constexpr int ColClassSpan = 4
 Column span of the classes of rare topologies.
 
static constexpr int MaxNumberOfRowClasses = 1 + ((itsmft::ClusterPattern::MaxRowSpan - 1) / RowClassSpan)
 Maximum number of row classes for the groups of rare topologies.
 
static constexpr int MaxNumberOfColClasses = 1 + ((itsmft::ClusterPattern::MaxColSpan - 1) / ColClassSpan)
 Maximum number of col classes for the groups of rare topologies.
 
static constexpr int NumberOfRareGroups = MaxNumberOfRowClasses * MaxNumberOfColClasses
 

Friends

std::ostream & operator<< (std::ostream &os, const its3::TopologyDictionary &dictionary)
 Prints the dictionary.
 

Detailed Description

Definition at line 39 of file TopologyDictionary.h.

Constructor & Destructor Documentation

◆ TopologyDictionary() [1/2]

o2::its3::TopologyDictionary::TopologyDictionary ( )

Definition at line 33 of file TopologyDictionary.cxx.

◆ TopologyDictionary() [2/2]

o2::its3::TopologyDictionary::TopologyDictionary ( const std::string &  fileName)

Definition at line 38 of file TopologyDictionary.cxx.

Member Function Documentation

◆ getClusterCoordinates() [1/2]

template<typename T >
template math_utils::Point3D< float > o2::its3::TopologyDictionary::getClusterCoordinates< float > ( const itsmft::CompClusterExt cl) const

Returns the local position of a compact cluster.

Returns the local position of a compact cluster

Definition at line 193 of file TopologyDictionary.cxx.

◆ getClusterCoordinates() [2/2]

template<typename T >
template math_utils::Point3D< float > o2::its3::TopologyDictionary::getClusterCoordinates< float > ( const itsmft::CompClusterExt cl,
const itsmft::ClusterPattern patt,
bool  isGroup = true 
)
static

Returns the local position of a compact cluster.

Definition at line 214 of file TopologyDictionary.cxx.

◆ getErr2X()

float o2::its3::TopologyDictionary::getErr2X ( int  n,
bool  IB = true 
) const
inline

Returns the error^2 on the x position of the COG for the n_th element.

Definition at line 93 of file TopologyDictionary.h.

◆ getErr2Z()

float o2::its3::TopologyDictionary::getErr2Z ( int  n,
bool  IB = true 
) const
inline

Returns the error^2 on the z position of the COG for the n_th element.

Definition at line 100 of file TopologyDictionary.h.

◆ getErrX()

float o2::its3::TopologyDictionary::getErrX ( int  n,
bool  IB = true 
) const
inline

Returns the error on the x position of the COG for the n_th element.

Definition at line 72 of file TopologyDictionary.h.

◆ getErrZ()

float o2::its3::TopologyDictionary::getErrZ ( int  n,
bool  IB = true 
) const
inline

Returns the error on the z position of the COG for the n_th element.

Definition at line 86 of file TopologyDictionary.h.

◆ getFrequency()

double o2::its3::TopologyDictionary::getFrequency ( int  n,
bool  IB = true 
) const
inline

Returns the frequency of the n_th element;.

Definition at line 121 of file TopologyDictionary.h.

◆ getHash()

unsigned long o2::its3::TopologyDictionary::getHash ( int  n,
bool  IB = true 
) const
inline

Returns the hash of the n_th element.

Definition at line 107 of file TopologyDictionary.h.

◆ getNpixels()

int o2::its3::TopologyDictionary::getNpixels ( int  n,
bool  IB = true 
) const
inline

Returns the number of fired pixels of the n_th element.

Definition at line 114 of file TopologyDictionary.h.

◆ getPattern()

const itsmft::ClusterPattern & o2::its3::TopologyDictionary::getPattern ( int  n,
bool  IB = true 
) const
inline

Returns the pattern of the topology.

Definition at line 135 of file TopologyDictionary.h.

◆ getSize()

int o2::its3::TopologyDictionary::getSize ( bool  IB) const
inline

Returns the number of elements in the dicionary;.

Definition at line 145 of file TopologyDictionary.h.

◆ getTopologyDistribution()

TH1F * o2::its3::TopologyDictionary::getTopologyDistribution ( const std::string_view  hname,
bool  IB = true 
) const

Fills a hostogram with the distribution of the IDs.

Definition at line 179 of file TopologyDictionary.cxx.

◆ getXCOG()

float o2::its3::TopologyDictionary::getXCOG ( int  n,
bool  IB = true 
) const
inline

Returns the x position of the COG for the n_th element.

Definition at line 65 of file TopologyDictionary.h.

◆ getZCOG()

float o2::its3::TopologyDictionary::getZCOG ( int  n,
bool  IB = true 
) const
inline

Returns the z position of the COG for the n_th element.

Definition at line 79 of file TopologyDictionary.h.

◆ isGroup()

bool o2::its3::TopologyDictionary::isGroup ( int  n,
bool  IB = true 
) const
inline

Returns true if the element corresponds to a group of rare topologies.

Definition at line 128 of file TopologyDictionary.h.

◆ loadFrom()

TopologyDictionary * o2::its3::TopologyDictionary::loadFrom ( const std::string &  fileName = "",
const std::string &  objName = "ccdb_object" 
)
static

Definition at line 238 of file TopologyDictionary.cxx.

◆ print()

void o2::its3::TopologyDictionary::print ( ) const
noexcept

Definition at line 43 of file TopologyDictionary.cxx.

◆ readBinaryFile()

void o2::its3::TopologyDictionary::readBinaryFile ( const std::string &  fileName)

Reads the dictionary from a binary file.

Definition at line 133 of file TopologyDictionary.cxx.

◆ readFromFile()

void o2::its3::TopologyDictionary::readFromFile ( const std::string &  fileName)

Definition at line 120 of file TopologyDictionary.cxx.

◆ reset()

void o2::its3::TopologyDictionary::reset ( )
noexcept

Resets internal structures.

Definition at line 52 of file TopologyDictionary.cxx.

◆ resetMaps()

void o2::its3::TopologyDictionary::resetMaps ( bool  IB = true)
noexcept

Definition at line 60 of file TopologyDictionary.cxx.

◆ writeBinaryFile()

void o2::its3::TopologyDictionary::writeBinaryFile ( const std::string &  outputFile)

Prints the dictionary in a binary file.

Definition at line 88 of file TopologyDictionary.cxx.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const its3::TopologyDictionary dictionary 
)
friend

Prints the dictionary.

Definition at line 67 of file TopologyDictionary.cxx.

Member Data Documentation

◆ ColClassSpan

constexpr int o2::its3::TopologyDictionary::ColClassSpan = 4
staticconstexpr

Column span of the classes of rare topologies.

Definition at line 48 of file TopologyDictionary.h.

◆ MaxNumberOfColClasses

constexpr int o2::its3::TopologyDictionary::MaxNumberOfColClasses = 1 + ((itsmft::ClusterPattern::MaxColSpan - 1) / ColClassSpan)
staticconstexpr

Maximum number of col classes for the groups of rare topologies.

Definition at line 50 of file TopologyDictionary.h.

◆ MaxNumberOfRowClasses

constexpr int o2::its3::TopologyDictionary::MaxNumberOfRowClasses = 1 + ((itsmft::ClusterPattern::MaxRowSpan - 1) / RowClassSpan)
staticconstexpr

Maximum number of row classes for the groups of rare topologies.

Definition at line 49 of file TopologyDictionary.h.

◆ NumberOfRareGroups

constexpr int o2::its3::TopologyDictionary::NumberOfRareGroups = MaxNumberOfRowClasses * MaxNumberOfColClasses
staticconstexpr

Number of entries corresponding to groups of rare topologies (those whos matrix exceed the max number of bytes are empty).

Definition at line 51 of file TopologyDictionary.h.

◆ RowClassSpan

constexpr int o2::its3::TopologyDictionary::RowClassSpan = 4
staticconstexpr

Row span of the classes of rare topologies.

constexpr for the definition of the groups of rare topologies. The attritbution of the group ID is stringly dependent on the following parameters: it must be a power of 2.

Definition at line 47 of file TopologyDictionary.h.


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