Belle II Software  release-08-01-10
TrackBuilder.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 <string>
11 #include <framework/geometry/B2Vector3.h>
12 #include <genfit/AbsTrackRep.h>
13 
14 namespace Belle2 {
20  class RecoTrack;
21 
41  class TrackBuilder {
42  public:
51  const std::string& trackColName,
52  const std::string& trackFitResultColName,
53  const B2Vector3D& beamSpot = B2Vector3D(0., 0., 0.),
54  const B2Vector3D& beamAxis = B2Vector3D(0., 0., 1.)
55  ) :
56  m_trackColName(trackColName),
57  m_trackFitResultColName(trackFitResultColName),
58  m_beamSpot(beamSpot),
59  m_beamAxis(beamAxis)
60  {};
61 
77  bool storeTrackFromRecoTrack(RecoTrack& recoTrack,
78  const bool useClosestHitToIP = false, const bool useBFieldAtHit = false);
79 
81  static uint32_t getHitPatternVXDInitializer(const RecoTrack& recoTrack, const genfit::AbsTrackRep* representation = nullptr);
83  static uint64_t getHitPatternCDCInitializer(const RecoTrack& recoTrack, const genfit::AbsTrackRep* representation = nullptr);
84 
85  private:
87  std::string m_trackColName;
94  };
95 
97 }
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
TrackBuilder class to create the Track/TrackFitResult mdst output from the RecoTrack.
Definition: TrackBuilder.h:41
static uint32_t getHitPatternVXDInitializer(const RecoTrack &recoTrack, const genfit::AbsTrackRep *representation=nullptr)
Get the HitPattern in the VXD.
bool storeTrackFromRecoTrack(RecoTrack &recoTrack, const bool useClosestHitToIP=false, const bool useBFieldAtHit=false)
Stores a Belle2 Track from a Reco Track.
Definition: TrackBuilder.cc:34
B2Vector3D m_beamSpot
Extrapolation target, origin.
Definition: TrackBuilder.h:91
std::string m_trackColName
TrackColName (output).
Definition: TrackBuilder.h:87
static uint64_t getHitPatternCDCInitializer(const RecoTrack &recoTrack, const genfit::AbsTrackRep *representation=nullptr)
Get the HitPattern in the CDC.
TrackBuilder(const std::string &trackColName, const std::string &trackFitResultColName, const B2Vector3D &beamSpot=B2Vector3D(0., 0., 0.), const B2Vector3D &beamAxis=B2Vector3D(0., 0., 1.))
Constructor of the class.
Definition: TrackBuilder.h:50
std::string m_trackFitResultColName
TrackFitResultColName (output).
Definition: TrackBuilder.h:89
B2Vector3D m_beamAxis
Extrapolation target, positive z direction.
Definition: TrackBuilder.h:93
Abstract base class for a track representation.
Definition: AbsTrackRep.h:66
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
Abstract base class for different kinds of events.