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/trackingUtilities/findlets/base/Findlet.h>
11#include <tracking/trackFindingCDC/findlets/minimal/EPreferredDirection.h>
12
13#include <cdc/topology/ISuperLayer.h>
14#include <cdc/topology/EWirePosition.h>
15
16#include <cdc/geometry/CDCGeometryParConstants.h>
17
18#include <framework/database/DBObjPtr.h>
19#include <cdc/dbobjects/CDClayerTimeCut.h>
20
21#include <Math/Vector3D.h>
22#include <Math/Vector2D.h>
23
24#include <vector>
25#include <tuple>
26#include <string>
27#include <memory>
28
29namespace Belle2 {
34 namespace CDC {
37 }
38 namespace TrackingUtilities {
39 class CDCWireHit;
40 }
41
42 namespace TrackFindingCDC {
43
48 class WireHitCreator : public TrackingUtilities::Findlet<TrackingUtilities::CDCWireHit> {
49
50 private:
53
54 public:
57
60
62 std::string getDescription() final;
63
65 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
66
68 void initialize() final;
69
71 void beginRun() final;
72
74 void apply(std::vector<TrackingUtilities::CDCWireHit>& outputWireHits) final;
75
76 private:
78 std::string m_param_wirePosition = "base";
79
82
85
87 std::tuple<double, double, double> m_param_triggerPoint = {0.0, 0.0, 0.0};
88
90 std::vector<int> m_param_useSuperLayers;
91
93 std::vector<uint> m_param_useLayers;
94
96 std::vector<uint> m_param_ignoreLayers;
97
99 std::vector<float> m_param_maxDriftTimes = { -1, -1, -1, -1, -1, -1, -1, -1, -1};
100
103
106
108 std::tuple<double, double> m_param_useDegreeSector{INFINITY, INFINITY};
109
111 std::vector<int> m_param_useMCParticleIds{};
112
113 private: // Prepared variables
115 CDC::EWirePosition m_wirePosition = CDC::EWirePosition::c_Base;
116
118 std::array<float, CDC::ISuperLayerUtil::c_N> m_maxDriftTimes = { -1, -1, -1, -1, -1, -1, -1, -1, -1};
119
121 EPreferredDirection m_flightTimeEstimation = EPreferredDirection::c_None;
122
124 ROOT::Math::XYZVector m_triggerPoint = ROOT::Math::XYZVector(0.0, 0.0, 0.0);
125
127 std::array<bool, CDC::ISuperLayerUtil::c_N> m_useSuperLayers{};
128
130 std::array<bool, c_maxNSenseLayers> m_useLayers{};
131
133 std::array<ROOT::Math::XYVector, 2> m_useSector{};
134
135 private: // Translators
137 std::unique_ptr<CDC::TDCCountTranslatorBase> m_tdcCountTranslator;
138
140 std::unique_ptr<CDC::ADCCountTranslatorBase> m_adcCountTranslator;
141
144 };
145 }
147}
Abstract Base class for the ADC count translator.
Base class for translation of Drift Time into Drift Length.
Class for accessing objects in the database.
Definition DBObjPtr.h:21
The Module parameter list class.
void apply(std::vector< TrackingUtilities::CDCWireHit > &outputWireHits) final
Main algorithm creating the wire hits.
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.
void initialize() final
Signals the beginning of the event processing.
void beginRun() final
Signal the beginning of a new run.
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::array< ROOT::Math::XYVector, 2 > m_useSector
Unit vectors denoting the sector for which hits should be created.
std::array< float, CDC::ISuperLayerUtil::c_N > m_maxDriftTimes
Cut for approximate drift time (super-layer dependent)
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.
TrackingUtilities::Findlet< TrackingUtilities::CDCWireHit > Super
Type of the base class.
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.
ROOT::Math::XYZVector m_triggerPoint
Central location of the flight time zero position. Usually the location of the trigger.
bool m_param_ignoreWireSag
Parameter : Switch to deactivate the sag of the wires for the concerns of the track finders.
bool m_param_useBadWires
Parameter : If true, the hits on bad wires are not ignored.
std::array< bool, CDC::ISuperLayerUtil::c_N > m_useSuperLayers
Bits for the used super layers.
CDC::EWirePosition m_wirePosition
Geometry set to be used.
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.
Class representing a hit wire in the central drift chamber.
Definition CDCWireHit.h:56
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition Findlet.h:26
CDCGeometryPar::EWirePosition EWirePosition
For ease-of-use just create a new alias for CDCGeometryPar::EWirePosition.
Abstract base class for different kinds of events.
STL namespace.