16 #include "Acts/Surfaces/PerigeeSurface.hpp"
17 #include "Acts/Surfaces/Surface.hpp"
21 #include "CLHEP/Units/SystemOfUnits.h"
30 #include <Inventor/nodes/SoSeparator.h>
31 #include <Inventor/nodes/SoNode.h>
52 const Acts::BoundTrackParameters trackparams(
55 return trackparams.momentum()*1000.;
58 const std::vector<Amg::Vector3D>*
61 auto trackContainerCollHandle =
63 auto points =
new std::vector<Amg::Vector3D>;
65 auto ctx = trackContainerCollHandle->common()->geometryContext().context();
67 if (trackstate.hasSmoothed() && trackstate.hasReferenceSurface()) {
68 const Acts::BoundTrackParameters
params(
69 trackstate.referenceSurface().getSharedPtr(), trackstate.smoothed(),
87 QList<QTreeWidgetItem*>& listOfItems) {
93 unsigned int listSize =
list.size();
97 unsigned int trackStateNum=0;
99 QString surfaceText = QString(
" ");
100 surfaceText += trackState.hasReferenceSurface()?
QString::number(trackState.referenceSurface().type()):
"No Surface";
116 TSOSitem->setFlags(Qt::ItemFlag());
117 QFont itemFont = TSOSitem->font(0);
118 itemFont.setStrikeOut(
true);
119 TSOSitem->setFont(0, itemFont);
120 TSOSitem->setFont(1, itemFont);
122 std::ostringstream
s;
124 s <<
" | Flags: "<< trackState.typeFlags();
126 TSOSitem->setText(0, QString(
"Track State "+
text ) );
128 if (trackState.hasReferenceSurface()) {
129 auto& surface = trackState.referenceSurface();
130 QString surfaceText = QString(surface.toString(
common()->geometryContext().context()).c_str());
131 QTreeWidgetItem* surfItem =
new QTreeWidgetItem(TSOSitem);
132 surfItem->setExpanded(
true);
133 surfItem->setFlags(Qt::ItemIsEnabled);
134 surfItem->setText(0, QString(surface.name().c_str()));
135 surfItem->setText(1, surfaceText );
140 QString trackStateText;
144 if (trackState.hasCalibrated() ){
146 trackStateText+=measName;
148 QTreeWidgetItem* measItem =
new QTreeWidgetItem(TSOSitem);
149 measItem->setExpanded(
true);
150 measItem->setFlags(Qt::ItemIsEnabled);
151 measItem->setText(0, measName);
232 TSOSitem->setText(1, trackStateText );
245 "TrackHandle_TrackContainer::zoomToTSOS: checking ASC " +
250 if (asc && asc->
trackState().index()==trackState.index()) {
252 "TrackHandle_TrackContainer::zoomToTSOS: this ASC matches " +
277 "TrackHandle_TrackContainer::updateObjectBrowser: No m_objBrowseTree!");
298 "No ASC objects associated with this track - no track components "
303 unsigned int numOfTS = 0;
310 "Could not cast to AscObj_TrackState, or could not find matching Asc "
317 if (asc->
trackState().index() != trackstate.index()) {
319 "WARNING! TrackHandle_TrackContainer::updateObjectBrowser: " +
321 ": ASC index mismatch with trackstate from loop having " +
344 Qt::ItemIsSelectable | Qt::ItemIsEnabled);
347 itemFont.setStrikeOut(!asc->
visible());
355 const QString& )
const {
367 for (
auto trackstate :
m_track.trackStatesReversed()) {
376 std::vector<AssociatedObjectHandleBase*>*& ascobjs) {
381 ascobjs =
new std::vector<AssociatedObjectHandleBase*>;
382 unsigned int index =0;
390 const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy& state,
391 std::vector<AssociatedObjectHandleBase*>* ascobjs,
unsigned int index) {
397 ascobjs->push_back(ao);
404 const ActsTrk::TrackStateBackend::ConstTrackStateProxy& state)
const {
406 if (state.hasReferenceSurface()) {
408 state.referenceSurface().associatedDetectorElement());
411 if (idhelper.is_mdt(actsElement->identify())) {
413 }
else if (idhelper.is_tgc(actsElement->identify())) {
415 }
else if (idhelper.is_rpc(actsElement->identify())) {
417 }
else if (idhelper.is_csc(actsElement->identify())) {
419 }
else if (idhelper.is_stgc(actsElement->identify())) {
421 }
else if (idhelper.is_mm(actsElement->identify())) {
431 const ActsTrk::TrackStateBackend::ConstTrackStateProxy& state)
const {
432 QString
text(
"Unknown Measurement");
433 if (state.hasReferenceSurface()) {
435 state.referenceSurface().associatedDetectorElement());
438 if (helperSvc->isMuon(actsElement->identify()))
439 text = QString(helperSvc->toString(actsElement->identify()).c_str());