ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::SiSpacePointsSeedMaker_LowMomentum Class Referencefinal

#include <SiSpacePointsSeedMaker_LowMomentum.h>

Inheritance diagram for InDet::SiSpacePointsSeedMaker_LowMomentum:
Collaboration diagram for InDet::SiSpacePointsSeedMaker_LowMomentum:

Public Member Functions

Standard tool methods
 SiSpacePointsSeedMaker_LowMomentum (const std::string &, const std::string &, const IInterface *)
virtual ~SiSpacePointsSeedMaker_LowMomentum ()=default
virtual StatusCode initialize () override
virtual StatusCode finalize () override
Methods to initialize tool for new event or region
virtual void newEvent (const EventContext &ctx, EventData &data, int iteration) const override
virtual void newRegion (const EventContext &ctx, EventData &data, const std::vector< IdentifierHash > &vPixel, const std::vector< IdentifierHash > &vSCT) const override
virtual void newRegion (const EventContext &ctx, EventData &data, const std::vector< IdentifierHash > &vPixel, const std::vector< IdentifierHash > &vSCT, const IRoiDescriptor &iRD) const override
Methods to initilize different strategies of seeds production
virtual void find2Sp (EventData &data, const std::list< Trk::Vertex > &lv) const override
 with two space points with or without vertex constraint
virtual void find3Sp (const EventContext &ctx, EventData &data, const std::list< Trk::Vertex > &lv) const override
 with three space points with or without vertex constraint
virtual void find3Sp (const EventContext &ctx, EventData &data, const std::list< Trk::Vertex > &lv, const double *zVertex) const override
 with three space points with or without vertex constraint with information about min and max Z of the vertex
virtual void findVSp (const EventContext &ctx, EventData &data, const std::list< Trk::Vertex > &lv) const override
 with variable number space points with or without vertex constraint Variable means (2,3,4,....) any number space points
Iterator through seeds pseudo collection

produced accordingly methods find

virtual const SiSpacePointsSeednext (const EventContext &ctx, EventData &data) const override
virtual void writeNtuple (const SiSpacePointsSeed *seed, const Trk::Track *track, int seedType, long eventNumber) const override
virtual bool getWriteNtupleBoolProperty () const override

Private Attributes

Data handles
SG::ReadHandleKey< SpacePointContainerm_spacepointsSCT {this, "SpacePointsSCTName", "SCT_SpacePoints", "SCT space points container"}
SG::ReadHandleKey< SpacePointContainerm_spacepointsPixel {this, "SpacePointsPixelName", "PixelSpacePoints", "Pixel space points container"}
SG::ReadHandleKey< SpacePointOverlapCollectionm_spacepointsOverlap {this, "SpacePointsOverlapName", "OverlapSpacePoints"}
SG::ReadHandleKey< Trk::PRDtoTrackMapm_prdToTrackMap {this,"PRDtoTrackMap","","option PRD-to-track association"}
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCondObjInputKey
Properties, which will not be changed after construction
BooleanProperty m_pixel {this, "usePixel", true}
BooleanProperty m_sct {this, "useSCT", true}
BooleanProperty m_useOverlap {this, "useOverlapSpCollection", false}
IntegerProperty m_maxsize {this, "maxSize", 2000}
IntegerProperty m_maxsizeSP {this, "maxSizeSP", 1500}
IntegerProperty m_maxOneSize {this, "maxSeedsForSpacePoint", 5}
FloatProperty m_r1min {this, "minRadius1", 0.}
FloatProperty m_r1max {this, "maxRadius1", 600.}
FloatProperty m_r2min {this, "minRadius2", 0.}
FloatProperty m_r2max {this, "maxRadius2", 600.}
FloatProperty m_r3min {this, "minRadius3", 0.}
FloatProperty m_drmin {this, "mindRadius", 10.}
FloatProperty m_drmax {this, "maxdRadius", 200.}
FloatProperty m_zmin {this, "minZ", -250.}
FloatProperty m_zmax {this, "maxZ", +250.}
FloatProperty m_r_rmax {this, "radMax", 200.}
FloatProperty m_r_rstep {this, "radStep", 2.}
FloatProperty m_dzver {this, "maxdZver", 5.}
FloatProperty m_dzdrver {this, "maxdZdRver", 0.02}
FloatProperty m_diver {this, "maxdImpact", 7.}
FloatProperty m_ptmax {this, "pTmax", 500.}
Properties, which can be updated in initialize
FloatProperty m_etamax {this, "etaMax", 2.7}
FloatProperty m_ptmin {this, "pTmin", 100.}
FloatProperty m_fieldScale {this, "fieldScale", 1.}
Data members, which are updated only in initialize
bool m_initialized {false}
int m_outputlevel {0}
int m_fNmax {0}
int m_r_size {0}
int m_rfz_b [SizeRFZ] {}
int m_rfz_t [SizeRFZ] {}
int m_rfz_ib [SizeRFZ][SizeI] {}
int m_rfz_it [SizeRFZ][SizeI] {}
float m_dzdrmin {0.}
float m_dzdrmax {0.}
float m_r3max {0.}
float m_iptmin {0.}
float m_iptmax {1.f/400.f}
float m_sF {0.}

Print internal tool parameters and status

enum  Size { SizeRF =20 , SizeZ =11 , SizeRFZ =SizeRF*SizeZ , SizeI =9 }
 enum for array sizes More...
virtual MsgStream & dump (EventData &data, MsgStream &out) const override

Disallow default instantiation, copy, assignment

 SiSpacePointsSeedMaker_LowMomentum ()=delete
 SiSpacePointsSeedMaker_LowMomentum (const SiSpacePointsSeedMaker_LowMomentum &)=delete
SiSpacePointsSeedMaker_LowMomentumoperator= (const SiSpacePointsSeedMaker_LowMomentum &)=delete
MsgStream & dumpConditions (EventData &data, MsgStream &out) const
void buildFrameWork ()
void buildBeamFrameWork (EventData &data) const
void newOneSeed (EventData &data, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const float &, const float &) const
void fillLists (EventData &data) const
void production3Sp (const EventContext &ctx, EventData &data) const
void production3Sp (EventData &data, std::vector< InDet::SiSpacePointForSeed * >::iterator *, std::vector< InDet::SiSpacePointForSeed * >::iterator *, std::vector< InDet::SiSpacePointForSeed * >::iterator *, std::vector< InDet::SiSpacePointForSeed * >::iterator *, int, int, int &, float) const
void findNext (const EventContext &ctx, EventData &data) const
bool isZCompatible (EventData &data, float &, float &, float &) const
bool isUsed (const Trk::SpacePoint *, const Trk::PRDtoTrackMap &prd_to_track_map) const
void initializeEventData (EventData &data) const
static MsgStream & dumpEvent (EventData &data, MsgStream &out)
static SiSpacePointForSeednewSpacePoint (EventData &data, const Trk::SpacePoint *const &)
static void newSeed (EventData &data, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const float &)
static void newSeed (EventData &data, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const float &)
static void fillSeeds (EventData &data)
static void erase (EventData &data)
static void production2Sp (EventData &data)
static bool newVertices (EventData &data, const std::list< Trk::Vertex > &)
static void convertToBeamFrameWork (EventData &data, const Trk::SpacePoint *const &, float *)

Detailed Description

Definition at line 52 of file SiSpacePointsSeedMaker_LowMomentum.h.

Member Enumeration Documentation

◆ Size

Constructor & Destructor Documentation

◆ SiSpacePointsSeedMaker_LowMomentum() [1/3]

InDet::SiSpacePointsSeedMaker_LowMomentum::SiSpacePointsSeedMaker_LowMomentum ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 27 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

29 : base_class(t, n, p)
30{
31}

◆ ~SiSpacePointsSeedMaker_LowMomentum()

virtual InDet::SiSpacePointsSeedMaker_LowMomentum::~SiSpacePointsSeedMaker_LowMomentum ( )
virtualdefault

◆ SiSpacePointsSeedMaker_LowMomentum() [2/3]

InDet::SiSpacePointsSeedMaker_LowMomentum::SiSpacePointsSeedMaker_LowMomentum ( )
privatedelete

◆ SiSpacePointsSeedMaker_LowMomentum() [3/3]

InDet::SiSpacePointsSeedMaker_LowMomentum::SiSpacePointsSeedMaker_LowMomentum ( const SiSpacePointsSeedMaker_LowMomentum & )
privatedelete

Member Function Documentation

◆ buildBeamFrameWork()

void InDet::SiSpacePointsSeedMaker_LowMomentum::buildBeamFrameWork ( EventData & data) const
private

Definition at line 660 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

661{
662 SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
663
664 const Amg::Vector3D &cb = beamSpotHandle->beamPos();
665 double tx = std::tan(beamSpotHandle->beamTilt(0));
666 double ty = std::tan(beamSpotHandle->beamTilt(1));
667
668 double ph = std::atan2(ty,tx);
669 double th = std::acos(1.f/std::sqrt(1.f+tx*tx+ty*ty));
670 double sint = std::sin(th);
671 double cost = std::cos(th);
672 double sinp = std::sin(ph);
673 double cosp = std::cos(ph);
674
675 data.xbeam[0] = static_cast<float>(cb.x());
676 data.xbeam[1] = static_cast<float>(cost*cosp*cosp+sinp*sinp);
677 data.xbeam[2] = static_cast<float>(cost*sinp*cosp-sinp*cosp);
678 data.xbeam[3] = -static_cast<float>(sint*cosp );
679
680 data.ybeam[0] = static_cast<float>(cb.y());
681 data.ybeam[1] = static_cast<float>(cost*cosp*sinp-sinp*cosp);
682 data.ybeam[2] = static_cast<float>(cost*sinp*sinp+cosp*cosp);
683 data.ybeam[3] = -static_cast<float>(sint*sinp );
684
685 data.zbeam[0] = static_cast<float>(cb.z());
686 data.zbeam[1] = static_cast<float>(sint*cosp);
687 data.zbeam[2] = static_cast<float>(sint*sinp);
688 data.zbeam[3] = static_cast<float>(cost);
689}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition hcg.cxx:922
Eigen::Matrix< double, 3, 1 > Vector3D

◆ buildFrameWork()

void InDet::SiSpacePointsSeedMaker_LowMomentum::buildFrameWork ( )
private

Definition at line 568 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

569{
570 m_ptmin = std::max( std::abs(m_ptmin), float(50.*m_fieldScale));
571 m_iptmax = 1.f/std::abs(m_ptmax);
572 m_iptmin = 1.f/std::abs(m_ptmin);
573 m_etamax = std::abs(m_etamax);
574 m_dzdrmax = 1.f/std::tan(2.f*std::atan(std::exp(-m_etamax)));
577
578 // Build radius sorted containers
579 //
580 m_r_size = static_cast<int>((m_r_rmax+.1f)/m_r_rstep);
581
582 // Build radius-azimuthal sorted containers
583 //
584 constexpr float pi2 = 2.*M_PI;
585 const int NFmax = SizeRF;
586 const float sFmax = static_cast<float>(NFmax )/pi2;
587 const float sFmin = 100./60.;
588 m_sF = m_ptmin/m_fieldScale /60.f;
589 if (m_sF > sFmax ) m_sF = sFmax;
590 else if (m_sF < sFmin) m_sF = sFmin;
591 m_fNmax = static_cast<int>(pi2*m_sF);
592 if (m_fNmax >=NFmax) m_fNmax = NFmax-1;
593
594 // Build maps for radius-azimuthal-Z sorted collections
595 //
596 for (int f=0; f<=m_fNmax; ++f) {
597 int fb = f-1; if (fb<0 ) fb=m_fNmax;
598 int ft = f+1; if (ft>m_fNmax) ft=0;
599
600 // For each azimuthal region loop through all Z regions
601 //
602 for (int z=0; z<SizeZ; ++z) {
603 int a = f *SizeZ+z;
604 int b = fb*SizeZ+z;
605 int c = ft*SizeZ+z;
606 m_rfz_b [a] = 3; m_rfz_t [a] = 3;
607 m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a;
608 m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b;
609 m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c;
610 if (z==5) {
611 m_rfz_t [a] = 9;
612 m_rfz_it[a][3] = a+1;
613 m_rfz_it[a][4] = b+1;
614 m_rfz_it[a][5] = c+1;
615 m_rfz_it[a][6] = a-1;
616 m_rfz_it[a][7] = b-1;
617 m_rfz_it[a][8] = c-1;
618 } else if (z> 5) {
619 m_rfz_b [a] = 6;
620 m_rfz_ib[a][3] = a-1;
621 m_rfz_ib[a][4] = b-1;
622 m_rfz_ib[a][5] = c-1;
623 if (z<10) {
624 m_rfz_t [a] = 6;
625 m_rfz_it[a][3] = a+1;
626 m_rfz_it[a][4] = b+1;
627 m_rfz_it[a][5] = c+1;
628 }
629 } else {
630 m_rfz_b [a] = 6;
631 m_rfz_ib[a][3] = a+1;
632 m_rfz_ib[a][4] = b+1;
633 m_rfz_ib[a][5] = c+1;
634 if (z>0) {
635 m_rfz_t [a] = 6;
636 m_rfz_it[a][3] = a-1;
637 m_rfz_it[a][4] = b-1;
638 m_rfz_it[a][5] = c-1;
639 }
640 }
641 if (z==3) {
642 m_rfz_b[a] = 9;
643 m_rfz_ib[a][6] = a+2;
644 m_rfz_ib[a][7] = b+2;
645 m_rfz_ib[a][8] = c+2;
646 } else if (z==7) {
647 m_rfz_b[a] = 9;
648 m_rfz_ib[a][6] = a-2;
649 m_rfz_ib[a][7] = b-2;
650 m_rfz_ib[a][8] = c-2;
651 }
652 }
653 }
654}
#define M_PI
static Double_t a
#define z

◆ convertToBeamFrameWork()

void InDet::SiSpacePointsSeedMaker_LowMomentum::convertToBeamFrameWork ( EventData & data,
const Trk::SpacePoint *const & sp,
float * r )
staticprivate

Definition at line 695 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

697{
698 r[0] = static_cast<float>(sp->globalPosition().x())-data.xbeam[0];
699 r[1] = static_cast<float>(sp->globalPosition().y())-data.ybeam[0];
700 r[2] = static_cast<float>(sp->globalPosition().z())-data.zbeam[0];
701}
static Double_t sp
#define y
#define x
int r
Definition globals.cxx:22

◆ dump()

MsgStream & InDet::SiSpacePointsSeedMaker_LowMomentum::dump ( EventData & data,
MsgStream & out ) const
overridevirtual

Definition at line 369 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

370{
371 if (not data.initialized) initializeEventData(data);
372
373 if (data.nprint) return dumpEvent(data, out);
374 return dumpConditions(data, out);
375}
MsgStream & dumpConditions(EventData &data, MsgStream &out) const
static MsgStream & dumpEvent(EventData &data, MsgStream &out)

◆ dumpConditions()

MsgStream & InDet::SiSpacePointsSeedMaker_LowMomentum::dumpConditions ( EventData & data,
MsgStream & out ) const
private

Definition at line 381 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

382{
383 int n = 42-m_spacepointsPixel.key().size();
384 std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
385 n = 42-m_spacepointsSCT.key().size();
386 std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
387 n = 42-m_spacepointsOverlap.key().size();
388 std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
389 n = 42-m_beamSpotKey.key().size();
390 std::string s5; for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
391
392 out<<"|---------------------------------------------------------------------|"
393 <<endmsg;
394 out<<"| Pixel space points | "<<m_spacepointsPixel.key() <<s2
395 <<endmsg;
396 out<<"| SCT space points | "<<m_spacepointsSCT.key()<<s3
397 <<endmsg;
398 out<<"| Overlap space points | "<<m_spacepointsOverlap.key()<<s4
399 <<endmsg;
400 out<<"| BeamConditionsService | "<<m_beamSpotKey.key()<<s5
401 <<endmsg;
402 out<<"| usePixel | "
403 <<std::setw(12)<<m_pixel
404 <<" |"<<endmsg;
405 out<<"| useSCT | "
406 <<std::setw(12)<<m_sct
407 <<" |"<<endmsg;
408 out<<"| Use PRD-to-track assoc.?| "
409 <<std::setw(12)<< (!m_prdToTrackMap.key().empty() ? "yes" : "no ")
410 <<" |"<<endmsg;
411 out<<"| maxSize | "
412 <<std::setw(12)<<m_maxsize
413 <<" |"<<endmsg;
414 out<<"| maxSizeSP | "
415 <<std::setw(12)<<m_maxsizeSP
416 <<" |"<<endmsg;
417 out<<"| pTmin (mev) | "
418 <<std::setw(12)<<std::setprecision(5)<<m_ptmin
419 <<" |"<<endmsg;
420 out<<"| pTmax (mev) | "
421 <<std::setw(12)<<std::setprecision(5)<<m_ptmax
422 <<" |"<<endmsg;
423 out<<"| |eta| <= | "
424 <<std::setw(12)<<std::setprecision(5)<<m_etamax
425 <<" |"<<endmsg;
426 out<<"| max radius SP | "
427 <<std::setw(12)<<std::setprecision(5)<<m_r_rmax
428 <<" |"<<endmsg;
429 out<<"| radius step | "
430 <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
431 <<" |"<<endmsg;
432 out<<"| min Z-vertex position | "
433 <<std::setw(12)<<std::setprecision(5)<<m_zmin
434 <<" |"<<endmsg;
435 out<<"| max Z-vertex position | "
436 <<std::setw(12)<<std::setprecision(5)<<m_zmax
437 <<" |"<<endmsg;
438 out<<"| min radius first SP(3) | "
439 <<std::setw(12)<<std::setprecision(5)<<m_r1min
440 <<" |"<<endmsg;
441 out<<"| min radius second SP(3) | "
442 <<std::setw(12)<<std::setprecision(5)<<m_r2min
443 <<" |"<<endmsg;
444 out<<"| min radius last SP(3) | "
445 <<std::setw(12)<<std::setprecision(5)<<m_r3min
446 <<" |"<<endmsg;
447 out<<"| max radius first SP(3) | "
448 <<std::setw(12)<<std::setprecision(4)<<m_r1max
449 <<" |"<<endmsg;
450 out<<"| max radius second SP(3) | "
451 <<std::setw(12)<<std::setprecision(5)<<m_r2max
452 <<" |"<<endmsg;
453 out<<"| max radius last SP(3) | "
454 <<std::setw(12)<<std::setprecision(5)<<m_r3max
455 <<" |"<<endmsg;
456 out<<"| min space points dR | "
457 <<std::setw(12)<<std::setprecision(5)<<m_drmin
458 <<" |"<<endmsg;
459 out<<"| max space points dR | "
460 <<std::setw(12)<<std::setprecision(5)<<m_drmax
461 <<" |"<<endmsg;
462 out<<"| max dZ impact | "
463 <<std::setw(12)<<std::setprecision(5)<<m_dzver
464 <<" |"<<endmsg;
465 out<<"| max dZ/dR impact | "
466 <<std::setw(12)<<std::setprecision(5)<<m_dzdrver
467 <<" |"<<endmsg;
468 out<<"| max impact | "
469 <<std::setw(12)<<std::setprecision(5)<<m_diver
470 <<" |"<<endmsg;
471 out<<"|---------------------------------------------------------------------|"
472 <<endmsg;
473 out<<"| Beam X center | "
474 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[0]
475 <<" |"<<endmsg;
476 out<<"| Beam Y center | "
477 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[0]
478 <<" |"<<endmsg;
479 out<<"| Beam Z center | "
480 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[0]
481 <<" |"<<endmsg;
482 out<<"| Beam X-axis direction | "
483 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[1]
484 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[2]
485 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[3]
486 <<" |"<<endmsg;
487 out<<"| Beam Y-axis direction | "
488 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[1]
489 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[2]
490 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[3]
491 <<" |"<<endmsg;
492 out<<"| Beam Z-axis direction | "
493 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[1]
494 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[2]
495 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[3]
496 <<" |"<<endmsg;
497 out<<"|---------------------------------------------------------------------|"
498 <<endmsg;
499 return out;
500}
#define endmsg
static const Attributes_t empty
SG::ReadHandleKey< SpacePointOverlapCollection > m_spacepointsOverlap
SG::ReadHandleKey< SpacePointContainer > m_spacepointsSCT
SG::ReadHandleKey< SpacePointContainer > m_spacepointsPixel
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap

◆ dumpEvent()

MsgStream & InDet::SiSpacePointsSeedMaker_LowMomentum::dumpEvent ( EventData & data,
MsgStream & out )
staticprivate

Definition at line 506 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

507{
508 out<<"|---------------------------------------------------------------------|"
509 <<endmsg;
510 out<<"| data.ns | "
511 <<std::setw(12)<<data.ns
512 <<" |"<<endmsg;
513 out<<"| data.nsaz | "
514 <<std::setw(12)<<data.nsaz
515 <<" |"<<endmsg;
516 out<<"| seeds | "
517 <<std::setw(12)<<data.l_seeds.size()
518 <<" |"<<endmsg;
519 out<<"|---------------------------------------------------------------------|"
520 <<endmsg;
521 return out;
522}

◆ erase()

void InDet::SiSpacePointsSeedMaker_LowMomentum::erase ( EventData & data)
staticprivate

Definition at line 752 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

753{
754 for (int i=0; i!=data.nr; ++i) {
755 int n = data.r_index[i];
756 data.r_map[n] = 0;
757 data.r_Sorted[n].clear();
758 }
759
760 for (int i=0; i!=data.nrfz; ++i) {
761 int n = data.rfz_index[i];
762 data.rfz_map[n] = 0;
763 data.rfz_Sorted[n].clear();
764 }
765
766 data.state = 0;
767 data.ns = 0;
768 data.nsaz = 0;
769 data.nr = 0;
770 data.nrfz = 0;
771}

◆ fillLists()

void InDet::SiSpacePointsSeedMaker_LowMomentum::fillLists ( EventData & data) const
private

Definition at line 707 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

708{
709 constexpr float pi2 = 2.*M_PI;
710
711 for (int i=0; i<m_r_size; ++i) {
712
713 if (!data.r_map[i]) continue;
714
715 for (InDet::SiSpacePointForSeed* r : data.r_Sorted[i]) {
716
717 // Azimuthal angle sort
718 //
719 float F = r->phi();
720 if (F<0.) F+=pi2;
721
722 int f = static_cast<int>(F*m_sF);
723 if (f < 0) f = m_fNmax;
724 else if (f > m_fNmax) f = 0;
725
726 int z;
727 float Z = r->z();
728
729 // Azimuthal angle and Z-coordinate sort
730 //
731 if (Z>0.) {
732 Z< 250.?z=5:Z< 450.?z=6:Z< 925.?z=7:Z< 1400.?z=8:Z< 2500.?z=9:z=10;
733 } else {
734 Z>-250.?z=5:Z>-450.?z=4:Z>-925.?z=3:Z>-1400.?z=2:Z>-2500.?z=1:z= 0;
735 }
736 int n = f*SizeZ+z;
737 ++data.nsaz;
738 data.rfz_Sorted[n].push_back(r);
739 if (!data.rfz_map[n]++) data.rfz_index[data.nrfz++] = n;
740 }
741 data.r_Sorted[i].clear();
742 data.r_map[i] = 0;
743 }
744 data.nr = 0;
745 data.state = 0;
746}
#define F(x, y, z)
Definition MD5.cxx:112

◆ fillSeeds()

void InDet::SiSpacePointsSeedMaker_LowMomentum::fillSeeds ( EventData & data)
staticprivate

Definition at line 1158 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1159{
1160 std::multimap<float,InDet::SiSpacePointsSeed*>::iterator
1161 l = data.mapOneSeeds.begin(),
1162 le = data.mapOneSeeds.end ();
1163
1164 for (; l!=le; ++l) {
1165 if (data.i_seede!=data.l_seeds.end()) {
1166 InDet::SiSpacePointsSeed* s = &(*data.i_seede++);
1167 *s = *(*l).second;
1168 } else {
1169 data.l_seeds.emplace_back(*(*l).second);
1170 data.i_seede = data.l_seeds.end();
1171 }
1172 }
1173}
l
Printing final latex table to .tex output file.

