![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
32 (
const std::string&
t,
const std::string&
n,
const IInterface*
p)
35 m_roadwidth_locz (10.)
38 declareInterface<ITRT_TrackExtensionTool>(
this);
64 if ((
sc=service(
"ToolSvc", toolSvc)).isFailure()) {
66 return StatusCode::FAILURE;
73 return StatusCode::FAILURE;
81 return StatusCode::FAILURE;
157 MsgStream& InDet::operator <<
167 std::ostream& InDet::operator <<
177 std::unique_ptr<InDet::ITRT_TrackExtensionTool::IEventData>
184 std::stringstream
msg;
186 throw std::runtime_error(
msg.str() );
189 std::unique_ptr<EventData> event_data(
new EventData(trtcontainer.
cptr()));
199 return std::unique_ptr<InDet::ITRT_TrackExtensionTool::IEventData>(event_data.release());
207 std::vector<const Trk::MeasurementBase*>&
226 parb = (*(tsos->
begin()))->trackParameters();
229 if(parb &&
par!=parb) {
252 std::vector< const Trk::TrackParameters* >::const_iterator parameterIter = tpars->begin();
253 for ( ; parameterIter != tpars->end(); ++parameterIter) {
256 if ( (*parameterIter)->associatedSurface().associatedDetectorElementIdentifier()==0 ) {
261 const Identifier& DCId = (*parameterIter)->associatedSurface().associatedDetectorElementIdentifier();
265 detElements[1]=(*parameterIter)->associatedSurface().associatedDetectorElement()->identifyHash();
274 if(phi_mod<0) phi_mod=31;
280 if(phi_mod>31) phi_mod=0;
287 for(
int i=-1;
i<2;
i++) {
294 if(container==
nullptr) {
302 InDet::TRT_DriftCircleCollection::const_iterator driftCircleIterator = container->begin();
303 for (; driftCircleIterator != container->end(); ++driftCircleIterator) {
306 const Trk::Surface &dc_surface=(*driftCircleIterator)->detectorElement()->surface((*driftCircleIterator)->identify());
309 std::optional<Amg::Vector2D> lpos=dc_surface.
globalToLocal((*parameterIter)->position());
316 double dist_locz=std::abs(lpos->y());
329 circ=(*driftCircleIterator);
337 if (lastz<-9999) lastz=(**parameterIter).position().z();
338 if (std::abs(lastz-(**parameterIter).position().z())>500.)
return;
339 lastz=(**parameterIter).position().z();
367 std::vector<const Trk::MeasurementBase*>&
378 std::vector<Identifier> vecID;
379 std::vector<const Trk::TrackParameters*> vecTP;
383 std::vector<const Trk::TrackParameters* >* tpars_down=
nullptr;
384 std::vector<const Trk::TrackParameters* >* tpars_up=
nullptr;
395 InDet::TRT_DriftCircleContainer::const_iterator
398 if ((**w).empty())
continue;
399 const Trk::Surface &surf=(**(**w).begin()).detectorElement()->surface();
412 vecTP.push_back(newpar);
414 tpars_down=
new std::vector<const Trk::TrackParameters* >;
415 tpars_up=
new std::vector<const Trk::TrackParameters* >;
417 if(!tpars_down || !tpars_up)
return event_data.
m_measurement;
420 std::sort(vecTP.begin(),vecTP.end(),
sorter);
421 for (
const auto *tmppar : vecTP){
422 if ((per->parameters()[
Trk::theta]>
M_PI/2 && per->position().z()<tmppar->position().z()) || (per->parameters()[
Trk::theta]<
M_PI/2 && per->position().z()>tmppar->position().z())) tpars_up->push_back(tmppar);
423 else tpars_down->push_back(tmppar);
426 if (!tpars_up->empty())
std::reverse(tpars_up->begin(),tpars_up->end());
438 std::vector< const Trk::TrackParameters* >::const_iterator parameterIter= tpars_up->begin();
439 for ( ; parameterIter != tpars_up->end(); ++parameterIter) {
440 delete *parameterIter;
446 std::vector< const Trk::TrackParameters* >::const_iterator parameterIter = tpars_down->begin();
447 for ( ; parameterIter != tpars_down->end(); ++parameterIter) {
448 delete *parameterIter;
478 const EventContext& ctx = Gaudi::Hive::currentContext();
510 double sinTheta =
std::sin(per->parameters()[3]);
511 double r= (std::abs(per->parameters()[
Trk::qOverP]) > 1
e-10) ? -sinTheta/(per->parameters()[
Trk::qOverP]*0.6) : 1e6;
512 double xc=per->position().x()-
r*
std::sin(per->parameters()[2]);
513 double yc=per->position().y()+
r*
std::cos(per->parameters()[2]);
514 double phi0=std::atan2(per->position().y()-yc,per->position().x()-xc);
516 double z0=per->position().z();
518 if (std::abs(surf->
normal().z())>0.5){
536 double discr=
b*
b-4*
a*
c;
538 double u1=(-
b-std::sqrt(discr))/(2*
a);
539 double u2=(-
b+std::sqrt(discr))/(2*
a);
540 double u=(std::abs(u1)<std::abs(u2)) ? u1 : u2;
543 double phi=std::atan2(
y-yc,
x-xc);
def retrieve(aClass, aKey=None)
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Scalar phi() const
phi method
const_pointer_type cptr()
Dereference the pointer.
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
DUMMY Primary Vertex Finder.
Scalar theta() const
theta method
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
return the detector element corresponding to this PRD
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
tp_sort_cosmics(double theta)
bool is_trt(Identifier id) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
ParametersT< 5, Charged, DiscSurface > AtaDisc
const Amg::Vector3D & center() const
Returns the center position of the Surface.
@ u
Enums for curvilinear frames.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Identifier identify() const
return the identifier
bool operator()(const Trk::TrackParameters *par1, const Trk::TrackParameters *par2) const
const Perigee * perigeeParameters() const
return Perigee.
Trk::PrepRawDataCollection< TRT_DriftCircle > TRT_DriftCircleCollection
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
Eigen::Matrix< double, 3, 1 > Vector3D
int phi_module(const Identifier &id) const
ParametersT< 5, Charged, PlaneSurface > AtaPlane
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
def delta_phi(phi1, phi2)
Eigen::Translation< double, 3 > Translation3D
std::array< std::vector< std::vector< Used_t > >, 3 > TRT_DetElemUsedMap
SiSpacePointsSeedMakerEventData EventData
static EventData & getPrivateEventData(InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data)
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
virtual const Trk::Surface & surface() const override final
Element Surface: access to the Surface (straw layer)
IdentifierHash straw_layer_hash(Identifier straw_layer_id) const
straw_layer hash from id - optimized
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw: