Belle II Software  release-05-01-25
SegmentRejecter.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun, Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/findlets/base/Findlet.h>
13 
14 #include <tracking/trackFindingCDC/filters/segment/BaseSegmentFilter.h>
15 #include <tracking/trackFindingCDC/filters/segment/SegmentFilterFactory.h>
16 
17 #include <tracking/trackFindingCDC/filters/base/ChooseableFilter.dcl.h>
18 
19 #include <vector>
20 #include <string>
21 
22 namespace Belle2 {
28  namespace TrackFindingCDC {
29  class CDCSegment2D;
30 
31  // Guard to prevent repeated instantiations
32  extern template class TrackFindingCDC::Chooseable<BaseSegmentFilter>;
33  extern template class TrackFindingCDC::ChooseableFilter<SegmentFilterFactory>;
34 
36  class SegmentRejecter : public Findlet<CDCSegment2D&> {
37 
38  private:
40  using Super = Findlet<CDCSegment2D&>;
41 
42  public:
44  explicit SegmentRejecter(const std::string& defaultFilterName = "all");
45 
47  std::string getDescription() final;
48 
50  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
51 
53  void apply(std::vector<CDCSegment2D>& segment2Ds) final;
54 
55  private:
57  bool m_param_deleteRejected = false;
58 
60  ChooseableFilter<SegmentFilterFactory> m_segmentFilter;
61  };
62  }
64 }
Belle2::TrackFindingCDC::SegmentFilterFactory
Factory that can create appropriate segment filters for new tracks from associated names.
Definition: SegmentFilterFactory.h:34
Belle2::TrackFindingCDC::ChooseableFilter
Convenvience wrapper to setup a Chooseable filter from a specific factory object.
Definition: ChooseableFilter.dcl.h:107
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::SegmentRejecter
Deletes fake segments that have been rejected by a filter.
Definition: SegmentRejecter.h:44
Belle2::TrackFindingCDC::CDCSegment2D
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:40
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46