ATLAS Offline Software
Loading...
Searching...
No Matches
VP1TrackSystem::Imp Class Reference
Collaboration diagram for VP1TrackSystem::Imp:

Public Member Functions

InDetProjFlags::DetTypeFlags currentUsedIDProjections () const
unsigned calcTotalMomentumOfSelectedHandles (Amg::Vector3D &totmom, Amg::Vector3D &totpos, double &mass) const
template<class T>
QList< TrackCollHandleBase * > createSpecificCollections ()
QList< TrackCollHandleBase * > createCollections ()

Public Attributes

VP1TrackSystemtheclass = nullptr
TrackSysCommonDatacommon = nullptr
SoCooperativeSelectionsel_tracks = nullptr
AscObjSelectionManagerascObjSelManager = nullptr
TrackCommonFlags::SELECTIONMODE selMode
InDetProjFlags::DetTypeFlags lastEmittedUsedIDProjections
SoSeparator * totmomsep = nullptr
SoLineSet * totmomline = nullptr
Amg::Vector3D totmomgev
double totmass = 0.0
QList< const Trk::PrepRawData * > selectedPRDs
std::vector< std::map< GeoPVConstLink, float > > chamberT0s
std::map< const Trk::Track *, SoMaterial * > vertexMaterialForTrackBases

Detailed Description

Definition at line 83 of file VP1TrackSystem.cxx.

Member Function Documentation

◆ calcTotalMomentumOfSelectedHandles()

unsigned VP1TrackSystem::Imp::calcTotalMomentumOfSelectedHandles ( Amg::Vector3D & totmom,
Amg::Vector3D & totpos,
double & mass ) const

Definition at line 641 of file VP1TrackSystem.cxx.

642{
643 totmom = Amg::Vector3D(0,0,0);
644 totpos = Amg::Vector3D(0,0,0);
645 mass = 0;
646 if (!sel_tracks)
647 return 0;
648 unsigned nused(0);
649 double totenergy(0);
650 for (int i = 0; i < sel_tracks->getList()->getLength(); ++i) {
651 SoFullPath *fPath = static_cast<SoFullPath *>((*(sel_tracks->getList()))[i]);
652 TrackHandleBase * handle = common->trackHandle(fPath?fPath->getTail():nullptr);
653 if (!handle)
654 continue;
655 Amg::Vector3D mom = handle->momentum();
656 if (mom.mag2()==0.0)
657 continue;
658 //Fixme: Get actual position of perigee!!
659 std::optional<Amg::Vector3D> pos = handle->startPoint();
660 if (!pos)
661 continue;
662 ++nused;
663 totmom += mom;
664 totpos += *pos;
665 mass = handle->hasMass() ? handle->mass() : 0;
666 totenergy += sqrt(mom.mag2() + mass*mass);
667 }
668 if (nused>1) {
669 double msq = totenergy*totenergy - totmom.mag2();
670 mass = (msq<0?-1.0:1.0)*sqrt(fabs(msq));
671 totpos /= nused;
672 }
673 return nused;
674}
bool hasMass() const
virtual std::optional< Amg::Vector3D > startPoint() const
returns 0 if can't find start point.
virtual double mass() const
virtual Amg::Vector3D momentum() const
TrackSysCommonData * common
SoCooperativeSelection * sel_tracks
Eigen::Matrix< double, 3, 1 > Vector3D

◆ createCollections()

QList< TrackCollHandleBase * > VP1TrackSystem::Imp::createCollections ( )
inline

Definition at line 115 of file VP1TrackSystem.cxx.

