|
ATLAS Offline Software
|
#include <TRT_TrackExtensionToolCosmics.h>
|
| TRT_TrackExtensionToolCosmics (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~TRT_TrackExtensionToolCosmics () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual std::vector< const Trk::MeasurementBase * > & | extendTrack (const EventContext &ctx, const Trk::Track &, InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override |
|
virtual std::vector< const Trk::MeasurementBase * > & | extendTrack (const EventContext &ctx, const Trk::TrackParameters *, InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override |
|
virtual Trk::TrackSegment * | findSegment (const EventContext &ctx, const Trk::TrackParameters *, InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override |
|
virtual Trk::Track * | newTrack (const EventContext &ctx, const Trk::Track &, InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override |
|
virtual std::unique_ptr< InDet::ITRT_TrackExtensionTool::IEventData > | newEvent (const EventContext &ctx) const override |
|
virtual MsgStream & | dump (MsgStream &out) const override |
|
virtual std::ostream & | dump (std::ostream &out) const override |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
◆ StoreGateSvc_t
◆ TRT_TrackExtensionToolCosmics()
InDet::TRT_TrackExtensionToolCosmics::TRT_TrackExtensionToolCosmics |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TRT_TrackExtensionToolCosmics()
InDet::TRT_TrackExtensionToolCosmics::~TRT_TrackExtensionToolCosmics |
( |
| ) |
|
|
virtualdefault |
◆ analyze_tpars()
Definition at line 230 of file TRT_TrackExtensionToolCosmics.cxx.
236 std::vector< const Trk::TrackParameters* >::const_iterator parameterIter = tpars->begin();
237 for ( ; parameterIter != tpars->end(); ++parameterIter) {
240 if ( (*parameterIter)->associatedSurface().associatedDetectorElementIdentifier()==0 ) {
245 const Identifier& DCId = (*parameterIter)->associatedSurface().associatedDetectorElementIdentifier();
249 detElements[1]=(*parameterIter)->associatedSurface().associatedDetectorElement()->identifyHash();
258 if(phi_mod<0) phi_mod=31;
264 if(phi_mod>31) phi_mod=0;
271 for(
int i=-1;
i<2;
i++) {
278 if(container==
nullptr) {
286 InDet::TRT_DriftCircleCollection::const_iterator driftCircleIterator = container->begin();
287 for (; driftCircleIterator != container->end(); ++driftCircleIterator) {
290 const Trk::Surface &dc_surface=(*driftCircleIterator)->detectorElement()->surface((*driftCircleIterator)->identify());
293 std::optional<Amg::Vector2D> lpos=dc_surface.
globalToLocal((*parameterIter)->position());
300 double dist_locz=std::abs(lpos->y());
313 circ=(*driftCircleIterator);
321 if (lastz<-9999) lastz=(**parameterIter).position().z();
322 if (std::abs(lastz-(**parameterIter).position().z())>500.)
return;
323 lastz=(**parameterIter).position().z();
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ dump() [1/2]
MsgStream & InDet::TRT_TrackExtensionToolCosmics::dump |
( |
MsgStream & |
out | ) |
const |
|
overridevirtual |
◆ dump() [2/2]
std::ostream & InDet::TRT_TrackExtensionToolCosmics::dump |
( |
std::ostream & |
out | ) |
const |
|
overridevirtual |
◆ dumpConditions()
MsgStream & InDet::TRT_TrackExtensionToolCosmics::dumpConditions |
( |
MsgStream & |
out | ) |
|
|
staticprotected |
◆ dumpEvent()
MsgStream & InDet::TRT_TrackExtensionToolCosmics::dumpEvent |
( |
MsgStream & |
out | ) |
|
|
staticprotected |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extendTrack() [1/2]
◆ extendTrack() [2/2]
Implements InDet::ITRT_TrackExtensionTool.
Definition at line 352 of file TRT_TrackExtensionToolCosmics.cxx.
362 std::vector<Identifier> vecID;
363 std::vector<const Trk::TrackParameters*> vecTP;
367 std::vector<const Trk::TrackParameters* >* tpars_down=
nullptr;
368 std::vector<const Trk::TrackParameters* >* tpars_up=
nullptr;
379 InDet::TRT_DriftCircleContainer::const_iterator
382 if ((**w).empty())
continue;
383 const Trk::Surface &surf=(**(**w).begin()).detectorElement()->surface();
396 vecTP.push_back(newpar);
398 tpars_down=
new std::vector<const Trk::TrackParameters* >;
399 tpars_up=
new std::vector<const Trk::TrackParameters* >;
401 if(!tpars_down || !tpars_up)
return event_data.
m_measurement;
405 for (
const auto *tmppar : vecTP){
406 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);
407 else tpars_down->push_back(tmppar);
410 if (!tpars_up->empty())
std::reverse(tpars_up->begin(),tpars_up->end());
422 std::vector< const Trk::TrackParameters* >::const_iterator parameterIter= tpars_up->begin();
423 for ( ; parameterIter != tpars_up->end(); ++parameterIter) {
424 delete *parameterIter;
430 std::vector< const Trk::TrackParameters* >::const_iterator parameterIter = tpars_down->begin();
431 for ( ; parameterIter != tpars_down->end(); ++parameterIter) {
432 delete *parameterIter;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode InDet::TRT_TrackExtensionToolCosmics::finalize |
( |
| ) |
|
|
overridevirtual |
◆ findBoundarySurface()
◆ findSegment()
◆ initialize()
StatusCode InDet::TRT_TrackExtensionToolCosmics::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & InDet::ITRT_TrackExtensionTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ intersect()
Definition at line 491 of file TRT_TrackExtensionToolCosmics.cxx.
494 double sinTheta =
std::sin(per->parameters()[3]);
495 double r= (std::abs(per->parameters()[
Trk::qOverP]) > 1
e-10) ? -sinTheta/(per->parameters()[
Trk::qOverP]*0.6) : 1e6;
496 double xc=per->position().x()-
r*
std::sin(per->parameters()[2]);
497 double yc=per->position().y()+
r*
std::cos(per->parameters()[2]);
498 double phi0=std::atan2(per->position().y()-yc,per->position().x()-xc);
500 double z0=per->position().z();
502 if (std::abs(surf->
normal().z())>0.5){
520 double discr=
b*
b-4*
a*
c;
522 double u1=(-
b-std::sqrt(discr))/(2*
a);
523 double u2=(-
b+std::sqrt(discr))/(2*
a);
524 double u=(std::abs(u1)<std::abs(u2)) ? u1 : u2;
527 double phi=std::atan2(
y-yc,
x-xc);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ newEvent()
◆ newTrack()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_extrapolator
◆ m_idHelper
◆ m_nprint
int InDet::TRT_TrackExtensionToolCosmics::m_nprint {} |
|
protected |
◆ m_outputlevel
int InDet::TRT_TrackExtensionToolCosmics::m_outputlevel {} |
|
protected |
◆ m_riontrackN
◆ m_roadwidth
DoubleProperty InDet::TRT_TrackExtensionToolCosmics::m_roadwidth |
|
protected |
◆ m_roadwidth_locz
DoubleProperty InDet::TRT_TrackExtensionToolCosmics::m_roadwidth_locz |
|
protected |
◆ m_searchNeighbour
BooleanProperty InDet::TRT_TrackExtensionToolCosmics::m_searchNeighbour |
|
protected |
◆ m_trtid
const TRT_ID* InDet::TRT_TrackExtensionToolCosmics::m_trtid {} |
|
protected |
◆ m_trtname
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
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 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.
Scalar theta() const
theta method
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
return the detector element corresponding to this PRD
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
ParametersT< TrackParametersDim, Charged, DiscSurface > AtaDisc
bool is_trt(Identifier id) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
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.
virtual void setOwner(IDataHandleHolder *o)=0
::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.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
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 void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Identifier identify() const
return the identifier
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
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
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
def delta_phi(phi1, phi2)
ParametersT< TrackParametersDim, Charged, PlaneSurface > AtaPlane
Eigen::Translation< double, 3 > Translation3D
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SiSpacePointsSeedMakerEventData EventData
static EventData & getPrivateEventData(InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
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)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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: