6 #include "ui_caloreadoutsystemcontroller.h" 
   16 #include <Inventor/nodes/SoSwitch.h> 
   17 #include <Inventor/nodes/SoSeparator.h> 
   18 #include <Inventor/nodes/SoMaterial.h> 
   19 #include <Inventor/nodes/SoDrawStyle.h> 
   20 #include <Inventor/nodes/SoPickStyle.h> 
   21 #include <Inventor/nodes/SoLightModel.h> 
   22 #include <Inventor/nodes/SoTransform.h> 
   23 #include <Inventor/nodes/SoPointSet.h> 
   24 #include <Inventor/nodes/SoLineSet.h> 
   25 #include <Inventor/nodes/SoVertexProperty.h> 
   26 #include <Inventor/nodes/SoSphere.h> 
   69 #define MAX_OBJECTS_PER_TECHNOLOGY 3000 
   70 #define NPHISECTORS 16 
  189   std::map < SoNode *, const FCALTile *>   
TileMap;
 
  190   std::map < SoNode *, HECCellConstLink>   
HECMap;
 
  191   std::map < SoNode *, EMECCellConstLink>  
EMECMap;
 
  192   std::map < SoNode *, EMBCellConstLink>   
EMBMap;
 
  194   std::map < SoNode *, const EMBHVElectrode*>  
EMBHVMap;
 
  201   Ui::CaloReadoutSystemControllerForm 
ui{};
 
  208   :
IVP13DSystemSimple(
"CaloReadout",
"Display the calorimeter readout segmentation",
"boudreau@pitt.edu"),
 
  221 #define INSERTCHECKBOX(checkboxname) \ 
  222 m_clockwork->checkBoxNamesMap.insert(m_clockwork->ui.checkboxname, m_clockwork->ui.checkboxname->objectName()) 
  226   QWidget* controller = 
new QWidget(0);
 
  309   connect(
m_clockwork->
ui.phiSectionWidget,SIGNAL(enabledPhiRangesChanged(
const QList<VP1Interval>&)),
 
  321    QList<int> justEnabledPhiSectors;
 
  322    QList<int> justDisabledPhiSectors;
 
  325      if (currentstate!=
v[iphi]) {
 
  327      justDisabledPhiSectors << iphi;
 
  329      justEnabledPhiSectors << iphi;
 
  333    for (
int iphi : justDisabledPhiSectors)
 
  335    for (
int iphi : justEnabledPhiSectors)
 
  349   SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
  350   drawStyle->lineWidth=2;
 
  351   drawStyle->pointSize=3;
 
  353   SoLightModel *lightModel = 
new SoLightModel();
 
  354   lightModel->model=SoLightModel::BASE_COLOR;
 
  366   root->addChild(drawStyle);
 
  367   root->addChild(lightModel);
 
  373   SoMaterial *white = 
new SoMaterial();
 
  374   white->diffuseColor.setValue(1,1,1);
 
  379   root->addChild(white);
 
  410   for (
int i=0;
i<3;
i++) {
 
  570   for (
int i=0;
i<4;
i++) {
 
  708   while (
it.hasNext()) {
 
  710     if (
it.value()->isChecked())
 
  722   SoMaterial *
red = 
new SoMaterial();
 
  723   red->diffuseColor.setValue(1,.3,.3);
 
  726   SoMaterial *white = 
new SoMaterial();
 
  727   white->diffuseColor.setValue(1,1,1);
 
  730   SoMaterial *
blue = 
new SoMaterial();
 
  731   blue->diffuseColor.setValue(0,0,1);
 
  734   for (
int i=0;
i<3;
i++) {
 
  740   for (
int i=0;
i<4;
i++) {
 
  773     message(
"No Access To HV Information.  The LArHVManager is NULL");
 
  779     message(
"No Access To HV Information.  Cannot retrieve LArHVIdMap.");
 
  783                                          hvCablingKey.
key()) == 
nullptr)
 
  785     message(
"No Access To HV Information.  Cannot retrieve LArHVIdMap.");
 
  790   std::vector<const CondAttrListCollection*> attrLists;
 
  796       message(
"No Access To HV Information.  Cannot retrieve I16.");
 
  800       message(
"No Access To HV Information.  Cannot retrieve I8.");
 
  804                                      i16Key.
key()) == 
nullptr ||
 
  806                                     i8Key.
key()) == 
nullptr)
 
  808       message(
"No Access To HV Information.  Cannot retrieve LArHVIdMap.");
 
  813     attrLists.push_back (*i16);
 
  814     attrLists.push_back (*i8);
 
  838         SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
  839         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
  840         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMin)));
 
  841         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMax)));
 
  842         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMax)));
 
  843         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
  845         SoLineSet *
ls = 
new SoLineSet();
 
  847         ls->vertexProperty=vtxProperty;
 
  855         double voltage0 = hvdata_EMB.
voltage (electrode, 0);
 
  856         double voltage1 = hvdata_EMB.
voltage (electrode, 1);
 
  857         double nominalVoltage = 
m_clockwork->
ui.embNominalSpinBox->value();
 
  859         bool missing        = voltage0 == -99999 || voltage1 == -99999;
 
  862           SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
  866           SoLineSet *
ls = 
new SoLineSet();
 
  868           ls->vertexProperty=vtxProperty;
 
  873           else if (outOfTolerance) {
 
  903       SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
  904       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
  905       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMin)));
 
  906       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMax)));
 
  907       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMax)));
 
  908       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
  910       SoLineSet *
ls = 
new SoLineSet();
 
  912       ls->vertexProperty=vtxProperty;
 
  915       double voltage0 = hvdata_EMBPS.
voltage (embMod, 0);
 
  916       double voltage1 = hvdata_EMBPS.
voltage (embMod, 1);
 
  917       double nominalVoltage = 
m_clockwork->
ui.embPresamplerNominalSpinBox->value();
 
  919       bool missing        = voltage0 == -99999 || voltage1 == -99999;
 
  925       else if (outOfTolerance) {
 
  938   QSpinBox *emecSpinBoxOuter[]=       {
m_clockwork->
ui.emecNominalSpinBox_1,
 
  945   QSpinBox *emecSpinBoxInner[]=       {
m_clockwork->
ui.emecNominalSpinBox_8,
 
  949   for (
int t=0;
t<2;
t++) {
 
  958       double z =  
e==0 ? -3740:3740;
 
  968         double rMax=fabs(
z/sinh(
etaMin));
 
  969         double rMin=fabs(
z/sinh(
etaMax));
 
  973         SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
  974         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
  975         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
  976         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
  977         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
  978         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
  981         SoLineSet *
ls = 
new SoLineSet();
 
  983         ls->vertexProperty=vtxProperty;
 
  988           double voltage0 = hvdata_EMEC.
voltage (electrode, 0);
 
  989           double voltage1 = hvdata_EMEC.
voltage (electrode, 1);
 
  990           double nominalVoltage = spinBoxes[
y]->value();
 
  992           bool missing        = voltage0 == -99999 || voltage1 == -99999;
 
  995           double rMin=fabs(
z/sinh(
etaMin));
 
  996           double rMax=fabs(
z/sinh(
etaMax));
 
 1000         SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1001         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(electrode.
getPhi()),rMin*
sin(electrode.
getPhi())  ,
z));
 
 1002         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(electrode.
getPhi()),rMax*
sin(electrode.
getPhi())  ,
z));
 
 1004         SoLineSet *
ls = 
new SoLineSet();
 
 1006         ls->vertexProperty=vtxProperty;
 
 1011         else if (outOfTolerance) {
 
 1030     double z =  
e==0 ? -3650:3650;
 
 1038       double rMax=fabs(
z/sinh(
etaMin));
 
 1039       double rMin=fabs(
z/sinh(
etaMax));
 
 1043       SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1044       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1045       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
 1046       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
 1047       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
 1048       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1051       SoLineSet *
ls = 
new SoLineSet();
 
 1053       ls->vertexProperty=vtxProperty;
 
 1056       double voltage0 = hvdata_EMECPS.
voltage (emecMod, 0);
 
 1057       double voltage1 = hvdata_EMECPS.
voltage (emecMod, 1);
 
 1058       double nominalVoltage = 
m_clockwork->
ui.emecPresamplerNominalSpinBox->value();
 
 1060       bool missing        = voltage0 == -99999 || voltage1 == -99999;
 
 1065       else if (outOfTolerance) {
 
 1087       double voltage = hvdata_HEC.
voltage (subgap);
 
 1088       double nominalVoltage = 
m_clockwork->
ui.hecNominalSpinBox->value();
 
 1089       bool outOfTolerance = fabs(voltage-nominalVoltage) > 
double (
tolerance);
 
 1090       bool missing        = voltage == -99999;
 
 1103       double z0 = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(
HECCell::FRONT))).
z();
 
 1104       double z1 = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(
HECCell::BACK))).
z();
 
 1107       double z =  
z0 + 
i*(z1-
z0)/4;
 
 1111       double rMin   = 
s==0 ? 371 : 474;
 
 1114       SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1115       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1116       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
 1117       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
 1118       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
 1119       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1121       SoLineSet *
ls = 
new SoLineSet();
 
 1123       ls->vertexProperty=vtxProperty;
 
 1127       else if (outOfTolerance) {
 
 1149       double voltage = hvdata_FCAL.
voltage (fcalLine);
 
 1156       const QSpinBox *spinBox=fcalSpin[
s];
 
 1157       double nominalVoltage = 
double (spinBox->value());
 
 1159       bool outOfTolerance = fabs(voltage-nominalVoltage) > 
double(
tolerance);
 
 1160       bool missing        = voltage == -99999;
 
 1174           SoSeparator  *
sep = 
new SoSeparator();
 
 1177           SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1191         for (
unsigned int p=0;
p<(*t).getNumTubes();
p++) {
 
 1194           if (&Line==&fcalLine) {
 
 1195             vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
T->getXLocal(),
T->getYLocal(),
z));
 
 1199           SoPointSet *
ps = 
new SoPointSet();
 
 1201           ps->vertexProperty=vtxProperty;
 
 1206           else if (outOfTolerance) {
 
 1232     SoSeparator *
sep[
NPHISECTORS]= {
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1233                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1234                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1235                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator()};
 
 1249         double zMin   = cellPtr->getZMinLocal(
pos);
 
 1250         double zMax   = cellPtr->getZMaxLocal(
pos);
 
 1251         double r      = cellPtr->getRLocal(
pos);
 
 1252         double phiMin = cellPtr->getPhiLocalLower();
 
 1253         double phiMax = cellPtr->getPhiLocalUpper();
 
 1256         SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1257         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,zMin));
 
 1258         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,zMin));
 
 1259         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,zMax));
 
 1260         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,zMax));
 
 1261         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,zMin));
 
 1263         SoLineSet *
ls = 
new SoLineSet();
 
 1265         ls->vertexProperty=vtxProperty;
 
 1267         int p = 
int ((cellPtr->getPhiMaxNominal() + cellPtr->getPhiMinNominal())/2.0 * 
NPHISECTORS/2.0/
M_PI);
 
 1289      SoSeparator *
sep[
NPHISECTORS]= {
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1290                 new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1291                 new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1292                 new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator()};
 
 1295      for (
int i=0;
i<1024;
i++) {
 
 1298        SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1301        for (
int j=0; j<14; j++) {
 
 1302      double xcent      = absorberSection->
XCent(
i,j);
 
 1303      double ycent      = absorberSection->
YCent(
i,j);
 
 1304      double cosU       = absorberSection->
Cosu(
i,j);
 
 1305      double sinU       = absorberSection->
Sinu(
i,j);
 
 1306      double halfLength = absorberSection->
HalfLength(
i,j);
 
 1307      vtxProperty->vertex.set1Value(
cc++,  SbVec3f(xcent, ycent, 0.0)-SbVec3f(cosU, sinU, 0)*halfLength);
 
 1308      vtxProperty->vertex.set1Value(
cc++,  SbVec3f(xcent, ycent, 0.0)+SbVec3f(cosU, sinU, 0)*halfLength);
 
 1310        SoLineSet *
ls = 
new SoLineSet();
 
 1312        ls->vertexProperty=vtxProperty;
 
 1335         SoSeparator *fsep = 
new SoSeparator;
 
 1337         SoTransform *soxf = 
new SoTransform();
 
 1338         soxf->translation.setValue(vFocal.x(),vFocal.y(),vFocal.z());
 
 1339         SoSphere *sphere = 
new SoSphere();
 
 1340         sphere->radius=10.0;
 
 1341         fsep->addChild(soxf);
 
 1342         fsep->addChild(sphere);
 
 1347     catch (
const std::runtime_error & 
e) {
 
 1354     SoSeparator *
sep[
NPHISECTORS]= {
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1355                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1356                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1357                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator()};
 
 1371         double rMin   = cellPtr->getRMinLocal(
pos);
 
 1372         double rMax   = cellPtr->getRMaxLocal(
pos);
 
 1373         double z      = cellPtr->getZLocal(
pos);
 
 1374         double phiMin = cellPtr->getPhiLocalLower();
 
 1375         double phiMax = cellPtr->getPhiLocalUpper();
 
 1378         SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1379         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1380         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
 1381         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
 1382         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
 1383         vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1385         SoLineSet *
ls = 
new SoLineSet();
 
 1387         ls->vertexProperty=vtxProperty;
 
 1389         int p = 
int ((cellPtr->getPhiMaxNominal() + cellPtr->getPhiMinNominal())/2.0 * 
NPHISECTORS/2.0/
M_PI);
 
 1418       SoSeparator *fsep = 
new SoSeparator;
 
 1420       SoTransform *soxf = 
new SoTransform();
 
 1421       soxf->translation.setValue(vFocal.x(),vFocal.y(),vFocal.z());
 
 1422       SoSphere *sphere = 
new SoSphere();
 
 1423       sphere->radius=10.0;
 
 1424       fsep->addChild(soxf);
 
 1425       fsep->addChild(sphere);
 
 1433     SoSeparator *
sep[
NPHISECTORS]= {
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1434                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1435                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(),
 
 1436                    new SoSeparator(), 
new SoSeparator(), 
new SoSeparator(), 
new SoSeparator()};
 
 1454           double z    = cellPtr->getZLocal(
pos);
 
 1455           double rMin = cellPtr->getRMinLocalNominal(
pos);
 
 1456           double rMax = cellPtr->getRMaxLocalNominal(
pos);
 
 1459           double phiMin = cellPtr->getPhiLocalUpper();
 
 1460           double phiMax = cellPtr->getPhiLocalLower();
 
 1463           SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1464           vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1465           vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
 1466           vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
 1467           vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
 1468           vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 1470           SoLineSet *
ls = 
new SoLineSet();
 
 1472           ls->vertexProperty=vtxProperty;
 
 1475           int p = 
int ((cellPtr->getPhiMaxNominal() + cellPtr->getPhiMinNominal())/2.0 * 
NPHISECTORS/2.0/
M_PI);
 
 1506        SoSeparator *
sep = 
new SoSeparator();
 
 1510      double x = 
t->getX();
 
 1511      double y = 
t->getY();
 
 1523      SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1524      vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
x-
dx+3,
y-
dy+3   ,
z));
 
 1525      vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
x+
dx-3,
y-
dy+3,   
z));
 
 1526      vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
x+
dx-3,
y+
dy-3   ,
z));
 
 1527      vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
x-
dx+3,
y+
dy-3   ,
z));
 
 1528      vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
x-
dx+3,
y-
dy+3   ,
z));
 
 1530      SoLineSet *
ls = 
new SoLineSet();
 
 1532      ls->vertexProperty=vtxProperty;
 
 1582     for (
int i=0;
i<4;
i++) {
 
 1647     if (swName==
"embCheckBoxHV"    ||
 
 1648     swName==
"embCheckBoxMods"  ||
 
 1649     swName==
"emecCheckBoxMods" ||
 
 1650     swName==
"emecCheckboxHV"   ||
 
 1651     swName==
"embPresamplerCheckBoxHV"    ||
 
 1652     swName==
"embPresamplerCheckBoxMods"  ||
 
 1653     swName==
"emecPresamplerCheckBoxMods" ||
 
 1654     swName==
"emecPresamplerCheckboxHV"   ||
 
 1655     swName==
"hecS0CheckBoxHV"  ||
 
 1656     swName==
"hecS1CheckBoxHV"  ||
 
 1657     swName==
"hecS2CheckBoxHV"  ||
 
 1658     swName==
"hecS3CheckBoxHV"  ||
 
 1659     swName==
"fcalS0CheckBoxHV" ||
 
 1660     swName==
"fcalS1CheckBoxHV" ||
 
 1661     swName==
"fcalS2CheckBoxHV" )
 
 1675     sw->whichChild = SO_SWITCH_ALL;
 
 1678     sw->whichChild = SO_SWITCH_NONE;
 
 1680     else if (swName==
"badHVDisplayCheckBox")
 
 1689     else if (swName==
"missingHVDisplayCheckBox")
 
 1698     else if (swName==
"normalHVDisplayCheckBox")
 
 1726   SoPickStyle *pickStyle = 
new SoPickStyle();
 
 1727   pickStyle->style=SoPickStyleElement::UNPICKABLE;
 
 1731   std::ostringstream indexStream, etaBoundaryStream, phiBoundaryStream;
 
 1735     std::map < SoNode *, const EMBHVElectrode*>::const_iterator 
p = 
m_clockwork->
EMBHVMap.find(mySelectedNode);
 
 1743       std::ostringstream outstream;
 
 1744       outstream << 
"Side: " << 
module.getSideIndex()
 
 1745                 <<
" Eta: " << 
module.getEtaIndex()
 
 1746                 << 
" Phi: " << 
module.getPhiIndex()
 
 1747                 << 
" Sector: " << 
module.getSectorIndex()
 
 1749                 << 
" Voltages: " << hvdata.
voltage (electrode, 0)
 
 1750                 << 
"/" << hvdata.
voltage (electrode, 1)
 
 1751                 << 
"; currents: " << hvdata.
current (electrode, 0)
 
 1752                 << 
"/" << hvdata.
current (electrode, 1);
 
 1753       message (outstream.str().c_str());
 
 1758     std::map < SoNode *, const EMECHVElectrode*>::const_iterator 
p = 
m_clockwork->
EMECHVMap.find(mySelectedNode);
 
 1766       std::ostringstream outstream;
 
 1767       outstream << 
"Side: " << 
module.getSideIndex()
 
 1768                 << 
" Wheel: " << 
module.getWheelIndex()
 
 1769                 << 
" Eta: " << 
module.getEtaIndex()
 
 1770                 << 
" Phi: " << 
module.getPhiIndex()
 
 1771                 << 
" Sector: " << 
module.getSectorIndex()
 
 1773                 << 
"Voltages: " << hvdata.
voltage (electrode, 0)
 
 1774                 << 
"/" << hvdata.
voltage (electrode, 1)
 
 1775                 << 
"; currents: " << hvdata.
current (electrode, 0)
 
 1776                 << 
"/" << hvdata.
current (electrode, 1);
 
 1777       message (outstream.str().c_str());
 
 1783     std::map < SoNode *, const HECHVSubgap*>::const_iterator 
p = 
m_clockwork->
HECHVMap.find(mySelectedNode);
 
 1791       std::ostringstream outstream;
 
 1792       outstream << 
"Side: " << 
module.getSideIndex()
 
 1793                 << 
" Phi: " << 
module.getPhiIndex()
 
 1794                 << 
" Sampling: " << 
module.getSamplingIndex()
 
 1796                 << 
"Voltage: " << hvdata.
voltage (subgap)
 
 1797                 << 
"; current: " << hvdata.
current (subgap);
 
 1798       message (outstream.str().c_str());
 
 1803     std::map < SoNode *, const FCALHVLine*>::const_iterator 
p = 
m_clockwork->
FCALHVMap.find(mySelectedNode);
 
 1811       std::ostringstream outstream;
 
 1812       outstream << 
"Side: " << 
module.getSideIndex()
 
 1813                 << 
" Sector: " << 
module.getSectorIndex()
 
 1814                 << 
" Sampling: " << 
module.getSamplingIndex()
 
 1815                 << 
" Line: " << 
line.getLineIndex()
 
 1818       message (outstream.str().c_str());
 
 1824     std::map < SoNode *, const FCALTile *>::const_iterator 
p = 
m_clockwork->
TileMap.find(mySelectedNode);
 
 1827       const FCALTile *element  = (*p).second;
 
 1828       indexStream       << 
"Element selected  has identifier of " << element->
identify() <<  std::endl;
 
 1829       indexStream       << 
"I index of                          " << element->
getIndexI() <<  std::endl;
 
 1830       indexStream       << 
"J index of                          " << element->
getIndexJ() <<  std::endl;
 
 1832     std::ostringstream highVoltageStream;
 
 1833     highVoltageStream << 
"There are " << element->
getNumHVLines() << 
" high voltage lines. Status: " << std::endl;
 
 1834     message(highVoltageStream.str().c_str());
 
 1848             std::ostringstream highVoltageStream;
 
 1850               highVoltageStream << 
i << 
' ' << hvdata.
voltage (*element->
getHVLine(
i)) << std::endl;
 
 1852             message(highVoltageStream.str().c_str());
 
 1868     SoSeparator * 
sep = 
new SoSeparator();
 
 1879     SoMaterial *white = 
new SoMaterial();
 
 1880     white->diffuseColor.setValue(1.00,1.00, 1.00);
 
 1882     SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
 1883     drawStyle->lineWidth=3;
 
 1884     drawStyle->pointSize=3;
 
 1886     SoLightModel *lm = 
new SoLightModel();
 
 1887     lm->model=SoLightModel::BASE_COLOR;
 
 1888     sep->addChild(white);
 
 1889     sep->addChild(drawStyle);
 
 1894     SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1896       if (((*f).getHVLine(0) && (*f).getHVLine(0)==element->
getHVLine(0)) ||
 
 1897           ((*f).getHVLine(1) && (*f).getHVLine(1)==element->
getHVLine(1)) ||
 
 1898           ((*f).getHVLine(2) && (*f).getHVLine(2)==element->
getHVLine(2)) ||
 
 1899           ((*f).getHVLine(3) && (*f).getHVLine(3)==element->
getHVLine(3)) ) {
 
 1900         for (
unsigned int i=0;
i<(*f).getNumTubes();
i++) {
 
 1902           vtxProperty->vertex.set1Value(
cc++,  SbVec3f(myTube->getXLocal(),myTube->getYLocal(),
z));
 
 1906     SoPointSet *
ps = 
new SoPointSet();
 
 1908     ps->vertexProperty=vtxProperty;
 
 1917     SoSeparator * 
sep = 
new SoSeparator();
 
 1928     SoMaterial *white = 
new SoMaterial();
 
 1929     white->diffuseColor.setValue(1.00,1.00, 1.00);
 
 1931     SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
 1932     drawStyle->lineWidth=3;
 
 1933     drawStyle->pointSize=3;
 
 1935     SoLightModel *lm = 
new SoLightModel();
 
 1936     lm->model=SoLightModel::BASE_COLOR;
 
 1937     sep->addChild(white);
 
 1938     sep->addChild(drawStyle);
 
 1943     SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 1946       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(myTube->getXLocal(),myTube->getYLocal(),
z));
 
 1948     SoPointSet *
ps = 
new SoPointSet();
 
 1950     ps->vertexProperty=vtxProperty;
 
 1960     std::map < SoNode *, HECCellConstLink>::const_iterator 
p = 
m_clockwork->
HECMap.find(mySelectedNode);
 
 1964       indexStream << 
"Sampling Region,Eta,Phi indices of   " << element->getSamplingIndex() << 
"," << element->getRegionIndex() << 
"," << element->getEtaIndex() << 
"," << element->getPhiIndex() <<  std::endl;
 
 1965       phiBoundaryStream << 
"Phi min & max (CLHEP::deg) =" <<  element->getPhiLocalLower()*180/
M_PI << 
"    " << element->getPhiLocalUpper()*180/
M_PI << std::endl;
 
 1966       etaBoundaryStream << 
"Eta Min and Max   " << element->getEtaMinNominal() << 
"," << element->getEtaMaxNominal() <<  std::endl;
 
 1968     std::ostringstream highVoltageStream;
 
 1969     highVoltageStream << 
"There are " << element->getNumSubgaps() << 
" subgaps. Status: " << std::endl;
 
 1970     message (highVoltageStream.str().c_str());
 
 1972       std::set<const HECHVModule*> modSet;
 
 1973       if (element->getNumSubgaps() > 0) {
 
 1978         for (
unsigned int i=0;
i<element->getNumSubgaps();
i++) {
 
 1980             std::ostringstream highVoltageStream;
 
 1981             highVoltageStream << 
i << 
" Status "  << hvdata.
hvOn (element->getSubgap(
i))
 
 1982                               << 
" voltage: " << hvdata.
voltage (element->getSubgap(
i))
 
 1983                               << 
" current: " << hvdata.
current (element->getSubgap(
i))
 
 1985             message(highVoltageStream.str().c_str());
 
 1992           if (!
m_clockwork->
ui.highVoltageCheckBox->isChecked()) 
continue;
 
 1994           SoSeparator * 
sep = 
new SoSeparator();
 
 1996           SoMaterial *white = 
new SoMaterial();
 
 1997           white->diffuseColor.setValue(1.00,1.00, 1.00);
 
 1999           SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
 2000           drawStyle->lineWidth=3;
 
 2001           drawStyle->pointSize=3;
 
 2003           SoLightModel *lm = 
new SoLightModel();
 
 2004           lm->model=SoLightModel::BASE_COLOR;
 
 2016           double z = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(
HECCell::FRONT))).
z();
 
 2018           double phiMin = 
module.getPhiMin();
 
 2019           double phiMax = 
module.getPhiMax();
 
 2023           double rMin=element->getSamplingIndex()==0 ? 371 : 474;
 
 2025           sep->addChild(white);
 
 2026           sep->addChild(drawStyle);
 
 2028           if (modSet.find(&
module)==modSet.end()) {
 
 2031             SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 2032             vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 2033             vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
 2034             vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
 2035             vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
 2036             vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 2039             SoLineSet *
ls = 
new SoLineSet();
 
 2041             ls->vertexProperty=vtxProperty;
 
 2051     std::map < SoNode *, EMECCellConstLink>::const_iterator 
p = 
m_clockwork->
EMECMap.find(mySelectedNode);
 
 2055       indexStream<< 
"Sampling Region,Eta,Phi indices of   " << element->getSamplingIndex() << 
"," << element->getRegionIndex() << 
"," << element->getEtaIndex() << 
"," << element->getPhiIndex() <<  std::endl;
 
 2056       etaBoundaryStream << 
"Eta Min and Max   " << element->getEtaMin() << 
"," << element->getEtaMax() <<  std::endl;
 
 2057       phiBoundaryStream << 
"Phi min & max (CLHEP::deg) =" <<  element->getPhiLocalLower()*180/
M_PI << 
"    " << element->getPhiLocalUpper()*180/
M_PI << std::endl;
 
 2060       if (element->getSamplingIndex()==0) {
 
 2067       std::ostringstream highVoltageStream;
 
 2068       highVoltageStream << 
"Presampler cell. HV Status: " << 
'\n';
 
 2069       message(highVoltageStream.str().c_str());
 
 2070       highVoltageStream <<  
"Status: "   
 2076       message(highVoltageStream.str().c_str());
 
 2079       SoSeparator * 
sep = 
new SoSeparator();
 
 2081       SoMaterial *white = 
new SoMaterial();
 
 2082       white->diffuseColor.setValue(1.00,1.00, 1.00);
 
 2084       SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
 2085       drawStyle->lineWidth=3;
 
 2086       drawStyle->pointSize=3;
 
 2088       SoLightModel *lm = 
new SoLightModel();
 
 2089       lm->model=SoLightModel::BASE_COLOR;
 
 2097       double z      = (element->getZLocal(
pos)+
 
 2098                element->getDescriptor()->getManager()->getFocalToRef() +
 
 2099                element->getDescriptor()->getManager()->getRefToActive())* (element->getEndcapIndex()==0 ? -1:1);
 
 2100       double phiMin = 
module.getPhiMin();
 
 2101       double phiMax = 
module.getPhiMax();
 
 2106       double rMax=fabs(
z/sinh(
etaMin));
 
 2107       double rMin=fabs(
z/sinh(
etaMax));
 
 2109       sep->addChild(white);
 
 2110       sep->addChild(drawStyle);
 
 2113       SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 2114       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 2115       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
 2116       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
 2117       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
 2118       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 2121       SoLineSet *
ls = 
new SoLineSet();
 
 2123       ls->vertexProperty=vtxProperty;
 
 2131       std::ostringstream highVoltageStream;
 
 2132       highVoltageStream << 
"There are " << element->getNumElectrodes() << 
" electrodes. Status: " << std::endl;
 
 2133       message(highVoltageStream.str().c_str());
 
 2135     std::set<const EMECHVModule*> modSet;
 
 2136         if (element->getNumElectrodes() > 0) {
 
 2137           for (
unsigned int i=0;
i<element->getNumElectrodes();
i++) {
 
 2145                 std::ostringstream highVoltageStream;
 
 2146                 highVoltageStream << 
i << 
' ' 
 2147                                   << element->getElectrode(
i).getElectrodeIndex() << 
") status: " 
 2148                                   << hvdata.
hvOn(element->getElectrode(
i),0) << 
' ' 
 2149                                   << hvdata.
hvOn(element->getElectrode(
i),1) <<  std::endl;
 
 2150                 message(highVoltageStream.str().c_str());
 
 2153                 std::ostringstream highVoltageStream;
 
 2154                 highVoltageStream << 
i << 
'(' 
 2155                                   << element->getElectrode(
i).getElectrodeIndex() << 
") voltage: "  
 2156                                   << hvdata.
voltage(element->getElectrode(
i),0) << 
' ' 
 2157                                   << hvdata.
voltage(element->getElectrode(
i),1) <<  std::endl;
 
 2158                 message(highVoltageStream.str().c_str());
 
 2161                 std::ostringstream highVoltageStream;
 
 2162                 highVoltageStream << 
i << 
'(' << element->getElectrode(
i).getElectrodeIndex() << 
") currents: " 
 2163                                   << hvdata.
current(element->getElectrode(
i),0) << 
' ' 
 2164                                   << hvdata.
current(element->getElectrode(
i),1) <<  std::endl;
 
 2165                 message(highVoltageStream.str().c_str());
 
 2173             if (!
m_clockwork->
ui.highVoltageCheckBox->isChecked()) 
continue;
 
 2175             SoSeparator * 
sep = 
new SoSeparator();
 
 2177             SoMaterial *white = 
new SoMaterial();
 
 2178             white->diffuseColor.setValue(1.00,1.00, 1.00);
 
 2180             SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
 2181             drawStyle->lineWidth=3;
 
 2182             drawStyle->pointSize=3;
 
 2184             SoLightModel *lm = 
new SoLightModel();
 
 2185             lm->model=SoLightModel::BASE_COLOR;
 
 2193             double z      = (element->getZLocal(
pos)+
 
 2194                              element->getDescriptor()->getManager()->getFocalToRef() +
 
 2195                              element->getDescriptor()->getManager()->getRefToActive())* (element->getEndcapIndex()==0 ? -1:1);
 
 2196             double phiMin = 
module.getPhiMin();
 
 2197             double phiMax = 
module.getPhiMax();
 
 2202             double rMax=fabs(
z/sinh(
etaMin));
 
 2203             double rMin=fabs(
z/sinh(
etaMax));
 
 2205             sep->addChild(white);
 
 2206             sep->addChild(drawStyle);
 
 2208             if (modSet.find(&
module)==modSet.end()) {
 
 2211               SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 2212               vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 2213               vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMax),rMin*
sin(phiMax)  ,
z));
 
 2214               vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMax),rMax*
sin(phiMax)  ,
z));
 
 2215               vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(phiMin),rMax*
sin(phiMin)  ,
z));
 
 2216               vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(phiMin),rMin*
sin(phiMin)  ,
z));
 
 2219               SoLineSet *
ls = 
new SoLineSet();
 
 2221               ls->vertexProperty=vtxProperty;
 
 2227               SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 2228               vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMin*
cos(element->getElectrode(
i).getPhi()),rMin*
sin(element->getElectrode(
i).getPhi())  ,
z));
 
 2229               vtxProperty->vertex.set1Value(
cc++,  SbVec3f(rMax*
cos(element->getElectrode(
i).getPhi()),rMax*
sin(element->getElectrode(
i).getPhi())  ,
z));
 
 2230               SoLineSet *
ls = 
new SoLineSet();
 
 2232               ls->vertexProperty=vtxProperty;
 
 2246     std::map < SoNode *, EMBCellConstLink>::const_iterator 
p = 
m_clockwork->
EMBMap.find(mySelectedNode);
 
 2251       indexStream<< 
"Sampling Region,Eta,Phi indices of   " << element->getSamplingIndex() << 
"," << element->getRegionIndex() << 
"," << element->getEtaIndex() << 
"," << element->getPhiIndex() <<  std::endl;
 
 2252       etaBoundaryStream<< 
"Eta Min and Max   " << element->getEtaMin() << 
"," << element->getEtaMax() <<  std::endl;
 
 2253       phiBoundaryStream<< 
"Phi min & max (CLHEP::deg) =" <<  element->getPhiLocalLower()*180/
M_PI << 
"    " << element->getPhiLocalUpper()*180/
M_PI << 
'\n';
 
 2256     if (element->getSamplingIndex()==0) {
 
 2262       std::ostringstream highVoltageStream;
 
 2263       highVoltageStream << 
"Presampler cell. HV Status: " << 
'\n';
 
 2264       message(highVoltageStream.str().c_str());
 
 2265       highVoltageStream <<  
"Status: "   
 2268       highVoltageStream <<  
"Current: "  
 2271       highVoltageStream <<  
"Voltage: "  
 2275       message(highVoltageStream.str().c_str());
 
 2277       SoSeparator * 
sep = 
new SoSeparator();
 
 2279       SoMaterial *white = 
new SoMaterial();
 
 2280       white->diffuseColor.setValue(1.00,1.00, 1.00);
 
 2282       SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
 2283       drawStyle->lineWidth=3;
 
 2284       drawStyle->pointSize=3;
 
 2286       SoLightModel *lm = 
new SoLightModel();
 
 2287       lm->model=SoLightModel::BASE_COLOR;
 
 2295       double r      = element->getRLocal(
pos);
 
 2296       double phiMin = 
module.getPhiMin();
 
 2297       double phiMax = 
module.getPhiMax();
 
 2300       sep->addChild(white);
 
 2301       sep->addChild(drawStyle);
 
 2307       SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 2308       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
 2309       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMin)));
 
 2310       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMax)));
 
 2311       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMax)));
 
 2312       vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
 2314       SoLineSet *
ls = 
new SoLineSet();
 
 2316       ls->vertexProperty=vtxProperty;
 
 2322       std::ostringstream highVoltageStream;
 
 2323       highVoltageStream << 
"There are " << element->getNumElectrodes() << 
" electrodes. Status: " << 
'\n';
 
 2324       message(highVoltageStream.str().c_str());
 
 2325       std::set<const EMBHVModule*> modSet;
 
 2326           if (element->getNumElectrodes() > 0) {
 
 2331             for (
unsigned int i=0;
i<element->getNumElectrodes();
i++) {
 
 2332               highVoltageStream << 
i << 
"Status: "   << element->getElectrode(
i).getElectrodeIndex() << 
' ' 
 2333                                 << hvdata.
hvOn (element->getElectrode(
i), 0) << 
' ' 
 2334                                 << hvdata.
hvOn (element->getElectrode(
i), 1) <<  
'\n';
 
 2335               highVoltageStream << 
i << 
"Current: "  
 2336                                 << element->getElectrode(
i).getElectrodeIndex() << 
' ' 
 2337                                 << hvdata.
current (element->getElectrode(
i), 0) << 
' ' 
 2338                                 << hvdata.
current (element->getElectrode(
i), 1) <<  
'\n';
 
 2339               highVoltageStream << 
i << 
"Voltage: "  << element->getElectrode(
i).getElectrodeIndex() << 
' ' 
 2340                                 << hvdata.
voltage (element->getElectrode(
i), 0) << 
' ' 
 2341                                 << hvdata.
voltage (element->getElectrode(
i), 1) <<  
'\n';
 
 2342               message(highVoltageStream.str().c_str());
 
 2348               if (!
m_clockwork->
ui.highVoltageCheckBox->isChecked()) 
continue;
 
 2350               SoSeparator * 
sep = 
new SoSeparator();
 
 2352               SoMaterial *white = 
new SoMaterial();
 
 2353               white->diffuseColor.setValue(1.00,1.00, 1.00);
 
 2355               SoDrawStyle *drawStyle = 
new SoDrawStyle();
 
 2356               drawStyle->lineWidth=3;
 
 2357               drawStyle->pointSize=3;
 
 2359               SoLightModel *lm = 
new SoLightModel();
 
 2360               lm->model=SoLightModel::BASE_COLOR;
 
 2368               double r      = element->getRLocal(
pos);
 
 2369               double phiMin = 
module.getPhiMin();
 
 2370               double phiMax = 
module.getPhiMax();
 
 2373               sep->addChild(white);
 
 2374               sep->addChild(drawStyle);
 
 2377               if (modSet.find(&
module)==modSet.end()) {
 
 2383                 SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 2384                 vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
 2385                 vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMin)));
 
 2386                 vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMax),
r*
sin(phiMax)  ,
r*sinh(
etaMax)));
 
 2387                 vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMax)));
 
 2388                 vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(phiMin),
r*
sin(phiMin)  ,
r*sinh(
etaMin)));
 
 2390                 SoLineSet *
ls = 
new SoLineSet();
 
 2392                 ls->vertexProperty=vtxProperty;
 
 2398                 SoVertexProperty *vtxProperty = 
new SoVertexProperty();
 
 2399                 vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(element->getElectrode(
i).getPhi()),
r*
sin(element->getElectrode(
i).getPhi())  ,
r*sinh(
etaMin)));
 
 2400                 vtxProperty->vertex.set1Value(
cc++,  SbVec3f(
r*
cos(element->getElectrode(
i).getPhi()),
r*
sin(element->getElectrode(
i).getPhi())  ,
r*sinh(
etaMax)));
 
 2402                 SoLineSet *
ls = 
new SoLineSet();
 
 2404                 ls->vertexProperty=vtxProperty;
 
 2418     message(etaBoundaryStream.str().c_str());
 
 2421     message(phiBoundaryStream.str().c_str());
 
 2424     message(indexStream.str().c_str());
 
 2439   QMap<QString,bool> checkboxstate;
 
 2440   while (
it.hasNext()) {
 
 2442     checkboxstate.insert(
it.key(),
it.value()->isChecked());
 
 2482   if (
state.version()==0) {
 
 2483     message(
"Warning: State data in .vp1 file has obsolete format - ignoring!");
 
 2487     message(
"Warning: State data in .vp1 file is in wrong format - ignoring!");
 
 2494   QMap<QString,bool> checkboxstate(
state.restore<QMap<QString,bool> >());
 
 2496   while (
it.hasNext()) {
 
 2498     state.widgetHandled(
it.value());
 
 2499     if (checkboxstate.contains(
it.key())) {
 
 2500       bool checked = checkboxstate.value(
it.key());
 
 2501       if (
it.value()->isChecked()!=checked)
 
 2502     it.value()->setChecked(checked);
 
 2506   if (
state.version()<=2) {
 
 2507     state.ignoreObsoletePhiSectionWidgetState();
 
 2537   if (
state.version()>=2)
 
 2547   for (
int i=0;
i<4;
i++) {