Belle II Software development
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
21namespace Belle2 {
32 class TrackCreatorModule : public Module {
33
34 public:
37
39 void initialize() override;
40
42 void beginRun() override;
43
45 void event() override;
46
47 private:
48 // Input
50 std::string m_recoTrackColName = "";
51
52 // Output
54 std::string m_trackColName = "";
56 std::string m_trackFitResultColName = "";
57
59 std::vector<double> m_beamSpot = {0.0, 0.0, 0.0};
63 std::vector<double> m_beamAxis = {0.0, 0.0, 1.0};
67 std::vector<int> m_pdgCodes = {211};
68
70 bool m_useClosestHitToIP = false;
75 bool m_useBFieldAtHit = false;
76
79
82 };
84}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
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.