◆ finalize()

StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::finalize ( )
overridevirtual

Definition at line 77 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

78{
79 return AlgTool::finalize();
80}

◆ find2Sp()

void InDet::SiSpacePointsSeedMaker_LowMomentum::find2Sp ( EventData & data,
const std::list< Trk::Vertex > & lv ) const
overridevirtual

with two space points with or without vertex constraint

Definition at line 268 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

269{
270 if (not data.initialized) initializeEventData(data);
271
272 int mode = 0;
273 if (lv.begin()!=lv.end()) mode = 1;
274 bool newv = newVertices(data, lv);
275
276 if (newv || !data.state || data.nspoint!=2 || data.mode!=mode || data.nlist) {
277 data.i_seede = data.l_seeds.begin();
278 data.state = 1;
279 data.nspoint = 2;
280 data.nlist = 0;
281 data.mode = mode;
282 data.endlist = true;
283 data.fNmin = 0;
284 data.zMin = 0;
286 }
287 data.i_seed = data.l_seeds.begin();
288
289 if (m_outputlevel<=0) {
290 data.nprint=1;
291 dump(data, msg(MSG::DEBUG));
292 }
293}
static bool newVertices(EventData &data, const std::list< Trk::Vertex > &)
virtual MsgStream & dump(EventData &data, MsgStream &out) const override
MsgStream & msg
Definition testRead.cxx:32

◆ find3Sp() [1/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::find3Sp ( const EventContext & ctx,
EventData & data,
const std::list< Trk::Vertex > & lv ) const
overridevirtual

with three space points with or without vertex constraint

Definition at line 300 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

301{
302 if (not data.initialized) initializeEventData(data);
303
304 int mode = 2;
305 if (lv.begin()!=lv.end()) mode = 3;
306 bool newv = newVertices(data, lv);
307
308 if (newv || !data.state || data.nspoint!=3 || data.mode!=mode || data.nlist) {
309 data.i_seede = data.l_seeds.begin();
310 data.state = 1;
311 data.nspoint = 3;
312 data.nlist = 0;
313 data.mode = mode;
314 data.endlist = true;
315 data.fNmin = 0;
316 data.zMin = 0;
317 production3Sp(ctx, data);
318 }
319 data.i_seed = data.l_seeds.begin();
320
321 if (m_outputlevel<=0) {
322 data.nprint=1;
323 dump(data, msg(MSG::DEBUG));
324 }
325}
void production3Sp(const EventContext &ctx, EventData &data) const

◆ find3Sp() [2/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::find3Sp ( const EventContext & ctx,
EventData & data,
const std::list< Trk::Vertex > & lv,
const double * zVertex ) const
overridevirtual

with three space points with or without vertex constraint with information about min and max Z of the vertex

Definition at line 327 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

328{
329 find3Sp(ctx, data, lv);
330}
virtual void find3Sp(const EventContext &ctx, EventData &data, const std::list< Trk::Vertex > &lv) const override
with three space points with or without vertex constraint

◆ findNext()

void InDet::SiSpacePointsSeedMaker_LowMomentum::findNext ( const EventContext & ctx,
EventData & data ) const
private

Definition at line 528 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

529{
530 if (data.endlist) return;
531
532 data.i_seede = data.l_seeds.begin();
533 if (data.mode==0 || data.mode==1) {
535 } else if (data.mode==2 || data.mode==3) {
536 production3Sp(ctx, data);
537 } else if (data.mode==5 || data.mode==6) {
538 production3Sp(ctx, data);
539 }
540
541 data.i_seed = data.l_seeds.begin();
542 ++data.nlist;
543}

◆ findVSp()

void InDet::SiSpacePointsSeedMaker_LowMomentum::findVSp ( const EventContext & ctx,
EventData & data,
const std::list< Trk::Vertex > & lv ) const
overridevirtual

with variable number space points with or without vertex constraint Variable means (2,3,4,....) any number space points

Definition at line 338 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

339{
340 if (not data.initialized) initializeEventData(data);
341
342 int mode = 5;
343 if (lv.begin()!=lv.end()) mode = 6;
344 bool newv = newVertices(data, lv);
345
346 if (newv || !data.state || data.nspoint!=4 || data.mode!=mode || data.nlist) {
347 data.i_seede = data.l_seeds.begin();
348 data.state = 1;
349 data.nspoint = 4;
350 data.nlist = 0;
351 data.mode = mode;
352 data.endlist = true;
353 data.fNmin = 0;
354 data.zMin = 0;
355 production3Sp(ctx, data);
356 }
357 data.i_seed = data.l_seeds.begin();
358
359 if (m_outputlevel<=0) {
360 data.nprint=1;
361 dump(data, msg(MSG::DEBUG));
362 }
363}

◆ getWriteNtupleBoolProperty()

bool InDet::SiSpacePointsSeedMaker_LowMomentum::getWriteNtupleBoolProperty ( ) const
overridevirtual

Definition at line 1190 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1190 {
1191 return false;
1192}

◆ initialize()

StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize ( )
overridevirtual

Definition at line 37 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

38{
39 StatusCode sc = AlgTool::initialize();
40
42 ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
44
45 // Get beam geometry
46 //
47 ATH_CHECK(m_beamSpotKey.initialize());
48
49 ATH_CHECK( m_fieldCondObjInputKey.initialize());
50
51 // PRD-to-track association (optional)
52 ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty()));
53
54 // Build framework
55 //
57
58 // Get output print level
59 //
60 m_outputlevel = msg().level()-MSG::DEBUG;
61 if (m_outputlevel<=0) {
64 data.nprint=0;
65 dump(data, msg(MSG::DEBUG));
66 }
67
68 m_initialized = true;
69
70 return sc;
71}
#define ATH_CHECK
Evaluate an expression and check for errors.
static Double_t sc
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ initializeEventData()

void InDet::SiSpacePointsSeedMaker_LowMomentum::initializeEventData ( EventData & data) const
private

Definition at line 1175 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1175 {
1176 data.initialize(EventData::ToolType::LowMomentum,
1179 0, // maxsize not used
1180 m_r_size,
1181 0, // sizeRF not used
1182 SizeRFZ,
1183 0, // sizeRFZV not used
1184 false); // checkEta not used
1185}

◆ isUsed()

bool InDet::SiSpacePointsSeedMaker_LowMomentum::isUsed ( const Trk::SpacePoint * sp,
const Trk::PRDtoTrackMap & prd_to_track_map ) const
inlineprivate

Definition at line 255 of file SiSpacePointsSeedMaker_LowMomentum.h.

256 {
257 const Trk::PrepRawData* d = sp->clusterList().first;
258 if (!d || !prd_to_track_map.isUsed(*d)) return false;
259
260 d = sp->clusterList().second;
261 if (!d || prd_to_track_map.isUsed(*d)) return true;
262
263 return false;
264 }
bool isUsed(const PrepRawData &prd) const
does this PRD belong to at least one track?

◆ isZCompatible()

bool InDet::SiSpacePointsSeedMaker_LowMomentum::isZCompatible ( EventData & data,
float & Zv,
float & R,
float & T ) const
private

Definition at line 1072 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1074{
1075 if (Zv < m_zmin || Zv > m_zmax) return false;
1076
1077 if (data.l_vertex.empty()) return true;
1078
1079 float dZmin = std::numeric_limits<float>::max();
1080 for (const float& v : data.l_vertex) {
1081 float dZ = std::abs(v-Zv);
1082 if (dZ<dZmin) dZmin=dZ;
1083 }
1084 return dZmin < (m_dzver+m_dzdrver*R)*std::sqrt(1.f+T*T);
1085}
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)

◆ newEvent()

void InDet::SiSpacePointsSeedMaker_LowMomentum::newEvent ( const EventContext & ctx,
EventData & data,
int iteration ) const
overridevirtual

Definition at line 86 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

