Belle II Software  release-05-01-25
CKFToCDCFindlet.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <tracking/ckf/cdc/findlets/CKFToCDCFindlet.h>
12 
13 #include <tracking/trackFindingCDC/utilities/Algorithms.h>
14 
15 #include <framework/core/ModuleParamList.h>
16 
17 using namespace Belle2;
18 
20 
22 {
28 }
29 
30 void CKFToCDCFindlet::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
31 {
32  Super::exposeParameters(moduleParamList, prefix);
33 
34  m_trackHandler.exposeParameters(moduleParamList, prefix);
35  m_seedCreator.exposeParameters(moduleParamList, prefix);
36  m_treeSearcher.exposeParameters(moduleParamList, prefix);
37  m_resultFinalizer.exposeParameters(moduleParamList, prefix);
38  m_resultStorer.exposeParameters(moduleParamList, prefix);
39 
40  moduleParamList->getParameter<std::string>("statePreFilter").setDefaultValue("all");
41  moduleParamList->getParameter<std::string>("stateBasicFilter").setDefaultValue("rough");
42  moduleParamList->getParameter<std::string>("stateExtrapolationFilter").setDefaultValue("extrapolate_and_update");
43  moduleParamList->getParameter<std::string>("stateFinalFilter").setDefaultValue("distance");
44 }
45 
47 {
49 
50  m_vxdRecoTrackVector.clear();
51  m_paths.clear();
52  m_seeds.clear();
53  m_results.clear();
54 }
55 
56 void CKFToCDCFindlet::apply(const std::vector<TrackFindingCDC::CDCWireHit>& wireHits)
57 {
60 
61  const auto& wireHitPtrs = TrackFindingCDC::as_pointers<const TrackFindingCDC::CDCWireHit>(wireHits);
62 
63  for (const auto& seed : m_seeds) {
64  B2DEBUG(100, "Starting new seed");
65  m_paths.clear();
66  m_paths.push_back(seed);
67  m_treeSearcher.apply(m_paths, wireHitPtrs);
69  }
70 
72 }
Belle2::CKFToCDCFindlet::m_resultFinalizer
CDCCKFResultFinalizer m_resultFinalizer
Result Finalizer.
Definition: CKFToCDCFindlet.h:73
Belle2::CDCCKFResultFinalizer::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: CDCCKFResultFinalizer.h:48
Belle2::CKFToCDCFindlet::m_seedCreator
CDCCKFSeedCreator m_seedCreator
Seed Creator.
Definition: CKFToCDCFindlet.h:69
Belle2::CDCCKFResultStorer::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: CDCCKFResultStorer.cc:21
Belle2::StackTreeSearcher::apply
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 ...
Definition: StackTreeSearcher.h:61
Belle2::CKFToCDCFindlet::m_seeds
std::vector< CDCCKFPath > m_seeds
Current list of seeds.
Definition: CKFToCDCFindlet.h:83
Belle2::CKFToCDCFindlet::~CKFToCDCFindlet
~CKFToCDCFindlet() override
Default desctructor.
Belle2::CKFToCDCFindlet::m_results
std::vector< CDCCKFResult > m_results
Current list of results.
Definition: CKFToCDCFindlet.h:85
Belle2::CKFToCDCFindlet::m_treeSearcher
StackTreeSearcher m_treeSearcher
Tree Searcher.
Definition: CKFToCDCFindlet.h:71
Belle2::ModuleParamList::getParameter
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
Definition: ModuleParamList.templateDetails.h:90
Belle2::CKFToCDCFindlet::m_trackHandler
TrackLoader m_trackHandler
Findlet for retrieving the vxd tracks and writing the result out.
Definition: CKFToCDCFindlet.h:67
Belle2::CKFToCDCFindlet::m_resultStorer
CDCCKFResultStorer m_resultStorer
Result Storer.
Definition: CKFToCDCFindlet.h:75
Belle2::CKFToCDCFindlet::m_vxdRecoTrackVector
std::vector< RecoTrack * > m_vxdRecoTrackVector
Pointers to the CDC Reco tracks as a vector.
Definition: CKFToCDCFindlet.h:79
Belle2::CKFToCDCFindlet::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: CKFToCDCFindlet.cc:30
Belle2::TrackFindingCDC::CompositeProcessingSignalListener::addProcessingSignalListener
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Definition: CompositeProcessingSignalListener.cc:57
Belle2::TrackLoader::apply
void apply(std::vector< RecoTrack * > &seeds) override
Load in the reco tracks and the hits.
Definition: TrackLoader.cc:70
Belle2::CDCCKFResultStorer::apply
void apply(const std::vector< CDCCKFResult > &results) override
Do the track/hit finding/merging.
Definition: CDCCKFResultStorer.cc:89
Belle2::CKFToCDCFindlet::apply
void apply(const std::vector< TrackFindingCDC::CDCWireHit > &wireHits) override
Do the track/hit finding/merging.
Definition: CKFToCDCFindlet.cc:56
Belle2::CDCCKFResultFinalizer::apply
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.
Definition: CDCCKFResultFinalizer.h:54
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::Findlet< const TrackFindingCDC::CDCWireHit >::exposeParameters
virtual void exposeParameters(ModuleParamList *moduleParamList __attribute__((unused)), const std::string &prefix __attribute__((unused)))
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:79
Belle2::CKFToCDCFindlet::m_paths
std::vector< CDCCKFPath > m_paths
Current list of paths.
Definition: CKFToCDCFindlet.h:81
Belle2::TrackFindingCDC::CompositeProcessingSignalListener::beginEvent
void beginEvent() override
Receive and dispatch signal for the start of a new event.
Definition: CompositeProcessingSignalListener.cc:33
Belle2::StackTreeSearcher::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: StackTreeSearcher.h:52
Belle2::CKFToCDCFindlet::beginEvent
void beginEvent() override
Clear the object pools.
Definition: CKFToCDCFindlet.cc:46
Belle2::TrackLoader::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: TrackLoader.cc:26
Belle2::CKFToCDCFindlet::CKFToCDCFindlet
CKFToCDCFindlet()
Constructor, for setting module description and parameters.
Definition: CKFToCDCFindlet.cc:21
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46
Belle2::CDCCKFSeedCreator::apply
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.
Definition: CDCCKFSeedCreator.h:38