Belle II Software  release-08-01-10
CDCTangentSegment.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/eventdata/segments/CDCTangentSegment.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
11 #include <tracking/trackFindingCDC/eventdata/hits/CDCTangent.h>
12 
13 using namespace Belle2;
14 using namespace TrackFindingCDC;
15 
16 CDCTangentSegment CDCTangentSegment::condense(const std::vector<const CDCFacet* >& facetPath)
17 {
18  CDCTangentSegment tangentSegment;
19 
20  tangentSegment.reserve(facetPath.size() + 1);
21  if (not facetPath.empty()) {
22  for (const CDCFacet* ptrFacet : facetPath) {
23  if (not ptrFacet) continue;
24 
25  const CDCFacet& facet = *ptrFacet;
26 
27  tangentSegment.push_back(facet.getStartToMiddle());
28  //tangentSegment.push_back(facet.getStartToEnd());
29  //the alignement of the tangents does not play a major role here
30  }
31  tangentSegment.push_back(facetPath.back()->getMiddleToEnd());
32  }
33  return tangentSegment;
34 
35 }
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:32
CDCTangent getStartToMiddle() const
Getter for the tangential line including the hits from the first to the second hit.
Definition: CDCFacet.cc:125
A segment consisting of adjacent tangents.
static CDCTangentSegment condense(const std::vector< const CDCFacet * > &facetPath)
Takes all distinct tangents from the facets in the path - Note! there is no particular order of the t...
Abstract base class for different kinds of events.