Belle II Software  release-05-01-25
MonopoleStereoHitFinderQuadratic.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun, Dmitrii Neverov *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/trackFindingCDC/findlets/combined/MonopoleStereoHitFinderQuadratic.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
13 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
14 
15 #include <tracking/trackFindingCDC/filters/base/ChooseableFilter.icc.h>
16 
17 using namespace Belle2;
18 using namespace TrackFindingCDC;
19 
21 
23 {
30 // addProcessingSignalListener(&m_szFitter);
31 }
32 
34 {
35  return "Tries to add monopole CDC stereo hits to the found CDC tracks by applying a histogramming method with a quad tree.\n"
36  "WARNING This findlet is kept here just in case hyperbolic one misbehaves and eats up too much RAM\n"
37  "If it doesn't, this one should be removed around release-05 or earlier";
38 }
39 
41 {
43 
44  m_rlTaggedWireHits.clear();
45  m_relations.clear();
46 }
47 
48 void MonopoleStereoHitFinderQuadratic::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
49 {
50  Super::exposeParameters(moduleParamList, prefix);
51 
52  m_rlWireHitCreator.exposeParameters(moduleParamList, prefix);
53  m_matcher.exposeParameters(moduleParamList, prefix);
54  m_filterSelector.exposeParameters(moduleParamList, prefix);
55  m_singleMatchSelector.exposeParameters(moduleParamList, prefix);
56  m_adder.exposeParameters(moduleParamList, prefix);
57  m_inspector.exposeParameters(moduleParamList, prefix);
58 // m_szFitter.exposeParameters(moduleParamList, prefix);
59 }
60 
61 void MonopoleStereoHitFinderQuadratic::apply(std::vector<CDCWireHit>& inputWireHits, std::vector<CDCTrack>& tracks)
62 {
63  m_rlTaggedWireHits.reserve(2 * inputWireHits.size());
64  m_relations.reserve(2 * inputWireHits.size() * tracks.size());
65 
68 // m_filterSelector.apply(m_relations);
71  m_inspector.apply(tracks);
72 
73  for (auto track : tracks)
74  track.sortByArcLength2D();
75 // m_szFitter.apply(tracks);
76 }
Belle2::TrackFindingCDC::AdderInterface::apply
void apply(std::vector< WeightedRelationItem > &weightedRelations) override
Main function to do the adding. Override the add function below in your derived class.
Definition: AdderInterface.h:55
Belle2::TrackFindingCDC::ChooseableFilter
Convenvience wrapper to setup a Chooseable filter from a specific factory object.
Definition: ChooseableFilter.dcl.h:107
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::beginEvent
void beginEvent() final
Signal the beginning of a new event.
Definition: MonopoleStereoHitFinderQuadratic.cc:40
Belle2::TrackFindingCDC::Findlet< CDCWireHit &, CDCTrack & >
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::MonopoleStereoHitFinderQuadratic
MonopoleStereoHitFinderQuadratic()
Constructor registering the subordinary findlets to the processing signal distribution machinery.
Definition: MonopoleStereoHitFinderQuadratic.cc:22
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
Definition: MonopoleStereoHitFinderQuadratic.cc:48
Belle2::TrackFindingCDC::CompositeProcessingSignalListener::addProcessingSignalListener
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Definition: CompositeProcessingSignalListener.cc:57
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_rlWireHitCreator
RLTaggedWireHitCreator m_rlWireHitCreator
Create RL wire hits out of the wire hits.
Definition: MonopoleStereoHitFinderQuadratic.h:81
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_singleMatchSelector
SingleMatchSelector< CDCTrack, CDCRLWireHit, HitComperator > m_singleMatchSelector
Select only those where the relation is unique (or the best one in those groups)
Definition: MonopoleStereoHitFinderQuadratic.h:87
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_adder
StereoHitTrackAdder m_adder
Add the hits to the tracks.
Definition: MonopoleStereoHitFinderQuadratic.h:89
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_matcher
StereoHitTrackQuadTreeMatcher< HitQuadraticLegendre > m_matcher
Find matching hits to a track.
Definition: MonopoleStereoHitFinderQuadratic.h:83
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::Findlet< CDCWireHit &, CDCTrack & >::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::TrackFindingCDC::TrackInspector::apply
void apply(std::vector< CDCTrack > &tracks) final
Print the tracks.
Definition: TrackInspector.cc:39
Belle2::TrackFindingCDC::CompositeProcessingSignalListener::beginEvent
void beginEvent() override
Receive and dispatch signal for the start of a new event.
Definition: CompositeProcessingSignalListener.cc:33
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::getDescription
std::string getDescription() final
Short description of the findlet.
Definition: MonopoleStereoHitFinderQuadratic.cc:33
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_inspector
TrackInspector m_inspector
Print found tracks if requested in module options.
Definition: MonopoleStereoHitFinderQuadratic.h:91
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_rlTaggedWireHits
std::vector< CDCRLWireHit > m_rlTaggedWireHits
Vector holding all possible wire hits with all possible RL combinations.
Definition: MonopoleStereoHitFinderQuadratic.h:96
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_relations
std::vector< WeightedRelation< CDCTrack, const CDCRLWireHit > > m_relations
Vector of relations between tracks and hits.
Definition: MonopoleStereoHitFinderQuadratic.h:98
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46
Belle2::TrackFindingCDC::TrackInspector::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Access parameters.
Definition: TrackInspector.cc:31
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::apply
void apply(std::vector< CDCWireHit > &inputWireHits, std::vector< CDCTrack > &tracks) final
Generates the segment from wire hits.
Definition: MonopoleStereoHitFinderQuadratic.cc:61
Belle2::TrackFindingCDC::MonopoleStereoHitFinderQuadratic::m_filterSelector
FilterSelector< CDCTrack, CDCRLWireHit, ChooseableFilter< StereoHitFilterFactory > > m_filterSelector
Filter for the Stereo Hits added to the track.
Definition: MonopoleStereoHitFinderQuadratic.h:85
Belle2::TrackFindingCDC::RLTaggedWireHitCreator::apply
void apply(std::vector< CDCWireHit > &inputWireHits, std::vector< CDCRLWireHit > &outputRLWireHits) final
Generates the segment from wire hits.
Definition: RLTaggedWireHitCreator.cc:25