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
14#include <string>
15#include <vector>
16
17namespace Belle2 {
22 class SpacePoint;
23
24 namespace vxdHoughTracking {
25
29 class HitSelector : public TrackFindingCDC::Findlet<VXDHoughState, const VxdID, VXDHoughState*> {
30
31 public:
33 void apply(std::vector<VXDHoughState>& hits, const std::vector<VxdID>& friendSensorList,
34 std::vector<VXDHoughState*>& selectedHits) override
35 {
36 const unsigned short sensorInLayerSixLadder = friendSensorList.back().getSensorNumber();
37
38 for (auto& hit : hits) {
39
40 const VXDHoughState::DataCache& hitData = hit.getDataCache();
41 const VxdID& currentHitSensorID = hitData.sensorID;
42
43 if (std::find(friendSensorList.begin(), friendSensorList.end(), currentHitSensorID) == friendSensorList.end()) {
44 continue;
45 }
46
47 const double hitZPosition = hitData.z;
48
49 if (sensorInLayerSixLadder == 1 and hitZPosition >= -1.0) {
50 selectedHits.emplace_back(&hit);
51 } else if (sensorInLayerSixLadder == 5 and hitZPosition <= 1.0) {
52 selectedHits.emplace_back(&hit);
53 }
54 }
55 }
56 };
57
58 }
60}
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:33
Select hits to be analysed in the Hough Space intercept finder for a given layer 6 sensor based on th...
Definition: HitSelector.h:29
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:33
Abstract base class for different kinds of events.
Cache containing the most important information of this state which will often be needed.
Definition: VXDHoughState.h:70