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 | 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 29 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 178 of file AsicBackgroundLibraryCreator.cc.
185 if (wireHits.size() > 8) {
186 B2ERROR(
"Number of hits per asic should not exceed 8, observe too many hits." <<
LogVar(
"nHits", wireHits.size()));
195 for (
auto& hit : wireHits) {
196 if (!(*hit)->hasBackgroundFlag() && (*hit)->hasTakenFlag()) {
215 const CDCTrack* signalTrack =
nullptr;
216 for (
auto& track : tracks) {
217 for (
auto& hit : track) {
218 if (&hit.getWireHit() == signal) {
219 signalTrack = &track;
223 if (signalTrack !=
nullptr) {
228 if (signalTrack ==
nullptr) {
229 B2DEBUG(29,
"AsicBackgroundLibraryCreator::No track found for the signal hit");
238 const auto& trajectory = signalTrack->getStartTrajectory3D();
242 for (
auto& hit : wireHits) {
244 const float dist = getDist2D(trajectory, hit);
271 for (
auto& hit : wireHits) {
272 auto eWire = hit->getWireID().getEWire();
273 auto channel =
m_map[eWire].second;
274 auto asicCH = channel % 8;
284 auto eWire = signal->getWireID().getEWire();
287 m_adc_sig = signal->getHit()->getADCCount();
double m_distance_signal_max
maximal distance from track to signal hit
Short_t m_adc_sig
ADC of the signal.
asicChannel m_asic_info[8]
all 8 channels
UShort_t m_n_hit_track
Number of hits on the track.
bool m_use_axial_hits_only
use axial layers only
size_t m_minimal_hits_on_track
min. number of hits on the track
float m_dist_bg
min. distance to non-linked hits
UChar_t m_board
signal boardID
float m_dist_signal
Distance to signal hit.
std::map< int, std::pair< int, int > > m_map
map from ewire to board/channel ID
UChar_t m_n_hit
For debuging, store also number of channels with hits.
UChar_t m_channel
signal channelID
std::unique_ptr< Recorder > m_recorder
Recorder for the root output.
double m_distance_background_min
minimal distance from track to background hit
size_t m_minimal_hit_number
min. number of hits in ASIC for background check
Short_t m_adc_max_bg
Max. ADC background.
Class representing a sequence of three dimensional reconstructed hits.
Class representing a hit wire in the central drift chamber.
Class to store variables with their name which were sent to the logging service.
Short_t TOT
Time over threshold.
The documentation for this class was generated from the following files: