|
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 > &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 |
|
|
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 336 of file VertexPointEstimator.cxx.
338 double ret = -999999;
339 double xi1, yi1, xi2, yi2;
342 double h = 0.5*(sqrt(
pow(xi1-xi2,2) +
pow(yi1-yi2,2) ));
343 double l = sqrt(
pow(xc1-xc2,2) +
pow(yc1-yc2,2) );
346 double norm1 = sqrt((xi1-xc1)*(xi1-xc1)+(yi1-yc1)*(yi1-yc1));
347 double norm2 = sqrt((xi1-xc2)*(xi1-xc2)+(yi1-yc2)*(yi1-yc2));
348 if((norm1!=0.) && (norm2!=0.)){
352 double xa = (xi1-xc1)*norm1;
353 double ya = (yi1-yc1)*norm1;
354 double xb = (xi1-xc2)*norm2;
355 double yb = (yi1-yc2)*norm2;
356 double costheta =
xa*
xb + ya*yb;
357 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 373 of file VertexPointEstimator.cxx.
375 double ret = -999999;
376 double xi1, yi1, xi2, yi2;
385 h = 0.5*(sqrt(
pow(xi1-xi2,2) +
pow(yi1-yi2,2) ));
387 double l = sqrt(
pow(xc1-xc2,2) +
pow(yc1-yc2,2) );
395 double norm1 = sqrt(
pow(xi1-xc1,2)+
pow(yi1-yc1,2));
396 double norm2 = sqrt(
pow(xi1-xc2,2)+
pow(yi1-yc2,2));
397 if ((norm1 != 0) && (norm2 != 0)){
399 double xa = (xi1 - xc1)/norm1;
400 double ya = (yi1 - yc1)/norm1;
401 double xb = (xi1 - xc2)/norm2;
402 double yb = (yi1 - yc2)/norm2;
403 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 413 of file VertexPointEstimator.cxx.
429 double A = (xc1 - xc2) / (yc2- yc1);
430 double B = (
r1*
r1 -
r2*
r2 - xc1*xc1 + xc2*xc2 - yc1*yc1 + yc2*yc2) / 2. / ( yc2 -yc1);
432 double b = 2*
A*
B - 2*xc1 -2*
A*yc1;
433 double c =
B*
B - 2*
B*yc1 + xc1*xc1 + yc1*yc1 -
r1*
r1;
442 double A = (yc1 - yc2) / (xc2- xc1);
443 double B = (
r1*
r1 -
r2*
r2 - xc1*xc1 + xc2*xc2 - yc1*yc1 + yc2*yc2) / 2. / ( xc2 -xc1);
445 double b = 2*
A*
B - 2*yc1 -2*
A*xc1;
446 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.);
120 double d0[2],
z0[2],
phi[2],
cotTheta[2],qOverPt[2],RC[2],XC[2],YC[2],RA[2],AB[2];
121 double XSVI[2],YSVI[2],ZSVI[2],RVI[2],DZSVI[2],SS1[2],SS2[2],ZZ1[2],ZZ2[2];
123 double X=0.,
Y=0.,
Z=0.;
124 for (
int I=0;
I<2; ++
I) {
139 DZSVI[
I] = 2.0*DZMAX;
147 const AmgVector(5)& perParam1 = per1->parameters();
149 const AmgVector(5)& perParam2 = per2->parameters();
159 RC[0] = 10.*0.5/(qOverPt[0]*aconst); RC[1] = 10.*0.5/(qOverPt[1]*aconst);
176 RC[0] = 10.*0.5/(qOverPt[0]*aconst); RC[1] = 10.*0.5/(qOverPt[1]*aconst);
177 double U = RC[0] +
d0[0];
188 double DX = XC[1] - XC[0];
189 double DY = YC[1] - YC[0];
190 double D = DX*DX + DY*DY;
193 ATH_MSG_DEBUG(
"Concentric circles, should not happen return (0,0,0)");
197 U = D - RA[0] - RA[1];
202 double hl =
areaVar(XC[0], YC[0], RA[0], XC[1], YC[1], RA[1],
PHI);
206 double Y0 = (-1*XC[0]*YC[1] + XC[1]*YC[0])/D;
207 for (
int I=0;
I<2; ++
I) {
208 AB[
I] = COST*XC[
I] + SINT*YC[
I];
210 U = (XC[1] + XC[0])*(XC[1] - XC[0]) + (YC[1] + YC[0])*(YC[1] - YC[0]);
211 double V = (RA[1] + RA[0])*(RA[1] - RA[0]);
212 double XX = 0.5*(U - V)/D;
213 if ((XX - AB[0])*(XX - AB[0]) > 0.) {
214 U = sqrt((XX - AB[0])*(XX - AB[0]));
216 double YY2 = (RA[0] + U)*(RA[0] - U);
224 for (
int I=0;
I<2; ++
I) {
226 XSVI[
I] = COST*XX - SINT*U;
227 YSVI[
I] = SINT*XX + COST*U;
236 U = D - RA[0] - RA[1];
242 if (AB[0] < AB[1]) XX = AB[0] + RA[0];
247 V = AB[0] - RA[0] - XX;
251 V = AB[1] + RA[1] - XX;
255 XSVI[0] = COST*XX - SINT*Y0;
256 YSVI[0] = SINT*XX + COST*Y0;
260 ATH_MSG_DEBUG(
"XY distance of minimum approach is too large, return (0,0,0)");
266 for (
int J=0; J<nsol; ++J) {
267 U = (XSVI[J] - XC[0])/RC[0];
268 V = -1*(YSVI[J] - YC[0])/RC[0];
269 U = atan2(U,V) -
phi[0];
274 U = (XSVI[J] - XC[1])/RC[1];
275 V = -1*(YSVI[J] - YC[1])/RC[1];
276 U = atan2(U,V) -
phi[1];
281 RVI[J] = sqrt(XSVI[J]*XSVI[J] + YSVI[J]*YSVI[J]);
282 DZSVI[J] = ZZ2[J] - ZZ1[J];
284 ZSVI[0] = 0.5*(ZZ1[0] + ZZ2[0]);
285 ZSVI[1] = 0.5*(ZZ1[1] + ZZ2[1]);
287 if (
std::min(RVI[0],RVI[1]) > RVMAX) {
292 if (
std::min(fabs(DZSVI[0]),fabs(DZSVI[1])) > DZMAX) {
306 if ( nsol == 2 && (fabs(DZSVI[1]) < fabs(DZSVI[0])) ) J = 1;
311 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
Scalar phi() const
phi method
static double areaTriangle(double, double, double, double, double, double)
static const double s_bmagnt
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
Amg::Vector3D intersectionImpl(const Trk::Perigee *per1, const Trk::Perigee *per2, unsigned int flag, int &errorcode, float &deltaPhi, float &deltaR) const
internal implementation
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.
static bool circleIntersection(double, double, double, double, double, double, double &, double &, double &, double &)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
static double areaVar(double, double, double, double, double, double, double &)
DoubleArrayProperty m_maxPhi