 |
ATLAS Offline Software
|
#include <VertexPointEstimator.h>
|
typedef std::map< std::string, float > | Values_t |
|
|
| VertexPointEstimator (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~VertexPointEstimator ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
Amg::Vector3D | getCirclesIntersectionPoint (const Trk::Perigee *per1, const Trk::Perigee *per2, unsigned int flag, int &errorcode) const |
| Get intersection point of two track helices. More...
|
|
Amg::Vector3D | getCirclesIntersectionPoint (const Trk::Perigee *per1, const Trk::Perigee *per2, unsigned int flag, int &errorcode, Values_t &decors) const |
| Get intersection point of two track helices. 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, V, H > &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 |
|
|
Amg::Vector3D | intersectionImpl (const Trk::Perigee *per1, const Trk::Perigee *per2, unsigned int flag, int &errorcode, float &deltaPhi, float &deltaR) const |
| internal implementation More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
static double | areaVar (double, double, double, double, double, double, double &) |
|
static double | areaVar (double, double, double, double, double, double, double &, double &, double &) |
|
static bool | circleIntersection (double, double, double, double, double, double, double &, double &, double &, double &) |
|
static bool | secondDegree (double, double, double, double &, double &) |
|
static double | areaTriangle (double, double, double, double, double, double) |
|
Some helper tools like: hits counter
- Author
- Tatjana Lenz , Thomas Koffas
Definition at line 20 of file VertexPointEstimator.h.
◆ StoreGateSvc_t
◆ Values_t
◆ VertexPointEstimator()
InDet::VertexPointEstimator::VertexPointEstimator |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~VertexPointEstimator()
virtual InDet::VertexPointEstimator::~VertexPointEstimator |
( |
| ) |
|
|
virtualdefault |
◆ areaTriangle()
double InDet::VertexPointEstimator::areaTriangle |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
d, |
|
|
double |
e, |
|
|
double |
g, |
|
|
double |
h |
|
) |
| |
|
staticprivate |
◆ areaVar() [1/2]
double InDet::VertexPointEstimator::areaVar |
( |
double |
xc1, |
|
|
double |
yc1, |
|
|
double |
r1, |
|
|
double |
xc2, |
|
|
double |
yc2, |
|
|
double |
r2, |
|
|
double & |
phi |
|
) |
| |
|
staticprivate |
Definition at line 355 of file VertexPointEstimator.cxx.
357 double ret = -999999;
364 double h = 0.5*(sqrt(
pow(xi1-xi2,2) +
pow(yi1-yi2,2) ));
365 double l = sqrt(
pow(xc1-xc2,2) +
pow(yc1-yc2,2) );
368 double norm1 = sqrt((xi1-xc1)*(xi1-xc1)+(yi1-yc1)*(yi1-yc1));
369 double norm2 = sqrt((xi1-xc2)*(xi1-xc2)+(yi1-yc2)*(yi1-yc2));
370 if((norm1!=0.) && (norm2!=0.)){
374 double xa = (xi1-xc1)*norm1;
375 double ya = (yi1-yc1)*norm1;
376 double xb = (xi1-xc2)*norm2;
377 double yb = (yi1-yc2)*norm2;
378 double costheta =
xa*
xb + ya*yb;
379 phi =
M_PI-std::acos(costheta);
◆ areaVar() [2/2]
double InDet::VertexPointEstimator::areaVar |
( |
double |
xc1, |
|
|
double |
yc1, |
|
|
double |
r1, |
|
|
double |
xc2, |
|
|
double |
yc2, |
|
|
double |
r2, |
|
|
double & |
h, |
|
|
double & |
hl, |
|
|
double & |
ddphi |
|
) |
| |
|
staticprivate |
Definition at line 395 of file VertexPointEstimator.cxx.
397 double ret = -999999;
410 h = 0.5*(sqrt(
pow(xi1-xi2,2) +
pow(yi1-yi2,2) ));
412 double l = sqrt(
pow(xc1-xc2,2) +
pow(yc1-yc2,2) );
420 double norm1 = sqrt(
pow(xi1-xc1,2)+
pow(yi1-yc1,2));
421 double norm2 = sqrt(
pow(xi1-xc2,2)+
pow(yi1-yc2,2));
422 if ((norm1 != 0) && (norm2 != 0)){
424 double xa = (xi1 - xc1)/norm1;
425 double ya = (yi1 - yc1)/norm1;
426 double xb = (xi1 - xc2)/norm2;
427 double yb = (yi1 - yc2)/norm2;
428 double costheta =
xa*
xb +ya*yb;
◆ circleIntersection()
bool InDet::VertexPointEstimator::circleIntersection |
( |
double |
xc1, |
|
|
double |
yc1, |
|
|
double |
r1, |
|
|
double |
xc2, |
|
|
double |
yc2, |
|
|
double |
r2, |
|
|
double & |
xi1, |
|
|
double & |
yi1, |
|
|
double & |
xi2, |
|
|
double & |
yi2 |
|
) |
| |
|
staticprivate |
Definition at line 438 of file VertexPointEstimator.cxx.
454 double A = (xc1 - xc2) / (yc2- yc1);
455 double B = (
r1*
r1 -
r2*
r2 - xc1*xc1 + xc2*xc2 - yc1*yc1 + yc2*yc2) / 2. / ( yc2 -yc1);
457 double b = 2*
A*
B - 2*xc1 -2*
A*yc1;
458 double c =
B*
B - 2*
B*yc1 + xc1*xc1 + yc1*yc1 -
r1*
r1;
467 double A = (yc1 - yc2) / (xc2- xc1);
468 double B = (
r1*
r1 -
r2*
r2 - xc1*xc1 + xc2*xc2 - yc1*yc1 + yc2*yc2) / 2. / ( xc2 -xc1);
470 double b = 2*
A*
B - 2*yc1 -2*
A*xc1;
471 double c =
B*
B - 2*
B*xc1 + xc1*xc1 + yc1*yc1 -
r1*
r1;
◆ 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]
◆ decorKeys()
std::vector< std::string > InDet::VertexPointEstimator::decorKeys |
( |
| ) |
|
|
static |
Return list of keys used for decorations.
Definition at line 74 of file VertexPointEstimator.cxx.
76 return {
"deltaPhiTracks",
"DR1R2"};
◆ 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
◆ finalize()
StatusCode InDet::VertexPointEstimator::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getCirclesIntersectionPoint() [1/2]
Get intersection point of two track helices.
circles intersection point calculation
Based on pure geometric arguments. Return error flag if problems.
Definition at line 49 of file VertexPointEstimator.cxx.
◆ getCirclesIntersectionPoint() [2/2]
Get intersection point of two track helices.
Based on pure geometric arguments. Return error flag if problems. Also return dictionary of values for decorations.
Definition at line 61 of file VertexPointEstimator.cxx.
69 decors[
"deltaPhiTracks"],
◆ initialize()
StatusCode InDet::VertexPointEstimator::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::VertexPointEstimator::interfaceID |
( |
| ) |
|
|
static |
◆ intersectionImpl()
internal implementation
Definition at line 83 of file VertexPointEstimator.cxx.
102 double minArcLength(0.);
103 double maxArcLength(0.);
143 for (
int I=0;
I<2; ++
I) {
158 DZSVI[
I] = 2.0*DZMAX;
166 const AmgVector(5)& perParam1 = per1->parameters();
168 const AmgVector(5)& perParam2 = per2->parameters();
178 RC[0] = 10.*0.5/(qOverPt[0]*aconst); RC[1] = 10.*0.5/(qOverPt[1]*aconst);
180 XC[0] = -1*U*
sin(phi[0]);
181 YC[0] = U*
cos(phi[0]);
184 XC[1] = -1*U*
sin(phi[1]);
185 YC[1] = U*
cos(phi[1]);
195 RC[0] = 10.*0.5/(qOverPt[0]*aconst); RC[1] = 10.*0.5/(qOverPt[1]*aconst);
196 double U = RC[0] +
d0[0];
197 XC[0] = -1*U*
sin(phi[0]);
198 YC[0] = U*
cos(phi[0]);
201 XC[1] = -1*U*
sin(phi[1]);
202 YC[1] = U*
cos(phi[1]);
207 double DX = XC[1] - XC[0];
208 double DY = YC[1] - YC[0];
209 double D = DX*DX + DY*DY;
212 ATH_MSG_DEBUG(
"Concentric circles, should not happen return (0,0,0)");
216 U = D - RA[0] - RA[1];
221 double hl =
areaVar(XC[0], YC[0], RA[0], XC[1], YC[1], RA[1],
PHI);
225 double Y0 = (-1*XC[0]*YC[1] + XC[1]*YC[0])/D;
226 for (
int I=0;
I<2; ++
I) {
227 AB[
I] = COST*XC[
I] + SINT*YC[
I];
229 U = (XC[1] + XC[0])*(XC[1] - XC[0]) + (YC[1] + YC[0])*(YC[1] - YC[0]);
230 double V = (RA[1] + RA[0])*(RA[1] - RA[0]);
231 double XX = 0.5*(U - V)/D;
232 if ((XX - AB[0])*(XX - AB[0]) > 0.) {
233 U = sqrt((XX - AB[0])*(XX - AB[0]));
235 double YY2 = (RA[0] + U)*(RA[0] - U);
243 for (
int I=0;
I<2; ++
I) {
245 XSVI[
I] = COST*XX - SINT*U;
246 YSVI[
I] = SINT*XX + COST*U;
255 U = D - RA[0] - RA[1];
261 if (AB[0] < AB[1]) XX = AB[0] + RA[0];
266 V = AB[0] - RA[0] - XX;
270 V = AB[1] + RA[1] - XX;
274 XSVI[0] = COST*XX - SINT*Y0;
275 YSVI[0] = SINT*XX + COST*Y0;
279 ATH_MSG_DEBUG(
"XY distance of minimum approach is too large, return (0,0,0)");
285 for (
int J=0; J<nsol; ++J) {
286 U = (XSVI[J] - XC[0])/RC[0];
287 V = -1*(YSVI[J] - YC[0])/RC[0];
288 U = atan2(U,V) -
phi[0];
293 U = (XSVI[J] - XC[1])/RC[1];
294 V = -1*(YSVI[J] - YC[1])/RC[1];
295 U = atan2(U,V) -
phi[1];
300 RVI[J] = sqrt(XSVI[J]*XSVI[J] + YSVI[J]*YSVI[J]);
301 DZSVI[J] = ZZ2[J] - ZZ1[J];
303 ZSVI[0] = 0.5*(ZZ1[0] + ZZ2[0]);
304 ZSVI[1] = 0.5*(ZZ1[1] + ZZ2[1]);
306 if (
std::min(RVI[0],RVI[1]) > RVMAX) {
311 if (
std::min(fabs(DZSVI[0]),fabs(DZSVI[1])) > DZMAX) {
325 if ( nsol == 2 && (fabs(DZSVI[1]) < fabs(DZSVI[0])) ) J = 1;
330 intPoint(0)=
X; intPoint(1)=
Y; intPoint(2)=
Z;
◆ 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()
◆ secondDegree()
bool InDet::VertexPointEstimator::secondDegree |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c, |
|
|
double & |
y1, |
|
|
double & |
y2 |
|
) |
| |
|
staticprivate |
◆ 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_maxArcLength
DoubleArrayProperty InDet::VertexPointEstimator::m_maxArcLength |
|
private |
Initial value:{this, "MaxArcLength", {10000., 10000., 10000.},
"maximum permitted arc length, track to vertex, depends on the posion of the first measurement"}
Definition at line 91 of file VertexPointEstimator.h.
◆ m_maxDR
DoubleArrayProperty InDet::VertexPointEstimator::m_maxDR |
|
private |
Initial value:{this, "MaxTrkXYDiffAtVtx", {10000., 10000., 10000.},
"maximum XY separation, non-intersecting circles"}
Definition at line 79 of file VertexPointEstimator.h.
◆ m_maxDr
DoubleArrayProperty InDet::VertexPointEstimator::m_maxDr |
|
private |
Initial value:{this, "MaxDeltaR", {5., 10., 10.},
"maximum difference between helix centers"}
Definition at line 97 of file VertexPointEstimator.h.
◆ m_maxDZ
DoubleArrayProperty InDet::VertexPointEstimator::m_maxDZ |
|
private |
Initial value:{this, "MaxTrkZDiffAtVtx", {10000., 10000., 10000.},
"maximum allowed track Z separation at the vertex"}
Definition at line 82 of file VertexPointEstimator.h.
◆ m_maxHl
DoubleArrayProperty InDet::VertexPointEstimator::m_maxHl {this, "MaxHl", {10000., 10000., 10000.}, "maximum ratio H/l"} |
|
private |
◆ m_maxPhi
DoubleArrayProperty InDet::VertexPointEstimator::m_maxPhi |
|
private |
Initial value:{this, "MaxPhi", {0.05, 0.1, 0.1},
"maximum DPhi at the estimated vertex position"}
Definition at line 102 of file VertexPointEstimator.h.
◆ m_maxR
DoubleArrayProperty InDet::VertexPointEstimator::m_maxR |
|
private |
Initial value:{this, "MaxTrkXYValue", {10000., 10000., 10000.},
"maximum allowed vertex radius"}
Definition at line 85 of file VertexPointEstimator.h.
◆ m_minArcLength
DoubleArrayProperty InDet::VertexPointEstimator::m_minArcLength |
|
private |
Initial value:{this, "MinArcLength", {-10000., -10000., -10000.},
"minimum permitted arc length, track to vertex, depends on the posion of the first measurement"}
Definition at line 88 of file VertexPointEstimator.h.
◆ m_minDr
DoubleArrayProperty InDet::VertexPointEstimator::m_minDr |
|
private |
Initial value:{this, "MinDeltaR", {-5., -25., -50.},
"minimum difference between helix centers"}
Definition at line 94 of file VertexPointEstimator.h.
◆ m_returnOnError
BooleanProperty InDet::VertexPointEstimator::m_returnOnError {this, "ReturnOnError", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ s_bmagnt
const double InDet::VertexPointEstimator::s_bmagnt = 2.083 |
|
staticprivate |
The documentation for this class was generated from the following files:
DoubleArrayProperty m_maxDZ
static double areaTriangle(double, double, double, double, double, double)
static const double s_bmagnt
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
DoubleArrayProperty m_minDr
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< DMTest::B > xa
DoubleArrayProperty m_maxR
DoubleArrayProperty m_maxHl
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Amg::Vector3D intersectionImpl(const Trk::Perigee *per1, const Trk::Perigee *per2, unsigned int flag, int &errorcode, float &deltaPhi, float &deltaR) const
internal implementation
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
DoubleArrayProperty m_maxDr
DoubleArrayProperty m_maxDR
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
BooleanProperty m_returnOnError
Eigen::Matrix< double, 3, 1 > Vector3D
double internal_acos(double x)
static bool secondDegree(double, double, double, double &, double &)
DoubleArrayProperty m_minArcLength
DoubleArrayProperty m_maxArcLength
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
constexpr int pow(int base, int exp) noexcept
static bool circleIntersection(double, double, double, double, double, double, double &, double &, double &, double &)
static double areaVar(double, double, double, double, double, double, double &)
DoubleArrayProperty m_maxPhi