|
ATLAS Offline Software
|
Go to the documentation of this file.
24 m_trkParametersWarning(false),
28 m_trkMomentumX(nullptr),
29 m_trkMomentumY(nullptr),
30 m_trkMomentumZ(nullptr),
35 declareInterface<IValidationNtupleHelperTool>(
this);
48 m_trkX =
new std::vector<float>();
49 m_trkY =
new std::vector<float>();
50 m_trkZ =
new std::vector<float>();
51 m_trkMomentumX =
new std::vector<float>();
52 m_trkMomentumY =
new std::vector<float>();
53 m_trkMomentumZ =
new std::vector<float>();
54 m_trkLoc1 =
new std::vector<float>();
55 m_trkLoc2 =
new std::vector<float>();
57 return StatusCode::SUCCESS;
68 delete m_trkMomentumX;
69 delete m_trkMomentumY;
70 delete m_trkMomentumZ;
75 return StatusCode::SUCCESS;
87 tree->Branch(
"TrackX", &m_trkX);
88 tree->Branch(
"TrackY", &m_trkY);
89 tree->Branch(
"TrackZ", &m_trkZ);
90 tree->Branch(
"TrackMomentumX", &m_trkMomentumX);
91 tree->Branch(
"TrackMomentumY", &m_trkMomentumY);
92 tree->Branch(
"TrackMomentumZ", &m_trkMomentumZ);
93 tree->Branch(
"TrackLocal1", &m_trkLoc1);
94 tree->Branch(
"TrackLocal2", &m_trkLoc2);
97 return StatusCode::SUCCESS;
109 const bool& isOutlier) {
112 m_trkX->push_back( s_errorEntry );
113 m_trkY->push_back( s_errorEntry );
114 m_trkZ->push_back( s_errorEntry );
115 m_trkMomentumX->push_back( s_errorEntry );
116 m_trkMomentumY->push_back( s_errorEntry );
117 m_trkMomentumZ->push_back( s_errorEntry );
118 m_trkLoc1->push_back( s_errorEntry );
119 m_trkLoc2->push_back( s_errorEntry );
122 if(!m_trkParametersWarning) {
124 ATH_MSG_WARNING (
"No TrackParameters: Track positions cannot be filled (filling dummy values).");
125 ATH_MSG_WARNING (
" This is possible for slimmed tracks; if track positions are needed choose another track collection");
127 m_trkParametersWarning =
true;
130 return StatusCode::SUCCESS;
142 m_trkX->push_back(
float(gpos.x()) );
143 m_trkY->push_back(
float(gpos.y()) );
144 m_trkZ->push_back(
float(gpos.z()) );
145 m_trkMomentumX->push_back(
float(gmom.x()) );
146 m_trkMomentumY->push_back(
float(gmom.y()) );
147 m_trkMomentumZ->push_back(
float(gmom.z()) );
149 m_trkLoc1->push_back(
float(lp[
Trk::locX]) );
150 m_trkLoc2->push_back(
float(lp[
Trk::locY]) );
152 return StatusCode::SUCCESS;
160 m_trkMomentumX->clear();
161 m_trkMomentumY->clear();
162 m_trkMomentumZ->clear();
166 return StatusCode::SUCCESS;
174 return StatusCode::SUCCESS;
virtual StatusCode fillMeasurementData(const Trk::MeasurementBase *, const Trk::TrackParameters *, const int &detectorType, const bool &isOutlier)
fill hit position data
~TrackPositionNtupleHelper()
StatusCode finalize()
finalize
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
#define ATH_MSG_VERBOSE(x)
virtual StatusCode resetVariables(const int &detectorType)
reset ntuple variables
::StatusCode StatusCode
StatusCode definition for legacy code.
TrackPositionNtupleHelper(const std::string &, const std::string &, const IInterface *)
Amg::Vector2D localPosition() const
Access method for the local coordinates, local parameter definitions differ for each surface type.
represents the track state (measurement, material, fit parameters and quality) at a surface.
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
#define ATH_MSG_WARNING(x)
virtual StatusCode fillHoleData(const Trk::TrackStateOnSurface &, const int &)
fill special data about holes on track (here: do nothing)
virtual StatusCode addNtupleItems(TTree *tree, const int &detectorType)
add items to the ntuple and configure the helper tool: should be called once (per detector type) by t...
StatusCode initialize()
initialize