This class implements the methods to map raw SVD hits to basf2 SVD hits.
More...
#include <SVDOnlineToOfflineMap.h>
|
typedef std::unordered_map< unsigned short, unsigned short > | FADCmap |
| FADC map typedef.
|
|
|
void | setErrorRate (int errorRate) |
| Setter for suppression factor given by the Unpacker.
|
|
| SVDOnlineToOfflineMap (const std::string &xml_filename) |
| Constructor. More...
|
|
| 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. More...
|
|
const SensorInfo & | getSensorInfo (unsigned char FADC, unsigned char APV25) |
| Get SensorInfo for a given FADC/APV combination. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
short | getStripNumber (unsigned char channel, const SensorInfo &info) const |
| Convert APV channel number to a strip number using a ChipInfo object. More...
|
|
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
|
|
|
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
|
|
|
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
|
|
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.
◆ SVDOnlineToOfflineMap()
Constructor.
- Parameters
-
xml_filename | is the name of the xml file containing the map. |
Definition at line 20 of file SVDOnlineToOfflineMap.cc.
35 B2ERROR(
"The xml filename: " << xmlFilename << endl <<
36 "resolved to: " << xmlFullPath << endl <<
37 "by FileSystem::findFile does not exist." << endl <<
38 "SVD online to offline map cannot be initialized." << endl <<
39 "Be aware: no SVDShaperDigit will be produced by this module." << endl
45 read_xml(xmlFullPath, propertyTree);
46 }
catch (std::exception
const& ex) {
47 B2ERROR(
"STD excpetion rised during xml parsing " << ex.what() << endl <<
48 "SVD online to offline map cannot be initialized." << endl <<
49 "Be aware: no SVDShaperDigits will be produced by this module." << endl);
52 B2ERROR(
"Unknown excpetion rised during xml parsing "
53 "SVD online to offline map cannot be initialized." << endl <<
54 "Be aware: no SVDShaperDigits will be produced by this module." << endl);
60 for (ptree::value_type
const& v : propertyTree.get_child(
"SVD")) {
61 if (v.first ==
"unique") {
63 B2INFO(
"Loading the offline -> online SVD map named " <<
m_MapUniqueName);
66 if (v.first ==
"layer")
67 ReadLayer(v.second.get<
int>(
"<xmlattr>.n"), v.second);
70 B2ERROR(
"Unknown excpetion rised during map initialization! "
71 "SVD online to offline map corrupted." << endl <<
72 "Be aware: the SVDShaperDigits will be unreliable." << endl);
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
static bool fileExists(const std::string &filename)
Check if the file with given filename exists.
SensorInfo m_currentSensorInfo
current sensor info
ChipInfo m_currentChipInfo
internal instance of chipinfo used by the getter
void ReadLayer(int nLayer, boost::property_tree::ptree const &xml_layer)
Read from the ptree v in the xml file the layer nLayer.
std::string m_MapUniqueName
Human readable unique name of this map.
◆ getChipInfo()
Get ChipInfo for a given layer/ladder/dssd/side/strip combination.
- Parameters
-
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 |
- Returns
- a reference to the corresponding ChipInfo object, all-zero if nonsensical input.
Definition at line 102 of file SVDOnlineToOfflineMap.cc.
◆ getSensorInfo()
Get SensorInfo for a given FADC/APV combination.
- Parameters
-
FADC | is FADC number from the SVDRawCopper data. |
APV25 | is the APV25 number from the SVDRawCopper data. |
- Returns
- a reference to the corresponding SensorInfo object, all-zero if nonsensical input.
Definition at line 79 of file SVDOnlineToOfflineMap.cc.
◆ getStripNumber()
short getStripNumber |
( |
unsigned char |
channel, |
|
|
const SensorInfo & |
info |
|
) |
| const |
|
inline |
Convert APV channel number to a strip number using a ChipInfo object.
- Parameters
-
- Returns
- The corresponding strip number, -1 if nonsensical input
Definition at line 234 of file SVDOnlineToOfflineMap.h.
235 {
return (info.m_channel0 + ((
unsigned short)channel) * (info.m_parallel ? 1 : -1)); }
◆ isAPVinMap() [1/2]
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.
- Parameters
-
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 |
- Returns
- true if the APV that reads the strip is in the map, false otherwise
Definition at line 135 of file SVDOnlineToOfflineMap.cc.
◆ isAPVinMap() [2/2]
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.
- Parameters
-
sensorID | is the VxdID of the sensor |
side | is true if U |
strip | is the strip number |
- Returns
- true if the APV that reads the strip is in the map, false otherwise
Definition at line 163 of file SVDOnlineToOfflineMap.cc.
◆ NewShaperDigit()
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.
- Parameters
-
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 |
- Returns
- a pointer to the new SVDShaperDigit owned by the caller whose Position is 0 FIXME: There should be no such function in this mapping class, no dependence on SVDShaperDigit and its interface.
Definition at line 169 of file SVDOnlineToOfflineMap.cc.
◆ m_sensors
The documentation for this class was generated from the following files: