26 constexpr size_t MAX_ROAD_SIZE(399);
28 std::vector<const Trk::Surface*>
29 vectorOfSurfacesFromVectorOfElements(
const std::vector<const InDetDD::TRT_BaseElement*> & v){
31 std::vector<const Trk::Surface*> surfaces;
32 for(
const auto &pThisElement: v) {
33 surfaces.emplace_back(&(pThisElement->surface()));
34 if(++roadsize==MAX_ROAD_SIZE)
break;
45(
const std::string& t,
const std::string& n,
const IInterface* p)
48 declareInterface<ITRT_TrackExtensionTool>(
this);
113 return StatusCode::SUCCESS;
122 return StatusCode::SUCCESS;
142 auto pad = [](
const std::string & s)->std::string{
143 std::string s1(s.size(),
' ');
147 const std::array<std::string,9> fieldmode{
"NoField" ,
"ConstantField",
"SolenoidalField",
148 "ToroidalField" ,
"Grid3DField" ,
"RealisticField" ,
149 "UndefinedField",
"AthenaField" ,
"?????" };
151 if(mode<0 || mode>8 ) mode = 8;
152 std::string lineSeparator(90,
'-');
153 lineSeparator =
"|" + lineSeparator +
"|\n";
154 const auto & w12 = std::setw(12);
155 const auto & sp5 = std::setprecision(5);
156 const std::string spaces =
" |\n";
158 out<<
"| TRT container | "<< pad(
m_trtname.key());
159 out<<
"| Tool for propagation | "<< pad(
m_proptool.type());
161 out<<
"| Tool for rio on trackD | "<< pad(
m_riontrackD.type());
162 out<<
"| Tool for rio on trackN | "<< pad(
m_riontrackN.type());
163 out<<
"| Tool for road builder | "<< pad(
m_roadtool.type());
164 out<<
"| Magnetic field mode | "<< pad(fieldmode[mode]);
166 out<<
"| TRT road half width (mm)| "<< w12 << sp5<<
m_roadwidth << spaces;
167 out<<
"| Min number DriftCircles | "<< w12 <<
m_minNumberDCs << spaces;
168 out<<
"| Use drift time ? | "<< w12 <<
m_usedriftrad << spaces;
169 out<<
"| Z vertex half width | "<< w12 <<
m_zVertexWidth << spaces;
170 out<<
"| Scalefactor hit error | "<< w12 <<
m_scale_error <<spaces;
171 out<<
"| Max impact parameter | "<< w12 <<
m_impact <<spaces;
189MsgStream& InDet::operator <<
199std::ostream& InDet::operator <<
209std::unique_ptr<InDet::ITRT_TrackExtensionTool::IEventData>
215 std::stringstream
msg;
216 msg <<
"Missing TRT_DriftCircleContainer " <<
m_trtname.key();
217 throw std::runtime_error(
msg.str() );
225 if (fieldCondObj ==
nullptr) {
236 event_data->m_trajectory.set(fieldprop, fieldCondObj);
237 event_data->m_trajectory.set (
m_trtid,
247 event_data->m_measurement.reserve(200);
255std::vector<const Trk::MeasurementBase*>&
268 if(parb && par!=parb) {
271 if((g2.x()*g2.x()+g2.y()*g2.y()) > (g1.x()*g1.x()+g1.y()*g1.y())) par=parb;
280std::vector<const Trk::MeasurementBase*>&
292std::vector<const Trk::MeasurementBase*>&
325 if (fieldCondObj ==
nullptr) {
333 const std::vector<const InDetDD::TRT_BaseElement*>& detectorElements =
337 if(
int(detectorElements.size())< nCut)
return nullptr;
341 auto surfaces =vectorOfSurfacesFromVectorOfElements(detectorElements);
346 if(!
Tp.production(par))
return nullptr;
347 std::vector< std::pair<Amg::Vector3D,double> > gpos;
377 if( nc < nCut || (1000*nc) < (700*(nc+nh)) )
return nullptr;
418 if (fieldCondObj ==
nullptr) {
425 const std::vector<const InDetDD::TRT_BaseElement*>& detectorElements =
431 auto surfaces = vectorOfSurfacesFromVectorOfElements(detectorElements);
436 if(!
Tp.production(par))
return false;
437 std::vector< std::pair<Amg::Vector3D,double> > gpos;
479 if(!pe)
return nullptr;
480 if(!pe->covariance())
return nullptr;
482 if(!pb)
return nullptr;
483 if(!pb->covariance())
return nullptr;
#define ATH_CHECK
Evaluate an expression and check for errors.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
const ServiceHandle< StoreGateSvc > & detStore() const
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
DataModel_detail::const_iterator< DataVector > const_iterator
const T * back() const
Access the last element in the collection as an rvalue.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const T * front() const
Access the first element in the collection as an rvalue.
std::array< std::vector< std::vector< Used_t > >, 3 > TRT_DetElemUsedMap
bool trackParametersEstimationForFirstPoint()
const int & naElements() const
void initiateForPrecisionSeed(std::vector< std::pair< Amg::Vector3D, double > > &, const std::vector< const InDetDD::TRT_BaseElement * > &, const TRT_DriftCircleContainer *&, const Trk::PatternTrackParameters &)
void convert(std::vector< const Trk::MeasurementBase * > &)
void trackFindingWithoutDriftTimeBL(double)
void buildTrajectoryForTRTSeed(bool)
bool trackParametersEstimationForFirstPointWithVertexConstraint()
void trackFindingWithoutDriftTime(double)
const int & nclusters() const
bool isFirstElementBarrel()
void trackFindingWithDriftTime(double)
bool trackParametersEstimationForPerigeeWithVertexConstraint()
const int & nholes() const
void buildTrajectoryForPrecisionSeed(bool)
void initiateForTRTSeed(std::vector< std::pair< Amg::Vector3D, double > > &, const std::vector< const InDetDD::TRT_BaseElement * > &, const TRT_DriftCircleContainer *&, const Trk::PatternTrackParameters &)
void trackFindingWithDriftTimeBL(double)
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
bool solenoidOn() const
status of the magnets
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
static EventData & getPrivateEventData(InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data)
magnetic field properties to steer the behavior of the extrapolation
This class is the pure abstract base class for all fittable tracking measurements.
const Amg::Vector3D & position() const
Access method for the position.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
Class for a generic track segment that holdes polymorphic Trk::MeasurementBase objects,...
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
holding In fact this class is here in order to allow STL container for all features This class is sho...
Eigen::Matrix< double, 3, 1 > Vector3D
DataVector< const Trk::TrackStateOnSurface > TrackStates
@ FastField
call the fast field access method of the FieldSvc
@ NoField
Field is set to 0., 0., 0.,.
@ FullField
Field is set to be realistic, but within a given Volume.
ParametersBase< TrackParametersDim, Charged > TrackParameters