Belle II Software development
ReattachCDCWireHitsToRecoTracksModule.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 <framework/core/Module.h>
11#include <framework/datastore/StoreArray.h>
12#include <tracking/dataobjects/RecoTrack.h>
13#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
14#include <tracking/trackFindingCDC/rootification/StoreWrappedObjPtr.h>
15#include <tracking/trackFindingCDC/numerics/ERightLeft.h>
16
17namespace Belle2 {
22 namespace TrackFindingCDC {
23
24
31
32 public:
33
36
38 void initialize() override;
39
41 void event() override;
42
43 private:
44
48 double arcLength = 0.0;
50 double z = 0.0;
52 double distanceToTrack = 0.0;
54 ERightLeft rlInfo = ERightLeft::c_Unknown;
56 bool isValid = false;
57 };
58
60 struct HitToAddInfo {
62 CDCWireHit* hit = nullptr;
64 ERightLeft rlInfo = ERightLeft::c_Unknown;
65 };
66
68 void findHits();
69
71 void addHits();
72
75 const RecoTrack& recoTrack,
76 const RecoHitInformation* recoHitInformation) const;
77
80
81 private:
82
84 std::string m_CDCWireHitsStoreArrayName = "CDCWireHitVector";
86 std::string m_inputRecoTracksStoreArrayName = "CDCRecoTracks";
88 std::string m_outputRecoTracksStoreArrayName = "ExtendedCDCRecoTracks";
90 double m_maximumDistance = 0.1;
92 int m_minimumADC = 1;
94 int m_minimumTOT = 1;
96 double m_maximumAbsD0 = 13.5;
98 double m_maximumAbsZ0 = 35.0;
99
106
108 std::unordered_map<RecoTrack*, std::vector<CDCHit*> > m_mapToHitsOnTrack;
110 std::unordered_map<RecoTrack*, std::vector<HitToAddInfo> > m_mapToHitsToAdd;
111 };
112 }
114}
Base class for Modules.
Definition: Module.h:72
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
RightLeftInformation
The RightLeft information of the hit which is only valid for CDC hits.
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Module to loop over low-ADC/TOT CDCWireHits and fitted RecoTracks, and reattach the hits to the track...
std::string m_outputRecoTracksStoreArrayName
Name of the output RecoTrack StoreArray.
std::string m_CDCWireHitsStoreArrayName
Name of the input CDCWireHit StoreWrappedObjPtr.
ReattachCDCWireHitsToRecoTracksModule()
Constructor of the module. Setting up parameters and description.
int m_minimumADC
ADC above which (inclusive) a CDC hit can be reattached to a track.
std::string m_inputRecoTracksStoreArrayName
Name of the input RecoTrack StoreArray.
std::unordered_map< RecoTrack *, std::vector< CDCHit * > > m_mapToHitsOnTrack
Map from a RecoTrack ptr to the vector of the hits that belong to this track.
RecoHitInformation::RightLeftInformation rightLeftInformationTranslator(ERightLeft rlInfo) const
Translate a TrackFindingCDC::ERightLeft into a RecoHitInformation::RightLeftInformation.
ReconstructionResults reconstruct(const CDCWireHit &wireHit, const RecoTrack &recoTrack, const RecoHitInformation *recoHitInformation) const
Compute distance from a CDCWireHit to a RecoTrack using the mSoP found with a RecoHitInformation.
double m_maximumDistance
Distance (cm) below which (exclusive) a CDC hit can be reattached to a track.
int m_minimumTOT
TOT above which (inclusive) a CDC hit can be reattached to a track.
StoreWrappedObjPtr< std::vector< CDCWireHit > > m_CDCWireHits
Input CDCWireHits.
double m_maximumAbsD0
Only tracks with an absolute value of d0 below (exclusive) this parameter (cm) are considered.
void findHits()
Find the hits that can be added to the RecoTracks.
std::unordered_map< RecoTrack *, std::vector< HitToAddInfo > > m_mapToHitsToAdd
Map from a RecoTrack ptr to the vector of the hits that need to be added to this track.
double m_maximumAbsZ0
Only tracks with an absolute value of z0 below (exclusive) this parameter (cm) are considered.
This class is for convenience access and registration of objects, that are stored inside the StoreWra...
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition: ERightLeft.h:25
Abstract base class for different kinds of events.
Internal structure to store the information about a hit to be added.