Belle II Software  release-08-01-10
RLTaggedWireHitCreator.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/minimal/RLTaggedWireHitCreator.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
11 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHit.h>
12 
13 #include <vector>
14 
15 using namespace Belle2;
16 using namespace TrackFindingCDC;
17 
19 {
20  return "Use all not-taken stereo hits and output them as right and left hypothesis.";
21 }
22 
23 void RLTaggedWireHitCreator::apply(std::vector<CDCWireHit>& inputWireHits, std::vector<CDCRLWireHit>& outputRLWireHits)
24 {
25  // Initialize the RL hits
26  for (const CDCWireHit& wireHit : inputWireHits) {
27  if (not wireHit->hasTakenFlag() and not wireHit.isAxial()) {
28  wireHit->unsetAssignedFlag();
29  for (ERightLeft rlInfo : {ERightLeft::c_Left, ERightLeft::c_Right}) {
30  outputRLWireHits.emplace_back(&wireHit, rlInfo);
31  }
32  }
33  }
34 }
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
std::string getDescription() final
Short description of the findlet.
void apply(std::vector< CDCWireHit > &inputWireHits, std::vector< CDCRLWireHit > &outputRLWireHits) final
Generates the segment from wire hits.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition: ERightLeft.h:25
Abstract base class for different kinds of events.