8#include <tracking/trackFindingCDC/filters/axialSegmentPair/BasicAxialSegmentPairVarSet.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCAxialSegmentPair.h>
11#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12#include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit2D.h>
13#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
15#include <tracking/trackFindingCDC/utilities/Functional.h>
18using namespace TrackFindingCDC;
21 std::array<int, 8> getNHitsByILayer(
const CDCSegment2D& segment)
23 std::array<int, 8> result{};
25 ++result[recoHit2D.getWireHit().getILayer()];
33 if (not ptrAxialSegmentPair)
return false;
46 var<
named(
"from_size")>() = fromSegment.size();
47 var<
named(
"to_size")>() = toSegment.size();
49 std::array<int, 8> fromNHitsByILayer = getNHitsByILayer(fromSegment);
50 std::array<int, 8> toNHitsByILayer = getNHitsByILayer(toSegment);
52 var<
named(
"from_n_layers")>() = std::count_if(fromNHitsByILayer.begin(), fromNHitsByILayer.end(),
Id() > 0);;
53 var<
named(
"to_n_layers")>() = std::count_if(toNHitsByILayer.begin(), toNHitsByILayer.end(),
Id() > 0);
bool extract(const CDCAxialSegmentPair *ptrAxialSegmentPair) override
Generate and assign the contained variables.
Class representing a pair of reconstructed axial segments in adjacent superlayer.
const CDCAxialSegment2D * getEndSegment() const
Getter for the end segment.
const CDCAxialSegment2D * getStartSegment() const
Getter for the start segment.
Class representing a two dimensional reconstructed hit in the central drift chamber.
A reconstructed sequence of two dimensional hits in one super layer.
ISuperLayer getISuperLayer() const
Returns the common super layer id of all stored tracking hits.
EStereoKind getStereoKind() const
Returns the common stereo type of all hits.
static constexpr int named(const char *name)
Getter for the index from the name.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Abstract base class for different kinds of events.
Generic identity functor.