ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
AscObj_TrackState Class Reference

#include <AscObj_TrackState.h>

Inheritance diagram for AscObj_TrackState:
Collaboration diagram for AscObj_TrackState:

Public Types

enum  PICKSTYLE { UNPICKABLE, ALL, COMPONENTS }
 

Public Member Functions

 AscObj_TrackState (TrackHandleBase *, unsigned indexOfPointOnTrack, const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state)
 
void setDistToNextPar (const double &)
 
void buildShapes (SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
 
QStringList clicked ()
 
void zoomView ()
 Depending on the controller settings, will attempt to zoom the view to this TSOS, for example in click() More...
 
bool isShortMeasurement ()
 Return true if TRT/MDT & shortened mode is on, false otherwise
More...
 
virtual void setVisible (bool)
 
virtual TrackCommonFlags::TSOSPartsFlags parts () const
 
const Acts::Surface & surface () const
 
const ActsTrk::TrackStateBackend::ConstTrackStateProxy trackState () const
 
Amg::Vector3D approxCenter () const
 
virtual bool initiatesOwnZooms () const
 
virtual QTreeWidgetItem * browserTreeItem () const
 
virtual void setBrowserTreeItem (QTreeWidgetItem *obt)
 
virtual unsigned nParts () const
 
bool hasParameters () const
 
bool hasParError () const
 
bool hasError () const
 
bool hasMaterialEffect () const
 
bool hasSurface () const
 
bool hasMeasurement () const
 
TrackSysCommonDatacommon () const
 
void setPickable (PICKSTYLE)
 
PICKSTYLE pickStyle () const
 
bool visible () const
 
void toggleVisible ()
 
TrackHandleBasetrackHandle () const
 
void update3DObjects ()
 
SoSeparator * shapeSimple () const
 
SoSeparator * shapeDetailed () const
 

Static Public Member Functions

static int numberOfInstances ()
 

Protected Member Functions

int regionIndex () const
 
double lodCrossOverValue () const
 

Private Member Functions

virtual ~AscObj_TrackState ()
 
void addTrackParamInfoToShapes (SoSeparator *&shape_simple, SoSeparator *&shape_detailed, bool showPars, bool showParsErrors, bool showSurfaces)
 
void addSurfaceToShapes (SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
 
void addMaterialToSurfaceShapes (SoNode *&shape_simple, SoNode *&shape_detailed)
 
void addPlaneSurfaceToShapes (SoSeparator *&shape_simple, SoSeparator *&shape_detailed, const Acts::Surface &surface)
 
void addCylindricalSurfaceToShapes (SoSeparator *&shape_simple, SoSeparator *&shape_detailed, const Acts::Surface &surface)
 
void addMaterialEffectsToShapes (SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
 
void addMeasurementToShapes (SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
 
void registerShapes (SoSeparator *simple, SoSeparator *detailed)
 
void unregisterShapes (SoSeparator *simple, SoSeparator *detailed)
 
AssocObjAttachmentHandlegetAttachmentHandle ()
 

Static Private Member Functions

static void ensureInitSeps (SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
 

Private Attributes

TrackCommonFlags::TSOSPartsFlags m_parts
 
unsigned m_indexOfPointOnTrack
 
double m_distToNextPar
 
QTreeWidgetItem * m_objBrowseTree
 
const ActsTrk::TrackStateBackend::ConstTrackStateProxy m_trackstate
 
Impm_d
 
TrackHandleBasem_trackHandle
 
bool m_visible
 
PICKSTYLE m_pickStyle
 

Detailed Description

Definition at line 29 of file AscObj_TrackState.h.

Member Enumeration Documentation

◆ PICKSTYLE

Enumerator
UNPICKABLE 
ALL 
COMPONENTS 

Definition at line 57 of file AssociatedObjectHandleBase.h.

Constructor & Destructor Documentation

◆ AscObj_TrackState()

AscObj_TrackState::AscObj_TrackState ( TrackHandleBase track,
unsigned  indexOfPointOnTrack,
const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &  state 
)

Definition at line 64 of file AscObj_TrackState.cxx.

69  m_indexOfPointOnTrack(indexOfPointOnTrack),
70  m_distToNextPar(-1),
71  m_objBrowseTree(nullptr),
72  m_trackstate(trackstate)
73 {
75  if (m_trackstate.hasReferenceSurface()) {
76  if (surface().associatedDetectorElement())
78  else
80  }
81 
82  if (m_trackstate.typeFlags().test(Acts::TrackStateFlag::ParameterFlag ))
84 
85  if (m_trackstate.typeFlags().test(Acts::TrackStateFlag::MeasurementFlag)){
87  if (m_trackstate.typeFlags().test(Acts::TrackStateFlag::OutlierFlag ))
89  else
91  }
92 
93  if (m_trackstate.typeFlags().test(Acts::TrackStateFlag::HoleFlag))
95 
96  if (m_trackstate.typeFlags().test(Acts::TrackStateFlag::MaterialFlag ))
98 }

◆ ~AscObj_TrackState()

virtual AscObj_TrackState::~AscObj_TrackState ( )
inlineprivatevirtual

Definition at line 59 of file AscObj_TrackState.h.

59 {}//Private so it can only be deleted by TrackHandleBase

Member Function Documentation

◆ addCylindricalSurfaceToShapes()

void AscObj_TrackState::addCylindricalSurfaceToShapes ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed,
const Acts::Surface &  surface 
)
private

Definition at line 331 of file AscObj_TrackState.cxx.

333  {
334  SoNode * nodeToAddSimple = nullptr;
335  SoNode * nodeToAddDetailed = nullptr;
336  // Check bounds
337  switch (surface.bounds().type()) {
338  case Acts::SurfaceBounds::BoundsType::eLine: {
339  const Acts::LineBounds& lineBounds =
340  dynamic_cast<const Acts::LineBounds&>(surface.bounds());
341  double hlength = lineBounds.get(Acts::LineBounds::eHalfLengthZ);
342 
343  SoVertexProperty * scatVtxProperty = new SoVertexProperty();
344  scatVtxProperty->vertex.set1Value(0, 0.0,0.0,-hlength);
345  scatVtxProperty->vertex.set1Value(1, 0.0,0.0, hlength);
346  SoLineSet * lineSurface = new SoLineSet();
347  lineSurface->numVertices = 2;
348  lineSurface->vertexProperty = scatVtxProperty;
349 
350  nodeToAddSimple = lineSurface;
351 
352  double radius = lineBounds.get(Acts::LineBounds::eR);
353 
354  SoTubs* lineSurfaceDetailed = new SoTubs();
355  (*lineSurfaceDetailed).pRMin = 0.;
356  (*lineSurfaceDetailed).pRMax = radius;
357  (*lineSurfaceDetailed).pDz = hlength;
358 
359  nodeToAddDetailed = lineSurfaceDetailed;
360  break;
361  }
362  default: {
363  VP1Msg::messageVerbose("AscObj_TrackState::addCylindricalSurfaceToShapes(): Unsupported bounds type.");
364  break;
365  }
366  }
367  if (nodeToAddDetailed!=nullptr){
368  addMaterialToSurfaceShapes(nodeToAddSimple, nodeToAddDetailed);
369  shape_simple->addChild(nodeToAddDetailed);
370  shape_detailed->addChild(nodeToAddDetailed);
371  }
372 }

◆ addMaterialEffectsToShapes()

void AscObj_TrackState::addMaterialEffectsToShapes ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed 
)
private
Parameters
shape_simpleshape_simple
shape_detailedshape_detailed

Definition at line 375 of file AscObj_TrackState.cxx.

376  {}

◆ addMaterialToSurfaceShapes()

void AscObj_TrackState::addMaterialToSurfaceShapes ( SoNode *&  shape_simple,
SoNode *&  shape_detailed 
)
private
Parameters
shape_simpleshape_simple

Definition at line 263 of file AscObj_TrackState.cxx.

264  {
265  if (trackHandle()->customColouredTSOSParts()&TrackCommonFlags::TSOS_AnySurface) {
266  SoMaterial * mat = common()->controller()->customMatSurfaces();
267  if (shape_detailed->getTypeId().isDerivedFrom(SoSeparator::getClassTypeId())) {
268  // static_cast<SoSeparator*>(theSurfSepSimple)->insertChild(mat,0); TODO
269  static_cast<SoSeparator*>(shape_detailed)->insertChild(mat,0);
270  } else {
271 
272  // SoSeparator * sepSimple = new SoSeparator;
273  // sepSimple->addChild(mat);
274  // sepSimple->addChild(theSurfSepSimple);
275  // nodeToAddSimple = sepSimple;
276  // TODO ^
277  SoSeparator * sep = new SoSeparator;
278  sep->addChild(mat);
279  sep->addChild(shape_detailed);
280  shape_detailed = sep;
281  }
282  }
283 }

◆ addMeasurementToShapes()

void AscObj_TrackState::addMeasurementToShapes ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed 
)
private

Definition at line 378 of file AscObj_TrackState.cxx.

379  {
380 
381  auto flag = m_trackstate.typeFlags();
382 
383  // Check if the TrackStateProxy has a measurement
384  if (!m_trackstate.hasReferenceSurface() ||
385  !flag.test(Acts::TrackStateFlag::MeasurementFlag ||
386  !(m_trackstate.hasUncalibratedSourceLink())))
387  return;
388 
389  ensureInitSeps(shape_simple, shape_detailed);
390  TrackCommonFlags::TSOSPartsFlags f(trackHandle()->shownTSOSParts() & m_parts);
391  const bool showMeas(f & TrackCommonFlags::TSOS_AnyMeasurement);
392  // const bool showMeasErrors(f & TrackCommonFlags::TSOS_MeasError);
393  if (showMeas) {
394  if (m_parts & trackHandle()->customColouredTSOSParts() &
396  SoMaterial* mat;
397  if (m_parts & trackHandle()->customColouredTSOSParts() &
400  else
402  shape_simple->addChild(mat);
403  shape_detailed->addChild(mat);
404  }
405 
406  // Handle measurements
407  auto sl = m_trackstate.getUncalibratedSourceLink()
409  assert(sl != nullptr);
410  const xAOD::UncalibratedMeasurement& uncalibMeas =
412 
413  const xAOD::UncalibMeasType measurementType = uncalibMeas.type();
414 
415  switch (measurementType) {
417  // Drift tubes
418  break;
419  }
426  // TODO
427  break;
428  }
430  // TODO
431  break;
432  }
434  default: {
436  "AscObj_TrackState::addMeasurementToShapes: Unable to handle this "
437  "measurement type ");
438  break;
439  }
440  }
441  }
442 }

◆ addPlaneSurfaceToShapes()

void AscObj_TrackState::addPlaneSurfaceToShapes ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed,
const Acts::Surface &  surface 
)
private

Definition at line 285 of file AscObj_TrackState.cxx.

287  {
288 
289  SoNode * nodeToAddSimple = nullptr;
290  SoNode * nodeToAddDetailed = nullptr;
291 
292  // Check bounds
293  switch (surface.bounds().type()) {
294  case Acts::SurfaceBounds::BoundsType::eBoundless: {
295  const double halfX = 100.0; // FIXME - make this configurable?
296  const double halfY = 100.0;
297  SoGenericBox* box = new SoGenericBox;
298  box->setParametersForBox(halfX, halfY,
299  0.5 * surfaceThickness);
300  box->drawEdgeLines.setValue(true);
301  nodeToAddDetailed = box;
302  break;
303  }
304  case Acts::SurfaceBounds::BoundsType::eRectangle: {
305 
306  const Acts::RectangleBounds& rectBounds =
307  dynamic_cast<const Acts::RectangleBounds&>(surface.bounds());
308  const double halfX = rectBounds.halfLengthX();
309  const double halfY = rectBounds.halfLengthY();
310  SoGenericBox* box = new SoGenericBox;
311  box->setParametersForBox(halfX, halfY,
312  0.5 * surfaceThickness);
313  box->drawEdgeLines.setValue(true);
314  nodeToAddDetailed = box;
315  // TODO simple
316  break;
317  }
318  default: {
319  VP1Msg::messageVerbose("Cannot currently handle surface bound of type" + QString::number(surface.bounds().type()));
320  break;
321  }
322  }
323 
324  if (nodeToAddDetailed!=nullptr){
325  addMaterialToSurfaceShapes(nodeToAddSimple, nodeToAddDetailed);
326  shape_simple->addChild(nodeToAddDetailed); // FIXME
327  shape_detailed->addChild(nodeToAddDetailed);
328  }
329 }

◆ addSurfaceToShapes()

void AscObj_TrackState::addSurfaceToShapes ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed 
)
private

Definition at line 201 of file AscObj_TrackState.cxx.

202  {
203  // VP1Msg::messageVerbose("\tAscObj_TrackState::addSurfaceToShapes() start. Type="+QString::number(surface().type())+" Bounds="+QString::number(surface().bounds().type()));
204  // Check if the TrackStateProxy has a surface
205 
206  if (!m_trackstate.hasReferenceSurface())
207  return;
208 
209  const Acts::Surface& surface = m_trackstate.referenceSurface();
210  if (surface.type()==Acts::Surface::SurfaceType::Straw && common()->controller()->hideTubeSurfaces())
211  return;
212 
213  SoTransform* sotra = VP1LinAlgUtils::toSoTransform(surface.transform(common()->geometryContext().context()));
214  shape_detailed->addChild(sotra);
215 
216  //
217  // enum SurfaceType {
218  // Cone = 0,
219  // Cylinder = 1,
220  // Disc = 2,
221  // Perigee = 3,
222  // Plane = 4,
223  // Straw = 5,
224  // Curvilinear = 6,
225  // Other = 7
226  // };
227 
228  // enum BoundsType : int {
229  // eCone = 0,
230  // eCylinder = 1,
231  // eDiamond = 2,
232  // eDisc = 3,
233  // eEllipse = 4,
234  // eLine = 5,
235  // eRectangle = 6,
236  // eTrapezoid = 7,
237  // eTriangle = 8,
238  // eDiscTrapezoid = 9,
239  // eConvexPolygon = 10,
240  // eAnnulus = 11,
241  // eBoundless = 12,
242  // eOther = 13
243  // };
244 
245 
246 
247  switch (surface.type()) {
249  addPlaneSurfaceToShapes(shape_simple, shape_detailed, surface);
250  break;
251  }
253  addCylindricalSurfaceToShapes(shape_simple, shape_detailed, surface);
254  break;
255  }
256  default:
257  VP1Msg::messageVerbose("Cannot currently handle surface of type" + QString::number(surface.type()));
258  break;
259  }
260  VP1Msg::messageVerbose("AscObj_TrackState::addSurfaceToShapes() end");
261 }

◆ addTrackParamInfoToShapes()

void AscObj_TrackState::addTrackParamInfoToShapes ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed,
bool  showPars,
bool  showParsErrors,
bool  showSurfaces 
)
private
Parameters
showSurfacesshowSurfaces

Definition at line 128 of file AscObj_TrackState.cxx.

132  {
133  ensureInitSeps(shape_simple, shape_detailed);
134 
135  SoSeparator* param_simple = new SoSeparator;
136  SoSeparator* param_detailed = new SoSeparator;
137 
138  if (!m_trackstate.hasReferenceSurface()) {
139  // FIXME - do not know how to handle this yet, since I think I need the
140  // surface to get the position
142  "AscObj_TrackState::addTrackParamInfoToShapes() - no reference "
143  "surface");
144  return;
145  }
146 
147  const Acts::BoundTrackParameters trackparams(
148  m_trackstate.referenceSurface().getSharedPtr(), m_trackstate.parameters(),
150  auto p1 = trackparams.position(common()->geometryContext().context());
151  if (showPars) {
152  auto u = trackparams.direction().unit();
153  double length = 15 * CLHEP::cm;
154  if (m_distToNextPar > 0)
156  Amg::Vector3D p2 = p1 + length * u;
157  // Line:
158  SoLineSet* line = new SoLineSet();
159  SoVertexProperty* vertices = new SoVertexProperty();
160  vertices->vertex.set1Value(0, p1.x(), p1.y(), p1.z());
161  vertices->vertex.set1Value(1, p2.x(), p2.y(), p2.z());
162  line->numVertices.set1Value(0, 2);
163 
164  // Point:
165  SoPointSet* points = new SoPointSet;
166  SoVertexProperty* vertices2 = new SoVertexProperty;
167  vertices2->vertex.set1Value(0, p1.x(), p1.y(), p1.z());
168  points->numPoints = 1;
169  line->vertexProperty = vertices;
170  points->vertexProperty = vertices2;
171  bool isHole = m_parts & TrackCommonFlags::TSOS_Hole;
172 
173  if (trackHandle()->customColouredTSOSParts() &
175  (isHole && (trackHandle()->customColouredTSOSParts() &
177  SoMaterial* mat = isHole
180  SoSeparator* sep = new SoSeparator;
181  sep->addChild(mat);
182  sep->addChild(line);
183  sep->addChild(points);
184  param_simple->addChild(sep);
185  param_detailed->addChild(sep);
186  } else {
187  param_simple->addChild(line);
188  param_simple->addChild(points);
189  param_detailed->addChild(line);
190  param_detailed->addChild(points);
191  }
192  if (showParsErrors) {
193  // TODO
194  }
195  shape_simple->addChild(param_simple);
196  shape_detailed->addChild(param_detailed);
197  }
198 }

◆ approxCenter()

Amg::Vector3D AscObj_TrackState::approxCenter ( ) const

Definition at line 108 of file AscObj_TrackState.cxx.

108  {
109  if (hasSurface())
110  return surface().center( common()->geometryContext().context() );
112  "AscObj_TrackState::approxCenter() WARNING: Failed to determine"
113  " position from either params or surface");
114  return Amg::Vector3D(0, 0, 0);
115 }

◆ browserTreeItem()

virtual QTreeWidgetItem* AscObj_TrackState::browserTreeItem ( ) const
inlinevirtual

Definition at line 51 of file AscObj_TrackState.h.

51 {return m_objBrowseTree;}

◆ buildShapes()

void AscObj_TrackState::buildShapes ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed 
)
virtual

Implements AssociatedObjectHandleBase.

Definition at line 454 of file AscObj_TrackState.cxx.

455  {
456  VP1Msg::messageVerbose("AscObj_TrackState::buildShapes() start");
457 
458  TrackCommonFlags::TSOSPartsFlags f(trackHandle()->shownTSOSParts()&m_parts);
460  VP1Msg::messageVerbose("AscObj_TrackState::buildShapes() - no objects to show with shownTSOSParts="+QString::number(trackHandle()->shownTSOSParts())+" and m_parts="+QString::number(m_parts));
461  return;
462  }
463  // TODO Implement the following
464  const bool showPars(f & TrackCommonFlags::TSOS_TrackPars);
465  // const bool showParsErrors(f & TrackCommonFlags::TSOS_AnyParsErrors);
466  // const bool showMeas(f & TrackCommonFlags::TSOS_AnyMeasRioOnTrack);
467  // const bool showCompetingRioOnTrack(f & TrackCommonFlags::TSOS_AnyMeasCompetingRioOnTrack);
468  const bool showSurfaces(f & TrackCommonFlags::TSOS_AnySurface);
469  // const bool showMaterialEffects(f & TrackCommonFlags::TSOS_AnyMaterialEffects);
470  // const bool showMeasErrors(f & TrackCommonFlags::TSOS_MeasError);
471  ensureInitSeps(shape_simple,shape_detailed);
472 
473  if (showPars)
474  addTrackParamInfoToShapes( shape_simple, shape_detailed, showPars, false, false);
475 
476  if (showSurfaces)
477  addSurfaceToShapes( shape_simple, shape_detailed);
478 
479  // addMeasurementToShapes is crashing at the moment. Need to investigate
480  // if (showMeas)
481  // addMeasurementToShapes( shape_simple, shape_detailed);
482 
483  VP1Msg::messageVerbose("AscObj_TrackState::buildShapes() end");
484 
485 }

◆ clicked()

QStringList AscObj_TrackState::clicked ( )
virtual

Implements AssociatedObjectHandleBase.

Definition at line 488 of file AscObj_TrackState.cxx.

488  {
489  QStringList l;
490  return l;
491 }

◆ common()

TrackSysCommonData * AssociatedObjectHandleBase::common ( ) const
inherited

Definition at line 105 of file AssociatedObjectHandleBase.cxx.

106 {
107  return m_trackHandle->common();
108 }

◆ ensureInitSeps()

void AscObj_TrackState::ensureInitSeps ( SoSeparator *&  shape_simple,
SoSeparator *&  shape_detailed 
)
staticprivate

Definition at line 445 of file AscObj_TrackState.cxx.

446  {
447  if (!shape_simple)
448  shape_simple = new SoSeparator;
449  if (!shape_detailed)
450  shape_detailed = new SoSeparator;
451 }

◆ getAttachmentHandle()

AssocObjAttachmentHandle * AssociatedObjectHandleBase::getAttachmentHandle ( )
privateinherited

Definition at line 155 of file AssociatedObjectHandleBase.cxx.

156 {
158 }

◆ hasError()

bool AssociatedObjectHandleBase::hasError ( ) const
inlineinherited

Definition at line 50 of file AssociatedObjectHandleBase.h.

◆ hasMaterialEffect()

bool AssociatedObjectHandleBase::hasMaterialEffect ( ) const
inlineinherited

Definition at line 51 of file AssociatedObjectHandleBase.h.

◆ hasMeasurement()

bool AssociatedObjectHandleBase::hasMeasurement ( ) const
inlineinherited

Definition at line 53 of file AssociatedObjectHandleBase.h.

◆ hasParameters()

bool AssociatedObjectHandleBase::hasParameters ( ) const
inlineinherited

