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/dbobjects/DAFConfiguration.h>
14#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
15#include <tracking/trackFindingCDC/rootification/StoreWrappedObjPtr.h>
16#include <tracking/trackFindingCDC/numerics/ERightLeft.h>
17
18namespace Belle2 {
23 namespace TrackFindingCDC {
24
25
32
33 public:
34
37
39 void initialize() override;
40
42 void event() override;
43
44 private:
45
49 double arcLength = 0.0;
51 double z = 0.0;
53 double distanceToTrack = 0.0;
55 ERightLeft rlInfo = ERightLeft::c_Unknown;
57 bool isValid = false;
58 };
59
61 struct HitToAddInfo {
63 CDCWireHit* hit = nullptr;
65 ERightLeft rlInfo = ERightLeft::c_Unknown;
66 };
67
69 void findHits();
70
72 void addHits();
73
76 const RecoTrack& recoTrack,
77 const RecoHitInformation* recoHitInformation) const;
78
81
82 private:
83
85 std::string m_CDCWireHitsStoreArrayName = "CDCWireHitVector";
87 std::string m_inputRecoTracksStoreArrayName = "CDCRecoTracks";
89 std::string m_outputRecoTracksStoreArrayName = "ExtendedCDCRecoTracks";
91 double m_maximumDistance = 0.1;
93 int m_minimumADC = 1;
95 int m_minimumTOT = 1;
97 double m_maximumAbsD0 = 13.5;
99 double m_maximumAbsZ0 = 35.0;
100
107
109 std::unordered_map<RecoTrack*, std::vector<CDCHit*> > m_mapToHitsOnTrack;
111 std::unordered_map<RecoTrack*, std::vector<HitToAddInfo> > m_mapToHitsToAdd;
112
115 };
116 }
118}
@ c_CDConly
configuration for the CDC-only track fitting
Module()
Constructor.
Definition Module.cc:30
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
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.
short m_trackFitType
Track Fit type to select the proper DAFParameter from DAFConfiguration; by default c_CDConly.
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...
Abstract base class for different kinds of events.
Internal structure to store the information about a hit to be added.