Belle II Software development
|
This class implements the methods to map raw SVD hits to basf2 SVD hits. More...
#include <SVDOnlineToOfflineMap.h>
Classes | |
class | ChipID |
Class to hold FADC+APV25 numbers. More... | |
struct | ChipInfo |
Struct to hold data about an APV25 chip. More... | |
struct | missingAPV |
struct to hold missing APVs informations More... | |
class | SensorID |
Class to hold numbers related to sensor. More... | |
struct | SensorInfo |
Struct to hold data about a sensor. More... | |
Public Types | |
typedef std::unordered_map< unsigned short, unsigned short > | FADCmap |
FADC map typedef. | |
Public Member Functions | |
void | setErrorRate (int errorRate) |
Setter for suppression factor given by the Unpacker. | |
SVDOnlineToOfflineMap (const std::string &xml_filename) | |
Constructor. | |
SVDOnlineToOfflineMap ()=delete | |
No default constructor. | |
SVDShaperDigit * | NewShaperDigit (unsigned char FADC, unsigned char APV25, unsigned char channel, short samples[6], float time=0.0) |
Return a pointer to a new SVDShpaerDigit whose VxdID, isU and cellID is set. | |
const SensorInfo & | getSensorInfo (unsigned char FADC, unsigned char APV25) |
Get SensorInfo for a given FADC/APV combination. | |
bool | isAPVinMap (unsigned short layer, unsigned short ladder, unsigned short dssd, bool side, unsigned short strip) |
is the APV of the strips in the map? for a given layer/ladder/dssd/side/strip combination. | |
bool | isAPVinMap (VxdID sensorID, bool side, unsigned short strip) |
is the APV of the strips in the map? for a given layer/ladder/dssd/side/strip combination. | |
void | prepareListOfMissingAPVs () |
prepares the list of the missing APVs using the channel mapping | |
int | getNumberOfMissingAPVs () |
Get number of missing APVs. | |
const ChipInfo & | getChipInfo (unsigned short layer, unsigned short ladder, unsigned short dssd, bool side, unsigned short strip) |
Get ChipInfo for a given layer/ladder/dssd/side/strip combination. | |
short | getStripNumber (unsigned char channel, const SensorInfo &info) const |
Convert APV channel number to a strip number using a ChipInfo object. | |
void | prepFADCmaps (FADCmap &, FADCmap &) |
function that maps FADC numbers as 0-(nFADCboards-1) from FADCnumbers unordered_set | |
unsigned short | getFADCboardsNumber () |
get the num,ner of FADC boards | |
Public Attributes | |
std::vector< missingAPV > | m_missingAPVs |
list of the missing APVs | |
std::unordered_set< unsigned char > | FADCnumbers |
container for FADC numbers from current mapping file | |
std::unordered_multimap< unsigned char, unsigned char > | APVforFADCmap |
map containing FADC numbers assigned to multiple APVs, from xml file | |
Private Member Functions | |
void | ReadLayer (int nLayer, boost::property_tree::ptree const &xml_layer) |
Read from the ptree v in the xml file the layer nLayer. | |
void | ReadLadder (int nLayer, int nLadder, boost::property_tree::ptree const &xml_ladder) |
Read from the ptree xml_ladde the ladder nLadder in layer nLayer. | |
void | ReadSensor (int nLayer, int nLadder, int nSensor, boost::property_tree::ptree const &xml_sensor) |
Read from the ptree xml_sensor the sensor nSensor in ladder nLadder in layer nLayer. | |
void | ReadSensorSide (int nLayer, int nLadder, int nSensor, bool isU, boost::property_tree::ptree const &xml_side) |
Read from the ptree xml_side the U-side, if isU, (the V-side otherwise) of the sensor nSensor in ladder nLadder in layer nLayer. | |
void | addChip (unsigned char chipN, unsigned char FADCn, int nlayer, int nladder, int nsensor, bool isU, unsigned short stripNumberCh0, bool isParallel) |
add chipN on FADCn to the map | |
void | addChip (unsigned char chipN, unsigned char FADCn, unsigned short stripNumberCh0, bool isParallel) |
add chipN on FADCn to the map | |
Private Attributes | |
std::string | m_MapUniqueName |
Human readable unique name of this map. | |
std::unordered_map< ChipID::baseType, SensorInfo > | m_sensors |
m_sensors[ChipID(FADC,APV25)] gives the SensorInfo for the given APV25 on the given FADC (Unpacker) | |
std::unordered_map< SensorID::baseType, std::vector< ChipInfo > > | m_chips |
needed for the packer, map of VxdID to chips | |
unsigned int | nBadMappingErrors = 0 |
Counter of the BadMapping errors. | |
int | m_errorRate {1000} |
The suppression factor of BadMapping ERRORs messages to be shown. | |
ChipInfo | m_currentChipInfo |
internal instance of chipinfo used by the getter | |
SensorInfo | m_currentSensorInfo |
current sensor info | |
This class implements the methods to map raw SVD hits to basf2 SVD hits.
Raw SVD hits are identified by: FADC number, APV number, strip number basf2 SVD hits are identified by PXD Sensor-id, side, strip number
Definition at line 30 of file SVDOnlineToOfflineMap.h.
typedef std::unordered_map<unsigned short, unsigned short> FADCmap |
FADC map typedef.
Definition at line 245 of file SVDOnlineToOfflineMap.h.
|
explicit |
Constructor.
xml_filename | is the name of the xml file containing the map. |
Definition at line 20 of file SVDOnlineToOfflineMap.cc.
const SVDOnlineToOfflineMap::ChipInfo & getChipInfo | ( | unsigned short | layer, |
unsigned short | ladder, | ||
unsigned short | dssd, | ||
bool | side, | ||
unsigned short | strip | ||
) |
Get ChipInfo for a given layer/ladder/dssd/side/strip combination.
layer | is the the layer number |
ladder | is the the ladder number |
dssd | is the the sensor number |
side | is true if U |
strip | is the strip number |
Definition at line 102 of file SVDOnlineToOfflineMap.cc.
|
inline |
get the num,ner of FADC boards
Definition at line 251 of file SVDOnlineToOfflineMap.h.
|
inline |
Get number of missing APVs.
Definition at line 213 of file SVDOnlineToOfflineMap.h.
const SVDOnlineToOfflineMap::SensorInfo & getSensorInfo | ( | unsigned char | FADC, |
unsigned char | APV25 | ||
) |
Get SensorInfo for a given FADC/APV combination.
FADC | is FADC number from the SVDRawCopper data. |
APV25 | is the APV25 number from the SVDRawCopper data. |
Definition at line 79 of file SVDOnlineToOfflineMap.cc.
|
inline |
Convert APV channel number to a strip number using a ChipInfo object.
Definition at line 234 of file SVDOnlineToOfflineMap.h.
bool isAPVinMap | ( | unsigned short | layer, |
unsigned short | ladder, | ||
unsigned short | dssd, | ||
bool | side, | ||
unsigned short | strip | ||
) |
is the APV of the strips in the map? for a given layer/ladder/dssd/side/strip combination.
layer | is the layer number |
ladder | is the ladder number |
dssd | is the sensor number |
side | is true if U |
strip | is the strip number |
Definition at line 135 of file SVDOnlineToOfflineMap.cc.
bool isAPVinMap | ( | VxdID | sensorID, |
bool | side, | ||
unsigned short | strip | ||
) |
is the APV of the strips in the map? for a given layer/ladder/dssd/side/strip combination.
sensorID | is the VxdID of the sensor |
side | is true if U |
strip | is the strip number |
Definition at line 163 of file SVDOnlineToOfflineMap.cc.
SVDShaperDigit * NewShaperDigit | ( | unsigned char | FADC, |
unsigned char | APV25, | ||
unsigned char | channel, | ||
short | samples[6], | ||
float | time = 0.0 |
||
) |
Return a pointer to a new SVDShpaerDigit whose VxdID, isU and cellID is set.
FADC | is FADC number from the SVDRawCopper data. |
APV25 | is the APV25 number from the SVDRawCopper data. |
channel | is the APV25 channel number from the SVDRawCopper data. |
samples | APV samples |
time | strip time |
Definition at line 169 of file SVDOnlineToOfflineMap.cc.
void prepareListOfMissingAPVs | ( | ) |
prepares the list of the missing APVs using the channel mapping
Definition at line 312 of file SVDOnlineToOfflineMap.cc.
function that maps FADC numbers as 0-(nFADCboards-1) from FADCnumbers unordered_set
Definition at line 302 of file SVDOnlineToOfflineMap.cc.
|
private |
Read from the ptree xml_ladde the ladder nLadder in layer nLayer.
Definition at line 205 of file SVDOnlineToOfflineMap.cc.
|
private |
Read from the ptree v in the xml file the layer nLayer.
Definition at line 193 of file SVDOnlineToOfflineMap.cc.
|
private |
Read from the ptree xml_sensor the sensor nSensor in ladder nLadder in layer nLayer.
Definition at line 217 of file SVDOnlineToOfflineMap.cc.
|
private |
Read from the ptree xml_side the U-side, if isU, (the V-side otherwise) of the sensor nSensor in ladder nLadder in layer nLayer.
Definition at line 241 of file SVDOnlineToOfflineMap.cc.
|
inline |
Setter for suppression factor given by the Unpacker.
Definition at line 34 of file SVDOnlineToOfflineMap.h.
std::unordered_multimap<unsigned char, unsigned char> APVforFADCmap |
map containing FADC numbers assigned to multiple APVs, from xml file
Definition at line 242 of file SVDOnlineToOfflineMap.h.
std::unordered_set<unsigned char> FADCnumbers |
container for FADC numbers from current mapping file
Definition at line 239 of file SVDOnlineToOfflineMap.h.
|
private |
needed for the packer, map of VxdID to chips
Definition at line 282 of file SVDOnlineToOfflineMap.h.
|
private |
internal instance of chipinfo used by the getter
Definition at line 306 of file SVDOnlineToOfflineMap.h.
|
private |
current sensor info
Definition at line 307 of file SVDOnlineToOfflineMap.h.
|
private |
The suppression factor of BadMapping ERRORs messages to be shown.
Definition at line 288 of file SVDOnlineToOfflineMap.h.
|
private |
Human readable unique name of this map.
Definition at line 276 of file SVDOnlineToOfflineMap.h.
std::vector< missingAPV > m_missingAPVs |
list of the missing APVs
Definition at line 210 of file SVDOnlineToOfflineMap.h.
|
private |
m_sensors[ChipID(FADC,APV25)] gives the SensorInfo for the given APV25 on the given FADC (Unpacker)
mao for chip ID to VxdID
Definition at line 281 of file SVDOnlineToOfflineMap.h.
|
private |
Counter of the BadMapping errors.
Definition at line 285 of file SVDOnlineToOfflineMap.h.