77 std::vector<uint8_t> apdHits(420 * 4, 0);
78 std::vector<uint8_t> hapdHits(420, 0);
79 for (
const auto& digit : digits) {
80 uint8_t bits = digit.getBitmap();
83 int moduleID = digit.getModuleID();
84 if (moduleID > 420 || moduleID < 1)
continue;
86 int channelID = digit.getChannelID();
87 if (channelID > 143 || channelID < 0)
continue;
88 int chipID = moduleID * 4 + channelID / 36;
94 for (
const auto& digit : digits) {
95 int asicCh = digit.getChannelID();
96 int modID = digit.getModuleID();
97 if (modID > 420 || modID < 1)
continue;
98 if (asicCh > 143 || asicCh < 0)
continue;
99 uint8_t hitBitmap = digit.getBitmap();
103 if (!
m_chnMask->isActive(modID, asicCh))
continue;
105 int chipID = (modID - 1) * 4 + asicCh / 36;
112 if (not
m_chnMap->getXYFromAsic(asicCh, xCh, yCh)) {
113 B2ERROR(
"Invalid ARICH hit! This hit will be ignored.");
117 ROOT::Math::XYVector hitpos2D =
m_geoPar->getChannelPosition(modID, xCh, yCh);
118 ROOT::Math::XYZVector hitpos3D(hitpos2D.X(), hitpos2D.Y(),
119 m_geoPar->getDetectorZPosition() +
m_geoPar->getHAPDGeometry().getWinThickness());
120 hitpos3D =
m_geoPar->getMasterVolume().pointToGlobal(hitpos3D);
123 ARICHHit* hh = arichHits.appendNew(hitpos3D, modID, asicCh);
127 for (
int imod = 1; imod < 421; imod++) {
128 for (
int ichn = 0; ichn < 144; ichn++) {
131 if (!
m_chnMask->isActive(imod, ichn))
continue;
132 int chipID = (imod - 1) * 4 + ichn / 36;
138 if (not
m_chnMap->getXYFromAsic(ichn, xCh, yCh)) {
139 B2ERROR(
"Invalid ARICH hit! This hit will be ignored.");
143 ROOT::Math::XYVector hitpos2D =
m_geoPar->getChannelPosition(imod, xCh, yCh);
144 ROOT::Math::XYZVector hitpos3D(hitpos2D.X(), hitpos2D.Y(),
145 m_geoPar->getDetectorZPosition() +
m_geoPar->getHAPDGeometry().getWinThickness());
146 hitpos3D =
m_geoPar->getMasterVolume().pointToGlobal(hitpos3D);
148 arichHits.appendNew(hitpos3D, imod, ichn);
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.