|
ATLAS Offline Software
|
Go to the documentation of this file.
28 double minTRTSegmentpT )
45 for(
auto & element :
m_elements) element.set(mp, condObj);
53 std::vector<std::pair<Amg::Vector3D, double> >& Gp,
54 const std::vector<const InDetDD::TRT_BaseElement*>& De,
69 InDet::TRT_DriftCircleCollection::const_iterator ti,te;
71 std::vector<const InDetDD::TRT_BaseElement*>::const_iterator
d=De.begin(),de=De.end();
73 std::vector< std::pair<Amg::Vector3D,double> >
::iterator i=Gp.begin(),i0=Gp.begin(),
ie=Gp.end();
77 if(Gp.empty() || ++
i==
ie) {
87 double A[4]={0., 0., 0., Tp.parameters()[4]};
89 if((*i).second-(*i0).second > 1.) {
90 A[0] = (*i).first.x()-(*i0).first.x();
91 A[1] = (*i).first.y()-(*i0).first.y();
92 A[2] = (*i).first.z()-(*i0).first.z();
93 double As = 1./std::sqrt(
A[0]*
A[0]+
A[1]*
A[1]+
A[2]*
A[2]);
94 A[0]*=As;
A[1]*=As;
A[2]*=As;
100 for(
i=Gp.begin();
i!=
ie; ++
i) {
102 const auto *
w=(*TRTc).indexFindPtr(
id);
104 if(
w!=
nullptr &&
w->begin()!=
w->end()) {
105 ti =
w->begin(); te =
w->end ();
116 if( (*i).second-(*i0).second > 50.) {
117 A[0] = (*i).first.x()-(*i0).first.x();
118 A[1] = (*i).first.y()-(*i0).first.y();
119 A[2] = (*i).first.z()-(*i0).first.z();
120 double As = 1./std::sqrt(
A[0]*
A[0]+
A[1]*
A[1]+
A[2]*
A[2]);
121 A[0]*=As;
A[1]*=As;
A[2]*=As; i0=
i;
135 std::vector<std::pair<Amg::Vector3D, double> >& Gp,
136 const std::vector<const InDetDD::TRT_BaseElement*>& De,
154 InDet::TRT_DriftCircleCollection::const_iterator ti,te;
156 std::vector<const InDetDD::TRT_BaseElement*>::const_iterator
d=De.begin(),de=De.end();
158 std::vector< std::pair<Amg::Vector3D,double> >
::iterator i=Gp.begin(),i0=Gp.begin(),
ie=Gp.end();
163 if(Gp.empty() || ++
i==
ie) {
170 double A[4]={0.,0.,0.,Tp.parameters()[4]};
172 if( (*i).second-(*i0).second > 1.) {
173 A[0] = (*i).first.x()-(*i0).first.x();
174 A[1] = (*i).first.y()-(*i0).first.y();
175 A[2] = (*i).first.z()-(*i0).first.z();
176 double As = 1./std::sqrt(
A[0]*
A[0]+
A[1]*
A[1]+
A[2]*
A[2]);
177 A[0]*=As;
A[1]*=As;
A[2]*=As; i0=
i;
break;
181 for (
i = Gp.begin();
i !=
ie; ++
i) {
184 const auto*
w = (*TRTc).indexFindPtr(
id);
186 if (
w !=
nullptr &&
w->begin() !=
w->end()) {
216 if ((*i).second - (*i0).second > 50.) {
218 A[0] = (*i).first.x() - (*i0).first.x();
219 A[1] = (*i).first.y() - (*i0).first.y();
220 A[2] = (*i).first.z() - (*i0).first.z();
221 double As = 1. / std::sqrt(
A[0] *
A[0] +
A[1] *
A[1] +
A[2] *
A[2]);
240 const double rcut = 2.2;
251 if(std::abs(dmin) < rcut || std::abs(dmax) < rcut) {dmin = -rcut; dmax = rcut;}
253 for(
int j=0; j!=nl; ++j) {
268 double r2 =
r+
e;
if(r2 > rs) r2 = rs;
269 double r1 =
r-
e;
if(r1 >= r2) r1 = r2-2.*
e;
279 if(
n>4990)
goto stab;
292 const double rcut = 2.2 ;
293 const double rs = 2.00;
294 const double sr = 50 ;
304 if(std::abs(dmin) < rcut || std::abs(dmax) < rcut) {dmin = -rcut; dmax = rcut;}
306 for(
int j=0; j!=nl; ++j) {
318 if(
n>4990)
goto stab;
349 double r2 =
r+
e;
if(r2 > rs) r2 = rs;
350 double r1 =
r-
e;
if(r1 >= r2) r1 = r2-2.*
e;
371 const double rs = 2.00;
372 const double sr = 50 ;
398 throw std::runtime_error(
"Too many roads in InDet::TRT_Trajectory_xk::searchStartStop");
400 const double rs = 2.00, rse = 1.85,
sr = 40;
410 else if( D < rse )
w[
e] =-1;
447 bool q = useDritRadius;
477 bool q = useDritRadius;
507 double dz = z1-
z0;
if(std::abs(dz) < 1.)
return;
508 double rz = (r1-r0)/dz;
509 double zv =
z0 - r0/rz;
526 (std::vector<const Trk::MeasurementBase*>& MB)
531 if(
mb) MB.push_back(
mb);
551 std::pair<const Trk::PseudoMeasurementOnTrack*,const Trk::PseudoMeasurementOnTrack* > pms;
555 int nbarrel=0,nendcap=0;
562 if (std::abs(
r->associatedSurface().transform()(2,2)) <.5) nendcap++;
571 if(rio.empty()) {
return nullptr;}
573 if (nbarrel>0 && nendcap>0)
bec=1;
574 else if (nbarrel==0 && nendcap>0)
bec=2;
575 pms=
pseudoMeasurements(&(**rio.begin()).associatedSurface(),&(**rio.rbegin()).associatedSurface(),
bec);
576 if(pms.first) rio.insert(rio.begin(),pms.first);
578 if (std::abs((**rio.rbegin()).associatedSurface().center().z())<2650.) rio.push_back(pms.second);
579 else rio.insert(rio.begin()+1,pms.second);
610 std::pair<const Trk::PseudoMeasurementOnTrack* , const Trk::PseudoMeasurementOnTrack*>
614 if(!firstsurf || !lastsurf)
return std::make_pair(pmon,pmon2);
615 double pseudotheta=0;
617 if(!cylb)
return std::make_pair(pmon,pmon2);
621 if(!cylb)
return std::make_pair(pmon,pmon2);
624 double tempz=lastsurf->
center().z();
631 tempr=lastsurf->
center().perp();
632 if (tempr<1000.) tempz+= (lastsurf->
center().z()>0) ? halfz : -halfz;
634 pseudorot = lastsurf->
transform().rotation();
636 else if (std::abs(lastsurf->
center().z())<2650.) {
638 tempr= lastsurf->
center().perp()+halfz;
639 tempz=lastsurf->
center().z();
641 pseudorot = lastsurf->
transform().rotation();
645 tempr=firstsurf->
center().perp()-halfzfirst;
646 tempz=firstsurf->
center().z();
648 pseudorot = firstsurf->
transform().rotation();
651 pseudotheta=atan2(tempr,std::abs(tempz));
653 if (lastsurf->
center().z()<0) pseudotheta=
M_PI-pseudotheta;
661 if(!Q)
return std::make_pair(pmon,pmon2);
679 if (
bec==0)
return std::make_pair(pmon,pmon2);
691 return std::make_pair(pmon,pmon2);
705 if(!
n1)
return false;
722 if(!
n1)
return false;
755 const double trad = .003;
760 double P42 =
m_parameters.parameters()[4] ; P42 = P42*P42*134.;
773 if( (
br && !barrel) || (!
br && barrel) )
rad+=.1;
780 double covP =
rad*P42;
noise.set(covP*sin2,covP,0.,1.);
806 m_A=
m_B=0;
if(Np<2)
return;
807 double Amax =std::abs(DA);
816 i=0;
int sm=0,
s=0,
l=0;
818 if((
m_SS[
i ].m_NA&1)==(
m_MA[
i ]=0)) {
if(++
s>sm) {sm=
s;
l=
i;}}
else --
s;
819 if((
m_SS[
i+1].m_NA&1)==(
m_MA[
i+1]=0)) {
if(++
s>sm) {sm=
s;
l=1+
i;}}
else --
s;
i+=2;
832 while(++
i!=Np) {
if(
m_U[
i]!=u0) {
break;}}
833 double U1=-1000.,
d=0.;
int m=0;
840 d=1./((U1=
m_U[
i])-u0);
846 (
i=
l);
while(--
i>0) {
if(
m_U[
i]!=u0) {
break;}} U1=-1000.;
853 d=1./((U1=
m_U[
i])-u0);
863 int nm = 0;
s = 0; sm=-1000;
864 for(
int i=0;
i!=
m-1; ++
i) {
868 if((na&1)==0) {
if(na>
l) {
if(++
s>sm) {sm=
s;
nm=
i;}}
else --
s;}
869 else {
if(na<
l) {
if(++
s>sm) {sm=
s;
nm=
i;}}
else --
s;}
894 const double trad = .003;
903 double P42 =
m_parameters.parameters()[4] ; P42 = P42*P42*134.;
909 bool barrel = false ;
919 if( (
br && !barrel) || (!
br && barrel) )
rad+=.1;
926 double covP =
rad*P42;
noise.set(covP*sin2,covP,0.,1.);
946 if(++nworse > 2)
break;
960 if(!Tp.
production((*s)->trackParameters()))
return nullptr;
965 auto tsosn = std::make_unique<Trk::TrackStates>();
971 for(++
s;
s!=
se; ++
s) {
980 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
990 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
1003 auto fq = std::make_unique<Trk::FitQuality>(
m_xi2,
m_ndf);
1004 return new Trk::Track (Tr.
info(),std::move(tsosn),std::move(fq));
1018 if(
w(4, 4) >=
v(4, 4))
return;
1021 double CovPi =
w(4, 4);
1025 double V[15] = {
v(0, 0),
1027 v(0, 2),
v(1, 2),
v(2, 2),
1028 v(0, 3),
v(1, 3),
v(2, 3),
v(3, 3),
1029 v(0, 4),
v(1, 4),
v(2, 4),
v(3, 4),
v(4, 4)};
1030 double P[ 5] = {
p[ 0],
p[ 1],
p[ 2],
p[ 3],
p[ 4]};
1033 double W = (1./CovPi-1./V[14]),
det = V[14]/CovPi, Wd =
W/
det;
1034 double a0 = -V[10]*Wd;
1035 double a1 = -V[11]*Wd;
1036 double a2 = -V[12]*Wd;
1037 double a3 = -V[13]*Wd;
1066 T.setParametersWithCovariance(&T.associatedSurface(),
P,V);
1074 std::ostream& InDet::operator <<
1088 out<<
"Trajectory does not exist"<<std::endl;
1090 out<<
"|-------------------------------------------------------------------------|"
1092 out<<
"| TRAJECTORY "
1109 out<<
"| First and last elements of the road "
1115 out<<
"| First and last elements of the trajectory "
1122 out<<
"|-------------------------------------------------------------------------|"
1124 out<<
"| n | b| c| nlinks | best | status | impact | zlocal | way |"
1126 out<<
"|-------------------------------------------------------------------------|"
1149 <<std::setw(13)<<std::setprecision(6)<<
im
1150 <<std::setw(13)<<std::setprecision(6)<<zl
1151 <<std::setw(13)<<std::setprecision(6)<<
w
1155 out<<
"|-------------------------------------------------------------------------|"
JetConstituentVector::iterator iterator
double findCloseLink(double, double)
Const iterator class for DataVector/DataList.
const int & bestlink() const
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
const int & nlinks() const
virtual const Surface & associatedSurface() const override final
Access to the Surface associated to the Parameters.
const TRT_ExtensionDriftCircleLink_xk & link(int i) const
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
const double & dnegative() const
std::unique_ptr< TrackParameters > convert(bool) const
void trackFindingWithoutDriftTime(double)
interface for track parameter propagation through the magnetic field, using the Trk::PatternTrackPara...
const Amg::Vector3D & center() const
Returns the center position of the Surface.
const double & distance() const
@ u
Enums for curvilinear frames.
#define AmgSymMatrix(dim)
Trk::PatternTrackParameters m_parameters
void buildTrajectoryForPrecisionSeed(bool)
const Trk::IPatternParametersPropagator * m_proptool
bool trackParametersEstimationForLastPoint()
void radiusCorrection(const double &)
static void sort(samiStruct *, int)
Class to handle pseudo-measurements in fitters and on track objects.
Interface for updating Trk::PatternTrackParameters, the fast internal representation of track paramet...
TRT_TrajectoryElement_xk m_elements[400]
bool trackParametersEstimationForFirstPointWithVertexConstraint()
void initiateForPrecisionSeed(std::vector< std::pair< Amg::Vector3D, double > > &, const std::vector< const InDetDD::TRT_BaseElement * > &, const TRT_DriftCircleContainer *&, const Trk::PatternTrackParameters &)
const double & radiusMax() const
void trackFindingWithoutDriftTimeBL(double)
const double & zlocal() const
const Trk::RIO_OnTrack * rioOnTrack()
std::pair< const Trk::PseudoMeasurementOnTrack *, const Trk::PseudoMeasurementOnTrack * > pseudoMeasurements(const Trk::Surface *, const Trk::Surface *, int bec)
void stabline(int, double)
std::ostream & dump(std::ostream &out) const
bool trackParametersEstimationForFirstPoint()
bool trackParametersEstimation(TRT_TrajectoryElement_xk *, TRT_TrajectoryElement_xk *, Trk::PatternTrackParameters &, double)
Eigen::Affine3d Transform3D
const double & dpositive() const
Trk::TrackSegment * convert()
void trackFindingWithDriftTimeBL(double)
void addNoise(const NoiseOnSurface &, PropDirection)
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Trk::MagneticFieldProperties m_fieldprop
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
const double & way() const
Trk::PrepRawDataContainer< TRT_DriftCircleCollection > TRT_DriftCircleContainer
void initiateForTRTSeed(std::vector< std::pair< Amg::Vector3D, double > > &, const std::vector< const InDetDD::TRT_BaseElement * > &, const TRT_DriftCircleContainer *&, const Trk::PatternTrackParameters &)
void buildTrajectoryForTRTSeed(bool)
void trackFindingWithDriftTime(double)
const bool & isBarrel() const
represents the track state (measurement, material, fit parameters and quality) at a surface.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
const TRT_DriftCircle * cluster() const
const Amg::Vector2D & localPosition() const
return the local position reference
virtual bool propagateParameters(const ::EventContext &ctx, PatternTrackParameters &, const Surface &, PatternTrackParameters &, PropDirection, const MagneticFieldProperties &, ParticleHypothesis particle=pion) const =0
Main propagation method for parameters only.
Eigen::Matrix< double, 3, 1 > Vector3D
bool initiateForTRTSeed(bool, const InDetDD::TRT_BaseElement *, InDet::TRT_DriftCircleCollection::const_iterator &, InDet::TRT_DriftCircleCollection::const_iterator &, std::pair< Amg::Vector3D, double > &, const double *, double)
bool initiateForPrecisionSeed(bool, const InDetDD::TRT_BaseElement *, InDet::TRT_DriftCircleCollection::const_iterator &, InDet::TRT_DriftCircleCollection::const_iterator &, std::pair< Amg::Vector3D, double > &, const double *, double)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const bool & isCluster() const
bool isFirstElementBarrel()
const double mb
1mb to cm2
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Translation< double, 3 > Translation3D
std::unique_ptr< Trk::RIO_OnTrack > rioOnTrackSimple() const
bool trackParametersEstimationForPerigeeWithVertexConstraint()
@ PseudoMeasurementOnTrack
double chiSquared() const
returns the of the overall track fit
const double & impact() const
bool production(const TrackParameters *)
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
const double & radiusMin() const
void updateTrackParameters(Trk::PatternTrackParameters &)
Amg::Vector3D momentum() const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Interface class for transforming Trk::PrepRawData to Trk::RIO_OnTrack using a local track hypothesis.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
void set(const TRT_ID *, const Trk::IPatternParametersPropagator *, const Trk::IPatternParametersUpdator *, const Trk::IRIO_OnTrackCreator *, const Trk::IRIO_OnTrackCreator *, double, double, double, double, double)
const Trk::IPatternParametersUpdator * m_updatortool
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
double halflengthZ() const
This method returns the halflengthZ.