26#include "CLHEP/Units/SystemOfUnits.h"
28#include <Inventor/nodes/SoSeparator.h>
29#include <Inventor/nodes/SoRotationXYZ.h>
30#include <Inventor/nodes/SoTranslation.h>
31#include <Inventor/nodes/SoCone.h>
32#include <Inventor/SoPath.h>
56 QList<VP1StdCollection*> l;
57 for (
const QString&
key : keys) {
62 double length =
met->et() * (200.0*CLHEP::cm/(100.0*CLHEP::GeV));
93 if (
m_d->key.startsWith(
"MET_"))
95 else if (
m_d->key.startsWith(
"ObjMET_"))
121 m_dash->removeAllChildren();
136 serialise.disableUnsavedChecks();
138 serialise.save(
key());
139 return serialise.result();
145 if (
m_d->key.startsWith(
"MET_"))
146 return m_d->key.right(
m_d->key.count()-4);
147 else if (
m_d->key.startsWith(
"ObjMET_"))
148 return m_d->key.right(
m_d->key.count()-7);
158 return "Object-Based";
169 return "Missing Et objects found by standard algorithms";
171 return "Missing Et found by Object-Based algorithms";
173 return "Missing ET objects not recognised as belonging to any other section";
182 return QColor::fromRgbF(0, 2./3., 0.5);
184 return QColor::fromRgbF(1, 2./3., 0.5);
197 int icollsep = p->findNode(
collSep());
199 message(
"ERROR: Could not truncate picked path correctly");
201 p->truncate(icollsep+1);
208 return QStringList() <<
"ERROR: Nul MissingET pointer!";
210 l <<
"Missing ET ["+
key()+
"]:";
211 l <<
" Et: "+
str(
met->et()/CLHEP::GeV)+
" GeV";
212 l <<
" SumEt: "+
str(
met->sumet()/CLHEP::GeV)+
" GeV";
213 l <<
" EtX: "+
str(
met->etx()/CLHEP::GeV)+
" GeV";
214 l <<
" EtY: "+
str(
met->ety()/CLHEP::GeV)+
" GeV";
215 l <<
" Phi: "+
str(
met->phi());
233 double length =
met->et() * (200.0*CLHEP::cm/(100.0*CLHEP::GeV));
238 SoRotationXYZ *finalRotation =
new SoRotationXYZ();
239 finalRotation->axis=SoRotationXYZ::Z;
240 finalRotation->angle=-
M_PI/2+
met->phi();
243 SoTranslation *translation1=
new SoTranslation();
244 translation1->translation.setValue(0,0.5*0.75*
m_length*
scale,0);
247 SoCylinder *cyl =
new SoCylinder();
252 SoTranslation *translation2=
new SoTranslation();
256 SoCone *cone =
new SoCone();
262 m_arrow->addChild(finalRotation);
263 m_arrow->addChild(translation1);
265 m_arrow->addChild(translation2);
271 SoRotationXYZ *
r =
new SoRotationXYZ();
272 r->axis=SoRotationXYZ::Z;
276 SoTranslation *t=
new SoTranslation();
277 t->translation.setValue(0, 0, 0);
281 SoDrawStyle *drawStyle =
new SoDrawStyle;
282 drawStyle->style.setValue(SoDrawStyle::LINES);
283 drawStyle->lineWidth.setValue(2.0 *
thickness);
284 drawStyle->linePattern.setValue(0xFF00);
285 m_dash->addChild(drawStyle);
288 SoCoordinate3 *coords =
new SoCoordinate3;
289 SbVec3f* vert =
new SbVec3f[2];
290 vert[0] = SbVec3f(0.0, 0.0, 0.0);
292 coords->point.setValues(0, 2, vert);
296 SoLineSet *lineSet =
new SoLineSet ;
297 lineSet->numVertices.set1Value(0, 2) ;
298 m_dash->addChild(lineSet);
327 SoTranslation *translation1= (SoTranslation*)
m_arrow->getChild(1);
328 translation1->translation.setValue(0,0.5*0.75*
m_length*
scale,0);
330 SoCylinder *cyl = (SoCylinder*)
m_arrow->getChild(2);
334 SoTranslation *translation2= (SoTranslation*)
m_arrow->getChild(3);
337 SoCone *cone = (SoCone*)
m_arrow->getChild(4);
342 SoDrawStyle *drawStyle = (SoDrawStyle*)
m_dash->getChild(2);
343 drawStyle->lineWidth.setValue(2.0 *
thickness);
345 SoCoordinate3 *coords = (SoCoordinate3*)
m_dash->getChild(3);
346 SbVec3f* vert =
new SbVec3f[2];
347 vert[0] = SbVec3f(0.0, 0.0, 0.0);
349 coords->point.setValues(0, 2, vert);
352 m_base->removeAllChildren();
#define MISSINGET_ZEROLENGTH(x)
void message(const QString &) const
IVP1System * systemBase() const
const QString & key() const
virtual QColor baseCol() const
static void useThickness(double)
QStringList baseInfo(const MissingET *) const
virtual QString provideText() const
virtual QStringList clicked(SoPath *) const
static void useShape(bool)
VP1MissingEtHandle(IVP1System *sys, const QString &key)
virtual QByteArray providePersistifiableID() const
virtual QString provideSection() const
virtual ~VP1MissingEtHandle()
void truncateToCollSep(SoPath *) const
virtual QString provideSectionToolTip() const
void assignDefaultMaterial(SoMaterial *) const
void addArrowToCollSep(const MissingET *)
static void useScale(double)
static QList< VP1StdCollection * > createCollections(IVP1System *sys)
QStringList getKeys() const
virtual void init(VP1MaterialButtonBase *button=0)
SoSeparator * collSep() const
All 3D objects from this coll.
qint32 collTypeID() const
VP1StdCollection(IVP1System *, const QString &helperClassName)