Belle II Software  release-08-01-10
BaseCandidateReceiver.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/trackFindingCDC/legendre/quadtree/BaseCandidateReceiver.h>
10 #include <tracking/trackFindingCDC/processing/LowHitsAxialTrackUtil.h>
11 
12 using namespace Belle2;
13 using namespace TrackFindingCDC;
14 
15 BaseCandidateReceiver::BaseCandidateReceiver(std::vector<const CDCWireHit*> allAxialWireHits)
16  : m_allAxialWireHits(std::move(allAxialWireHits))
17 {
18 }
19 
21 {
22 }
23 
24 void BaseCandidateReceiver::operator()(const std::vector<const CDCWireHit*>& inputWireHits,
25  void* qt __attribute__((unused)))
26 {
27  // Unset the taken flag
28  // NOTE after QuadTreeProcessor finds a leaf, it marks all items as "taken"
29  for (const CDCWireHit* wireHit : inputWireHits) {
30  (*wireHit)->setTakenFlag(false);
31  }
34  m_tracks,
35  true, // fromOrigin
36  false, // straight
37  false); // withPostprocessing
38 }
39 
40 const std::vector<CDCTrack>& BaseCandidateReceiver::getTracks() const
41 {
42  return m_tracks;
43 }
virtual void operator()(const std::vector< const CDCWireHit * > &inputWireHits, void *qt)
Main entry point for the post processing call from the QuadTreeProcessor.
const std::vector< CDCTrack > & getTracks() const
Get the collected tracks.
BaseCandidateReceiver(std::vector< const CDCWireHit * > allAxialWireHits)
Constructor.
std::vector< const CDCWireHit * > m_allAxialWireHits
Pool of all axial hits from which the road search may select additional hits.
std::vector< CDCTrack > m_tracks
Collected tracks.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Abstract base class for different kinds of events.
static void addCandidateFromHits(const std::vector< const CDCWireHit * > &foundAxialWireHits, const std::vector< const CDCWireHit * > &allAxialWireHits, std::vector< CDCTrack > &axialTracks, bool fromOrigin=true, bool straight=true, bool withPostprocessing=true)
Create CDCTrack using CDCWireHit hits and store it in the list.