Belle II Software  release-08-01-10
CKFToCDCFindlet.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 
9 #include <tracking/ckf/cdc/findlets/CKFToCDCFindlet.h>
10 
11 #include <tracking/trackFindingCDC/utilities/Algorithms.h>
12 
13 #include <framework/core/ModuleParamList.h>
14 
15 using namespace Belle2;
16 
18 
20 {
26 }
27 
28 void CKFToCDCFindlet::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
29 {
30  Super::exposeParameters(moduleParamList, prefix);
31 
32  m_trackHandler.exposeParameters(moduleParamList, prefix);
33  m_seedCreator.exposeParameters(moduleParamList, prefix);
34  m_treeSearcher.exposeParameters(moduleParamList, prefix);
35  m_resultFinalizer.exposeParameters(moduleParamList, prefix);
36  m_resultStorer.exposeParameters(moduleParamList, prefix);
37 
38  moduleParamList->getParameter<std::string>("statePreFilter").setDefaultValue("all");
39  moduleParamList->getParameter<std::string>("stateBasicFilter").setDefaultValue("rough");
40  moduleParamList->getParameter<std::string>("stateExtrapolationFilter").setDefaultValue("extrapolate_and_update");
41  moduleParamList->getParameter<std::string>("stateFinalFilter").setDefaultValue("distance");
42 }
43 
45 {
47 
48  m_vxdRecoTrackVector.clear();
49  m_paths.clear();
50  m_seeds.clear();
51  m_results.clear();
52 }
53 
54 void CKFToCDCFindlet::apply(const std::vector<TrackFindingCDC::CDCWireHit>& wireHits)
55 {
58 
59  const auto& wireHitPtrs = TrackFindingCDC::as_pointers<const TrackFindingCDC::CDCWireHit>(wireHits);
60 
61  for (const auto& seed : m_seeds) {
62  B2DEBUG(29, "Starting new seed");
63  m_paths.clear();
64  m_paths.push_back(seed);
65  m_treeSearcher.apply(m_paths, wireHitPtrs);
67  }
68 
70 }
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void apply(const std::vector< CDCCKFPath > &paths, std::vector< CDCCKFResult > &results) override
main method of the findlet, for a list of paths create a list of results.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void apply(const std::vector< CDCCKFResult > &results) override
Do the track/hit finding/merging.
void apply(const std::vector< RecoTrack * > &recoTracks, std::vector< CDCCKFPath > &seeds) override
Main method of the findlet, loop over reco tracks, create seeds for each of them.
std::vector< CDCCKFResult > m_results
Current list of results.
std::vector< CDCCKFPath > m_seeds
Current list of seeds.
CDCCKFResultStorer m_resultStorer
Result Storer.
void apply(const std::vector< TrackFindingCDC::CDCWireHit > &wireHits) override
Do the track/hit finding/merging.
CDCCKFSeedCreator m_seedCreator
Seed Creator.
~CKFToCDCFindlet() override
Default desctructor.
StackTreeSearcher m_treeSearcher
Tree Searcher.
CDCCKFResultFinalizer m_resultFinalizer
Result Finalizer.
void beginEvent() override
Clear the object pools.
TrackLoader m_trackHandler
Findlet for retrieving the vxd tracks and writing the result out.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
std::vector< RecoTrack * > m_vxdRecoTrackVector
Pointers to the CDC Reco tracks as a vector.
CKFToCDCFindlet()
Constructor, for setting module description and parameters.
std::vector< CDCCKFPath > m_paths
Current list of paths.
The Module parameter list class.
void apply(std::vector< CDCCKFPath > &paths, const std::vector< const TrackFindingCDC::CDCWireHit * > &wireHits) override
Main method to update the paths. Input: vector of the selected paths and a vector of CDC wirehits to ...
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:69
void apply(std::vector< RecoTrack * > &seeds) override
Load in the reco tracks and the hits.
Definition: TrackLoader.cc:68
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: TrackLoader.cc:24
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
Abstract base class for different kinds of events.