Belle II Software  release-06-01-15
WireHitCreator.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/trackFindingCDC/findlets/base/Findlet.h>
11 #include <tracking/trackFindingCDC/findlets/minimal/EPreferredDirection.h>
12 
13 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
14 #include <tracking/trackFindingCDC/topology/EWirePosition.h>
15 
16 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
17 
18 #include <vector>
19 #include <tuple>
20 #include <string>
21 #include <memory>
22 
23 namespace Belle2 {
28  namespace CDC {
29  class TDCCountTranslatorBase;
30  class ADCCountTranslatorBase;
31  }
32  namespace TrackFindingCDC {
33  class CDCWireHit;
34 
39  class WireHitCreator : public Findlet<CDCWireHit> {
40 
41  private:
44 
45  public:
48 
51 
53  std::string getDescription() final;
54 
56  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
57 
59  void initialize() final;
60 
62  void beginRun() final;
63 
65  void apply(std::vector<CDCWireHit>& outputWireHits) final;
66 
67  private:
69  std::string m_param_wirePosition = "base";
70 
72  bool m_param_ignoreWireSag = false;
73 
75  std::string m_param_flightTimeEstimation = "none";
76 
78  std::tuple<double, double, double> m_param_triggerPoint = {0.0, 0.0, 0.0};
79 
81  std::vector<int> m_param_useSuperLayers;
82 
84  std::vector<uint> m_param_useLayers;
85 
87  std::vector<uint> m_param_ignoreLayers;
88 
90  bool m_param_useSecondHits = false;
91 
93  bool m_param_useBadWires = false;
94 
96  std::tuple<double, double> m_param_useDegreeSector{INFINITY, INFINITY};
97 
99  std::vector<int> m_param_useMCParticleIds{};
100 
101  private: // Prepared variables
103  EWirePosition m_wirePosition = EWirePosition::c_Base;
104 
106  EPreferredDirection m_flightTimeEstimation = EPreferredDirection::c_None;
107 
109  Vector3D m_triggerPoint = Vector3D(0.0, 0.0, 0.0);
110 
112  std::array<bool, ISuperLayerUtil::c_N> m_useSuperLayers{};
113 
116  std::array<bool, 56> m_useLayers{};
117 
119  std::array<Vector2D, 2> m_useSector{};
120 
121  private: // Translators
123  std::unique_ptr<CDC::TDCCountTranslatorBase> m_tdcCountTranslator;
124 
126  std::unique_ptr<CDC::ADCCountTranslatorBase> m_adcCountTranslator;
127  };
128  }
130 }
The Module parameter list class.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
A three dimensional vector.
Definition: Vector3D.h:32
Combines the geometrical information and the raw hit information into wire hits, which can be used fr...
std::string m_param_wirePosition
Parameter : Geometry set to be used. Either "base", "misalign" or " aligned".
EPreferredDirection m_flightTimeEstimation
Method for the initial time of flight estimation.
std::array< bool, ISuperLayerUtil::c_N > m_useSuperLayers
Bits for the used super layers.
void initialize() final
Signals the beginning of the event processing.
void beginRun() final
Signal the beginning of a new run.
EWirePosition m_wirePosition
Geometry set to be used.
std::array< bool, 56 > m_useLayers
Bits for the used layers ATTENTION: hardcoded value for number of layers.
std::vector< int > m_param_useMCParticleIds
Parameter : Indices of the Monte Carlo particles for which hits should be used.
std::tuple< double, double, double > m_param_triggerPoint
Parameter : Location of the flight time zero.
std::unique_ptr< CDC::TDCCountTranslatorBase > m_tdcCountTranslator
TDC Count translator to be used to calculate the initial dirft length estiamtes.
std::string getDescription() final
Short description of the findlet.
std::string m_param_flightTimeEstimation
Parameter : Method for the initial time of flight estimation as string.
std::vector< uint > m_param_useLayers
Parameter : List of layers to be used.
std::vector< uint > m_param_ignoreLayers
Parameter : List of layers to be ignored in tracking e.g. for simulating too high occupancy.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
std::tuple< double, double > m_param_useDegreeSector
Parameter : Angular range in degrees for which hits should be unpacked.
std::unique_ptr< CDC::ADCCountTranslatorBase > m_adcCountTranslator
ADC Count translator to be used to calculate the charge deposit in the drift cell.
std::vector< int > m_param_useSuperLayers
Parameter : List of super layers to be used - mostly for debugging.
bool m_param_ignoreWireSag
Parameter : Switch to deactivate the sag of the wires for the concerns of the track finders.
void apply(std::vector< CDCWireHit > &outputWireHits) final
Main algorithm creating the wire hits.
std::array< Vector2D, 2 > m_useSector
Unit vectors denoting the sector for which hits should be created.
bool m_param_useBadWires
Parameter : If true, the hits on bad wires are not ignored.
bool m_param_useSecondHits
Parameter : If true, the second hit information will be used to create Wire Hits.
Vector3D m_triggerPoint
Central location of the flight time zero position. Usually the location of the trigger.
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:34
Abstract base class for different kinds of events.