|
ATLAS Offline Software
|
Go to the documentation of this file.
40 , m_particleCreator(
"Trk::TrackParticleCreatorTool/TrackParticleCreatorTool", this)
88 , m_hit_derivx_transx{}
89 , m_hit_derivx_transy{}
90 , m_hit_derivx_transz{}
97 , m_hit_derivy_transx{}
98 , m_hit_derivy_transy{}
99 , m_hit_derivy_transz{}
100 , m_hit_derivy_rotx{}
101 , m_hit_derivy_roty{}
102 , m_hit_derivy_rotz{}
103 , m_hit_derivy_bowx{}
104 , m_hit_derivy_bowy{}
105 , m_hit_derivy_bowz{}
107 , m_storeDerivatives{
false} {
108 declareInterface<Trk::IFillNtupleTool>(
this);
109 declareProperty(
"TrackParticleCreatorTool", m_particleCreator,
"tool to build TrackParticle");
110 declareProperty(
"AlignModuleTool", m_alignModuleTool);
111 declareProperty(
"MaxHits", m_max_hits);
112 declareProperty(
"StoreDerivatives", m_storeDerivatives);
173 return StatusCode::FAILURE;
177 return StatusCode::SUCCESS;
186 }
else ATH_MSG_WARNING(
"Variable m_file not set or not pointing to open output file.");
187 return StatusCode::SUCCESS;
194 return StatusCode::SUCCESS;
213 constexpr
double invalidParameterValue{-999.};
214 m_d0 = invalidParameterValue;
215 m_z0 = invalidParameterValue;
216 m_phi0 = invalidParameterValue;
217 m_theta = invalidParameterValue;
219 m_pt = invalidParameterValue;
220 m_eta = invalidParameterValue;
221 m_xvtx = invalidParameterValue;
222 m_yvtx = invalidParameterValue;
223 m_zvtx = invalidParameterValue;;
225 constexpr
int initialiseNHits{0};
236 constexpr
double invalidChiSq(-1e12);
237 constexpr
int invalidDegreesOfFreedom{-999};
240 m_ndof = invalidDegreesOfFreedom;
243 if (not aMeasPer)
ATH_MSG_ERROR(
"Could not get Trk::MeasuredPerigee");
250 ATH_MSG_DEBUG(itrk <<
". " <<
" Track Parameters (d0, z0, phi0, theta, q/p)");
252 m_pt = std::sqrt((aMeasPer->momentum().x()) * (aMeasPer->momentum().x())
253 + (aMeasPer->momentum().y()) * (aMeasPer->momentum().y()));
254 m_eta = aMeasPer->eta();
255 m_xvtx = aMeasPer->position().x();
256 m_yvtx = aMeasPer->position().y();
257 m_zvtx = aMeasPer->position().z();
262 if (not trackPart)
ATH_MSG_ERROR(
"Could not get xAOD::TrackParticle");
302 if (not fitQual)
ATH_MSG_ERROR(
"No fit quality assigned to the track");
304 if (fitQual->chiSquared() > 0. && fitQual->numberDoF() > 0) {
305 m_chi2 = fitQual->chiSquared();
306 m_ndof = fitQual->numberDoF();
320 int nhitsTotal = alignTSOSCollection->
size();
395 for (; atsit != atsit_end; ++atsit) {
434 std::vector<Trk::Residual>::const_iterator ires = atsos->
firstResidual();
469 const std::vector<Amg::VectorX>* derivs = atsos->
derivatives();
471 int npar = derivs->at(0).rows();
474 int naPar = alignPars->
size();
476 if (npar != naPar)
ATH_MSG_WARNING(
"number of derivatives on AlignTSOS doesn't match the one on AlignModule");
479 for (
int i = 0;
i < npar;
i++) {
524 for (
int i = 0;
i < npar;
i++) {
577 <<
"Some hits will not be stored.");
626 m_tree =
new TTree(
"IDAlign",
"Inner Detector Alignment Ntuple");
def retrieve(aClass, aKey=None)
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
TrackState::MeasurementType measType() const
returns measurement type enum
Const iterator class for DataVector/DataList.
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
const RIO_OnTrack * rio() const
returns RIO_OnTrack or leading RIO of CompetingRIOsOnTrack (assigned by c'tor)
uint64_t eventNumber() const
The current event's event number.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
virtual const Amg::Vector3D & globalPosition() const override=0
Interface method to get the global Position.
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
TransformParameters
enum to keep track of transformation coordinates
const std::vector< Amg::VectorX > * derivatives() const
returns pointer to vector of derivatives
AlignModule::TransformParameters paramType() const
returns the type of parameter (i.e.
constexpr double derivative(const double x)
const AlignModule * module() const
accessor method for AlignModule to which tsos belongs
uint32_t runNumber() const
The current event's run number.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::unique_ptr< TFile > m_file
description: this is a custom writer for the old-school drivers that don't use an actual writer
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
std::string dumpMeasType() const
returns string corresponding to the measurement type
::StatusCode StatusCode
StatusCode definition for legacy code.
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
@ numberOfSCTHoles
number of SCT holes [unit8_t].
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
const TrackParameters * unbiasedTrackPars() const
returns pointer to unbiased track parameters if present
const Perigee * perigeeParameters() const
return Perigee.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Eigen::Matrix< double, 3, 1 > Vector3D
Class describing the basic event information.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const AlignTSOSCollection * alignTSOSCollection() const
returns collection of alignTSOS
bool is_barrel(const Identifier &id) const
Test for barrel.
#define ATH_MSG_WARNING(x)
Identifier identify() const
return the identifier -extends MeasurementBase
int nResDim() const
returns number of measurement residual + scatterer residual dimensions
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Class describing a TrackParticle.
std::vector< Residual >::const_iterator firstResidual() const
returns first Residual iterator
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.