Belle II Software  release-05-01-25
WireHitCreator.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: 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 #include <tracking/trackFindingCDC/findlets/minimal/EPreferredDirection.h>
14 
15 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
16 #include <tracking/trackFindingCDC/topology/EWirePosition.h>
17 
18 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
19 
20 #include <vector>
21 #include <tuple>
22 #include <string>
23 #include <memory>
24 
25 namespace Belle2 {
30  namespace CDC {
31  class TDCCountTranslatorBase;
32  class ADCCountTranslatorBase;
33  }
34  namespace TrackFindingCDC {
35  class CDCWireHit;
36 
41  class WireHitCreator : public Findlet<CDCWireHit> {
42 
43  private:
45  using Super = Findlet<CDCWireHit>;
46 
47  public:
50 
53 
55  std::string getDescription() final;
56 
58  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
59 
61  void initialize() final;
62 
64  void beginRun() final;
65 
67  void apply(std::vector<CDCWireHit>& outputWireHits) final;
68 
69  private:
71  std::string m_param_wirePosition = "base";
72 
74  bool m_param_ignoreWireSag = false;
75 
77  std::string m_param_flightTimeEstimation = "none";
78 
80  std::tuple<double, double, double> m_param_triggerPoint = {0.0, 0.0, 0.0};
81 
83  std::vector<int> m_param_useSuperLayers;
84 
86  bool m_param_useSecondHits = false;
87 
89  bool m_param_useBadWires = false;
90 
92  std::tuple<double, double> m_param_useDegreeSector{INFINITY, INFINITY};
93 
95  std::vector<int> m_param_useMCParticleIds{};
96 
97  private: // Prepared variables
99  EWirePosition m_wirePosition = EWirePosition::c_Base;
100 
102  EPreferredDirection m_flightTimeEstimation = EPreferredDirection::c_None;
103 
105  Vector3D m_triggerPoint = Vector3D(0.0, 0.0, 0.0);
106 
108  std::array<bool, ISuperLayerUtil::c_N> m_useSuperLayers{};
109 
111  std::array<Vector2D, 2> m_useSector{};
112 
113  private: // Translators
115  std::unique_ptr<CDC::TDCCountTranslatorBase> m_tdcCountTranslator;
116 
118  std::unique_ptr<CDC::ADCCountTranslatorBase> m_adcCountTranslator;
119  };
120  }
122 }
Belle2::Vector3D
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:35
Belle2::TrackFindingCDC::WireHitCreator::m_param_useDegreeSector
std::tuple< double, double > m_param_useDegreeSector
Parameter : Angular range in degrees for which hits should be unpacked.
Definition: WireHitCreator.h:100
Belle2::TrackFindingCDC::WireHitCreator::m_flightTimeEstimation
EPreferredDirection m_flightTimeEstimation
Method for the initial time of flight estimation.
Definition: WireHitCreator.h:110
Belle2::TrackFindingCDC::WireHitCreator::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
Definition: WireHitCreator.cc:44
Belle2::TrackFindingCDC::WireHitCreator::WireHitCreator
WireHitCreator()
Default constructor.
Belle2::TrackFindingCDC::WireHitCreator::getDescription
std::string getDescription() final
Short description of the findlet.
Definition: WireHitCreator.cc:38
Belle2::TrackFindingCDC::WireHitCreator::initialize
void initialize() final
Signals the beginning of the event processing.
Definition: WireHitCreator.cc:99
Belle2::TrackFindingCDC::WireHitCreator::m_useSector
std::array< Vector2D, 2 > m_useSector
Unit vectors denoting the sector for which hits should be created.
Definition: WireHitCreator.h:119
Belle2::TrackFindingCDC::WireHitCreator::m_param_useSuperLayers
std::vector< int > m_param_useSuperLayers
Parameter : List of super layers to be used - mostly for debugging.
Definition: WireHitCreator.h:91
Belle2::TrackFindingCDC::WireHitCreator::m_param_flightTimeEstimation
std::string m_param_flightTimeEstimation
Parameter : Method for the initial time of flight estimation as string.
Definition: WireHitCreator.h:85
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::WireHitCreator::m_param_ignoreWireSag
bool m_param_ignoreWireSag
Parameter : Switch to deactivate the sag of the wires for the concerns of the track finders.
Definition: WireHitCreator.h:82
Belle2::TrackFindingCDC::Vector3D
A three dimensional vector.
Definition: Vector3D.h:34
Belle2::TrackFindingCDC::WireHitCreator::m_param_useSecondHits
bool m_param_useSecondHits
Parameter : If true, the second hit information will be used to create Wire Hits.
Definition: WireHitCreator.h:94
Belle2::TrackFindingCDC::WireHitCreator::m_param_triggerPoint
std::tuple< double, double, double > m_param_triggerPoint
Parameter : Location of the flight time zero.
Definition: WireHitCreator.h:88
Belle2::TrackFindingCDC::WireHitCreator::m_useSuperLayers
std::array< bool, ISuperLayerUtil::c_N > m_useSuperLayers
Bits for the used super layers.
Definition: WireHitCreator.h:116
Belle2::TrackFindingCDC::WireHitCreator::m_triggerPoint
Vector3D m_triggerPoint
Central location of the flight time zero position. Usually the location of the trigger.
Definition: WireHitCreator.h:113
Belle2::TrackFindingCDC::NWirePosition::EWirePosition
EWirePosition
Wire position set.
Definition: EWirePosition.h:40
Belle2::TrackFindingCDC::WireHitCreator::m_param_wirePosition
std::string m_param_wirePosition
Parameter : Geometry set to be used. Either "base", "misalign" or " aligned".
Definition: WireHitCreator.h:79
Belle2::TrackFindingCDC::WireHitCreator::beginRun
void beginRun() final
Signal the beginning of a new run.
Definition: WireHitCreator.cc:156
Belle2::TrackFindingCDC::WireHitCreator::m_wirePosition
EWirePosition m_wirePosition
Geometry set to be used.
Definition: WireHitCreator.h:107
Belle2::TrackFindingCDC::WireHitCreator::Super
Findlet< CDCWireHit > Super
Type of the base class.
Definition: WireHitCreator.h:53
Belle2::TrackFindingCDC::WireHitCreator::m_tdcCountTranslator
std::unique_ptr< CDC::TDCCountTranslatorBase > m_tdcCountTranslator
TDC Count translator to be used to calculate the initial dirft length estiamtes.
Definition: WireHitCreator.h:123
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46
Belle2::TrackFindingCDC::WireHitCreator::m_param_useBadWires
bool m_param_useBadWires
Parameter : If true, the hits on bad wires are not ignored.
Definition: WireHitCreator.h:97
Belle2::TrackFindingCDC::WireHitCreator::apply
void apply(std::vector< CDCWireHit > &outputWireHits) final
Main algorithm creating the wire hits.
Definition: WireHitCreator.cc:163
Belle2::TrackFindingCDC::WireHitCreator::m_param_useMCParticleIds
std::vector< int > m_param_useMCParticleIds
Parameter : Indices of the Monte Carlo particles for which hits should be used.
Definition: WireHitCreator.h:103
Belle2::TrackFindingCDC::WireHitCreator::~WireHitCreator
~WireHitCreator()
Default destructor.
Belle2::TrackFindingCDC::WireHitCreator::m_adcCountTranslator
std::unique_ptr< CDC::ADCCountTranslatorBase > m_adcCountTranslator
ADC Count translator to be used to calculate the charge deposit in the drift cell.
Definition: WireHitCreator.h:126