Belle II Software development
HitSelector.h
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#pragma once
9
10#include <tracking/vxdHoughTracking/entities/VXDHoughState.h>
11#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
12#include <vxd/dataobjects/VxdID.h>
13
14namespace Belle2 {
19 class SpacePoint;
20
21 namespace vxdHoughTracking {
22
26 class HitSelector : public TrackFindingCDC::Findlet<VXDHoughState, const VxdID, VXDHoughState*> {
27
28 public:
30 void apply(std::vector<VXDHoughState>& hits, const std::vector<VxdID>& friendSensorList,
31 std::vector<VXDHoughState*>& selectedHits) override
32 {
33 const unsigned short sensorInLayerSixLadder = friendSensorList.back().getSensorNumber();
34
35 for (auto& hit : hits) {
36
37 const VXDHoughState::DataCache& hitData = hit.getDataCache();
38 const VxdID& currentHitSensorID = hitData.sensorID;
39
40 if (std::find(friendSensorList.begin(), friendSensorList.end(), currentHitSensorID) == friendSensorList.end()) {
41 continue;
42 }
43
44 const double hitZPosition = hitData.z;
45
46 if (sensorInLayerSixLadder == 1 and hitZPosition >= -1.0) {
47 selectedHits.emplace_back(&hit);
48 } else if (sensorInLayerSixLadder == 5 and hitZPosition <= 1.0) {
49 selectedHits.emplace_back(&hit);
50 }
51 }
52 }
53 };
54
55 }
57}
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition SpacePoint.h:42
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition Findlet.h:26
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32
Select hits to be analysed in the Hough Space intercept finder for a given layer 6 sensor based on th...
Definition HitSelector.h:26
void apply(std::vector< VXDHoughState > &hits, const std::vector< VxdID > &friendSensorList, std::vector< VXDHoughState * > &selectedHits) override
Load the hits in a sensor friend list for a given L6 sensor from hits and store them in selectedHits,...
Definition HitSelector.h:30
Abstract base class for different kinds of events.
Cache containing the most important information of this state which will often be needed.