Belle II Software development
CKFToCDCFromEclFindlet.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/CKFToCDCFromEclFindlet.h>
10
11#include <tracking/trackFindingCDC/utilities/Algorithms.h>
12
13#include <framework/core/ModuleParamList.h>
14
15#include <cdc/dataobjects/CDCRecoHit.h>
16#include <cdc/translators/LinearGlobalADCCountTranslator.h>
17#include <cdc/translators/RealisticCDCGeometryTranslator.h>
18#include <cdc/translators/RealisticTDCCountTranslator.h>
19
20using namespace Belle2;
21
23
25{
31}
32
33void CKFToCDCFromEclFindlet::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
34{
35 Super::exposeParameters(moduleParamList, prefix);
36
37 m_seedCreator.exposeParameters(moduleParamList, prefix);
38 m_treeSearcher.exposeParameters(moduleParamList, prefix);
39 m_resultFinalizer.exposeParameters(moduleParamList, prefix);
40 m_resultStorer.exposeParameters(moduleParamList, prefix);
41 m_duplicateRemover.exposeParameters(moduleParamList, prefix);
42
43 moduleParamList->getParameter<std::string>("statePreFilter").setDefaultValue("all");
44 moduleParamList->getParameter<std::string>("stateBasicFilter").setDefaultValue("rough_eclSeed");
45 moduleParamList->getParameter<std::string>("stateExtrapolationFilter").setDefaultValue("extrapolate_and_update");
46 moduleParamList->getParameter<std::string>("stateFinalFilter").setDefaultValue("distance");
47
48 moduleParamList->getParameter<std::string>("badTracksFilter").setDefaultValue("seedCharge");
49 moduleParamList->getParameter<std::string>("duplicateTrackFilter").setDefaultValue("hitDistance");
50 moduleParamList->getParameter<std::string>("duplicateSeedFilter").setDefaultValue("duplicateHits");
51}
52
54{
56
57 // Prepare the Translators (necessary to create CDCRecoHits)
61 true);
62
63 // Clear all vectors
64 m_paths.clear();
65 m_seeds.clear();
66 m_results.clear();
67}
68
69void CKFToCDCFromEclFindlet::apply(const std::vector<TrackFindingCDC::CDCWireHit>& wireHits)
70{
71 const auto& wireHitPtrs = TrackFindingCDC::as_pointers<const TrackFindingCDC::CDCWireHit>(wireHits);
72
73 // create the seed objects
75
76 // find the paths
77 for (const auto& seed : m_seeds) {
78 B2DEBUG(29, "Starting new seed");
79 m_paths.clear();
80 m_paths.push_back(seed);
81 m_treeSearcher.apply(m_paths, wireHitPtrs);
83 }
84
85 // remove duplicate tracks (additional seeds from Bremsstrahlung)
87
88 // and store output
90}
91
92
void apply(std::vector< CDCCKFResult > &results) override
main method of the findlet, merges and filters paths
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void apply(std::vector< CDCCKFPath > &seeds) override
Load in the reco tracks and the hits.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
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.
static void setTranslators(CDC::ADCCountTranslatorBase *const adcCountTranslator, CDC::CDCGeometryTranslatorBase *const cdcGeometryTranslator, CDC::TDCCountTranslatorBase *const tdcCountTranslator, bool useTrackTime=false, bool cosmics=false)
Setter for the Translators.
Definition: CDCRecoHit.cc:33
This class simply assumes a linear translation through (0,0)
This class uses the realistic detector geometry (the one after alignment procedure) for the translati...
Translator mirroring the realistic Digitization.
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.
StackTreeSearcher m_treeSearcher
Tree Searcher.
CDCCKFResultFinalizer m_resultFinalizer
Result Finalizer.
~CKFToCDCFromEclFindlet() override
Default destructor.
void beginEvent() override
Clear the object pools.
CDCCKFDuplicateRemover m_duplicateRemover
Showers from Bremsstrahlung might lead to duplicate tracks.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
CDCCKFEclSeedCreator m_seedCreator
Findlet for retrieving the ecl showers and creating recoTracks out of it.
CKFToCDCFromEclFindlet()
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
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
Abstract base class for different kinds of events.