Belle II Software development
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 <cdc/geometry/CDCGeometryParConstants.h>
19
20#include <framework/database/DBObjPtr.h>
21#include <cdc/dbobjects/CDClayerTimeCut.h>
22
23#include <vector>
24#include <tuple>
25#include <string>
26#include <memory>
27
28namespace Belle2 {
33 namespace CDC {
34 class TDCCountTranslatorBase;
35 class ADCCountTranslatorBase;
36 }
37 namespace TrackFindingCDC {
38 class CDCWireHit;
39
44 class WireHitCreator : public Findlet<CDCWireHit> {
45
46 private:
49
50 public:
53
56
58 std::string getDescription() final;
59
61 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
62
64 void initialize() final;
65
67 void beginRun() final;
68
70 void apply(std::vector<CDCWireHit>& outputWireHits) final;
71
72 private:
74 std::string m_param_wirePosition = "base";
75
78
81
83 std::tuple<double, double, double> m_param_triggerPoint = {0.0, 0.0, 0.0};
84
86 std::vector<int> m_param_useSuperLayers;
87
89 std::vector<uint> m_param_useLayers;
90
92 std::vector<uint> m_param_ignoreLayers;
93
95 std::vector<float> m_param_maxDriftTimes = { -1, -1, -1, -1, -1, -1, -1, -1, -1};
96
99
102
104 std::tuple<double, double> m_param_useDegreeSector{INFINITY, INFINITY};
105
107 std::vector<int> m_param_useMCParticleIds{};
108
109 private: // Prepared variables
111 EWirePosition m_wirePosition = EWirePosition::c_Base;
112
114 std::array<float, ISuperLayerUtil::c_N> m_maxDriftTimes = { -1, -1, -1, -1, -1, -1, -1, -1, -1};
115
117 EPreferredDirection m_flightTimeEstimation = EPreferredDirection::c_None;
118
121
123 std::array<bool, ISuperLayerUtil::c_N> m_useSuperLayers{};
124
126 std::array<bool, c_maxNSenseLayers> m_useLayers{};
127
129 std::array<Vector2D, 2> m_useSector{};
130
131 private: // Translators
133 std::unique_ptr<CDC::TDCCountTranslatorBase> m_tdcCountTranslator;
134
136 std::unique_ptr<CDC::ADCCountTranslatorBase> m_adcCountTranslator;
137
140 };
141 }
143}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
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:33
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::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.
DBObjPtr< CDClayerTimeCut > m_DBCDClayerTimeCut
Cut for approximate drift time (super-layer dependent)
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::array< bool, c_maxNSenseLayers > m_useLayers
Bits for the used layers.
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.
std::array< float, ISuperLayerUtil::c_N > m_maxDriftTimes
Cut for approximate drift time (super-layer dependent)
bool m_param_useBadWires
Parameter : If true, the hits on bad wires are not ignored.
std::vector< float > m_param_maxDriftTimes
Parameter : Cut for approximate drift time (super-layer dependent)
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.
Abstract base class for different kinds of events.
STL namespace.