Belle II Software  release-08-01-10
TrackCreatorModule.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 <framework/database/DBObjPtr.h>
13 
14 #include <tracking/dbobjects/TrackFitMomentumRange.h>
15 #include <tracking/dataobjects/RecoTrack.h>
16 
17 #include <framework/geometry/B2Vector3.h>
18 #include <vector>
19 #include <string>
20 
21 namespace Belle2 {
35  class TrackCreatorModule : public Module {
36 
37  public:
40 
42  void initialize() override;
43 
45  void beginRun() override;
46 
48  void event() override;
49 
50  private:
51  // Input
53  std::string m_recoTrackColName = "";
54 
55  // Output
57  std::string m_trackColName = "";
59  std::string m_trackFitResultColName = "";
60 
62  std::vector<double> m_beamSpot = {0.0, 0.0, 0.0};
66  std::vector<double> m_beamAxis = {0.0, 0.0, 1.0};
70  std::vector<int> m_pdgCodes = {211};
71 
73  bool m_useClosestHitToIP = false;
78  bool m_useBFieldAtHit = false;
79 
82 
85  };
87 }
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
Takes RecoTracks coming from the event reconstructions and fits them with the configured list of part...
std::vector< double > m_beamSpot
BeamSpot define the coordinate system in which the tracks will be extrapolated to the perigee.
B2Vector3D m_beamSpotAsTVector
BeamSpot as B2Vector3D.
void initialize() override
Require and register the store arrays.
B2Vector3D m_beamAxisAsTVector
BeamAxis as B2Vector3D.
void event() override
Build/fit the track fit results.
DBObjPtr< TrackFitMomentumRange > m_trackFitMomentumRange
TrackFitMomentumRange Database OjbPtr.
TrackCreatorModule()
Constructor adding the description and properties.
bool m_useBFieldAtHit
Flag to calculate the BField at the used hit (closest to IP or first one), instead of the one at the ...
bool m_useClosestHitToIP
Flag to turn on special handling which measurement to choose; especially useful for Cosmics.
std::vector< double > m_beamAxis
BeamAxis define the coordinate system in which the tracks will be extrapolated to the perigee.
std::string m_trackColName
Name of collection holding the Tracks (output).
void beginRun() override
Called when entering a new run, to load TrackFitMomentumRange parameters.
std::string m_recoTrackColName
Name of collection holding the RecoTracks (input).
std::vector< int > m_pdgCodes
PDG codes for which TrackFitResults will be created.
std::string m_trackFitResultColName
Name of collection holding the TrackFitResult (output).
StoreArray< RecoTrack > m_RecoTracks
RecoTracks StoreArray.
Abstract base class for different kinds of events.