Belle II Software  release-05-01-25
BaseCandidateReceiver.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Viktor Trusov, Nils Braun, Dmitrii Neverov *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <tracking/trackFindingCDC/legendre/quadtree/BaseCandidateReceiver.h>
12 #include <tracking/trackFindingCDC/processing/LowHitsAxialTrackUtil.h>
13 
14 using namespace Belle2;
15 using namespace TrackFindingCDC;
16 
17 BaseCandidateReceiver::BaseCandidateReceiver(std::vector<const CDCWireHit*> allAxialWireHits)
18  : m_allAxialWireHits(std::move(allAxialWireHits))
19 {
20 }
21 
23 {
24 }
25 
26 void BaseCandidateReceiver::operator()(const std::vector<const CDCWireHit*>& inputWireHits,
27  void* qt __attribute__((unused)))
28 {
29  // Unset the taken flag
30  // NOTE after QuadTreeProcessor finds a leaf, it marks all items as "taken"
31  for (const CDCWireHit* wireHit : inputWireHits) {
32  (*wireHit)->setTakenFlag(false);
33  }
36  m_tracks,
37  true, // fromOrigin
38  false, // straight
39  false); // withPostprocessing
40 }
41 
42 const std::vector<CDCTrack>& BaseCandidateReceiver::getTracks() const
43 {
44  return m_tracks;
45 }
Belle2::TrackFindingCDC::BaseCandidateReceiver::~BaseCandidateReceiver
virtual ~BaseCandidateReceiver()
Destructor.
Definition: BaseCandidateReceiver.cc:22
Belle2::TrackFindingCDC::LowHitsAxialTrackUtil::addCandidateFromHits
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.
Definition: LowHitsAxialTrackUtil.cc:22
Belle2::TrackFindingCDC::BaseCandidateReceiver::operator()
virtual void operator()(const std::vector< const CDCWireHit * > &inputWireHits, void *qt)
Main entry point for the post processing call from the QuadTreeProcessor.
Definition: BaseCandidateReceiver.cc:26
Belle2::TrackFindingCDC::BaseCandidateReceiver::m_tracks
std::vector< CDCTrack > m_tracks
Collected tracks.
Definition: BaseCandidateReceiver.h:52
Belle2::TrackFindingCDC::BaseCandidateReceiver::BaseCandidateReceiver
BaseCandidateReceiver(std::vector< const CDCWireHit * > allAxialWireHits)
Constructor.
Definition: BaseCandidateReceiver.cc:17
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::BaseCandidateReceiver::m_allAxialWireHits
std::vector< const CDCWireHit * > m_allAxialWireHits
Pool of all axial hits from which the road search may select additional hits.
Definition: BaseCandidateReceiver.h:49
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65
Belle2::TrackFindingCDC::BaseCandidateReceiver::getTracks
const std::vector< CDCTrack > & getTracks() const
Get the collected tracks.
Definition: BaseCandidateReceiver.cc:42