Belle II Software  release-08-01-10
AxialStraightTrackFinder.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 #include <tracking/trackFindingCDC/findlets/combined/AxialStraightTrackFinder.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
11 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
12 #include <mdst/dataobjects/ECLCluster.h>
13 
14 using namespace Belle2;
15 using namespace TrackFindingCDC;
16 
18 {
20 }
21 
23 {
24  m_storeArrayClusters.isRequired();
25 
27 }
28 
30 {
31  return "Performs a search for straight tracks coming from IP and ending in an ECL cluster";
32 }
33 
35  const std::string& prefix)
36 {
37  m_axialStraightTrackCreator.exposeParameters(moduleParamList, prefix);
38 }
39 
40 void AxialStraightTrackFinder::apply(const std::vector<CDCWireHit>& wireHits,
41  std::vector<CDCTrack>& tracks)
42 {
43  B2DEBUG(25, "********** CDCTrackingModule ************");
44 
45 // Acquire ecl clusters
46  std::vector<const ECLCluster*> clusters;
47  clusters.reserve(m_storeArrayClusters.getEntries());
48  for (const ECLCluster& cluster : m_storeArrayClusters) {
49  if (cluster.hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)) { //FIXME reasonable to pick other hypothesis?
50  clusters.emplace_back(&cluster);
51  }
52  }
53  // Acquire the axial hits
54  std::vector<const CDCWireHit*> axialWireHits;
55  axialWireHits.reserve(wireHits.size());
56  for (const CDCWireHit& wireHit : wireHits) {
57  if (not wireHit.isAxial()) continue;
58  axialWireHits.emplace_back(&wireHit);
59  }
60 
61  m_axialStraightTrackCreator.apply(clusters, axialWireHits, tracks);
62 
63 // AxialTrackUtil::deleteShortTracks(tracks);
64 }
65 
ECL cluster data.
Definition: ECLCluster.h:27
@ c_nPhotons
CR is split into n photons (N1)
The Module parameter list class.
void apply(const std::vector< const ECLCluster * > &eclClusters, const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &tracks) final
Execute one pass over given clusters and wirehits and create tracks.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void initialize() final
Receive signal before the start of the event processing.
std::string getDescription() final
Short description of the findlet.
AxialStraightTrackCreator m_axialStraightTrackCreator
Findlet for straight legendre pass.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< CDCWireHit > &wireHits, std::vector< CDCTrack > &tracks)
Main method to apply the track finding.
StoreArray< ECLCluster > m_storeArrayClusters
Accessor to the ECLClusters StoreArray.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
void initialize() override
Receive and dispatch signal before the start of the event processing.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Abstract base class for different kinds of events.