Definition at line 48 of file AssociatedObjectHandleBase.h.

◆ hasParError()

bool AssociatedObjectHandleBase::hasParError ( ) const
inlineinherited

Definition at line 49 of file AssociatedObjectHandleBase.h.

◆ hasSurface()

bool AssociatedObjectHandleBase::hasSurface ( ) const
inlineinherited

Definition at line 52 of file AssociatedObjectHandleBase.h.

◆ initiatesOwnZooms()

virtual bool AscObj_TrackState::initiatesOwnZooms ( ) const
inlinevirtual

Reimplemented from AssociatedObjectHandleBase.

Definition at line 49 of file AscObj_TrackState.h.

49 { return true; }

◆ isShortMeasurement()

bool AscObj_TrackState::isShortMeasurement ( )

Return true if TRT/MDT & shortened mode is on, false otherwise

◆ lodCrossOverValue()

double AscObj_TrackState::lodCrossOverValue ( ) const
inlineprotectedvirtual

Reimplemented from AssociatedObjectHandleBase.

Definition at line 56 of file AscObj_TrackState.h.

56 {return 1000; }

◆ nParts()

virtual unsigned AssociatedObjectHandleBase::nParts ( ) const
inlinevirtualinherited

Definition at line 47 of file AssociatedObjectHandleBase.h.

47 { return 1; }

◆ numberOfInstances()

int AssociatedObjectHandleBase::numberOfInstances ( )
staticinherited

Definition at line 130 of file AssociatedObjectHandleBase.cxx.

131 {
132  return Imp::nascobjs;
133 }

◆ parts()

virtual TrackCommonFlags::TSOSPartsFlags AscObj_TrackState::parts ( ) const
inlinevirtual

Reimplemented from AssociatedObjectHandleBase.

Definition at line 42 of file AscObj_TrackState.h.

42 { return m_parts; }

◆ pickStyle()

PICKSTYLE AssociatedObjectHandleBase::pickStyle ( ) const
inlineinherited

Definition at line 59 of file AssociatedObjectHandleBase.h.

59 { return m_pickStyle; }

◆ regionIndex()

int AscObj_TrackState::regionIndex ( ) const
protectedvirtual

Reimplemented from AssociatedObjectHandleBase.

Definition at line 118 of file AscObj_TrackState.cxx.

118  {
120  static const double l = 30.0 * CLHEP::cm;
121  return static_cast<int>(c.z() / l) + 1000 * static_cast<int>(c.y() / l) +
122  1000000 * static_cast<int>(c.x() / l);
123 }

◆ registerShapes()

void AssociatedObjectHandleBase::registerShapes ( SoSeparator *  simple,
SoSeparator *  detailed 
)
privateinherited

Definition at line 93 of file AssociatedObjectHandleBase.cxx.

94 {
96 }

◆ setBrowserTreeItem()

virtual void AscObj_TrackState::setBrowserTreeItem ( QTreeWidgetItem *  obt)
inlinevirtual

Definition at line 52 of file AscObj_TrackState.h.

52 {m_objBrowseTree=obt;}

◆ setDistToNextPar()

void AscObj_TrackState::setDistToNextPar ( const double &  d)

Definition at line 101 of file AscObj_TrackState.cxx.

101  {
102  // We assume this is called right after the constructor - so no need
103  // to update 3D objects.
104  m_distToNextPar = d;
105 }

◆ setPickable()

void AssociatedObjectHandleBase::setPickable ( PICKSTYLE  ps)
inherited

Definition at line 136 of file AssociatedObjectHandleBase.cxx.

137 {
138  if (m_pickStyle==ps)
139  return;
140  m_pickStyle=ps;
141 
142  //Fixme...
143 
144 }

◆ setVisible()

void AscObj_TrackState::setVisible ( bool  vis)
virtual

Reimplemented from AssociatedObjectHandleBase.

Definition at line 493 of file AscObj_TrackState.cxx.

493  {
495 }

◆ shapeDetailed()

SoSeparator * AssociatedObjectHandleBase::shapeDetailed ( ) const
inherited

Definition at line 206 of file AssociatedObjectHandleBase.cxx.

207 {
208  return m_d->sep_detailed;
209 }

◆ shapeSimple()

SoSeparator * AssociatedObjectHandleBase::shapeSimple ( ) const
inherited

Definition at line 200 of file AssociatedObjectHandleBase.cxx.

201 {
202  return m_d->sep_simple;
203 }

◆ surface()

const Acts::Surface& AscObj_TrackState::surface ( ) const
inline

Definition at line 44 of file AscObj_TrackState.h.

44 { return m_trackstate.referenceSurface(); }

◆ toggleVisible()

void AssociatedObjectHandleBase::toggleVisible ( )
inlineinherited

Definition at line 62 of file AssociatedObjectHandleBase.h.

62 { setVisible(!m_visible); }

◆ trackHandle()

TrackHandleBase* AssociatedObjectHandleBase::trackHandle ( ) const
inlineinherited

Definition at line 64 of file AssociatedObjectHandleBase.h.

64 { return m_trackHandle; }

◆ trackState()

const ActsTrk::TrackStateBackend::ConstTrackStateProxy AscObj_TrackState::trackState ( ) const
inline

Definition at line 46 of file AscObj_TrackState.h.

46 { return m_trackstate; }

◆ unregisterShapes()

void AssociatedObjectHandleBase::unregisterShapes ( SoSeparator *  simple,
SoSeparator *  detailed 
)
privateinherited

Definition at line 99 of file AssociatedObjectHandleBase.cxx.

100 {
102 }