87{
88 if (not data.initialized) initializeEventData(data);
89
90 data.trigger = false;
91 if (!m_pixel && !m_sct) return;
92 erase(data);
93 data.i_spforseed = data.l_spforseed.begin();
95
96 float irstep = 1./m_r_rstep;
97 int irmax = m_r_size-1;
98
99 SG::ReadHandle<Trk::PRDtoTrackMap> prd_to_track_map;
100 const Trk::PRDtoTrackMap *prd_to_track_map_cptr = nullptr;
101 if (!m_prdToTrackMap.key().empty()) {
102 prd_to_track_map=SG::ReadHandle<Trk::PRDtoTrackMap>(m_prdToTrackMap, ctx);
103 if (!prd_to_track_map.isValid()) {
104 ATH_MSG_ERROR("Failed to read PRD to track association map: " << m_prdToTrackMap.key());
105 }
106 prd_to_track_map_cptr = prd_to_track_map.cptr();
107 }
108
109 // Get pixels space points containers from store gate
110 //
111 if (m_pixel) {
112
113 SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
114 if (spacepointsPixel.isValid()) {
115
116 for (const SpacePointCollection* spc: *spacepointsPixel) {
117 for (const Trk::SpacePoint* sp: *spc) {
118
119 float r = sp->r();
120 if (r<0. || r>=m_r_rmax) continue;
121 if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
122
123 InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
124
125 int ir = static_cast<int>(sps->radius()*irstep);
126 if (ir>irmax) ir = irmax;
127 data.r_Sorted[ir].push_back(sps);
128 ++data.r_map[ir];
129 if (data.r_map[ir]==1) data.r_index[data.nr++] = ir;
130 ++data.ns;
131 }
132 }
133 }
134 }
135
136 // Get sct space points containers from store gate
137 //
138 if (m_sct) {
139
140 SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
141 if (spacepointsSCT.isValid()) {
142
143 for (const SpacePointCollection* spc: *spacepointsSCT) {
144 for (const Trk::SpacePoint* sp: *spc) {
145
146 float r = sp->r();
147 if (r<0. || r>=m_r_rmax) continue;
148 if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
149
150 InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
151
152 int ir = static_cast<int>(sps->radius()*irstep);
153 if (ir>irmax) ir = irmax;
154 data.r_Sorted[ir].push_back(sps);
155 ++data.r_map[ir];
156 if (data.r_map[ir]==1) data.r_index[data.nr++] = ir;
157 ++data.ns;
158 }
159 }
160 }
161 }
163}
#define ATH_MSG_ERROR(x)
static SiSpacePointForSeed * newSpacePoint(EventData &data, const Trk::SpacePoint *const &)
bool isUsed(const Trk::SpacePoint *, const Trk::PRDtoTrackMap &prd_to_track_map) const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
int ir
counter of the current depth
Definition fastadd.cxx:49

◆ newOneSeed()

void InDet::SiSpacePointsSeedMaker_LowMomentum::newOneSeed ( EventData & data,
const Trk::SpacePoint *& p1,
const Trk::SpacePoint *& p2,
const Trk::SpacePoint *& p3,
const float & z,
const float & q ) const
private

Definition at line 1025 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1029{
1030 if (data.nOneSeeds < m_maxOneSize) {
1031 data.OneSeeds[data.nOneSeeds].erase();
1032 data.OneSeeds[data.nOneSeeds].add(p1);
1033 data.OneSeeds[data.nOneSeeds].add(p2);
1034 data.OneSeeds[data.nOneSeeds].add(p3);
1035 data.OneSeeds[data.nOneSeeds].setZVertex(static_cast<double>(z));
1036 data.mapOneSeeds.insert(std::make_pair(q, &(data.OneSeeds[data.nOneSeeds])));
1037 ++data.nOneSeeds;
1038 } else {
1039 std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator
1040 l = data.mapOneSeeds.rbegin();
1041 if ((*l).first <= q) return;
1042
1043 InDet::SiSpacePointsSeed* s = (*l).second;
1044 s->erase ( );
1045 s->add (p1);
1046 s->add (p2);
1047 s->add (p3);
1048 s->setZVertex(static_cast<double>(z));
1049 std::multimap<float,InDet::SiSpacePointsSeed*>::iterator
1050 i = data.mapOneSeeds.insert(std::make_pair(q,s));
1051 for (++i; i!=data.mapOneSeeds.end(); ++i) {
1052 if ((*i).second==s) {
1053 data.mapOneSeeds.erase(i);
1054 return;
1055 }
1056 }
1057 }
1058}

