Belle II Software  release-08-01-10
RecoHitInformation.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 
9 #pragma once
10 
11 #include <cdc/dataobjects/CDCHit.h>
12 #include <pxd/dataobjects/PXDCluster.h>
13 #include <svd/dataobjects/SVDCluster.h>
14 #include <klm/dataobjects/eklm/EKLMAlignmentHit.h>
15 #include <klm/dataobjects/KLMHit2d.h>
16 
17 #include <framework/datastore/RelationsObject.h>
18 
19 namespace Belle2 {
39  public:
40 
48 
51 
53  typedef CDCHit UsedCDCHit;
54 
57 
60 
63  c_undefinedRightLeftInformation,
64  c_invalidRightLeftInformation,
65  c_right,
66  c_left
67  };
68 
71  c_undefinedTrackFinder,
72  // the Hit has been generated by the MCTrackFinder and its considered important
73  // to find this hit by PR. Which hits get marked as priority and auxiliary solely
74  // depends on the configuration of the TrackFinderMCRTruh
75  c_MCTrackFinderPriorityHit,
76  // the Hit has been generated by the MCTrackFinder and is considered to be of minor
77  // importance to find, for example because it is in one of the downstream loops.
78  // Which hits get marked as priority and auxiliary solely depends on the configuration
79  // of the TrackFinderMCRTruh
80  c_MCTrackFinderAuxiliaryHit,
81  c_invalidTrackFinder,
82  // non CKF-based track finders
83  c_CDCTrackFinder,
84  c_LocalTrackFinder,
85  c_SegmentTrackCombiner,
86  c_VXDTrackFinder,
87  // track finders based on CKF
88  c_SVDtoCDCCKF,
89  c_ECLtoCDCCKF,
90  c_CDCtoSVDCKF,
91  c_SVDtoPXDCKF,
92  // SVDHough track finder
93  c_SVDHough,
94  // CDC hit finder implemented in the ReattachCDCWireHitsToRecoTracks module:
95  // looks for CDC hits that are close to RecTracks, but that were rejected by the ADC/TOT based filter.
96  c_ReattachCDCWireHitsToRecoTracks,
97  // Belle I's track finder
98  c_Trasan,
99  c_other
100  };
101 
103  enum RecoHitFlag {
104  c_undefinedRecoHitFlag,
105  c_dismissedByFit,
106  c_pruned,
107  };
108 
111  c_undefinedTrackingDetector,
112  c_invalidTrackingDetector,
113  c_SVD,
114  c_PXD,
115  c_CDC,
116  c_EKLM,
117  c_BKLM
118  };
119 
120  public:
125 
133  RecoHitInformation(const UsedCDCHit* cdcHit, RightLeftInformation rightLeftInformation, OriginTrackFinder foundByTrackFinder,
134  unsigned int sortingParameter) :
135  RecoHitInformation(cdcHit, RecoHitDetector::c_CDC, rightLeftInformation, foundByTrackFinder, sortingParameter)
136  {
137  }
138 
145  RecoHitInformation(const UsedPXDHit* pxdHit, OriginTrackFinder foundByTrackFinder,
146  unsigned int sortingParameter) :
147  RecoHitInformation(pxdHit, RecoHitDetector::c_PXD, RightLeftInformation::c_invalidRightLeftInformation,
148  foundByTrackFinder, sortingParameter)
149  {
150  }
151 
158  RecoHitInformation(const UsedSVDHit* svdHit, OriginTrackFinder foundByTrackFinder,
159  unsigned int sortingParameter) :
160  RecoHitInformation(svdHit, RecoHitDetector::c_SVD, RightLeftInformation::c_invalidRightLeftInformation,
161  foundByTrackFinder, sortingParameter)
162  {
163  }
164 
171  RecoHitInformation(const UsedEKLMHit* eklmHit, OriginTrackFinder foundByTrackFinder,
172  unsigned int sortingParameter) :
173  RecoHitInformation(eklmHit, RecoHitDetector::c_EKLM, RightLeftInformation::c_invalidRightLeftInformation,
174  foundByTrackFinder, sortingParameter)
175  {
176  }
177 
184  RecoHitInformation(const UsedBKLMHit* bklmHit, OriginTrackFinder foundByTrackFinder,
185  unsigned int sortingParameter) :
186  RecoHitInformation(bklmHit, RecoHitDetector::c_BKLM, RightLeftInformation::c_invalidRightLeftInformation,
187  foundByTrackFinder, sortingParameter)
188  {
189  }
190 
193  {
194  return m_flag;
195  }
196 
198  void setFlag(RecoHitFlag flag)
199  {
200  m_flag = flag;
201  }
202 
205  {
206  return m_foundByTrackFinder;
207  }
208 
210  void setFoundByTrackFinder(OriginTrackFinder foundByTrackFinder)
211  {
212  m_foundByTrackFinder = foundByTrackFinder;
213  }
214 
216  unsigned int getSortingParameter() const
217  {
218  return m_sortingParameter;
219  }
220 
222  void setSortingParameter(unsigned int sortingParameter)
223  {
224  m_sortingParameter = sortingParameter;
225  }
226 
229  {
230  return m_rightLeftInformation;
231  }
232 
235  {
236  m_rightLeftInformation = rightLeftInformation;
237  }
238 
241  {
242  return m_trackingDetector;
243  }
244 
246  bool useInFit() const
247  {
248  return m_useInFit;
249  }
250 
252  void setUseInFit(const bool useInFit = true)
253  {
255  }
256 
261  void setCreatedTrackPointID(int trackPointID)
262  {
263  m_createdTrackPointID = trackPointID;
264  }
265 
274  {
275  return m_createdTrackPointID;
276  }
277 
278  private:
280  RecoHitDetector m_trackingDetector = RecoHitDetector::c_undefinedTrackingDetector;
282  RightLeftInformation m_rightLeftInformation = RightLeftInformation::c_undefinedRightLeftInformation;
283 
285  unsigned int m_sortingParameter = 0;
288  OriginTrackFinder m_foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder;
290  RecoHitFlag m_flag = RecoHitFlag::c_undefinedRecoHitFlag;
292  bool m_useInFit = true;
299 
308  template <class HitType>
309  RecoHitInformation(const HitType* hit,
310  RecoHitDetector trackingDetector,
311  RightLeftInformation rightLeftInformation,
312  OriginTrackFinder foundByTrackFinder,
313  unsigned int sortingParameter) :
314  m_trackingDetector(trackingDetector),
315  m_rightLeftInformation(rightLeftInformation),
316  m_sortingParameter(sortingParameter),
317  m_foundByTrackFinder(foundByTrackFinder),
318  m_flag(RecoHitFlag::c_undefinedRecoHitFlag)
319  {
320  addRelationTo(hit);
321  }
322 
324  };
326 }
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
This dataobject is used only for EKLM alignment.
KLM 2d hit.
Definition: KLMHit2d.h:33
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
RecoHitInformation(const UsedPXDHit *pxdHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
Create hit information for a PXD hit with the given information.
RecoHitDetector m_trackingDetector
The tracking detector this hit comes from (can not be changed once created)
void setUseInFit(const bool useInFit=true)
Set the hit to be used (default) or not in the next fit.
RightLeftInformation m_rightLeftInformation
The right-left-information of the hit. Can be invalid (for VXD hits) or unknown.
RightLeftInformation getRightLeftInformation() const
Get the right-left-information.
OriginTrackFinder
The TrackFinder which has added the hit to the track.
RightLeftInformation
The RightLeft information of the hit which is only valid for CDC hits.
CDCHit UsedCDCHit
Define, use of CDC hits as CDC hits (for symmetry).
void setSortingParameter(unsigned int sortingParameter)
Set the sorting parameter.
RecoHitInformation(const UsedCDCHit *cdcHit, RightLeftInformation rightLeftInformation, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
Create hit information for a CDC hit with the given information.
RecoHitFlag
Another flag to be used (currently unused)
RecoHitInformation(const UsedEKLMHit *eklmHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
Create hit information for a EKLM hit with the given information.
OriginTrackFinder getFoundByTrackFinder() const
Get which track finder has found the track.
RecoHitDetector getTrackingDetector() const
Get the detector this hit comes from.
void setRightLeftInformation(RightLeftInformation rightLeftInformation)
Set the right-left-information.
EKLMAlignmentHit UsedEKLMHit
Define, use of EKLMHit2d as EKLM hits.
RecoHitDetector
The detector this hit comes from (which is of course also visible in the hit type)
RecoHitFlag m_flag
An additional flag to be used.
RecoHitInformation()
Empty constructor for root.
int m_createdTrackPointID
The index for the created TrackPoint in the genfit::Track of the related RecoTrack.
bool useInFit() const
Get the flag, whether this his should be used in a fit or not.
RecoHitInformation(const UsedBKLMHit *bklmHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
Create hit information for a BKLM hit with the given information.
KLMHit2d UsedBKLMHit
Define, use of KLMHit2d as BKLM hits.
RecoHitInformation(const UsedSVDHit *svdHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
Create hit information for a SVD hit with the given information.
void setFlag(RecoHitFlag flag)
Set the additional flag.
unsigned int m_sortingParameter
The sorting parameter as an index.
void setCreatedTrackPointID(int trackPointID)
Set the id of the created track point to the one from the genfit::Track.
ClassDef(RecoHitInformation, 6)
This class implements additional information for hits.
PXDCluster UsedPXDHit
Define, use of clusters or true hits for PXD.
RecoHitInformation(const HitType *hit, RecoHitDetector trackingDetector, RightLeftInformation rightLeftInformation, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
Create hit information for a generic hit with the given information.
int getCreatedTrackPointID() const
Get the id of the TrackPoint related to this reco hit information in the genfit::Track.
SVDCluster UsedSVDHit
Define, use of clusters or true hits for SVD.
OriginTrackFinder m_foundByTrackFinder
Which track finder has found this hit and added it to the reco track.
unsigned int getSortingParameter() const
Get the sorting parameter.
void setFoundByTrackFinder(OriginTrackFinder foundByTrackFinder)
Set which track finder has found the track.
RecoHitFlag getFlag() const
Get the additional flag.
bool m_useInFit
Set this flag to falso to not create a measurement out of this hit.
Defines interface for accessing relations of objects in StoreArray.
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
Abstract base class for different kinds of events.