|
ATLAS Offline Software
|
creates SCT_ClusterOnTrack objects allowing to calibrate cluster position and error using a given track hypothesis.
More...
#include <ITkStripClusterOnTrackTool.h>
|
| StripClusterOnTrackTool (const std::string &, const std::string &, const IInterface *) |
| AlgTool constructor. More...
|
|
virtual | ~StripClusterOnTrackTool ()=default |
|
virtual StatusCode | initialize () override |
| AlgTool initialisation. More...
|
|
virtual InDet::SCT_ClusterOnTrack * | correct (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx=Gaudi::Hive::currentContext()) const override |
| produces an SCT_ClusterOnTrack for ITk strip clusters using the measured SCT_Cluster and the track prediction. More...
|
|
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 |
|
|
SG::ReadCondHandleKey< RIO_OnTrackErrorScaling > | m_stripErrorScalingKey {this,"ErrorScalingKey", "/Indet/TrkErrorScalingITkStrip", "Key for ITkStrip error scaling conditions data."} |
| toolhandle for central error scaling More...
|
|
IntegerProperty | m_option_errorStrategy {this, "ErrorStrategy", -1, "if ErrorStrategy < 0, keep previous errors else recompute"} |
|
IntegerProperty | m_option_correctionStrategy {this, "CorrectionStrategy", -1, "if CorrectionStrategy >= 0, apply correction to position"} |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
creates SCT_ClusterOnTrack objects allowing to calibrate cluster position and error using a given track hypothesis.
See doxygen of Trk::RIO_OnTrackCreator for details. Different strategies to calibrate the cluster error can be chosen by job Option. Also the handle to the general hit-error scaling is implemented.
Definition at line 35 of file ITkStripClusterOnTrackTool.h.
◆ StoreGateSvc_t
◆ StripClusterOnTrackTool()
ITk::StripClusterOnTrackTool::StripClusterOnTrackTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~StripClusterOnTrackTool()
virtual ITk::StripClusterOnTrackTool::~StripClusterOnTrackTool |
( |
| ) |
|
|
virtualdefault |
◆ correct()
produces an SCT_ClusterOnTrack for ITk strip clusters using the measured SCT_Cluster and the track prediction.
This method is a factory, so the client has to take care of management/deletion of the SCT_ClusterOnTrack.
Implements Trk::IRIO_OnTrackCreator.
Definition at line 82 of file ITkStripClusterOnTrackTool.cxx.
87 ATH_MSG_WARNING(
"Attempt to correct RIO which is not SCT_Cluster with ITk::StripClusterOnTrackTool: returning nullptr");
91 ATH_MSG_VERBOSE(
"STARTING CLUSTER ON TRACK CORRECTION... " << __func__ <<
" " << __LINE__);
101 if (!detectorElement) {
109 double cosAlpha = std::sqrt(1 - sinAlpha * sinAlpha);
111 ATH_MSG_VERBOSE(
"STRIP DIRECTION = " << localstripdir[0] <<
", " << localstripdir[1]);
119 ATH_MSG_VERBOSE(
"TRACK PAR LOCAL POS = " << loct[0] <<
", " << loct[1]);
123 double phiPitchInRad = 0.;
131 ATH_MSG_VERBOSE(
"BARREL ====>>>> DISTANCE*COSALPHA / HALF LENGTH --> " <<
distance*cosAlpha <<
" / " << boundsy);
136 ATH_MSG_VERBOSE(
"DISTANCE TO LARGE COMPARED TO BOUNDS, SETTING TO MAXIMUM");
149 double striphalflength = design->
stripLength(siCellId) / 2.0;
157 ATH_MSG_VERBOSE(
"DISTANCE TO LARGE COMPARED TO BOUNDS, SETTING TO MAXIMUM");
186 if (not detectorElement->
isBarrel()) {
206 double sinAlpha2 = sinAlpha * sinAlpha;
207 double cosAlpha2 = (1. - sinAlpha) * (1. + sinAlpha);;
210 double v1 =
mat(1, 1);
211 mat(0, 0) = (cosAlpha2 *
v0 + sinAlpha2 * v1);
212 mat(1, 0) = (sinAlpha * std::sqrt(cosAlpha2) * (
v0 - v1));
214 mat(1, 1) = (sinAlpha2 *
v0 + cosAlpha2 * v1);
217 ATH_MSG_VERBOSE(
"sinAlpha / sinAlpha2 / cosAlpha2 / weight = " << sinAlpha <<
" / " << sinAlpha2 <<
" / " << cosAlpha2 <<
" / " <<
weight);
236 covariance(0, 0) = prevCov(0, 0);
240 covariance = Trk::ErrorScalingCast<SCTRIO_OnTrackErrorScaling>(*error_scaling)
241 ->getScaledCovariance(std::move(covariance),
false, 0.0);
248 covariance = Trk::ErrorScalingCast<SCTRIO_OnTrackErrorScaling>(*error_scaling)
249 ->getScaledCovariance(std::move(covariance),
true,
258 double sinAlpha2 = sinAlpha * sinAlpha;
259 double cosAlpha2 = (1. - sinAlpha) * (1. + sinAlpha);
260 double sinAlphaCosAlpha = sinAlpha * std::sqrt(cosAlpha2);
263 double radiusAtLocPos = std::hypot(loct.x(), loct.y());
264 double phiPitchAtLocPos = phiPitchInRad*radiusAtLocPos;
268 double dV0 = (cosAlpha2 * covariance(0, 0) + sinAlpha2 * covariance(1, 1) +
269 2. * sinAlphaCosAlpha * covariance(1, 0)) * (
weight *
weight - 1.);
282 covariance(0, 0) += (cosAlpha2 * dV0);
283 covariance(1, 0) += (sinAlphaCosAlpha * dV0);
284 covariance(0, 1) = covariance(1, 0);
285 covariance(1, 1) += (sinAlpha2 * dV0);
288 ATH_MSG_VERBOSE(
"sinAlpha / sinAlpha2 / cosAlpha2 / weight = " << sinAlpha <<
" / " << sinAlpha2 <<
" / " << cosAlpha2 <<
" / " <<
weight );
290 << sinAlpha2 * covariance(1, 1) <<
" + "
291 << 2. * sinAlphaCosAlpha * covariance(1, 0)
294 ATH_MSG_VERBOSE(
"SCALED CLUSTER COVARIANCE = " << covariance(0, 0) <<
", "
295 << covariance(0, 1));
301 detectorElement->
identifyHash(), globalPosition, isbroad);
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ initialize()
StatusCode ITk::StripClusterOnTrackTool::initialize |
( |
| ) |
|
|
overridevirtual |
AlgTool initialisation.
Definition at line 41 of file ITkStripClusterOnTrackTool.cxx.
52 default:
ATH_MSG_ERROR(
" -- NO, UNKNOWN. Pls check jobOptions!");
53 return StatusCode::FAILURE;
55 ATH_MSG_DEBUG(
" will be applied during ITkStripClusterOnTrack making");
59 case -1:
ATH_MSG_DEBUG(
"keep the global position as evaluated");
62 default:
ATH_MSG_ERROR(
" -- NO, UNKNOWN. Pls check jobOptions!");
63 return StatusCode::FAILURE;
65 ATH_MSG_DEBUG(
" will be applied during ITkStripClusterOnTrack making");
◆ 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()
static const InterfaceID& Trk::IRIO_OnTrackCreator::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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_option_correctionStrategy
IntegerProperty ITk::StripClusterOnTrackTool::m_option_correctionStrategy {this, "CorrectionStrategy", -1, "if CorrectionStrategy >= 0, apply correction to position"} |
|
private |
◆ m_option_errorStrategy
IntegerProperty ITk::StripClusterOnTrackTool::m_option_errorStrategy {this, "ErrorStrategy", -1, "if ErrorStrategy < 0, keep previous errors else recompute"} |
|
private |
◆ m_stripErrorScalingKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
std::pair< double, ParamDefs > DefinedParameter
virtual void setOwner(IDataHandleHolder *o)=0
virtual int diodesInRow(const int row) const override
double phiPitch() const
Pitch (inline methods)
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Amg::Vector2D localPosition() const
Access method for the local coordinates, local parameter definitions differ for each surface type.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
const Amg::Vector2D & localPosition() const
return the local position reference
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & globalPosition() const
return global position reference
const InDet::SiWidth & width() const
return width class reference
#define ATH_MSG_WARNING(x)
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
constexpr double ONE_TWELFTH
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
constexpr int pow(int base, int exp) noexcept
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.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Scalar mag() const
mag method
double stripLength(const SiCellId &cellId) const