◆ newRegion() [1/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion ( const EventContext & ctx,
EventData & data,
const std::vector< IdentifierHash > & vPixel,
const std::vector< IdentifierHash > & vSCT ) const
overridevirtual

Definition at line 169 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

171 {
172 if (not data.initialized) initializeEventData(data);
173
174 data.trigger = false;
175 if (!m_pixel && !m_sct) return;
176 erase(data);
177 data.i_spforseed = data.l_spforseed.begin();
179
180 int irmax = m_r_size-1;
181 float irstep = 1.f/m_r_rstep;
182
183 SG::ReadHandle<Trk::PRDtoTrackMap> prd_to_track_map;
184 const Trk::PRDtoTrackMap *prd_to_track_map_cptr = nullptr;
185 if (!m_prdToTrackMap.key().empty()) {
186 prd_to_track_map=SG::ReadHandle<Trk::PRDtoTrackMap>(m_prdToTrackMap, ctx);
187 if (!prd_to_track_map.isValid()) {
188 ATH_MSG_ERROR("Failed to read PRD to track association map: " << m_prdToTrackMap.key());
189 }
190 prd_to_track_map_cptr = prd_to_track_map.cptr();
191 }
192
193 // Get pixels space points containers from store gate
194 //
195 if (m_pixel && !vPixel.empty()) {
196
197 SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
198 if (spacepointsPixel.isValid()) {
199 // Loop through all trigger collections
200 //
201 for (const IdentifierHash& l: vPixel) {
202 const auto *w = spacepointsPixel->indexFindPtr(l);
203 if (w==nullptr) continue;
204 for (const Trk::SpacePoint* sp: *w) {
205 float r = sp->r();
206 if (r<0. || r>=m_r_rmax) continue;
207 if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
208
209 InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
210
211 int ir = static_cast<int>(sps->radius()*irstep);
212 if (ir>irmax) ir = irmax;
213 data.r_Sorted[ir].push_back(sps);
214 ++data.r_map[ir];
215 if (data.r_map[ir]==1) data.r_index[data.nr++] = ir;
216 ++data.ns;
217 }
218 }
219 }
220 }
221
222 // Get sct space points containers from store gate
223 //
224 if (m_sct && !vSCT.empty()) {
225
226 SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
227 if (spacepointsSCT.isValid()) {
228 // Loop through all trigger collections
229 //
230 for (const IdentifierHash& l: vSCT) {
231 const auto *w = spacepointsSCT->indexFindPtr(l);
232 if (w==nullptr) continue;
233 for (const Trk::SpacePoint* sp: *w) {
234 float r = sp->r();
235 if (r<0. || r>=m_r_rmax) continue;
236 if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
237 InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
238 int ir = static_cast<int>(sps->radius()*irstep);
239 if (ir>irmax) ir = irmax;
240 data.r_Sorted[ir].push_back(sps);
241 ++data.r_map[ir];
242 if (data.r_map[ir]==1) data.r_index[data.nr++] = ir;
243 ++data.ns;
244 }
245 }
246 }
247 }
249}

◆ newRegion() [2/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion ( const EventContext & ctx,
EventData & data,
const std::vector< IdentifierHash > & vPixel,
const std::vector< IdentifierHash > & vSCT,
const IRoiDescriptor & iRD ) const
overridevirtual

Definition at line 255 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

259{
260 newRegion(ctx, data, vPixel, vSCT);
261}
virtual void newRegion(const EventContext &ctx, EventData &data, const std::vector< IdentifierHash > &vPixel, const std::vector< IdentifierHash > &vSCT) const override

◆ newSeed() [1/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::newSeed ( EventData & data,
const Trk::SpacePoint *& p1,
const Trk::SpacePoint *& p2,
const float & z )
staticprivate

Definition at line 1115 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1119{
1120 if (data.i_seede!=data.l_seeds.end()) {
1121 InDet::SiSpacePointsSeed* s = &(*data.i_seede++);
1122 s->erase();
1123 s->add(p1);
1124 s->add(p2);
1125 s->setZVertex(static_cast<double>(z));
1126 } else {
1127 data.l_seeds.emplace_back(p1, p2, z);
1128 data.i_seede = data.l_seeds.end();
1129 }
1130}

◆ newSeed() [2/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::newSeed ( EventData & data,
const Trk::SpacePoint *& p1,
const Trk::SpacePoint *& p2,
const Trk::SpacePoint *& p3,
const float & z )
staticprivate

Definition at line 1136 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1140{
1141 if (data.i_seede!=data.l_seeds.end()) {
1142 InDet::SiSpacePointsSeed* s = &(*data.i_seede++);
1143 s->erase();
1144 s->add(p1);
1145 s->add(p2);
1146 s->add(p3);
1147 s->setZVertex(static_cast<double>(z));
1148 } else {
1149 data.l_seeds.emplace_back(p1, p2, p3, z);
1150 data.i_seede = data.l_seeds.end();
1151 }
1152}

◆ newSpacePoint()

InDet::SiSpacePointForSeed * InDet::SiSpacePointsSeedMaker_LowMomentum::newSpacePoint ( EventData & data,
const Trk::SpacePoint *const & sp )
staticprivate

Definition at line 1091 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1093{
1094 InDet::SiSpacePointForSeed* sps = nullptr;
1095
1096 float r[3];
1098
1099 if (data.i_spforseed!=data.l_spforseed.end()) {
1100 sps = &(*data.i_spforseed++);
1101 sps->set(sp, r);
1102 } else {
1103 data.l_spforseed.emplace_back(sp, r);
1104 sps = &(data.l_spforseed.back());
1105 data.i_spforseed = data.l_spforseed.end();
1106 }
1107
1108 return sps;
1109}
void set(const Trk::SpacePoint *, std::span< float const, 3 >)
static void convertToBeamFrameWork(EventData &data, const Trk::SpacePoint *const &, float *)

◆ newVertices()

bool InDet::SiSpacePointsSeedMaker_LowMomentum::newVertices ( EventData & data,
const std::list< Trk::Vertex > & lV )
staticprivate

Definition at line 549 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

550{
551 unsigned int s1 = data.l_vertex.size();
552 unsigned int s2 = lV.size();
553
554 if (s1==0 && s2==0) return false;
555
556 data.l_vertex.clear();
557
558 for (const Trk::Vertex& v : lV) {
559 data.l_vertex.insert(static_cast<float>(v.position().z()));
560 }
561 return false;
562}

◆ next()

const InDet::SiSpacePointsSeed * InDet::SiSpacePointsSeedMaker_LowMomentum::next ( const EventContext & ctx,
EventData & data ) const
overridevirtual

Definition at line 1060 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1061{
1062 if (not data.initialized) initializeEventData(data);
1063
1064 if (data.i_seed==data.i_seede) {
1065 findNext(ctx, data);
1066 //cppcheck-suppress identicalInnerCondition
1067 if (data.i_seed==data.i_seede) return nullptr;
1068 }
1069 return &(*data.i_seed++);
1070}
void findNext(const EventContext &ctx, EventData &data) const

◆ operator=()

SiSpacePointsSeedMaker_LowMomentum & InDet::SiSpacePointsSeedMaker_LowMomentum::operator= ( const SiSpacePointsSeedMaker_LowMomentum & )
privatedelete

◆ production2Sp()

void InDet::SiSpacePointsSeedMaker_LowMomentum::production2Sp ( EventData & data)
staticprivate

Definition at line 777 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

778{
779 data.endlist = true;
780}

◆ production3Sp() [1/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp ( const EventContext & ctx,
EventData & data ) const
private

Definition at line 786 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

787{
788 if (data.nsaz<3) return;
789
790 float K = 0.;
791 double f[3], gP[3] ={10.,10.,0.};
792
793 MagField::AtlasFieldCache fieldCache;
794
795 // Get field cache object
796 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
797 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
798 if (fieldCondObj == nullptr) {
799 ATH_MSG_ERROR("SiSpacePointsSeedMaker_LowMomentum: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
800 return;
801 }
802 fieldCondObj->getInitializedCache (fieldCache);
803
804 if (fieldCache.solenoidOn()) {
805 fieldCache.getFieldZR(gP, f);
806
807 K = 2./(300.*f[2]);
808 } else {
809 K = 2./(300.* 5. );
810 }
811
812 const int ZI[SizeZ]= {5,6,7,8,9,10,4,3,2,1,0};
813 std::vector<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9];
814 int nseed = 0;
815
816 // Loop thorugh all azimuthal regions
817 //
818 for (int f=data.fNmin; f<=m_fNmax; ++f) {
819 // For each azimuthal region loop through all Z regions
820 //
821 int z = 0;
822 if (!data.endlist) z = data.zMin;
823
824 for (; z<SizeZ; ++z) {
825 int a = f *SizeZ+ZI[z];
826 if (!data.rfz_map[a]) continue;
827 int NB = 0, NT = 0;
828 for (int i=0; i!=m_rfz_b[a]; ++i) {
829 int an = m_rfz_ib[a][i];
830 if (!data.rfz_map[an]) continue;
831 rb [NB] = data.rfz_Sorted[an].begin();
832 rbe[NB++] = data.rfz_Sorted[an].end();
833 }
834 for (int i=0; i!=m_rfz_t[a]; ++i) {
835 int an = m_rfz_it[a][i];
836 if (!data.rfz_map[an]) continue;
837 rt [NT] = data.rfz_Sorted[an].begin();
838 rte[NT++] = data.rfz_Sorted[an].end();
839 }
840 production3Sp(data, rb, rbe, rt, rte, NB, NT, nseed, K);
841 if (!data.endlist) {
842 data.fNmin=f;
843 data.zMin = z;
844 return;
845 }
846 }
847 }
848 data.endlist = true;
849}
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
bool solenoidOn() const
status of the magnets
void getFieldZR(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field valaue on the z-r plane at given position works only inside the solenoid.

◆ production3Sp() [2/2]

void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp ( EventData & data,
std::vector< InDet::SiSpacePointForSeed * >::iterator * rb,
std::vector< InDet::SiSpacePointForSeed * >::iterator * rbe,
std::vector< InDet::SiSpacePointForSeed * >::iterator * rt,
std::vector< InDet::SiSpacePointForSeed * >::iterator * rte,
int NB,
int NT,
int & nseed,
float K ) const
private

Definition at line 855 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

862{
863
864 const float COF = 134*.07*9.;
865 const float COFP = 134*.2*9.;
866
867 std::vector<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
868 if (!data.endlist) {
869 r0 = data.rMin;
870 data.endlist = true;
871 }
872
873 // Loop through all trigger space points
874 //
875 for (; r0!=rbe[0]; ++r0) {
876 data.nOneSeeds = 0;
877 data.mapOneSeeds.erase(data.mapOneSeeds.begin(), data.mapOneSeeds.end());
878
879 float R = (*r0)->radius();
880 if (R<m_r2min) continue;
881 if (R>m_r2max) break;
882
883 bool pix = true;
884 if ((*r0)->spacepoint->clusterList().second) pix = false;
885 const Trk::Surface* sur0 = (*r0)->sur();
886 float X = (*r0)->x();
887 float Y = (*r0)->y();
888 float Z = (*r0)->z();
889 int Nb = 0;
890
891 // Bottom links production
892 //
893 for (int i=0; i!=NB; ++i) {
894 for (r=rb[i]; r!=rbe[i]; ++r) {
895 float Rb =(*r)->radius();
896 if (Rb<m_r1min) {
897 rb[i]=r;
898 continue;
899 }
900 if (Rb>m_r1max) break;
901
902 float dR = R-Rb;
903 if (dR<m_drmin) break;
904
905 if (dR>m_drmax || (*r)->sur()==sur0) continue;
906
907 if ( !pix && !(*r)->spacepoint->clusterList().second) continue;
908
909 float dx = X-(*r)->x();
910 float dy = Y-(*r)->y();
911 float dZ = Z-(*r)->z();
912 data.Tz[Nb] = dZ/std::sqrt(dx*dx+dy*dy);
913 if (data.Tz[Nb]<m_dzdrmin || data.Tz[Nb]>m_dzdrmax) continue;
914 data.Zo[Nb] = Z-R*data.Tz[Nb];
915
916 // Comparison with vertices Z coordinates
917 //
918 if (!isZCompatible(data, data.Zo[Nb], Rb, data.Tz[Nb])) continue;
919 data.SP[Nb] = (*r);
920 if (++Nb==m_maxsizeSP) goto breakb;
921 }
922 }
923 breakb:
924 if (!Nb || Nb==m_maxsizeSP) continue;
925 int Nt = Nb;
926
927 // Top links production
928 //
929 for (int i=0; i!=NT; ++i) {
930 for (r=rt[i]; r!=rte[i]; ++r) {
931 float Rt =(*r)->radius();
932 float dR = Rt-R;
933 if (dR<m_drmin || Rt<m_r3min) {
934 rt[i]=r;
935 continue;
936 }
937 if (Rt>m_r3max || dR>m_drmax) break;
938
939 if ((*r)->sur()==sur0) continue;
940
941 float dx = X-(*r)->x();
942 float dy = Y-(*r)->y();
943 float dZ = (*r)->z()-Z;
944 data.Tz[Nt] = dZ/std::sqrt(dx*dx+dy*dy);
945 if (data.Tz[Nt]<m_dzdrmin || data.Tz[Nt]>m_dzdrmax) continue;
946 data.Zo[Nt] = Z-R*data.Tz[Nt];
947
948 // Comparison with vertices Z coordinates
949 //
950 if (!isZCompatible(data, data.Zo[Nt], Rt, data.Tz[Nt])) continue;
951 data.SP[Nt] = (*r);
952 if (++Nt==m_maxsizeSP) goto breakt;
953 }
954 }
955
956 breakt:
957 if (!(Nt-Nb)) continue;
958
959 float covr0 = (*r0)->covr ();
960 float covz0 = (*r0)->covz ();
961 float ax = X/R;
962 float ay = Y/R;
963
964 for (int i=0; i!=Nt; ++i) {
965 float dx = data.SP[i]->x()-X;
966 float dy = data.SP[i]->y()-Y;
967 float dz = data.SP[i]->z()-Z;
968 float x = dx*ax+dy*ay;
969 float y =-dx*ay+dy*ax;
970 float r2 = 1.f/(x*x+y*y);
971 float dr = std::sqrt(r2);
972
973 i < Nb ? data.Tz[i] = -dz*dr : data.Tz[i] = dz*dr;
974
975 data.U [i] = x*r2;
976 data.V [i] = y*r2;
977 data.Er[i] = (covz0+data.SP[i]->covz()+data.Tz[i]*data.Tz[i]*(covr0+data.SP[i]->covr()))*r2;
978 data.R [i] = dr;
979 }
980
981 // Three space points comparison
982 //
983 for (int b=Nb-1; b>=0; --b) {
984 float SA = 1.f+data.Tz[b]*data.Tz[b];
985 for (int t=Nb; t!=Nt; ++t) {
986 float cof = COF;
987 if (!data.SP[t]->spacepoint->clusterList().second) cof = COFP;
988
989 float Ts = .5f*(data.Tz[b]+data.Tz[t]);
990 float dT = data.Tz[b]-data.Tz[t];
991 dT = dT*dT-data.Er[b]-data.Er[t]-2.*data.R[b]*data.R[t]*(Ts*Ts*covr0+covz0);
992
993 if (dT > 0. && dT > (m_iptmin*m_iptmin)*cof*SA) continue;
994 float dU = data.U[t]-data.U[b];
995 if (dU == 0.) continue;
996 float A = (data.V[t]-data.V[b])/dU;
997 float B = data.V[t]-A*data.U[t];
998 float S2 = 1.f+A*A;
999 float S = std::sqrt(S2);
1000 float BK = std::abs(B*K);
1001 if (BK > m_iptmin*S || BK < m_iptmax*S) continue; // Momentum cut
1002 if (dT > 0. && dT > (BK*BK/S2)*cof*SA) continue; // Polar angle cut
1003
1004 float Im = std::abs((A-B*R)*R);
1005 if (Im > m_diver) continue;
1006
1007 newOneSeed(data, data.SP[b]->spacepoint,(*r0)->spacepoint,data.SP[t]->spacepoint,data.Zo[b],Im);
1008 }
1009 }
1010 nseed += data.mapOneSeeds.size();
1011 fillSeeds(data);
1012 if (nseed>=m_maxsize) {
1013 data.endlist=false;
1014 ++r0;
1015 data.rMin = r0;
1016 return;
1017 }
1018 }
1019}
struct TBPatternUnitContext S2
void newOneSeed(EventData &data, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const float &, const float &) const
bool isZCompatible(EventData &data, float &, float &, float &) const
const double r0
electron radius{cm}

◆ writeNtuple()

void InDet::SiSpacePointsSeedMaker_LowMomentum::writeNtuple ( const SiSpacePointsSeed * seed,
const Trk::Track * track,
int seedType,
long eventNumber ) const
overridevirtual

Definition at line 1187 of file SiSpacePointsSeedMaker_LowMomentum.cxx.

1187 {
1188}

Member Data Documentation

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> InDet::SiSpacePointsSeedMaker_LowMomentum::m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
private

Definition at line 140 of file SiSpacePointsSeedMaker_LowMomentum.h.

140{ this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };

◆ m_diver

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_diver {this, "maxdImpact", 7.}
private

Definition at line 167 of file SiSpacePointsSeedMaker_LowMomentum.h.

167{this, "maxdImpact", 7.};

◆ m_drmax

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_drmax {this, "maxdRadius", 200.}
private

Definition at line 160 of file SiSpacePointsSeedMaker_LowMomentum.h.

160{this, "maxdRadius", 200.};

◆ m_drmin

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_drmin {this, "mindRadius", 10.}
private

Definition at line 159 of file SiSpacePointsSeedMaker_LowMomentum.h.

159{this, "mindRadius", 10.};

◆ m_dzdrmax

float InDet::SiSpacePointsSeedMaker_LowMomentum::m_dzdrmax {0.}
private

Definition at line 189 of file SiSpacePointsSeedMaker_LowMomentum.h.

189{0.};

◆ m_dzdrmin

float InDet::SiSpacePointsSeedMaker_LowMomentum::m_dzdrmin {0.}
private

Definition at line 188 of file SiSpacePointsSeedMaker_LowMomentum.h.

188{0.};

◆ m_dzdrver

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_dzdrver {this, "maxdZdRver", 0.02}
private

Definition at line 166 of file SiSpacePointsSeedMaker_LowMomentum.h.

166{this, "maxdZdRver", 0.02};

◆ m_dzver

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_dzver {this, "maxdZver", 5.}
private

Definition at line 165 of file SiSpacePointsSeedMaker_LowMomentum.h.

165{this, "maxdZver", 5.};

◆ m_etamax

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_etamax {this, "etaMax", 2.7}
private

Definition at line 173 of file SiSpacePointsSeedMaker_LowMomentum.h.

173{this, "etaMax", 2.7};

◆ m_fieldCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> InDet::SiSpacePointsSeedMaker_LowMomentum::m_fieldCondObjInputKey
private
Initial value:
{this, "AtlasFieldCacheCondObj", "fieldCondObj",
"Name of the Magnetic Field conditions object key"}

Definition at line 142 of file SiSpacePointsSeedMaker_LowMomentum.h.

142 {this, "AtlasFieldCacheCondObj", "fieldCondObj",
143 "Name of the Magnetic Field conditions object key"};

◆ m_fieldScale

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_fieldScale {this, "fieldScale", 1.}
private

Definition at line 175 of file SiSpacePointsSeedMaker_LowMomentum.h.

175{this, "fieldScale", 1.};

◆ m_fNmax

int InDet::SiSpacePointsSeedMaker_LowMomentum::m_fNmax {0}
private

Definition at line 182 of file SiSpacePointsSeedMaker_LowMomentum.h.

182{0};

◆ m_initialized

bool InDet::SiSpacePointsSeedMaker_LowMomentum::m_initialized {false}
private

Definition at line 180 of file SiSpacePointsSeedMaker_LowMomentum.h.

180{false};

◆ m_iptmax

float InDet::SiSpacePointsSeedMaker_LowMomentum::m_iptmax {1.f/400.f}
private

Definition at line 192 of file SiSpacePointsSeedMaker_LowMomentum.h.

192{1.f/400.f};

◆ m_iptmin

float InDet::SiSpacePointsSeedMaker_LowMomentum::m_iptmin {0.}
private

Definition at line 191 of file SiSpacePointsSeedMaker_LowMomentum.h.

191{0.};

◆ m_maxOneSize

IntegerProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_maxOneSize {this, "maxSeedsForSpacePoint", 5}
private

Definition at line 153 of file SiSpacePointsSeedMaker_LowMomentum.h.

153{this, "maxSeedsForSpacePoint", 5};

◆ m_maxsize

IntegerProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_maxsize {this, "maxSize", 2000}
private

Definition at line 151 of file SiSpacePointsSeedMaker_LowMomentum.h.

151{this, "maxSize", 2000};

◆ m_maxsizeSP

IntegerProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_maxsizeSP {this, "maxSizeSP", 1500}
private

Definition at line 152 of file SiSpacePointsSeedMaker_LowMomentum.h.

152{this, "maxSizeSP", 1500};

◆ m_outputlevel

int InDet::SiSpacePointsSeedMaker_LowMomentum::m_outputlevel {0}
private

Definition at line 181 of file SiSpacePointsSeedMaker_LowMomentum.h.

181{0};

◆ m_pixel

BooleanProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_pixel {this, "usePixel", true}
private

Definition at line 148 of file SiSpacePointsSeedMaker_LowMomentum.h.

148{this, "usePixel", true};

◆ m_prdToTrackMap

SG::ReadHandleKey<Trk::PRDtoTrackMap> InDet::SiSpacePointsSeedMaker_LowMomentum::m_prdToTrackMap {this,"PRDtoTrackMap","","option PRD-to-track association"}
private

Definition at line 139 of file SiSpacePointsSeedMaker_LowMomentum.h.

139{this,"PRDtoTrackMap","","option PRD-to-track association"};

◆ m_ptmax

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_ptmax {this, "pTmax", 500.}
private

Definition at line 168 of file SiSpacePointsSeedMaker_LowMomentum.h.

168{this, "pTmax", 500.};

◆ m_ptmin

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_ptmin {this, "pTmin", 100.}
private

Definition at line 174 of file SiSpacePointsSeedMaker_LowMomentum.h.

174{this, "pTmin", 100.};

◆ m_r1max

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_r1max {this, "maxRadius1", 600.}
private

Definition at line 155 of file SiSpacePointsSeedMaker_LowMomentum.h.

155{this, "maxRadius1", 600.};

◆ m_r1min

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_r1min {this, "minRadius1", 0.}
private

Definition at line 154 of file SiSpacePointsSeedMaker_LowMomentum.h.

154{this, "minRadius1", 0.};

◆ m_r2max

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_r2max {this, "maxRadius2", 600.}
private

Definition at line 157 of file SiSpacePointsSeedMaker_LowMomentum.h.

157{this, "maxRadius2", 600.};

◆ m_r2min

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_r2min {this, "minRadius2", 0.}
private

Definition at line 156 of file SiSpacePointsSeedMaker_LowMomentum.h.

156{this, "minRadius2", 0.};

◆ m_r3max

float InDet::SiSpacePointsSeedMaker_LowMomentum::m_r3max {0.}
private

Definition at line 190 of file SiSpacePointsSeedMaker_LowMomentum.h.

190{0.};

◆ m_r3min

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_r3min {this, "minRadius3", 0.}
private

Definition at line 158 of file SiSpacePointsSeedMaker_LowMomentum.h.

158{this, "minRadius3", 0.};

◆ m_r_rmax

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_r_rmax {this, "radMax", 200.}
private

Definition at line 163 of file SiSpacePointsSeedMaker_LowMomentum.h.

163{this, "radMax", 200.};

◆ m_r_rstep

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_r_rstep {this, "radStep", 2.}
private

Definition at line 164 of file SiSpacePointsSeedMaker_LowMomentum.h.

164{this, "radStep", 2.};

◆ m_r_size

int InDet::SiSpacePointsSeedMaker_LowMomentum::m_r_size {0}
private

Definition at line 183 of file SiSpacePointsSeedMaker_LowMomentum.h.

183{0};

◆ m_rfz_b

int InDet::SiSpacePointsSeedMaker_LowMomentum::m_rfz_b[SizeRFZ] {}
private

Definition at line 184 of file SiSpacePointsSeedMaker_LowMomentum.h.

184{};

◆ m_rfz_ib

int InDet::SiSpacePointsSeedMaker_LowMomentum::m_rfz_ib[SizeRFZ][SizeI] {}
private

Definition at line 186 of file SiSpacePointsSeedMaker_LowMomentum.h.

186{};

◆ m_rfz_it

int InDet::SiSpacePointsSeedMaker_LowMomentum::m_rfz_it[SizeRFZ][SizeI] {}
private

Definition at line 187 of file SiSpacePointsSeedMaker_LowMomentum.h.

187{};

◆ m_rfz_t

int InDet::SiSpacePointsSeedMaker_LowMomentum::m_rfz_t[SizeRFZ] {}
private

Definition at line 185 of file SiSpacePointsSeedMaker_LowMomentum.h.

185{};

◆ m_sct

BooleanProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_sct {this, "useSCT", true}
private

Definition at line 149 of file SiSpacePointsSeedMaker_LowMomentum.h.

149{this, "useSCT", true};

◆ m_sF

float InDet::SiSpacePointsSeedMaker_LowMomentum::m_sF {0.}
private

Definition at line 193 of file SiSpacePointsSeedMaker_LowMomentum.h.

193{0.};

◆ m_spacepointsOverlap

SG::ReadHandleKey<SpacePointOverlapCollection> InDet::SiSpacePointsSeedMaker_LowMomentum::m_spacepointsOverlap {this, "SpacePointsOverlapName", "OverlapSpacePoints"}
private

Definition at line 138 of file SiSpacePointsSeedMaker_LowMomentum.h.

138{this, "SpacePointsOverlapName", "OverlapSpacePoints"};

◆ m_spacepointsPixel

SG::ReadHandleKey<SpacePointContainer> InDet::SiSpacePointsSeedMaker_LowMomentum::m_spacepointsPixel {this, "SpacePointsPixelName", "PixelSpacePoints", "Pixel space points container"}
private

Definition at line 137 of file SiSpacePointsSeedMaker_LowMomentum.h.

137{this, "SpacePointsPixelName", "PixelSpacePoints", "Pixel space points container"};

◆ m_spacepointsSCT

SG::ReadHandleKey<SpacePointContainer> InDet::SiSpacePointsSeedMaker_LowMomentum::m_spacepointsSCT {this, "SpacePointsSCTName", "SCT_SpacePoints", "SCT space points container"}
private

Definition at line 136 of file SiSpacePointsSeedMaker_LowMomentum.h.

136{this, "SpacePointsSCTName", "SCT_SpacePoints", "SCT space points container"};

◆ m_useOverlap

BooleanProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_useOverlap {this, "useOverlapSpCollection", false}
private

Definition at line 150 of file SiSpacePointsSeedMaker_LowMomentum.h.

150{this, "useOverlapSpCollection", false};

◆ m_zmax

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_zmax {this, "maxZ", +250.}
private

Definition at line 162 of file SiSpacePointsSeedMaker_LowMomentum.h.

162{this, "maxZ", +250.};

◆ m_zmin

FloatProperty InDet::SiSpacePointsSeedMaker_LowMomentum::m_zmin {this, "minZ", -250.}
private

Definition at line 161 of file SiSpacePointsSeedMaker_LowMomentum.h.

161{this, "minZ", -250.};

The documentation for this class was generated from the following files: