17 #include "ui_tracksystemcontrollerform.h" 
   26 #include <Inventor/nodes/SoSeparator.h> 
   27 #include <Inventor/nodes/SoLineSet.h> 
   28 #include <Inventor/nodes/SoVertexProperty.h> 
   29 #include <Inventor/nodes/SoSwitch.h> 
   34 #include <QTextDocument> 
   35 #include "GaudiKernel/SystemOfUnits.h" 
   43                        "This is a temporary testing version of the basic 3D track display system.",
 
   44                        "Manuel Proissl, mproissl@cern.ch"), m_ptcut(0*
Gaudi::
Units::
GeV), m_multiselection(0),
 
   45                        m_trackInfoDisplay(nullptr)
 
   47   std::cout << 
"INFO :: TrackSystemDisplay -> constructor" << std::endl;
 
   55   std::cout << 
"INFO :: TrackSystemDisplay -> building event scene graph" << std::endl;
 
   61     message(
"ERROR :: Null storegate pointer received.");
 
   66   std::string trackname=
"Tracks";
 
   68   if (
status != StatusCode::SUCCESS || !trackColl) {
 
   69     message(
"ERROR :: Could not retrieve track collection (used key="+QString(trackname.c_str())+
")");
 
   80   for(trackItr=trackColl->
begin(); trackItr!=trackItrEnd; ++trackItr) {
 
   87     SoVertexProperty *vertices = 
new SoVertexProperty();
 
   92       vertices->vertex.set1Value(iver++,(*it)->position().x(),(*it)->position().y(),(*it)->position().z());
 
   95     SoLineSet * 
line = 
new SoLineSet();
 
   96     line->numVertices = iver;
 
   97     line->vertexProperty = vertices;
 
   99     SoSwitch * sw = 
new SoSwitch();
 
  101     sw->whichChild = 
pt > 
m_ptcut ? SO_SWITCH_ALL : SO_SWITCH_NONE;
 
  120     message(
"ERROR :: No track information for selected node.");
 
  127     message(
"ERROR :: Track has no track parameters.");
 
  132   QString 
title = 
"TriggerDisplay - Track Parameters";
 
  133   QList<QString> paraname, paravalue;
 
  142   for (
CamListItr itCam = cameras.begin(); itCam!=cameras.end(); ++itCam) {
 
  156   double totalenergy(0);
 
  158   foreach (SoNode * 
node, nodes) {
 
  161       message(
"ERROR :: Does not have track information for all nodes");
 
  168       message(
"ERROR :: Track has no trackparameters");
 
  172     total3mom += 
params->front()->momentum();
 
  173     totalenergy += 
params->front()->momentum().mag();
 
  177   double invmasssq = totalenergy*totalenergy - total3mom.mag2();
 
  179   QString 
title = 
"Invariant Mass";
 
  180   QList<QString> paraname, paravalue;
 
  183   paravalue << invmass_str+
" GeV";
 
  192   QWidget * controller = 
new QWidget(0);
 
  193   Ui::TrackSystemControllerForm ui;
 
  196   ui.setupUi(controller);
 
  200   connect(ui.doubleSpinBox_ptcut,SIGNAL(valueChanged(
double)),
this,SLOT(
ptCutChanged(
double)));
 
  220   QString 
header = 
"<html><head><link rel='stylesheet' type='text/css' href='format.css'></head><body>", 
footer = 
"</body></html>";
 
  221   QString css = 
"#design { font-family: Courier New; font-size: 12px; margin: 0px; width: 100%; text-align: left; } #design th { font-size: 13px; font-weight: normal; padding: 2px; background: #ccc; border-top: 4px solid #000; border-bottom: 1px solid #fff; color: #000; } #design td { padding: 2px; background: #000; border-bottom: 1px solid #fff; color: #fff; border-top: 1px solid transparent; }";
 
  222   QString table_b = 
"<table id='design'>", table_e = 
"</table>";
 
  223   QString thead_b = 
"<thead><tr><th COLSPAN=2>", thead_e = 
"</th></tr></thead>";
 
  224   QString tbody_b = 
"<tbody>", tbody_e = 
"</tbody>";
 
  225   QString data_tr_b = 
"<tr>", data_tr_e = 
"</tr>";
 
  226   QString data_td_b = 
"<td>", data_td_e = 
"</td>";
 
  230   for(
int i=0; 
i<paraname.size(); ++
i) {
 
  231     data += data_tr_b+data_td_b+ paraname[
i] +data_td_e;
 
  232     data += data_td_b+ paravalue[
i] +data_td_e+data_tr_e;
 
  236   QTextDocument *
doc = 
new QTextDocument;
 
  237   doc->addResource(QTextDocument::StyleSheetResource, QUrl(
"format.css"), css);
 
  254     it->first->whichChild = ( 
it->second>
m_ptcut ? SO_SWITCH_ALL : SO_SWITCH_NONE );