◆ update3DObjects()

void AssociatedObjectHandleBase::update3DObjects ( )
inherited

Definition at line 185 of file AssociatedObjectHandleBase.cxx.

186 {
187  VP1Msg::messageVerbose("AssociatedObjectHandleBase update3DObjects.");
188 
189  if (m_visible) {
190  m_d->detach();
191  m_d->ensureShapesErased(this);
192  m_d->ensureShapesBuild(this);
193  m_d->attach(this);
194  } else {
195  m_d->ensureShapesErased(this);
196  }
197 }

◆ visible()

bool AssociatedObjectHandleBase::visible ( ) const
inlineinherited

Definition at line 61 of file AssociatedObjectHandleBase.h.

61 { return m_visible; }

◆ zoomView()

void AscObj_TrackState::zoomView ( )

Depending on the controller settings, will attempt to zoom the view to this TSOS, for example in click()

Definition at line 497 of file AscObj_TrackState.cxx.

497  {
498  VP1Msg::messageVerbose("AscObj_TrackState::zoomView()");
499  if ( common()->controller()->orientAndZoomOnSingleSelection() )
500  {
501  // Zoom without orientation
502  // TODO - add orientation?
503  VP1Msg::messageVerbose("AscObj_TrackState::zoomView() Zoom without orientation");
504  std::set<SoCamera*> cameras = common()->system()->getCameraList();
505  std::set<SoCamera*>::iterator it,itE = cameras.end();
506  for (it=cameras.begin();it!=itE;++it) {
507  if (common()->controller()->assocObjDetailLevel()==TrackCommonFlags::SIMPLE)
508  {
509  VP1CameraHelper::animatedZoomToSubTree(*it,common()->ascObjSelectionManager()->getAscObjAttachSep(),shapeSimple(),2.0,1.0);
510  } else
511  {
512  VP1CameraHelper::animatedZoomToSubTree(*it,common()->ascObjSelectionManager()->getAscObjAttachSep(),shapeDetailed(),2.0,1.0);
513  }
514  }
515  } else {
516  VP1Msg::messageVerbose("AscObj_TrackState::zoomView() - zooming on selection not turned on.");
517  }
518 }

Member Data Documentation

◆ m_d

Imp* AssociatedObjectHandleBase::m_d
privateinherited

Definition at line 91 of file AssociatedObjectHandleBase.h.

◆ m_distToNextPar

double AscObj_TrackState::m_distToNextPar
private

Definition at line 62 of file AscObj_TrackState.h.

◆ m_indexOfPointOnTrack

unsigned AscObj_TrackState::m_indexOfPointOnTrack
private

Definition at line 61 of file AscObj_TrackState.h.

◆ m_objBrowseTree

QTreeWidgetItem* AscObj_TrackState::m_objBrowseTree
private

Definition at line 63 of file AscObj_TrackState.h.

◆ m_parts

TrackCommonFlags::TSOSPartsFlags AscObj_TrackState::m_parts
private

Definition at line 60 of file AscObj_TrackState.h.

◆ m_pickStyle

PICKSTYLE AssociatedObjectHandleBase::m_pickStyle
privateinherited

Definition at line 95 of file AssociatedObjectHandleBase.h.

◆ m_trackHandle

TrackHandleBase* AssociatedObjectHandleBase::m_trackHandle
privateinherited

Definition at line 93 of file AssociatedObjectHandleBase.h.

◆ m_trackstate

const ActsTrk::TrackStateBackend::ConstTrackStateProxy AscObj_TrackState::m_trackstate
private

Definition at line 64 of file AscObj_TrackState.h.

◆ m_visible

bool AssociatedObjectHandleBase::m_visible
privateinherited

