Belle II Software  release-05-01-25
RLTaggedWireHitCreator.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/trackFindingCDC/findlets/minimal/RLTaggedWireHitCreator.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
13 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHit.h>
14 
15 #include <vector>
16 
17 using namespace Belle2;
18 using namespace TrackFindingCDC;
19 
21 {
22  return "Use all not-taken stereo hits and output them as right and left hypothesis.";
23 }
24 
25 void RLTaggedWireHitCreator::apply(std::vector<CDCWireHit>& inputWireHits, std::vector<CDCRLWireHit>& outputRLWireHits)
26 {
27  // Initialize the RL hits
28  for (const CDCWireHit& wireHit : inputWireHits) {
29  if (not wireHit->hasTakenFlag() and not wireHit.isAxial()) {
30  wireHit->unsetAssignedFlag();
31 
32  for (ERightLeft rlInfo : {ERightLeft::c_Left, ERightLeft::c_Right}) {
33  // cppcheck-suppress useStlAlgorithm
34  outputRLWireHits.emplace_back(&wireHit, rlInfo);
35  }
36  }
37  }
38 }
Belle2::TrackFindingCDC::RLTaggedWireHitCreator::getDescription
std::string getDescription() final
Short description of the findlet.
Definition: RLTaggedWireHitCreator.cc:20
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::NRightLeft::ERightLeft
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition: ERightLeft.h:35
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65
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