Finds ASICs with single signal hit, records info to the library.
More...
#include <AsicBackgroundLibraryCreator.h>
|
using | IOTypes = std::tuple< AIOTypes... > |
| Types that should be served to apply on invokation.
|
|
using | IOVectors = std::tuple< std::vector< AIOTypes >... > |
| Vector types that should be served to apply on invokation.
|
|
|
| AsicBackgroundLibraryCreator ()=default |
| Default constructor.
|
|
void | initialize () final |
| Access database here, open library for writing:
|
|
void | beginRun () final |
| Reload channel map if needed.
|
|
std::string | getDescription () final |
| Short description of the findlet.
|
|
void | exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final |
| Expose the parameters to a module.
|
|
void | apply (const std::vector< CDCWireHit > &wireHits, const std::vector< CDCTrack > &tracks) final |
| Main algorithm marking hit as background.
|
|
void | terminate () final |
| write out the library
|
|
virtual void | exposeParameters (ModuleParamList *moduleParamList __attribute__((unused)), const std::string &prefix __attribute__((unused))) |
| Forward prefixed parameters of this findlet to the module parameter list.
|
|
virtual void | apply (ToVector< AIOTypes > &... ioVectors)=0 |
| Main function executing the algorithm.
|
|
void | beginEvent () override |
| Receive and dispatch signal for the start of a new event.
|
|
void | endRun () override |
| Receive and dispatch signal for the end of the run.
|
|
|
using | ToVector = typename ToVectorImpl< T >::Type |
| Short hand for ToRangeImpl.
|
|
Finds ASICs with single signal hit, records info to the library.
Definition at line 39 of file AsicBackgroundLibraryCreator.h.
◆ selectAsic()
void selectAsic |
( |
const std::vector< const CDCWireHit * > & |
wireHits, |
|
|
const std::vector< CDCTrack > & |
tracks |
|
) |
| |
|
private |
Algorithm to select suitable ASIC for library creation.
This is abnormal situation, detected for few runs, related to CDC unpacker. Hits are to be marked as background.
Definition at line 180 of file AsicBackgroundLibraryCreator.cc.
187 if (wireHits.size() > 8) {
188 B2ERROR(
"Number of hits per asic should not exceed 8, observe too many hits." <<
LogVar(
"nHits", wireHits.size()));
197 for (
auto& hit : wireHits) {
198 if (!(*hit)->hasBackgroundFlag() && (*hit)->hasTakenFlag()) {
217 const CDCTrack* signalTrack =
nullptr;
218 for (
auto& track : tracks) {
219 for (
auto& hit : track) {
220 if (&hit.getWireHit() == signal) {
221 signalTrack = &track;
225 if (signalTrack !=
nullptr) {
230 if (signalTrack ==
nullptr) {
231 B2DEBUG(29,
"AsicBackgroundLibraryCreator::No track found for the signal hit");
240 const auto& trajectory = signalTrack->getStartTrajectory3D();
244 for (
auto& hit : wireHits) {
246 const float dist = getDist2D(trajectory, hit);
273 for (
auto& hit : wireHits) {
274 auto eWire = hit->getWireID().getEWire();
275 auto channel =
m_map[eWire].second;
276 auto asicCH = channel % 8;
286 auto eWire = signal->getWireID().getEWire();
289 m_adc_sig = signal->getHit()->getADCCount();
The documentation for this class was generated from the following files: