Belle II Software  release-08-01-10
DATCONFPGAFindlet.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include <tracking/datcon/findlets/DATCONFPGAFindlet.h>
9 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
10 #include <framework/logging/Logger.h>
11 #include <framework/core/ModuleParamList.h>
12 
13 using namespace Belle2;
14 using namespace TrackFindingCDC;
15 
17 
19 {
20  addProcessingSignalListener(&m_digitConverter);
21  addProcessingSignalListener(&m_uClusterizer);
22  addProcessingSignalListener(&m_vClusterizer);
23  addProcessingSignalListener(&m_clusterLoaderAndPreparer);
24  addProcessingSignalListener(&m_uInterceptFinder);
25  addProcessingSignalListener(&m_vInterceptFinder);
26  addProcessingSignalListener(&m_toPXDExtrapolator);
27  addProcessingSignalListener(&m_ROICalculator);
28 }
29 
30 void DATCONFPGAFindlet::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
31 {
32  Super::exposeParameters(moduleParamList, prefix);
33 
34  m_digitConverter.exposeParameters(moduleParamList, prefix);
35  m_uClusterizer.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "uSide"));
36  m_vClusterizer.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "vSide"));
37 
38  m_clusterLoaderAndPreparer.exposeParameters(moduleParamList, prefix);
39 
40  m_uInterceptFinder.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "uSide"));
41  m_vInterceptFinder.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "vSide"));
42 
43  m_toPXDExtrapolator.exposeParameters(moduleParamList, prefix);
44  m_ROICalculator.exposeParameters(moduleParamList, prefix);
45 }
46 
48 {
49  Super::beginEvent();
50 
51  m_uDigits.clear();
52  m_vDigits.clear();
53  m_uClusters.clear();
54  m_vClusters.clear();
55  m_uHits.clear();
56  m_vHits.clear();
57  m_uTracks.clear();
58  m_vTracks.clear();
59  m_uExtrapolations.clear();
60  m_vExtrapolations.clear();
61 
62 }
63 
65 {
66  m_digitConverter.apply(m_uDigits, m_vDigits);
67  B2DEBUG(29, "m_uDigits.size(): " << m_uDigits.size() << " m_vDigits.size(): " << m_vDigits.size());
68 
69  m_uClusterizer.apply(m_uDigits, m_uClusters);
70  m_vClusterizer.apply(m_vDigits, m_vClusters);
71  B2DEBUG(29, "m_uClusters.size(): " << m_uClusters.size() << " m_vClusters.size(): " << m_vClusters.size());
72 
73  m_clusterLoaderAndPreparer.apply(m_uClusters, m_vClusters, m_uHits, m_vHits);
74  B2DEBUG(29, "m_uHits.size(): " << m_uHits.size() << " m_vHits.size(): " << m_vHits.size());
75 
76  // hit vectors are empty in case of high occupancy, a warning is created in m_clusterLoader
77  if (m_uHits.empty() or m_vHits.empty()) {
78  return;
79  }
80 
81  m_uInterceptFinder.apply(m_uHits, m_uTracks);
82  m_vInterceptFinder.apply(m_vHits, m_vTracks);
83 
84  B2DEBUG(29, "m_uTracks.size(): " << m_uTracks.size() << " m_vTracks.size(): " << m_vTracks.size());
85 
86  m_toPXDExtrapolator.apply(m_uTracks, m_vTracks, m_uExtrapolations, m_vExtrapolations);
87 
88  m_ROICalculator.apply(m_uExtrapolations, m_vExtrapolations);
89 
90  B2DEBUG(29, "Event statistics: uSVDDigits: " << m_uDigits.size() << " vSVDDigits: " << m_vDigits.size() << " uSVDClusters: " <<
91  m_uClusters.size() << " vSVDClusters: " << m_vClusters.size() << " uHits: " << m_uHits.size() << " vHits: " <<
92  m_vHits.size() << " uTracks: " << m_uTracks.size() << " vTracks: " << m_vTracks.size() <<
93  " uExtrapolations: " << m_uExtrapolations.size() << " vExtrapolations: " << m_vExtrapolations.size());
94 }
DATCONFPGAFindlet()
Constructor for adding the subfindlets.
~DATCONFPGAFindlet()
Default desctructor.
void beginEvent() override
Clear the object pools.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void apply() override
Function to call all the sub-findlets.
The Module parameter list class.
Abstract base class for different kinds of events.