115 {
116 QList<TrackCollHandleBase*> l;
117 l << createSpecificCollections<TrackCollHandle_TrkTrack>();
118 l << createSpecificCollections<TrackCollHandle_TrkSegment>();
119 // theclass->messageVerbose("Creating coll handle for TrackCollHandle_FatrasTruthTracks");
120 // l << createSpecificCollections<TrackCollHandle_FatrasTruthTracks>();
121 // theclass->messageVerbose("Creating coll handle for TrackCollHandle_TruthTracks");
122 l << createSpecificCollections<TrackCollHandle_TruthTracks>();
123 l << createSpecificCollections<TrackCollHandle_SimulationTracks>();
124 // theclass->messageVerbose("Creating coll handle for TrackCollHandle_TrackParticle");
125 l << createSpecificCollections<TrackCollHandle_TrackParticle>();
126 l << createSpecificCollections<TrackCollHandle_xAODTrackParticle>();
127 theclass->message("Creating coll handle for ACTS TrackContainers");
128 l << createSpecificCollections<TrackCollHandle_TrackContainer>();
129 return l;
130 }
VP1TrackSystem * theclass
l
Printing final latex table to .tex output file.

◆ createSpecificCollections()

template<class T>
QList< TrackCollHandleBase * > VP1TrackSystem::Imp::createSpecificCollections ( )
inline

Definition at line 105 of file VP1TrackSystem.cxx.

105 {
106 QList<TrackCollHandleBase*> l;
107 for (const QString& name : T::availableCollections(theclass)) {
108 std::cout<<name.toStdString()<<std::endl;
109 T * col = new T(common,name);
110 col->init();
111 l << col;
112 }
113 return l;
114 }
const QString & name() const
unsigned long long T

◆ currentUsedIDProjections()

InDetProjFlags::DetTypeFlags VP1TrackSystem::Imp::currentUsedIDProjections ( ) const

Definition at line 750 of file VP1TrackSystem.cxx.

751{
752 if (common->controller()->collWidget()->visibleStdCollections().isEmpty())
754 if (common->controller()->shownTrackParts() & TrackCommonFlags::InDetProjections)
757}

Member Data Documentation

◆ ascObjSelManager

AscObjSelectionManager* VP1TrackSystem::Imp::ascObjSelManager = nullptr

Definition at line 88 of file VP1TrackSystem.cxx.

◆ chamberT0s

std::vector<std::map<GeoPVConstLink, float> > VP1TrackSystem::Imp::chamberT0s

Definition at line 131 of file VP1TrackSystem.cxx.

◆ common

TrackSysCommonData* VP1TrackSystem::Imp::common = nullptr

Definition at line 86 of file VP1TrackSystem.cxx.

◆ lastEmittedUsedIDProjections

InDetProjFlags::DetTypeFlags VP1TrackSystem::Imp::lastEmittedUsedIDProjections

Definition at line 91 of file VP1TrackSystem.cxx.

◆ sel_tracks

SoCooperativeSelection* VP1TrackSystem::Imp::sel_tracks = nullptr

Definition at line 87 of file VP1TrackSystem.cxx.

◆ selectedPRDs

QList<const Trk::PrepRawData*> VP1TrackSystem::Imp::selectedPRDs

Definition at line 99 of file VP1TrackSystem.cxx.

◆ selMode

TrackCommonFlags::SELECTIONMODE VP1TrackSystem::Imp::selMode

Definition at line 89 of file VP1TrackSystem.cxx.

◆ theclass

VP1TrackSystem* VP1TrackSystem::Imp::theclass = nullptr

Definition at line 85 of file VP1TrackSystem.cxx.

◆ totmass

double VP1TrackSystem::Imp::totmass = 0.0

Definition at line 97 of file VP1TrackSystem.cxx.

◆ totmomgev

Amg::Vector3D VP1TrackSystem::Imp::totmomgev

Definition at line 96 of file VP1TrackSystem.cxx.

◆ totmomline

SoLineSet* VP1TrackSystem::Imp::totmomline = nullptr

Definition at line 95 of file VP1TrackSystem.cxx.

◆ totmomsep

SoSeparator* VP1TrackSystem::Imp::totmomsep = nullptr

Definition at line 94 of file VP1TrackSystem.cxx.

◆ vertexMaterialForTrackBases

std::map<const Trk::Track*, SoMaterial*> VP1TrackSystem::Imp::vertexMaterialForTrackBases

Definition at line 132 of file VP1TrackSystem.cxx.


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