|
ATLAS Offline Software
|
Go to the documentation of this file.
27 #include <QStringList>
30 #include <Inventor/nodes/SoTranslation.h>
31 #include <Inventor/nodes/SoSeparator.h>
32 #include <Inventor/nodes/SoSphere.h>
33 #include <Inventor/nodes/SoPointSet.h>
34 #include <Inventor/nodes/SoVertexProperty.h>
35 #include <Inventor/nodes/SoMatrixTransform.h>
36 #include <Inventor/nodes/SoMaterial.h>
37 #include <Inventor/SbMatrix.h>
38 #include <Inventor/SoPath.h>
46 #include "GaudiKernel/SystemOfUnits.h"
54 QList<VP1StdCollection*>
l;
72 QList<const Trk::Track*>& tracks,
73 QList<const Trk::TrackParticleBase*>& trackparticles);
85 m_sep->removeAllChildren();
89 m_sep =
new SoSeparator;
92 if (
m_sep->getNumChildren()>0)
93 m_sep->removeAllChildren();
160 r = (
rand() /
static_cast<double>(RAND_MAX));
161 g = (
rand() /
static_cast<double>(RAND_MAX));
162 b = (
rand() /
static_cast<double>(RAND_MAX));
166 if ( (
r-1.0)*(
r-1.0)+
g*
g+
b*
b < r2*0.5 )
170 else if (
r*
r+
g*
g+
b*
b < r2*2.0 )
180 " not be selected such as to satisfy all separation criteria");
202 SoPointSet *
points =
new SoPointSet;
203 SoVertexProperty *
vertices =
new SoVertexProperty;
211 SoTranslation * translation =
new SoTranslation;
212 translation->translation.setValue (
pos.x(),
pos.y(),
pos.z() );
213 m_sep->addChild ( translation );
221 double a(errMat(0,0)),
b(errMat(0,1)),
c(errMat(0,2)),
222 d(errMat(1,1)),
e(errMat(1,2)),
226 double sixthrootofdet =
exp(
log(
det)/6.0);
227 double invdet = 1.0/sixthrootofdet;
234 SbMatrix sbMat(
a,
b,
c,0,
238 SoMatrixTransform * matTrans =
new SoMatrixTransform();
239 matTrans->matrix.setValue(sbMat);
240 m_sep->addChild (matTrans);
246 SoSphere * sphere =
new SoSphere;
247 sphere->radius = fabs(
r);
248 m_sep->addChild ( sphere );
275 m_colourby(COLOUR_PERCOLLECTION)
282 connect(controller,SIGNAL(reconCutAllowedTypesChanged(VertexCommonFlags::ReconVertexTypeFlags)),
this,SLOT(
recheckAllCuts()));
284 dynamic_cast<VP1VertexSystem*
>(controller->
systemBase()),SLOT(updateVertexToTracks(QList<std::pair<
const SoMaterial*,QList<const Trk::Track*> > >&)));
305 m_d->
comboBox_colourby->setToolTip(
"Determine how vertices from this collection are coloured.");
342 if (
i>=0&&i<m_d->comboBox_colourby->count()) {
347 message(
"ERROR: Problems finding correct text in combo box");
355 QList<const Trk::Track*> tracks;
356 QList<const Trk::TrackParticleBase*> trackparticles;
357 QList< std::pair<const SoMaterial*, QList< const Trk::Track*> > > colAndTracks;
361 colAndTracks.append(std::pair<
const SoMaterial*, QList< const Trk::Track*> >(
mat, tracks));
377 messageVerbose(
"Collection detail level combo box changed index");
392 QList<const Trk::Track*>& tracks,
393 QList<const Trk::TrackParticleBase*>& trackparticles)
396 trackparticles.clear();
400 const std::vector<Trk::VxTrackAtVertex*> * tmpVxTAVtx = vtx->
vxTrackAtVertex();
401 for ( std::vector<Trk::VxTrackAtVertex*>::const_iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); ++itr) {
413 trk =
tp->originalTrack();
416 if (linkToTrack && linkToTrack->
isValid())
422 trackparticles <<
tp;
439 QList<const Trk::Track*> tracks;
440 QList<const Trk::TrackParticleBase*> trackparticles;
441 QList< std::pair<const SoMaterial*, QList< const Trk::Track*> > > colAndTracks;
446 colAndTracks.append(std::pair<
const SoMaterial*, QList< const Trk::Track*> >(
mat, tracks));
494 while (pickedPath->getLength()>3&&pickedPath->getNodeFromTail(0)->getTypeId()!=SoSeparator::getClassTypeId())
496 if (pickedPath->getNodeFromTail(0)->getTypeId()!=SoSeparator::getClassTypeId())
497 return QStringList() <<
"ERROR: Could not get vertex information for picked Node (1)";
498 SoSeparator * pickedSep =
static_cast<SoSeparator *
>(pickedPath->getNodeFromTail(0));
502 if (vh->
sep()==pickedSep) {
508 return QStringList() <<
"ERROR: Could not get vertex information for picked Node (1)";
515 l <<
"Reconstructed vertex from collection "+
text()+
":" ;
521 QList<const Trk::Track*> tracks;
522 QList<const Trk::TrackParticleBase*> trackparticles;
526 l <<
"--#Trk::Track's: "+
str(tracks.count());
527 l <<
"--#Trk::TrackParticleBase's: "+
str(trackparticles.count());
528 l <<
"======== Dump ========";
529 std::ostringstream
s;
531 l << QString(
s.str().c_str()).split(
'\n');
532 l <<
"======================";
554 QList< std::pair<const SoMaterial*, QList< const Trk::Track*> > > colAndTracks;
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
ElementType cachedElement() const
Return the cached element, if any.
Const iterator class for DataVector/DataList.
SoMaterial * determineMaterial()
const Trk::RecVertex & recVertex(void) const
Returns a reference to reconstructed vertex.
static QString comboBoxEntry_ColourByRandom()
SoMaterial * material() const
void messageVerbose(const QString &) const
VertexType vertexType() const
return the type of the vertex
void collVisibilityChanged(bool vis)
virtual void init(VP1MaterialButtonBase *button=0)
virtual void largeChangesBegin()
static VP1CameraHelper * animatedZoomToPath(SoCamera *camera, SoGroup *sceneroot, SoPath *path, double duration_in_secs=1.0, double clipVolPercent=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)
virtual ~VP1VertexCollection()
void updateShapes(VertexSysController *controller)
VertexCommonFlags::ReconVertexTypeFlags reconCutAllowedTypes() const
static QString str(const QString &s)
VP1VertexCollection * m_collHandle
bool isValid() const
Test to see if the link can be dereferenced.
#define AmgSymMatrix(dim)
bool printVerboseInfoOnClick() const
SoMaterial * m_randommaterial
QStringList getKeys() const
def save(self, fileName="./columbo.out")
VP1VertexCollection * theclass
std::vector< Trk::VxTrackAtVertex * > * vxTrackAtVertex(void)
Unconst pointer to the vector of tracks Required by some of the vertex fitters.
SoMaterial * m_randommaterial
VertexSysController * controller
void findAssociatedTracks(const Trk::VxCandidate *vtx, QList< const Trk::Track * > &tracks, QList< const Trk::TrackParticleBase * > &trackparticles)
bool cut(VertexHandle *vh, VertexSysController *controller)
@ V0LambdaBar
Temporary addition for V0 LambdaBar.
QStringList infoOnClicked(SoPath *pickedPath)
void visibilityChanged(bool)
void recheckCut(VertexHandle *vh)
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
AUTO - An Undocumented Tracking Object.
QList< VertexHandle * > vertices
VertexHandle(const Trk::VxCandidate *v, VP1VertexCollection *collHandle)
void tracksFromVertexChanged(QList< std::pair< const SoMaterial *, QList< const Trk::Track * > > > &)
void assignDefaultMaterial(SoMaterial *) const
void ensureAttached(SoSeparator *collSep, VertexSysController *controller)
void setColourBy(COLOURBY)
const Amg::Vector3D & position() const
return position of vertex
@ V0KShort
Temporary addition for KShort.
void rerandomiseRandomVertexColours()
const Trk::VxCandidate * vertex() const
IVP1System * systemBase() const
@ V0Vtx
Vertex from V0 Decay.
void init(VP1MaterialButtonBase *mat=0)
void rerandomiseRandomMaterial()
Eigen::Matrix< double, 3, 1 > Vector3D
@ SecVtx
Secondary Vertex.
COLOURBY colourBy() const
virtual void largeChangesEnd()
VertexCommonFlags::ReconVertexTypeFlag type()
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
QComboBox * comboBox_colourby
void actualBuildShape(VertexSysController *controller)
SoSeparator * collSep() const
All 3D objects from this coll.
VP1VertexCollection(VertexSysController *controller, const QString &key)
QString provideText() const
void ensureDetached(SoSeparator *collSep)
static QString comboBoxEntry_ColourByCollection()
bool printInfoOnClick() const
void message(const QString &) const
double reconVertexRepresentation() const
VP1VertexCollection * collHandle()
void colourByComboBoxItemChanged()
static QList< VP1StdCollection * > createCollections(VertexSysController *controller)
virtual COLOURBY defaultColourBy() const
@ ConvVtx
Converstion Vertex.
void message(const QString &) const
const Trk::VxCandidate * m_vertex
SoSeparator * sep() const
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
@ V0Lambda
Temporary addition for V0 Lambda.
QList< QWidget * > provideExtraWidgetsForGuiRow() const