11#include <tracking/trackFindingVXD/variableExtractors/VariableExtractor.h>
12#include <tracking/dataobjects/RecoTrack.h>
13#include <tracking/dataobjects/RecoHitInformation.h>
15#include <genfit/FitStatus.h>
16#include <mdst/dataobjects/Track.h>
17#include <mdst/dataobjects/MCParticle.h>
18#include <mdst/dataobjects/HitPatternCDC.h>
19#include <framework/gearbox/Const.h>
35 addVariable(prefix +
"seed_pz_estimate", variableSet);
36 addVariable(prefix +
"seed_pz_variance", variableSet);
37 addVariable(prefix +
"seed_z_estimate", variableSet);
38 addVariable(prefix +
"seed_tan_lambda_estimate", variableSet);
39 addVariable(prefix +
"seed_pt_estimate", variableSet);
40 addVariable(prefix +
"seed_x_estimate", variableSet);
41 addVariable(prefix +
"seed_y_estimate", variableSet);
42 addVariable(prefix +
"seed_py_variance", variableSet);
43 addVariable(prefix +
"seed_d0_estimate", variableSet);
44 addVariable(prefix +
"seed_omega_variance", variableSet);
45 addVariable(prefix +
"svd_layer6_clsTime", variableSet);
46 addVariable(prefix +
"seed_tan_lambda_variance", variableSet);
47 addVariable(prefix +
"seed_z_variance", variableSet);
50 addVariable(prefix +
"svd_layer3_positionSigma", variableSet);
51 addVariable(prefix +
"first_cdc_layer", variableSet);
52 addVariable(prefix +
"last_cdc_layer", variableSet);
53 addVariable(prefix +
"InOutArmTimeDifference", variableSet);
54 addVariable(prefix +
"InOutArmTimeDifferenceError", variableSet);
55 addVariable(prefix +
"inGoingArmTime", variableSet);
56 addVariable(prefix +
"inGoingArmTimeError", variableSet);
57 addVariable(prefix +
"outGoingArmTime", variableSet);
58 addVariable(prefix +
"outGoingArmTimeError", variableSet);
71 if (not svdcdcRecoTrack) {
82 if (cdcHitList.size() > 0) {
83 m_variables.at(
m_prefix +
"first_cdc_layer") =
static_cast<float>(cdcHitList.front()->getICLayer());
84 m_variables.at(
m_prefix +
"last_cdc_layer") =
static_cast<float>(cdcHitList.back()->getICLayer());
91 const auto& svdcdcRecoTrackMomentum = svdcdcRecoTrack->
getMomentumSeed();
92 const auto& svdcdcRecoTrackPosition = svdcdcRecoTrack->
getPositionSeed();
93 const float svdcdcRecoTrackChargeSign = svdcdcRecoTrack->
getChargeSeed() > 0 ? 1.0f : -1.0f;
95 const uint16_t svdcdcNDF = 0xffff;
96 const auto& svdcdcFitResult =
TrackFitResult(svdcdcRecoTrackPosition, svdcdcRecoTrackMomentum, svdcdcRecoTrackCovariance,
97 svdcdcRecoTrackChargeSign,
Const::pion, 0, bFieldValue, 0, 0,
100 m_variables.at(
m_prefix +
"seed_pz_variance") =
static_cast<float>(svdcdcRecoTrackCovariance(5, 5));
101 m_variables.at(
m_prefix +
"seed_pz_estimate") =
static_cast<float>(svdcdcRecoTrackMomentum.Z());
102 m_variables.at(
m_prefix +
"seed_z_estimate") =
static_cast<float>(svdcdcRecoTrackPosition.Z());
103 m_variables.at(
m_prefix +
"seed_tan_lambda_estimate") =
static_cast<float>(svdcdcFitResult.getCotTheta());
105 m_variables.at(
m_prefix +
"seed_pt_estimate") =
static_cast<float>(svdcdcRecoTrackMomentum.Rho());
106 m_variables.at(
m_prefix +
"seed_x_estimate") =
static_cast<float>(svdcdcRecoTrackPosition.X());
107 m_variables.at(
m_prefix +
"seed_y_estimate") =
static_cast<float>(svdcdcRecoTrackPosition.Y());
108 m_variables.at(
m_prefix +
"seed_py_variance") =
static_cast<float>(svdcdcRecoTrackCovariance(4, 4));
109 m_variables.at(
m_prefix +
"seed_d0_estimate") =
static_cast<float>(svdcdcFitResult.getD0());
110 m_variables.at(
m_prefix +
"seed_omega_variance") =
static_cast<float>(svdcdcFitResult.getCov()[9]);
111 m_variables.at(
m_prefix +
"seed_tan_lambda_variance") =
static_cast<float>(svdcdcFitResult.getCov()[14]);
112 m_variables.at(
m_prefix +
"seed_z_variance") =
static_cast<float>(svdcdcRecoTrackCovariance(2, 2));
115 if (svdHit->getSensorID().getLayerNumber() == 3) {
116 m_variables.at(
m_prefix +
"svd_layer3_positionSigma") =
static_cast<float>(svdHit->getPositionSigma());
118 if (svdHit->getSensorID().getLayerNumber() == 6) {
119 m_variables.at(
m_prefix +
"svd_layer6_clsTime") =
static_cast<float>(svdHit->getClsTime());
static ROOT::Math::XYZVector getFieldInTesla(const ROOT::Math::XYZVector &pos)
return the magnetic field at a given position in Tesla.
static const float floatNaN
quiet_NaN
static const ChargedStable pion
charged pion particle
A mixin class to attach a name to an object. Based on class with same name in CDC package.
This is the Reconstruction Event-Data Model Track.
const TMatrixDSym & getSeedCovariance() const
Return the covariance matrix of the seed. ATTENTION: This is not the fitted covariance.
float getInOutArmTimeDifference()
Return the difference between the track times of the ingoing and outgoing arms.
float getOutgoingArmTime()
Return the track time of the outgoing arm.
std::vector< Belle2::RecoTrack::UsedSVDHit * > getSVDHitList() const
Return an unsorted list of svd hits.
std::vector< Belle2::RecoTrack::UsedCDCHit * > getSortedCDCHitList() const
Return a sorted list of cdc hits. Sorted by the sortingParameter.
ROOT::Math::XYZVector getPositionSeed() const
Return the position seed stored in the reco track. ATTENTION: This is not the fitted position.
unsigned int getNumberOfSVDHits() const
Return the number of svd hits.
unsigned int getNumberOfCDCHits() const
Return the number of cdc hits.
float getIngoingArmTimeError()
Return the error of the track time of the ingoing arm.
float getOutgoingArmTimeError()
Return the error of the track time of the outgoing arm.
float getIngoingArmTime()
Return the track time of the ingoing arm.
float getInOutArmTimeDifferenceError()
Return the error of the difference between the track times of the ingoing and outgoing arms.
short int getChargeSeed() const
Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
ROOT::Math::XYZVector getMomentumSeed() const
Return the momentum seed stored in the reco track. ATTENTION: This is not the fitted momentum.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Values of the result of a track fit with a given particle hypothesis.
Abstract base class for different kinds of events.