|
ATLAS Offline Software
|
#include <TrigInDetTrackFitter.h>
|
| TrigInDetTrackFitter (const std::string &, const std::string &, const IInterface *) |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | finalize () |
|
std::pair< Trk::Track *, Trk::Track * > | fitTrack (const Trk::Track &, MagField::AtlasFieldCache &, const EventContext &ctx, const Trk::ParticleHypothesis &matEffects=Trk::pion, const bool addTPtoTSoS=false) const |
|
void | fit (const TrackCollection &, TrackCollection &, const EventContext &, const Trk::ParticleHypothesis &matEffects=Trk::pion) const |
|
void | fit (const TrackCollection &, TrackCollection &, TrackCollection &, const EventContext &, const Trk::ParticleHypothesis &matEffects=Trk::pion, const bool addTPtoTSoS=false) const |
|
StatusCode | getUnbiasedResiduals (const Trk::Track &, std::vector< TrigL2HitResidual > &, const EventContext &) const |
|
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 |
|
|
Trk::TrkTrackState * | extrapolate (Trk::TrkTrackState *, Trk::TrkPlanarSurface *, Trk::TrkPlanarSurface *, MagField::AtlasFieldCache &) const |
|
void | getMagneticField (double[3], double *, MagField::AtlasFieldCache &) const |
|
void | correctScale (Trk::TrkTrackState *) const |
|
Trk::TrackStateOnSurface * | createTrackStateOnSurface (Trk::TrkBaseNode *pN, const bool, const EventContext &ctx) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 33 of file TrigInDetTrackFitter.h.
◆ StoreGateSvc_t
◆ TrigInDetTrackFitter()
TrigInDetTrackFitter::TrigInDetTrackFitter |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ correctScale()
◆ createTrackStateOnSurface()
Definition at line 820 of file TrigInDetTrackFitter.cxx.
824 std::unique_ptr<Trk::TrackParameters> pTP{};
825 if(
type==0)
return pTSS;
830 for(
int i=0;
i<5;
i++) {
831 for(
int j=0;j<5;j++) {
841 if(pPS==
nullptr)
return pTSS;
854 if(pLS==
nullptr)
return pTSS;
857 ATH_MSG_WARNING(
"Phi out of range when correcting Trk::TrackStateOnSurface");
861 pTP=std::make_unique<Trk::AtaStraightLine>(pTS->
getTrackState(0),
869 if(pTP==
nullptr)
return nullptr;
870 std::unique_ptr<Trk::RIO_OnTrack> pRIO{
m_ROTcreator->correct(*pPRD,*pTP,ctx)};
874 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
879 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePatternwTP;
◆ 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
◆ extrapolate()
Definition at line 133 of file TrigInDetTrackFitter.cxx.
138 const double C=0.02999975/1000.0;
139 const double minStep=30.0;
141 double J[5][5],Rf[5],AG[5][5],Gf[5][5],
A[5][5];
144 bool samePlane=
false;
158 double gP[3],gPi[3],lP[3],gV[3],
a,
b,
c,
s,J0[7][5],
descr,CQ,Ac,Av,Cc;
159 double V[3],
P[3],M[3][3],D[4],Jm[7][7],
160 J1[5][7],gB[3],gBi[3],gBf[3],dBds[3],Buf[5][7],DVx,DVy,DVz;
164 double sint,
cost,sinf,cosf;
169 memset(&J0[0][0],0,
sizeof(J0));
178 J0[0][0]=L[0][0];J0[0][1]=L[0][1];
179 J0[1][0]=L[1][0];J0[1][1]=L[1][1];
180 J0[2][0]=L[2][0];J0[2][1]=L[2][1];
181 J0[3][2]=-sinf*sint;J0[3][3]=cosf*
cost;
182 J0[4][2]= cosf*sint;J0[4][3]=sinf*
cost;
194 J0[3][2]=-sinf*sint;J0[3][3]=cosf*
cost;
195 J0[4][2]= cosf*sint;J0[4][3]=sinf*
cost;
200 for(
i=0;
i<3;
i++) gPi[
i]=gP[
i];
204 for(
i=0;
i<3;
i++) gBi[
i]=gB[
i];
206 c=D[0]*gP[0]+D[1]*gP[1]+D[2]*gP[2]+D[3];
207 b=D[0]*gV[0]+D[1]*gV[1]+D[2]*gV[2];
208 a=0.5*CQ*(gB[0]*(D[1]*gV[2]-D[2]*gV[1])+
209 gB[1]*(D[2]*gV[0]-D[0]*gV[2])+
210 gB[2]*(D[0]*gV[1]-D[1]*gV[0]));
220 bool useExpansion=
true;
224 useExpansion =
false;
231 int signb = (
b<0.0)?-1:1;
232 sl = (-
b+signb*sqrt(
descr))/(2*
a);
235 if(fabs(sl)<minStep) nStepMax=1;
238 nStepMax=(
int)(fabs(sl)/minStep)+1;
240 if((nStepMax<0)||(nStepMax>1000))
246 DVx=gV[1]*gB[2]-gV[2]*gB[1];
247 DVy=gV[2]*gB[0]-gV[0]*gB[2];
248 DVz=gV[0]*gB[1]-gV[1]*gB[0];
250 P[0]=gP[0]+gV[0]*sl+Ac*DVx;
251 P[1]=gP[1]+gV[1]*sl+Ac*DVy;
252 P[2]=gP[2]+gV[2]*sl+Ac*DVz;
259 for(
i=0;
i<3;
i++) gBf[
i]=gB[
i];
262 dBds[
i]=(gBf[
i]-gBi[
i])/sl;
268 c=D[0]*gP[0]+D[1]*gP[1]+D[2]*gP[2]+D[3];
269 b=D[0]*gV[0]+D[1]*gV[1]+D[2]*gV[2];
270 a=0.5*CQ*(gB[0]*(D[1]*gV[2]-D[2]*gV[1])+
271 gB[1]*(D[2]*gV[0]-D[0]*gV[2])+
272 gB[2]*(D[0]*gV[1]-D[1]*gV[0]));
276 useExpansion =
false;
277 else useExpansion =
true;
290 int signb = (
b<0.0)?-1:1;
291 sl = (-
b+signb*sqrt(
descr))/(2*
a);
297 DVx=gV[1]*gB[2]-gV[2]*gB[1];
298 DVy=gV[2]*gB[0]-gV[0]*gB[2];
299 DVz=gV[0]*gB[1]-gV[1]*gB[0];
301 P[0]=gP[0]+gV[0]*
ds+Ac*DVx;
302 P[1]=gP[1]+gV[1]*
ds+Ac*DVy;
303 P[2]=gP[2]+gV[2]*
ds+Ac*DVz;
309 gV[
i]=V[
i];gP[
i]=
P[
i];
311 for(
i=0;
i<3;
i++) gB[
i]+=dBds[
i]*
ds;
315 Rf[0]=lP[0];Rf[1]=lP[1];
316 Rf[2]=atan2(V[1],V[0]);
326 gV[0]=sint*cosf;gV[1]=sint*sinf;gV[2]=
cost;
329 for(
i=0;
i<3;
i++) gP[
i]=gPi[
i];
333 gB[
i]=0.5*(gBi[
i]+gBf[
i]);
336 c=D[0]*gP[0]+D[1]*gP[1]+D[2]*gP[2]+D[3];
337 b=D[0]*gV[0]+D[1]*gV[1]+D[2]*gV[2];
338 a=CQ*(gB[0]*(D[1]*gV[2]-D[2]*gV[1])+
339 gB[1]*(D[2]*gV[0]-D[0]*gV[2])+
340 gB[2]*(D[0]*gV[1]-D[1]*gV[0]));
344 useExpansion =
false;
345 else useExpansion =
true;
358 int signb = (
b<0.0)?-1:1;
366 DVx=gV[1]*gB[2]-gV[2]*gB[1];
367 DVy=gV[2]*gB[0]-gV[0]*gB[2];
368 DVz=gV[0]*gB[1]-gV[1]*gB[0];
370 P[0]=gP[0]+gV[0]*
s+Ac*DVx;
371 P[1]=gP[1]+gV[1]*
s+Ac*DVy;
372 P[2]=gP[2]+gV[2]*
s+Ac*DVz;
374 V[0]=gV[0]+Av*DVx;V[1]=gV[1]+Av*DVy;V[2]=gV[2]+Av*DVz;
375 if (std::abs(V[2]) > 1.0) {
381 memset(&Jm[0][0],0,
sizeof(Jm));
385 double coeff[3], dadVx,dadVy,dadVz,dadQ,dsdx,dsdy,dsdz,dsdVx,dsdVy,dsdVz,dsdQ;
390 dadVx=0.5*CQ*(-D[1]*gB[2]+D[2]*gB[1]);
391 dadVy=0.5*CQ*( D[0]*gB[2]-D[2]*gB[0]);
392 dadVz=0.5*CQ*(-D[0]*gB[1]+D[1]*gB[0]);
393 dadQ=0.5*
C*(D[0]*DVx+D[1]*DVy+D[2]*DVz);
403 Jm[0][0]=1.0+V[0]*dsdx;
407 Jm[0][3]=
s+V[0]*dsdVx;
408 Jm[0][4]= V[0]*dsdVy+Ac*gB[2];
409 Jm[0][5]= V[0]*dsdVz-Ac*gB[1];
410 Jm[0][6]= V[0]*dsdQ+Cc*DVx;
413 Jm[1][1]=1.0+V[1]*dsdy;
416 Jm[1][3]= V[1]*dsdVx-Ac*gB[2];
417 Jm[1][4]=
s+V[1]*dsdVy;
418 Jm[1][5]= V[1]*dsdVz+Ac*gB[0];
419 Jm[1][6]= V[1]*dsdQ+Cc*DVy;
423 Jm[2][2]=1.0+V[2]*dsdz;
424 Jm[2][3]= V[2]*dsdVx+Ac*gB[1];
425 Jm[2][4]= V[2]*dsdVy-Ac*gB[0];
426 Jm[2][5]=
s+V[2]*dsdVz;
427 Jm[2][6]= V[2]*dsdQ+Cc*DVz;
429 Jm[3][0]=dsdx*CQ*DVx;
430 Jm[3][1]=dsdy*CQ*DVx;
431 Jm[3][2]=dsdz*CQ*DVx;
433 Jm[3][3]=1.0+dsdVx*CQ*DVx;
434 Jm[3][4]=CQ*(dsdVy*DVx+
s*gB[2]);
435 Jm[3][5]=CQ*(dsdVz*DVx-
s*gB[1]);
437 Jm[3][6]=(CQ*dsdQ+
C*
s)*DVx;
439 Jm[4][0]=dsdx*CQ*DVy;
440 Jm[4][1]=dsdy*CQ*DVy;
441 Jm[4][2]=dsdz*CQ*DVy;
443 Jm[4][3]=CQ*(dsdVx*DVy-
s*gB[2]);
444 Jm[4][4]=1.0+dsdVy*CQ*DVy;
445 Jm[4][5]=CQ*(dsdVz*DVy+
s*gB[0]);
447 Jm[4][6]=(CQ*dsdQ+
C*
s)*DVy;
449 Jm[5][0]=dsdx*CQ*DVz;
450 Jm[5][1]=dsdy*CQ*DVz;
451 Jm[5][2]=dsdz*CQ*DVz;
452 Jm[5][3]=CQ*(dsdVx*DVz+
s*gB[1]);
453 Jm[5][4]=CQ*(dsdVy*DVz-
s*gB[0]);
454 Jm[5][5]=1.0+dsdVz*CQ*DVz;
455 Jm[5][6]=(CQ*dsdQ+
C*
s)*DVz;
459 memset(&J1[0][0],0,
sizeof(J1));
461 J1[0][0]=M[0][0];J1[0][1]=M[0][1];J1[0][2]=M[0][2];
462 J1[1][0]=M[1][0];J1[1][1]=M[1][1];J1[1][2]=M[1][2];
463 J1[2][3]=-V[1]/(V[0]*V[0]+V[1]*V[1]);
464 J1[2][4]= V[0]/(V[0]*V[0]+V[1]*V[1]);
465 J1[3][5]=-1.0/sqrt(1-V[2]*V[2]);
471 Buf[j][
i]=J1[j][0]*Jm[0][
i]+J1[j][1]*Jm[1][
i]+J1[j][2]*Jm[2][
i];
472 Buf[2][
i]=J1[2][3]*Jm[3][
i]+J1[2][4]*Jm[4][
i];
473 Buf[3][
i]=J1[3][5]*Jm[5][
i];
481 J[
i][0]=Buf[
i][0]*J0[0][0]+Buf[
i][1]*J0[1][0]+Buf[
i][2]*J0[2][0];
482 J[
i][1]=Buf[
i][0]*J0[0][1]+Buf[
i][1]*J0[1][1]+Buf[
i][2]*J0[2][1];
483 J[
i][2]=Buf[
i][3]*J0[3][2]+Buf[
i][4]*J0[4][2];
484 J[
i][3]=Buf[
i][3]*J0[3][3]+Buf[
i][4]*J0[4][3]+Buf[
i][5]*J0[5][3];
492 J[
i][0]=Buf[
i][0]*J0[0][0]+Buf[
i][1]*J0[1][0];
494 J[
i][2]=Buf[
i][0]*J0[0][2]+Buf[
i][1]*J0[1][2]+Buf[
i][3]*J0[3][2]+Buf[
i][4]*J0[4][2];
495 J[
i][3]=Buf[
i][3]*J0[3][3]+Buf[
i][4]*J0[4][3]+Buf[
i][5]*J0[5][3];
506 memset(&J[0][0],0,
sizeof(J));
507 for(
i=0;
i<5;
i++) J[
i][
i]=1.0;
510 for(
i=0;
i<5;
i++)
for(j=0;j<5;j++)
514 for(
i=0;
i<5;
i++)
for(j=
i;j<5;j++)
517 for(
m=0;
m<5;
m++) Gf[
i][j]+=AG[
i][
m]*J[j][
m];
526 for(
i=0;
i<4;
i++) Rtmp[
i] = Rf[
i];
527 Rtmp[4] = 0.001*Rf[4];
552 for(
i=0;
i<5;
i++) for(j=
i;j<5;j++)
558 for(
i=0;
i<5;
i++)
for(j=0;j<5;j++)
561 for(
m=0;
m<5;
m++)
A[
i][j]+=AG[
m][
i]*Gi(
m,j);
◆ finalize()
StatusCode TrigInDetTrackFitter::finalize |
( |
| ) |
|
|
virtual |
Definition at line 91 of file TrigInDetTrackFitter.cxx.
93 ATH_MSG_INFO(
"==============================================================");
94 ATH_MSG_INFO(
"TrigInDetTrackFitter::finalize() - LVL2 Track fit Statistics: ");
100 ATH_MSG_INFO(
"==============================================================");
101 return StatusCode::SUCCESS;
◆ fit() [1/2]
◆ fit() [2/2]
Implements ITrigInDetTrackFitter.
Definition at line 575 of file TrigInDetTrackFitter.cxx.
580 if (!fieldCondObj.isValid()) {
585 fieldCondObj->getInitializedCache (fieldCache);
591 std::tie(fittedTrack,fittedTrackwTP) =
fitTrack(**trIt, fieldCache, ctx, matEffects, addTPtoTSoS);
592 if (fittedTrack!=
nullptr) {
595 if (addTPtoTSoS && fittedTrackwTP!=
nullptr) {
596 fittedTrackswTP.
push_back(fittedTrackwTP);
◆ fitTrack()
Definition at line 601 of file TrigInDetTrackFitter.cxx.
604 if(trackPars==
nullptr) {
606 return std::make_pair(
nullptr,
nullptr);
611 Rk[0] = trackPars->parameters()[
Trk::d0];
612 Rk[1] = trackPars->parameters()[
Trk::z0];
613 Rk[2] = trackPars->parameters()[
Trk::phi0];
616 double trk_theta = trackPars->parameters()[
Trk::theta];
618 double trk_qOverP = trackPars->parameters()[
Trk::qOverP];
619 Rk[4] = 1000.0*trk_qOverP;
620 double trk_Pt =
sin(trk_theta)/trk_qOverP;
622 if(fabs(trk_Pt)<100.0)
624 ATH_MSG_DEBUG(
"Estimated Pt is too low "<<trk_Pt<<
" - skipping fit");
625 return std::make_pair(
nullptr,
nullptr);
630 std::vector<Trk::TrkBaseNode*> vpTrkNodes;
631 std::vector<Trk::TrkTrackState*> vpTrackStates;
632 vpTrackStates.reserve(vpTrkNodes.size() + 1);
634 int nHits=vpTrkNodes.size();
637 if(!trackResult)
return std::make_pair(
nullptr,
nullptr);
642 double Gk[5][5] = {{100.0, 0, 0, 0, 0},
652 vpTrackStates.push_back(pTS);
655 ATH_MSG_VERBOSE(
"Initial params: locT="<<Rk[0]<<
" locL="<<Rk[1]<<
" phi="<<Rk[2]
656 <<
" theta="<<Rk[3]<<
" Q="<<Rk[4]<<
" pT="<<
sin(Rk[3])/Rk[4]<<
" GeV");
665 for(
auto pnIt = vpTrkNodes.begin(); pnIt!=vpTrkNodes.end(); ++pnIt) {
666 pSE=(*pnIt)->getSurface();
671 vpTrackStates.push_back(pNS);
673 (*pnIt)->validateMeasurement(pNS);
675 if((*pnIt)->isValidated())
677 chi2tot+=(*pnIt)->getChi2();
678 ndoftot+=(*pnIt)->getNdof();
680 (*pnIt)->updateTrackState(pNS);
683 if(fabs(est_Pt)<200.0)
685 ATH_MSG_VERBOSE(
"Estimated Pt is too low "<<est_Pt<<
" - skipping fit");
700 for(
auto ptsIt = vpTrackStates.rbegin();ptsIt!=vpTrackStates.rend();++ptsIt)
702 (*ptsIt)->runSmoother();
704 pTS=(*vpTrackStates.begin());
717 bool bad_cov =
false;
719 for(
int i=0;
i<5;
i++) {
723 ATH_MSG_DEBUG(
"REGTEST: cov(" <<
i <<
"," <<
i <<
") =" << cov_diag <<
" < 0, reject track");
727 for(
int j=
i+1;j<5;j++) {
732 if((ndoftot<0) || (fabs(
pt)<100.0) || (std::isnan(
pt)) || bad_cov)
734 ATH_MSG_DEBUG(
"Fit failed - possibly floating point problem");
741 std::unique_ptr<Trk::Perigee> perigeewTP = (addTPtoTSoS) ? std::make_unique<Trk::Perigee>(
d0,
z0,
phi0,
theta,
qOverP, perigeeSurface,
cov) :
nullptr;
743 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
745 auto pParVec = std::make_unique<Trk::TrackStates>();
746 auto pParVecwTP = std::make_unique<Trk::TrackStates>();
748 pParVec->reserve(vpTrkNodes.size()+1);
755 pParVecwTP->reserve(vpTrkNodes.size() + 1);
756 pParVecwTP->push_back(
759 for (
auto pnIt = vpTrkNodes.begin(); pnIt != vpTrkNodes.end(); ++pnIt) {
760 if((*pnIt)->isValidated()) {
765 pParVec->push_back(pTSS);
767 if(pTSSwTP!=
nullptr) {
768 pParVecwTP->push_back(pTSSwTP);
780 pParVec->push_back((*tSOS)->clone());
788 <<
" eta0="<<
eta<<
" pt="<<
pt);
790 auto pFQ= std::make_unique<Trk::FitQuality>(chi2tot,ndoftot);
792 info.setParticleHypothesis(matEffects);
793 fittedTrack =
new Trk::Track(
info, std::move(pParVec), std::move(pFQ));
795 auto pFQwTP=std::make_unique<Trk::FitQuality>(chi2tot,ndoftot);
797 infowTP.setParticleHypothesis(matEffects);
798 fittedTrackwTP =
new Trk::Track(infowTP, std::move(pParVecwTP), std::move(pFQwTP));
804 ATH_MSG_DEBUG(
"Forward Kalman filter: extrapolation failure ");
807 for(
auto pnIt = vpTrkNodes.begin(); pnIt!=vpTrkNodes.end(); ++pnIt) {
808 delete((*pnIt)->getSurface());
812 for(
auto ptsIt = vpTrackStates.begin();ptsIt!=vpTrackStates.end();++ptsIt) {
815 vpTrackStates.clear();
817 return std::make_pair(fittedTrack,fittedTrackwTP);
◆ getMagneticField()
◆ getUnbiasedResiduals()
Implements ITrigInDetTrackFitter.
Definition at line 891 of file TrigInDetTrackFitter.cxx.
895 if(trackPars==
nullptr) {
897 return StatusCode::FAILURE;
903 if (!fieldCondObj.isValid()) {
905 return StatusCode::FAILURE;
908 fieldCondObj->getInitializedCache (fieldCache);
909 std::vector<Trk::TrkBaseNode*> vpTrkNodes;
910 std::vector<Trk::TrkTrackState*> vpTrackStates;
912 double trk_theta = trackPars->parameters()[
Trk::theta];
913 double trk_qOverP = trackPars->parameters()[
Trk::qOverP];
914 double Pt =
sin(trk_theta)/trk_qOverP;
917 ATH_MSG_DEBUG(
"TrigL2ResidualCalculator failed -- Estimated Pt is too low "<<
Pt);
918 return StatusCode::FAILURE;
927 return StatusCode::FAILURE;
942 Rk[0] = trackPars->parameters()[
Trk::d0];
943 Rk[1] = trackPars->parameters()[
Trk::z0];
944 Rk[2] = trackPars->parameters()[
Trk::phi0];
947 trk_theta = trackPars->parameters()[
Trk::theta];
949 Rk[4] = 1000.0*trackPars->parameters()[
Trk::qOverP];
955 double Gk[5][5] = {{100.0, 0, 0, 0, 0},
965 vpTrackStates.push_back(pTS);
967 ATH_MSG_DEBUG(
"Initial params: locT="<<Rk[0]<<
" locL="<<Rk[1]<<
" phi="<<Rk[2]
968 <<
" theta="<<Rk[3]<<
" Q="<<Rk[4]<<
" pT="<<
sin(Rk[3])/Rk[4]);
973 for(pnIt=vpTrkNodes.begin();pnIt!=pnEnd;++pnIt)
975 pSE=(*pnIt)->getSurface();
981 vpTrackStates.push_back(pNS);
983 (*pnIt)->validateMeasurement(pNS);
985 if((*pnIt)!=pMaskedNode)
987 (*pnIt)->updateTrackState(pNS);
1008 std::vector<Trk::TrkTrackState*>::reverse_iterator ptsrIt(vpTrackStates.rbegin()),
1009 ptsrEnd(vpTrackStates.rend());
1011 for(;ptsrIt!=ptsrEnd;++ptsrIt)
1013 (*ptsrIt)->runSmoother();
1018 double r[2],V[2][2];
1048 if((V[0][0]>0.0) && (V[1][1]>0.0)) {
1050 r[1],
r[1]*sqrt(V[1][1])));
1060 ATH_MSG_DEBUG(
"Forward Kalman filter: extrapolation failure ");
1064 ptsIt!=vpTrackStates.end();++ptsIt)
delete (*ptsIt);
1065 vpTrackStates.clear();
1068 pnIt=vpTrkNodes.begin();pnEnd=vpTrkNodes.end();
1069 for(;pnIt!=pnEnd;++pnIt)
1071 delete((*pnIt)->getSurface());
1076 if(OK)
return StatusCode::SUCCESS;
1077 else return StatusCode::FAILURE;
◆ initialize()
StatusCode TrigInDetTrackFitter::initialize |
( |
| ) |
|
|
virtual |
◆ 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& ITrigInDetTrackFitter::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_correctClusterPos
bool TrigInDetTrackFitter::m_correctClusterPos |
|
private |
◆ m_DChi2
double TrigInDetTrackFitter::m_DChi2 |
|
private |
◆ m_detStore
◆ m_doBremm
bool TrigInDetTrackFitter::m_doBremm |
|
private |
◆ m_doMultScatt
bool TrigInDetTrackFitter::m_doMultScatt |
|
private |
◆ m_evtStore
◆ m_fieldCondObjInputKey
◆ m_fitErrorsDivergence
std::atomic<size_t> TrigInDetTrackFitter::m_fitErrorsDivergence |
|
mutableprivate |
◆ m_fitErrorsLowPt
std::atomic<size_t> TrigInDetTrackFitter::m_fitErrorsLowPt |
|
mutableprivate |
◆ m_fitErrorsUnresolved
std::atomic<size_t> TrigInDetTrackFitter::m_fitErrorsUnresolved |
|
mutableprivate |
◆ m_idHelper
◆ m_nTracksTotal
std::atomic<size_t> TrigInDetTrackFitter::m_nTracksTotal |
|
mutableprivate |
◆ m_pixelId
◆ m_ROTcreator
◆ m_sctId
◆ m_trackMaker
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const AtlasDetectorID * m_idHelper
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
bool is_pixel(Identifier id) const
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
std::pair< Trk::Track *, Trk::Track * > fitTrack(const Trk::Track &, MagField::AtlasFieldCache &, const EventContext &ctx, const Trk::ParticleHypothesis &matEffects=Trk::pion, const bool addTPtoTSoS=false) const
Contains information about the 'fitter' of this track.
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
void applyMultipleScattering()
void transformPointToLocal(const double *, double *)
void transformPointToGlobal(const double *, double *)
bool is_sct(Identifier id) const
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
std::atomic< size_t > m_nTracksTotal
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Scalar theta() const
theta method
double getRotMatrix(int, int)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
void fit(const TrackCollection &, TrackCollection &, const EventContext &, const Trk::ParticleHypothesis &matEffects=Trk::pion) const
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
virtual void validateMeasurement(TrkTrackState *)=0
#define ATH_MSG_VERBOSE(x)
virtual char getNodeType()
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool is_blayer(const Identifier &id) const
Test for b-layer - WARNING: id MUST be pixel id, otherwise answer is not accurate....
#define AmgSymMatrix(dim)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ToolHandle< Trk::IRIO_OnTrackCreator > m_ROTcreator
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
void setScatteringMode(int)
virtual const Surface & surface() const =0
Return surface associated with this detector element.
void correctScale(Trk::TrkTrackState *) const
const PixelID * m_pixelId
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
double getInvRotMatrix(int, int)
void attachToSurface(TrkPlanarSurface *)
TrkTrackState * getTrackState()
void applyEnergyLoss(int)
virtual void renounce()=0
void setPreviousState(TrkTrackState *)
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual int getResiduals(double[2])=0
Identifier identify() const
return the identifier
const Perigee * perigeeParameters() const
return Perigee.
std::atomic< size_t > m_fitErrorsLowPt
represents the track state (measurement, material, fit parameters and quality) at a surface.
Trk::TrkTrackState * extrapolate(Trk::TrkTrackState *, Trk::TrkPlanarSurface *, Trk::TrkPlanarSurface *, MagField::AtlasFieldCache &) const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
constexpr double coeff(unsigned int l, unsigned int k)
Calculates the n-th coefficient of the legendre polynomial series.
ToolHandle< ITrigDkfTrackMakerTool > m_trackMaker
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
void setSmootherGain(double A[5][5])
std::atomic< size_t > m_fitErrorsUnresolved
void getMagneticField(double[3], double *, MagField::AtlasFieldCache &) const
#define ATH_MSG_WARNING(x)
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
void setTrackCovariance(double A[5][5])
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...
void setTrackState(const double A[5])
double getTrackState(int i)
virtual const PrepRawData * getPrepRawData()
std::atomic< size_t > m_fitErrorsDivergence
Trk::TrackStateOnSurface * createTrackStateOnSurface(Trk::TrkBaseNode *pN, const bool, const EventContext &ctx) const
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual int getInverseResidualVariance(double[2][2])=0
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ NumberOfTrackStateOnSurfaceTypes
double getTrackCovariance(int i, int j)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...