Definition at line 94 of file AssociatedObjectHandleBase.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AssociatedObjectHandleBase::m_d
Imp * m_d
Definition: AssociatedObjectHandleBase.h:90
AssociatedObjectHandleBase::UNPICKABLE
@ UNPICKABLE
Definition: AssociatedObjectHandleBase.h:57
AscObjSelectionManager::registerAscObj
void registerAscObj(SoSeparator *simple, SoSeparator *detailed, AssociatedObjectHandleBase *)
Definition: AscObjSelectionManager.cxx:140
AssociatedObjectHandleBase::parts
virtual TrackCommonFlags::TSOSPartsFlags parts() const
Definition: AssociatedObjectHandleBase.h:46
AssociatedObjectHandleBase::lodCrossOverValue
virtual double lodCrossOverValue() const
Definition: AssociatedObjectHandleBase.h:82
AscObj_TrackState::m_objBrowseTree
QTreeWidgetItem * m_objBrowseTree
Definition: AscObj_TrackState.h:63
xAOD::UncalibMeasType::HGTDClusterType
@ HGTDClusterType
AssociatedObjectHandleBase::Imp::attach
void attach(AssociatedObjectHandleBase *theclass)
Definition: AssociatedObjectHandleBase.cxx:162
TrackSysCommonData::controller
TrackSystemController * controller() const
Definition: TrackSysCommonData.h:124
AssociatedObjectHandleBase::regionIndex
virtual int regionIndex() const
Definition: AssociatedObjectHandleBase.h:81
TrackCommonFlags::SIMPLE
@ SIMPLE
Definition: TrackCommonFlags.h:39
AssociatedObjectHandleBase::m_trackHandle
TrackHandleBase * m_trackHandle
Definition: AssociatedObjectHandleBase.h:93
TrackCommonFlags::TSOS_AnyMeasurement
@ TSOS_AnyMeasurement
Definition: TrackCommonFlags.h:61
AscObj_TrackState::addCylindricalSurfaceToShapes
void addCylindricalSurfaceToShapes(SoSeparator *&shape_simple, SoSeparator *&shape_detailed, const Acts::Surface &surface)
Definition: AscObj_TrackState.cxx:331
SoTubs
SoTubs - Inventor version of the G4Tubs Geant Geometry entity.
Definition: SoTubs.h:52
AscObj_TrackState::surface
const Acts::Surface & surface() const
Definition: AscObj_TrackState.h:44
xAOD::UncalibMeasType::StripClusterType
@ StripClusterType
hist_file_dump.d
d
Definition: hist_file_dump.py:142
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
AssociatedObjectHandleBase::hasSurface
bool hasSurface() const
Definition: AssociatedObjectHandleBase.h:52
AssociatedObjectHandleBase::COMPONENTS
@ COMPONENTS
Definition: AssociatedObjectHandleBase.h:57
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
TrackHandleBase::collHandle
TrackCollHandleBase * collHandle() const
Definition: TrackHandleBase.h:68
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TrackSysCommonData::system
VP1TrackSystem * system() const
Definition: TrackSysCommonData.h:122
TrackSysCommonData::ascObjSelectionManager
AscObjSelectionManager * ascObjSelectionManager() const
Definition: TrackSysCommonData.h:123
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:197
TrackCommonFlags::TSOS_AnySurface
@ TSOS_AnySurface
Definition: TrackCommonFlags.h:60
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
AscObj_TrackState::addPlaneSurfaceToShapes
void addPlaneSurfaceToShapes(SoSeparator *&shape_simple, SoSeparator *&shape_detailed, const Acts::Surface &surface)
Definition: AscObj_TrackState.cxx:285
AscObj_TrackState::addTrackParamInfoToShapes
void addTrackParamInfoToShapes(SoSeparator *&shape_simple, SoSeparator *&shape_detailed, bool showPars, bool showParsErrors, bool showSurfaces)
Definition: AscObj_TrackState.cxx:128
AscObj_TrackState::m_trackstate
const ActsTrk::TrackStateBackend::ConstTrackStateProxy m_trackstate
Definition: AscObj_TrackState.h:64
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
AssociatedObjectHandleBase::trackHandle
TrackHandleBase * trackHandle() const
Definition: AssociatedObjectHandleBase.h:64
AscObj_TrackState::addMaterialToSurfaceShapes
void addMaterialToSurfaceShapes(SoNode *&shape_simple, SoNode *&shape_detailed)
Definition: AscObj_TrackState.cxx:263
AscObj_TrackState::approxCenter
Amg::Vector3D approxCenter() const
Definition: AscObj_TrackState.cxx:108
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
AscObj_TrackState::m_distToNextPar
double m_distToNextPar
Definition: AscObj_TrackState.h:62
AssociatedObjectHandleBase::Imp::detach
void detach() const
Definition: AssociatedObjectHandleBase.cxx:147
TruthTest.itE
itE
Definition: TruthTest.py:25
TrackCommonFlags::TSOS_AnyErrors
@ TSOS_AnyErrors
Definition: TrackCommonFlags.h:67
AssociatedObjectHandleBase::Imp::sep_detailed
SoSeparator * sep_detailed
Definition: AssociatedObjectHandleBase.cxx:36
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
AscObj_TrackState::m_indexOfPointOnTrack
unsigned m_indexOfPointOnTrack
Definition: AscObj_TrackState.h:61
AscObj_TrackState::m_parts
TrackCommonFlags::TSOSPartsFlags m_parts
Definition: AscObj_TrackState.h:60
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
TrackCommonFlags::TSOS_TrackPars
@ TSOS_TrackPars
bit 0
Definition: TrackCommonFlags.h:44
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
AssociatedObjectHandleBase::m_visible
bool m_visible
Definition: AssociatedObjectHandleBase.h:94
AssociatedObjectHandleBase::common
TrackSysCommonData * common() const
Definition: AssociatedObjectHandleBase.cxx:105
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
SoTransparency::initClass
static void initClass()
Definition: SoTransparency.cxx:29
AssociatedObjectHandleBase::m_pickStyle
PICKSTYLE m_pickStyle
Definition: AssociatedObjectHandleBase.h:95
python.SystemOfUnits.ps
float ps
Definition: SystemOfUnits.py:150
TrackCommonFlags::TSOS_MeasRioOnTrackOutlier
@ TSOS_MeasRioOnTrackOutlier
bit 6
Definition: TrackCommonFlags.h:50
TrackSystemController::customMatSurfaces
SoMaterial * customMatSurfaces() const
Definition: TrackSystemController.cxx:1397
master.flag
bool flag
Definition: master.py:29
TrackSystemController::customMatHoleParameters
SoMaterial * customMatHoleParameters() const
Definition: TrackSystemController.cxx:1379
AscObj_TrackState::ensureInitSeps
static void ensureInitSeps(SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
Definition: AscObj_TrackState.cxx:445
AssociatedObjectHandleBase::Imp::sep_simple
SoSeparator * sep_simple
Definition: AssociatedObjectHandleBase.cxx:35
xAOD::Other
@ Other
hist_file_dump.f
f
Definition: hist_file_dump.py:140
SoGenericBox::setParametersForBox
void setParametersForBox(float dx, float dy, float dz, float xcenter=0.0, float ycenter=0.0, float zcenter=0.0)
Definition: SoGenericBox.cxx:178
AssociatedObjectHandleBase::setVisible
virtual void setVisible(bool)
Definition: AssociatedObjectHandleBase.cxx:171
TrackSystemController::customMatParameters
SoMaterial * customMatParameters() const
Definition: TrackSystemController.cxx:1373
TrackCommonFlags::TSOS_AnyMaterialEffects
@ TSOS_AnyMaterialEffects
Definition: TrackCommonFlags.h:59
TrackCommonFlags::TSOS_MaterialEffects
@ TSOS_MaterialEffects
bit 13
Definition: TrackCommonFlags.h:56
TrackHandleBase::common
TrackSysCommonData * common() const
Definition: TrackHandleBase.cxx:255
grepfile.sep
sep
Definition: grepfile.py:38
TrackCommonFlags::TSOS_AnyMeasRioOnTrack
@ TSOS_AnyMeasRioOnTrack
Definition: TrackCommonFlags.h:64
TrackSystemController::customMatMeasurementsOutliers
SoMaterial * customMatMeasurementsOutliers() const
Definition: TrackSystemController.cxx:1367
xAOD::Straw
@ Straw
Definition: TrackingPrimitives.h:558
python.selection.number
number
Definition: selection.py:20
TrackCommonFlags::TSOS_MeasRioOnTrackNotOutlier
@ TSOS_MeasRioOnTrackNotOutlier
bit 4
Definition: TrackCommonFlags.h:48
AssociatedObjectHandleBase::ALL
@ ALL
Definition: AssociatedObjectHandleBase.h:57
AssociatedObjectHandleBase::Imp::ensureShapesBuild
void ensureShapesBuild(AssociatedObjectHandleBase *theclass)
Definition: AssociatedObjectHandleBase.cxx:49
AscObjSelectionManager::unregisterAscObj
void unregisterAscObj(SoSeparator *simple, SoSeparator *detailed)
Definition: AscObjSelectionManager.cxx:164
TrackCommonFlags::TSOS_SurfacesDetElem
@ TSOS_SurfacesDetElem
bit 9
Definition: TrackCommonFlags.h:52
TrackCommonFlags::TSOS_Hole
@ TSOS_Hole
bit 14
Definition: TrackCommonFlags.h:57
ActsTrk::getUncalibratedMeasurement
const xAOD::UncalibratedMeasurement & getUncalibratedMeasurement(const ATLASUncalibSourceLink &source_link)
Definition: ATLASSourceLink.h:26
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
SoGenericBox::drawEdgeLines
SoSFBool drawEdgeLines
Definition: SoGenericBox.h:33
IVP13DSystem::getCameraList
CamList getCameraList()
Definition: IVP13DSystem.cxx:395
VP1Msg::message
static void message(const QString &, IVP1System *sys=0)
Definition: VP1Msg.cxx:30
TrackCommonFlags::TSOS_AnyParsErrors
@ TSOS_AnyParsErrors
Definition: TrackCommonFlags.h:66
SoGenericBox
Definition: SoGenericBox.h:26
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition: MeasurementDefs.h:25
TrackCommonFlags::TSOS_NoObjects
@ TSOS_NoObjects
Definition: TrackCommonFlags.h:43
AssociatedObjectHandleBase::Imp::ensureShapesErased
void ensureShapesErased(AssociatedObjectHandleBase *theclass)
Definition: AssociatedObjectHandleBase.cxx:77
AssociatedObjectHandleBase::shapeSimple
SoSeparator * shapeSimple() const
Definition: AssociatedObjectHandleBase.cxx:200
TrackHandleBase::getAttachmentHandle
AssocObjAttachmentHandle * getAttachmentHandle(int regionIndex, const double &crossoverval)
Definition: TrackHandleBase.cxx:1468
AssociatedObjectHandleBase::shapeDetailed
SoSeparator * shapeDetailed() const
Definition: AssociatedObjectHandleBase.cxx:206
TrackSystemController::customMatMeasurements
SoMaterial * customMatMeasurements() const
Definition: TrackSystemController.cxx:1361
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
TrackCommonFlags::TSOS_SurfacesCustom
@ TSOS_SurfacesCustom
bit 10
Definition: TrackCommonFlags.h:53
TrackCollHandleBase::common
TrackSysCommonData * common() const
Definition: TrackCollHandleBase.h:79
xAOD::Plane
@ Plane
Definition: TrackingPrimitives.h:557
AssociatedObjectHandleBase::Imp::nascobjs
static int nascobjs
Definition: AssociatedObjectHandleBase.cxx:29
VP1CameraHelper::animatedZoomToSubTree
static VP1CameraHelper * animatedZoomToSubTree(SoCamera *camera, SoGroup *sceneroot, SoNode *subtreeroot, double duration_in_secs=1.0, double clipVolPercent=100.0, double lastClipVolPercent=100.0, double slack=1.0, const SbVec3f &lookat=SbVec3f(999, 999, 999), const SbVec3f &upvec=SbVec3f(999, 999, 999), bool varySpeed=true, bool forceCircular=false)
Definition: VP1CameraHelper.cxx:413
python.compressB64.c
def c
Definition: compressB64.py:93
VP1LinAlgUtils::toSoTransform
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
Definition: VP1LinAlgUtils.cxx:40
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
AssociatedObjectHandleBase::AssociatedObjectHandleBase
AssociatedObjectHandleBase(TrackHandleBase *)
Definition: AssociatedObjectHandleBase.cxx:111
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97
xAOD::UncalibMeasType::PixelClusterType
@ PixelClusterType
common
Definition: common.py:1
AscObj_TrackState::addSurfaceToShapes
void addSurfaceToShapes(SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
Definition: AscObj_TrackState.cxx:201