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
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) \
222m_clockwork->checkBoxNamesMap.insert(m_clockwork->ui.checkboxname, m_clockwork->ui.checkboxname->objectName())
226 QWidget* controller =
new QWidget(0);
287 m_clockwork->ui.phiSectionWidget->setNumberOfSectors(16);
288 m_clockwork->ui.phiSectionWidget->setAllowedNumberOfSectors(l);
291 for(QCheckBox* cb :
m_clockwork->checkBoxNamesMap.keys())
309 connect(
m_clockwork->ui.phiSectionWidget,SIGNAL(enabledPhiRangesChanged(
const QList<VP1Interval>&)),
321 QList<int> justEnabledPhiSectors;
322 QList<int> justDisabledPhiSectors;
324 bool currentstate=
m_clockwork->currentlyEnabledPhiSectors[iphi];
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;
357 m_clockwork->pickStyle->style =
m_clockwork->ui.geomSelectableCheckBox->isChecked() ? SoPickStyleElement::SHAPE : SoPickStyleElement::UNPICKABLE;
366 root->addChild(drawStyle);
367 root->addChild(lightModel);
369 m_clockwork->volatileSeparator =
new SoSeparator();
373 SoMaterial *white =
new SoMaterial();
374 white->diffuseColor.setValue(1,1,1);
379 root->addChild(white);
384 m_clockwork->embMaterial->diffuseColor.setValue(0,0,1);
388 m_clockwork->fcalMaterial->diffuseColor.setValue(0 , 1, 0);
392 m_clockwork->hecMaterial->diffuseColor.setValue(0, 1.00, 1.00);
396 m_clockwork->emecMaterial->diffuseColor.setValue(1.00,0.00, 1.00);
400 m_clockwork->embAccMaterial->diffuseColor.setValue(1.00,1.00, 1.00);
410 for (
int i=0;i<3;i++) {
415 m_clockwork->fcalMissingSwitch[i] =
new SoSwitch();
417 m_clockwork->fcalHVSeparator[i]=
new SoSeparator();
426 m_clockwork->fcalHVSeparator[i]->addChild(drawStyle);
427 m_clockwork->fcalHVSeparator[i]->addChild(lightModel);
445 m_clockwork->embModsSeparator->addChild(drawStyle);
446 m_clockwork->embModsSeparator->addChild(lightModel);
474 m_clockwork->embPreModsSeparator =
new SoSeparator();
476 m_clockwork->embPreModsSeparator->addChild(drawStyle);
477 m_clockwork->embPreModsSeparator->addChild(lightModel);
480 m_clockwork->embPreHVSeparator =
new SoSeparator();
482 m_clockwork->embPreHVSeparator->addChild(drawStyle);
483 m_clockwork->embPreHVSeparator->addChild(lightModel);
504 m_clockwork->emecModsSeparator =
new SoSeparator();
506 m_clockwork->emecModsSeparator->addChild(drawStyle);
507 m_clockwork->emecModsSeparator->addChild(lightModel);
513 m_clockwork->emecHVSeparator->addChild(lightModel);
533 m_clockwork->emecPreModsSeparator =
new SoSeparator();
535 m_clockwork->emecPreModsSeparator->addChild(drawStyle);
536 m_clockwork->emecPreModsSeparator->addChild(lightModel);
539 m_clockwork->emecPreHVSeparator =
new SoSeparator();
541 m_clockwork->emecPreHVSeparator->addChild(drawStyle);
542 m_clockwork->emecPreHVSeparator->addChild(lightModel);
549 m_clockwork->emecPreMissingSep =
new SoSeparator();
550 m_clockwork->emecPreMissingSwitch =
new SoSwitch();
570 for (
int i=0;i<4;i++) {
581 m_clockwork->embSubSwitch[i][p]->whichChild= SO_SWITCH_ALL;
593 m_clockwork->emecSubSep [i][p] =
new SoSeparator();
596 m_clockwork->emecSubSwitch[i][p]->whichChild= SO_SWITCH_ALL;
603 m_clockwork->hecHVSeparator[i] =
new SoSeparator();
605 m_clockwork->hecHVSeparator[i]->addChild(drawStyle);
606 m_clockwork->hecHVSeparator[i]->addChild(lightModel);
632 m_clockwork->hecSubSwitch[i][p]->whichChild= SO_SWITCH_ALL;
653 m_clockwork->accordionSubSwitch[p] =
new SoSwitch();
654 m_clockwork->accordionSubSep [p] =
new SoSeparator();
657 m_clockwork->accordionSubSwitch[p]->whichChild= SO_SWITCH_ALL;
707 QMapIterator<QString,QCheckBox*> it(
m_clockwork->checkBoxMap);
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++) {
764 m_clockwork->emecPreModsSeparator->addChild(white);
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();
858 bool outOfTolerance = (fabs(voltage0-nominalVoltage) > double (
tolerance)) || (fabs(voltage1-nominalVoltage) >
double (
tolerance)) ;
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();
918 bool outOfTolerance = (fabs(voltage0-nominalVoltage) > double (
tolerance)) || (fabs(voltage1-nominalVoltage) >
double (
tolerance)) ;
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();
991 bool outOfTolerance = (fabs(voltage0-nominalVoltage) > double (
tolerance)) || (fabs(voltage1-nominalVoltage) >
double (
tolerance)) ;
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();
1059 bool outOfTolerance = (fabs(voltage0-nominalVoltage) > double (
tolerance)) || (fabs(voltage1-nominalVoltage) >
double (
tolerance)) ;
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) {
1228 for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
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()};
1237 for (
int p=0;p<
NPHISECTORS;p++) sep[p]->addChild(XF);
1239 for (
unsigned int iPhi=region->
beginPhiIndex();iPhi<region->endPhiIndex();iPhi++) {
1240 for (
unsigned int iEta=region->
beginEtaIndex();iEta<region->endEtaIndex();iEta++) {
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);
1276 sep[p]->addChild(ls);
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;
1314 sep[p]->addChild(ls);
1328 for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
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()};
1359 for (
int p=0;p<
NPHISECTORS;p++) sep[p]->addChild(XF);
1360 for (
unsigned int iPhi=region->
beginPhiIndex();iPhi<region->endPhiIndex();iPhi++) {
1361 for (
unsigned int iEta=region->
beginEtaIndex();iEta<region->endEtaIndex();iEta++) {
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);
1398 sep[p]->addChild(ls);
1410 for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
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()};
1438 for (
int p=0;p<
NPHISECTORS;p++) sep[p]->addChild(XF);
1440 for (
unsigned int iPhi=region->
beginPhiIndex();iPhi<region->endPhiIndex();iPhi++) {
1441 for (
unsigned int iEta=region->
beginEtaIndex();iEta<region->endEtaIndex();iEta++) {
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);
1484 sep[p]->addChild(ls);
1497 for (e=manager->beginFCAL();e!=manager->endFCAL(); ++e) {
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;
1558 m_clockwork->pickStyle->style = flag ? SoPickStyleElement::SHAPE : SoPickStyleElement::UNPICKABLE;
1559 m_clockwork->ui.etaBoundariesCheckBox->setEnabled(flag);
1560 m_clockwork->ui.phiBoundariesCheckBox->setEnabled(flag);
1561 m_clockwork->ui.fcalTubesCheckBox->setEnabled(flag);
1562 m_clockwork->ui.highVoltageCheckBox->setEnabled(flag);
1563 m_clockwork->ui.indicesCheckBox->setEnabled(flag);
1582 for (
int i=0;i<4;i++) {
1583 if (i<3)
m_clockwork->fcalSubSep[i]->removeAllChildren();
1585 m_clockwork->embSubSep[i][p]->removeAllChildren();
1586 m_clockwork->emecSubSep[i][p]->removeAllChildren();
1587 m_clockwork->hecSubSep[i][p]->removeAllChildren();
1590 m_clockwork->emecFocalSwitch->removeAllChildren();
1604 m_clockwork->volatileSeparator->removeAllChildren();
1612 if (
m_clockwork->currentlyEnabledPhiSectors.isEmpty())
1614 for (
int i=0;i<4;i++)
m_clockwork->embSubSwitch[i][p]->whichChild=SO_SWITCH_ALL;
1615 for (
int i=0;i<4;i++)
m_clockwork->emecSubSwitch[i][p]->whichChild=SO_SWITCH_ALL;
1616 for (
int i=0;i<4;i++)
m_clockwork->hecSubSwitch[i][p]->whichChild=SO_SWITCH_ALL;
1617 m_clockwork->accordionSubSwitch[p]->whichChild=SO_SWITCH_ALL;
1621 if (
m_clockwork->currentlyEnabledPhiSectors.isEmpty())
1623 for (
int i=0;i<4;i++)
m_clockwork->embSubSwitch[i][p]->whichChild=SO_SWITCH_NONE;
1624 for (
int i=0;i<4;i++)
m_clockwork->emecSubSwitch[i][p]->whichChild=SO_SWITCH_NONE;
1625 for (
int i=0;i<4;i++)
m_clockwork->hecSubSwitch[i][p]->whichChild=SO_SWITCH_NONE;
1626 m_clockwork->accordionSubSwitch[p]->whichChild=SO_SWITCH_NONE;
1640 if(cb &&
m_clockwork->checkBoxNamesMap.contains(cb))
1643 QString swName =
m_clockwork->checkBoxNamesMap[cb];
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")
1682 for (
int i=0;i<3;i++)
m_clockwork->fcalBadSwitch[i]->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1683 for (
int i=0;i<4;i++)
m_clockwork->hecBadSwitch[i]->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1684 m_clockwork->emecBadSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1685 m_clockwork->embBadSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1686 m_clockwork->embPreBadSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1687 m_clockwork->emecPreBadSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1689 else if (swName==
"missingHVDisplayCheckBox")
1691 for (
int i=0;i<3;i++)
m_clockwork->fcalMissingSwitch[i]->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1692 for (
int i=0;i<4;i++)
m_clockwork->hecMissingSwitch[i]->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1693 m_clockwork->emecMissingSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1694 m_clockwork->embMissingSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1695 m_clockwork->embPreMissingSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1696 m_clockwork->emecPreMissingSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1698 else if (swName==
"normalHVDisplayCheckBox")
1700 for (
int i=0;i<3;i++)
m_clockwork->fcalNormalSwitch[i]->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1701 for (
int i=0;i<4;i++)
m_clockwork->hecNormalSwitch[i]->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1702 m_clockwork->emecNormalSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1703 m_clockwork->embNormalSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1704 m_clockwork->embPreNormalSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1705 m_clockwork->emecPreNormalSwitch->whichChild = cb->isChecked() ? SO_SWITCH_ALL: SO_SWITCH_NONE;
1716 m_clockwork->volatileSeparator->removeAllChildren();
1724 m_clockwork->volatileSeparator->removeAllChildren();
1726 SoPickStyle *pickStyle =
new SoPickStyle();
1727 pickStyle->style=SoPickStyleElement::UNPICKABLE;
1728 m_clockwork->volatileSeparator->addChild(pickStyle);
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()
1748 << " Electrode " << electrode.getElectrodeIndex()
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);
1759 if (p!=m_clockwork->EMECHVMap.end()) {
1761 const EMECHVElectrode& electrode = *p->second;
1762 const EMECHVModule& module = electrode.getModule();
1763 const EMECHVManager& manager = module.getManager();
1764 const EMECHVManager::EMECHVData hvdata = manager.getData(**hvCabling,
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()
1772 << " Electrode:
" << electrode.getElectrodeIndex()
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);
1784 if (p!=m_clockwork->HECHVMap.end()) {
1786 const HECHVSubgap& subgap = *p->second;
1787 const HECHVModule& module = subgap.getModule();
1788 const HECHVManager& manager = module.getManager();
1789 const HECHVManager::HECHVData hvdata = manager.getData(**hvCabling,
1791 std::ostringstream outstream;
1792 outstream << "Side:
" << module.getSideIndex()
1793 << " Phi:
" << module.getPhiIndex()
1794 << " Sampling:
" << module.getSamplingIndex()
1795 << " Subgap:
" << subgap.getSubgapIndex()
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);
1804 if (p!=m_clockwork->FCALHVMap.end()) {
1806 const FCALHVLine& line = *p->second;
1807 const FCALHVModule& module = line.getModule();
1808 const FCALHVManager& manager = module.getManager();
1809 const FCALHVManager::FCALHVData hvdata = manager.getData(**hvCabling,
1811 std::ostringstream outstream;
1812 outstream << "Side:
" << module.getSideIndex()
1813 << " Sector:
" << module.getSectorIndex()
1814 << " Sampling:
" << module.getSamplingIndex()
1815 << " Line:
" << line.getLineIndex()
1816 << "Voltage:
" << hvdata.voltage (line)
1817 << "; current:
" << hvdata.current (line);
1818 message (outstream.str().c_str());
1822 // See if it is in the FCAL
1824 std::map < SoNode *, const FCALTile *>::const_iterator p = m_clockwork->TileMap.find(mySelectedNode);
1825 if (p!=m_clockwork->TileMap.end()) {
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;
1831 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
1832 std::ostringstream highVoltageStream;
1833 highVoltageStream << "There are
" << element->getNumHVLines() << " high voltage lines. Status:
" << std::endl;
1834 message(highVoltageStream.str().c_str());
1836 const FCALHVLine* line = nullptr;
1837 for (unsigned int i=0;i<element->getNumHVLines();i++) {
1838 line = element->getHVLine(i);
1843 const FCALHVModule& module = line->getModule();
1844 const FCALHVManager& manager = module.getManager();
1845 const FCALHVManager::FCALHVData hvdata = manager.getData(**hvCabling,
1847 for (unsigned int i=0;i<element->getNumHVLines();i++) {
1848 std::ostringstream highVoltageStream;
1849 if (element->getHVLine(i)) {
1850 highVoltageStream << i << ' ' << hvdata.voltage (*element->getHVLine(i)) << std::endl;
1852 message(highVoltageStream.str().c_str());
1860 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
1862 const FCALModule *fcalMod=element->getModule();
1865 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
1866 SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
1868 SoSeparator * sep = new SoSeparator();
1871 double zf = fcalMod->getEndcapIndex()== 0 ? +fcalMod->getFullDepthZ(*element)/2.0 : -fcalMod->getFullDepthZ(*element)/2.0;
1873 double zb = fcalMod->getEndcapIndex()== 0 ? -fcalMod->getFullDepthZ(*element)/2.0 : +fcalMod->getFullDepthZ(*element)/2.0;
1876 if (m_clockwork->pos==CENTER) z=zc;
1877 if (m_clockwork->pos==BACK) z=zb;
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();
1895 for (FCALModule::ConstIterator f=fcalMod->beginTiles();f!=fcalMod->endTiles();f++) {
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++) {
1901 FCALTubeConstLink myTube=(*f).getTube(i);
1902 vtxProperty->vertex.set1Value(cc++, SbVec3f(myTube->getXLocal(),myTube->getYLocal(),z));
1906 SoPointSet *ps = new SoPointSet();
1908 ps->vertexProperty=vtxProperty;
1910 m_clockwork->volatileSeparator->addChild(sep);
1912 if (m_clockwork->ui.fcalTubesCheckBox->isChecked()) {
1913 const FCALModule *fcalMod=element->getModule();
1914 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
1915 SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
1917 SoSeparator * sep = new SoSeparator();
1920 double zf = fcalMod->getEndcapIndex()== 0 ? +fcalMod->getFullDepthZ(*element)/2.0 : -fcalMod->getFullDepthZ(*element)/2.0;
1922 double zb = fcalMod->getEndcapIndex()== 0 ? -fcalMod->getFullDepthZ(*element)/2.0 : +fcalMod->getFullDepthZ(*element)/2.0;
1925 if (m_clockwork->pos==CENTER) z=zc;
1926 if (m_clockwork->pos==BACK) z=zb;
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();
1944 for (unsigned int i=0;i<element->getNumTubes();i++) {
1945 FCALTubeConstLink myTube=element->getTube(i);
1946 vtxProperty->vertex.set1Value(cc++, SbVec3f(myTube->getXLocal(),myTube->getYLocal(),z));
1948 SoPointSet *ps = new SoPointSet();
1950 ps->vertexProperty=vtxProperty;
1952 m_clockwork->volatileSeparator->addChild(sep);
1958 // See if it is in the HEC:
1960 std::map < SoNode *, HECCellConstLink>::const_iterator p = m_clockwork->HECMap.find(mySelectedNode);
1961 if (p!=m_clockwork->HECMap.end()) {
1963 HECCellConstLink element = (*p).second;
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;
1967 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
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) {
1974 const HECHVModule& module0 = element->getSubgap(0).getModule();
1975 const HECHVManager& manager = module0.getManager();
1976 const HECHVManager::HECHVData hvdata = manager.getData(**hvCabling,
1978 for (unsigned int i=0;i<element->getNumSubgaps();i++) {
1979 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
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());
1988 // Now let's show the module, and where she is:
1990 const HECHVModule& module = element->getSubgap(i).getModule();
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;
2007 // we comment out to avoid compilation warnings, because they're not used, apparently
2008 // HECCell::CELLPOS pos=HECCell::FRONT;
2009 // if (m_clockwork->pos==BACK) pos=HECCell::BACK;
2010 // if (m_clockwork->pos==CENTER) pos=HECCell::CENTER;
2013 const HECDetectorManager *hecManager = VP1DetInfo::hecDetMgr();
2014 const HECDetectorRegion *region = hecManager->getDetectorRegion(element->getEndcapIndex(),element->getSamplingIndex(),element->getRegionIndex());
2015 const HepGeom::Transform3D &XF= Amg::EigenTransformToCLHEP(region->getAbsoluteTransform());
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()) {
2029 modSet.insert(&module);
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;
2044 m_clockwork->volatileSeparator->addChild(sep);
2049 // See if it is in the EMEC:
2051 std::map < SoNode *, EMECCellConstLink>::const_iterator p = m_clockwork->EMECMap.find(mySelectedNode);
2052 if (p!=m_clockwork->EMECMap.end()) {
2054 EMECCellConstLink element = (*p).second;
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) {
2062 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
2063 const EMECPresamplerHVModule& module = element->getPresamplerHVModule();
2064 const EMECPresamplerHVManager& manager = module.getManager();
2065 const EMECPresamplerHVManager::EMECPresamplerHVData hvdata = manager.getData(**hvCabling,
2067 std::ostringstream highVoltageStream;
2068 highVoltageStream << "Presampler cell. HV Status:
" << '\n';
2069 message(highVoltageStream.str().c_str());
2070 highVoltageStream << "Status:
"
2071 << hvdata.hvOn (module, 0) << ' '
2072 << hvdata.hvOn (module, 1) << '\n';
2073 highVoltageStream << "Current:
" << hvdata.current(module, 0) << ' ' << hvdata.current (module, 1) << '\n';
2074 highVoltageStream << "Voltage:
" << hvdata.voltage (module, 0) << ' ' << hvdata.voltage (module, 1) << '\n';
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;
2092 EMECCell::CELLPOS pos=EMECCell::FRONT;
2093 if (m_clockwork->pos==BACK) pos=EMECCell::BACK;
2094 if (m_clockwork->pos==CENTER) pos=EMECCell::CENTER;
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();
2102 double etaMin = module.getEtaMin();
2103 double etaMax = module.getEtaMax();
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;
2125 m_clockwork->volatileSeparator->addChild(sep);
2130 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
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++) {
2138 const EMECHVElectrode& electrode = element->getElectrode(0);
2139 const EMECHVModule& module0 = electrode.getModule();
2140 const EMECHVManager& manager = module0.getManager();
2141 const EMECHVManager::EMECHVData hvdata = manager.getData(**hvCabling,
2143 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
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());
2169 // Now let's show the module, and where she is:
2171 const EMECHVModule& module = element->getElectrode(i).getModule();
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;
2188 EMECCell::CELLPOS pos=EMECCell::FRONT;
2189 if (m_clockwork->pos==BACK) pos=EMECCell::BACK;
2190 if (m_clockwork->pos==CENTER) pos=EMECCell::CENTER;
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();
2198 double etaMin = module.getEtaMin();
2199 double etaMax = module.getEtaMax();
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()) {
2209 modSet.insert(&module);
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;
2236 m_clockwork->volatileSeparator->addChild(sep);
2244 // See if it is in the EMB:
2246 std::map < SoNode *, EMBCellConstLink>::const_iterator p = m_clockwork->EMBMap.find(mySelectedNode);
2247 if (p!=m_clockwork->EMBMap.end()) {
2249 EMBCellConstLink element = (*p).second;
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';
2255 if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
2256 if (element->getSamplingIndex()==0) {
2257 const EMBPresamplerHVModule& module = element->getPresamplerHVModule();
2258 const EMBPresamplerHVManager& manager = module.getManager();
2259 const EMBPresamplerHVManager::EMBPresamplerHVData hvdata = manager.getData(**hvCabling,
2262 std::ostringstream highVoltageStream;
2263 highVoltageStream << "Presampler cell. HV Status:
" << '\n';
2264 message(highVoltageStream.str().c_str());
2265 highVoltageStream << "Status:
"
2266 << hvdata.hvOn (module, 0) << ' '
2267 << hvdata.hvOn (module, 1) << '\n';
2268 highVoltageStream << "Current:
"
2269 << hvdata.current (module, 0) << ' '
2270 << hvdata.current (module, 1) << '\n';
2271 highVoltageStream << "Voltage:
"
2272 << hvdata.voltage (module, 0) << ' '
2273 << hvdata.voltage (module, 1) << '\n';
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;
2290 EMBCell::CELLPOS pos=EMBCell::FRONT;
2291 if (m_clockwork->pos==BACK) pos=EMBCell::BACK;
2292 if (m_clockwork->pos==CENTER) pos=EMBCell::CENTER;
2295 double r = element->getRLocal(pos);
2296 double phiMin = module.getPhiMin();
2297 double phiMax = module.getPhiMax();
2298 double etaMin = module.getEtaMin();
2299 double etaMax = module.getEtaMax();
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;
2319 m_clockwork->volatileSeparator->addChild(sep);
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) {
2327 const EMBHVModule& module0 = element->getElectrode(0).getModule();
2328 const EMBHVManager& manager = module0.getManager();
2329 const EMBHVManager::EMBHVData hvdata = manager.getData(**hvCabling,
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());
2344 // Now let's show the module, and where she is:
2346 const EMBHVModule& module = element->getElectrode(i).getModule();
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;
2363 EMBCell::CELLPOS pos=EMBCell::FRONT;
2364 if (m_clockwork->pos==BACK) pos=EMBCell::BACK;
2365 if (m_clockwork->pos==CENTER) pos=EMBCell::CENTER;
2368 double r = element->getRLocal(pos);
2369 double phiMin = module.getPhiMin();
2370 double phiMax = module.getPhiMax();
2371 double etaMin = module.getEtaMin();
2372 double etaMax = module.getEtaMax();
2373 sep->addChild(white);
2374 sep->addChild(drawStyle);
2377 if (modSet.find(&module)==modSet.end()) {
2378 modSet.insert(&module);
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;
2409 m_clockwork->volatileSeparator->addChild(sep);
2417 if (m_clockwork->ui.etaBoundariesCheckBox->isChecked()) {
2418 message(etaBoundaryStream.str().c_str());
2420 if (m_clockwork->ui.phiBoundariesCheckBox->isChecked()) {
2421 message(phiBoundaryStream.str().c_str());
2423 if (m_clockwork->ui.indicesCheckBox->isChecked()) {
2424 message(indexStream.str().c_str());
2429QByteArray VP1CaloReadoutSystem::saveState()
2432 ensureBuildController();
2434 VP1Serialise serialise(3/*version*/,this);
2435 serialise.save(IVP13DSystemSimple::saveState());
2437 //Checkboxes (by name for greater stability in case we change content of map):
2438 QMapIterator<QString,QCheckBox*> it(m_clockwork->checkBoxMap);
2439 QMap<QString,bool> checkboxstate;
2440 while (it.hasNext()) {
2442 checkboxstate.insert(it.key(),it.value()->isChecked());
2443 serialise.widgetHandled(it.value());
2445 serialise.save(checkboxstate);
2447 serialise.save(m_clockwork->ui.phiSectionWidget);//Versions <=2 saved in old format
2448 serialise.save(m_clockwork->ui.frontRadioButton,
2449 m_clockwork->ui.backRadioButton,
2450 m_clockwork->ui.centerRadioButton);
2451 serialise.save(m_clockwork->ui.embColorSel);
2452 serialise.save(m_clockwork->ui.emecColorSel);
2453 serialise.save(m_clockwork->ui.hecColorSel);
2454 serialise.save(m_clockwork->ui.fcalColorSel);
2455 serialise.save(m_clockwork->ui.hvToleranceSpinBox);
2456 serialise.save(m_clockwork->ui.embNominalSpinBox);
2457 serialise.save(m_clockwork->ui.hecNominalSpinBox);
2458 serialise.save(m_clockwork->ui.fcal1NominalSpinBox);
2459 serialise.save(m_clockwork->ui.fcal2NominalSpinBox);
2460 serialise.save(m_clockwork->ui.fcal3NominalSpinBox);
2461 serialise.save(m_clockwork->ui.emecNominalSpinBox_1);
2462 serialise.save(m_clockwork->ui.emecNominalSpinBox_2);
2463 serialise.save(m_clockwork->ui.emecNominalSpinBox_3);
2464 serialise.save(m_clockwork->ui.emecNominalSpinBox_4);
2465 serialise.save(m_clockwork->ui.emecNominalSpinBox_5);
2466 serialise.save(m_clockwork->ui.emecNominalSpinBox_6);
2467 serialise.save(m_clockwork->ui.emecNominalSpinBox_7);
2468 serialise.save(m_clockwork->ui.emecNominalSpinBox_8);
2469 serialise.save(m_clockwork->ui.emecNominalSpinBox_9);
2470 serialise.save(m_clockwork->ui.embPresamplerNominalSpinBox);
2471 serialise.save(m_clockwork->ui.emecPresamplerNominalSpinBox);
2473 serialise.save(m_clockwork->ui.caloReadoutToolBox); //Version 2+
2474 serialise.warnUnsaved(controllerWidget());
2475 return serialise.result();
2479void VP1CaloReadoutSystem::restoreFromState(QByteArray ba)
2481 VP1Deserialise state(ba,this);
2482 if (state.version()==0) {
2483 message("Warning:
State data in .vp1
file has obsolete format - ignoring!
");
2486 if (state.version()<1||state.version()>3) {
2487 message("Warning:
State data in .vp1
file is in wrong format - ignoring!
");
2490 ensureBuildController();
2491 IVP13DSystemSimple::restoreFromState(state.restoreByteArray());
2493 //Checkboxes (by name for greater stability in case we change content of map):
2494 QMap<QString,bool> checkboxstate(state.restore<QMap<QString,bool> >());
2495 QMapIterator<QString,QCheckBox*> it(m_clockwork->checkBoxMap);
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();
2508 state.ignoreWidget(m_clockwork->ui.phiSectionWidget);
2510 state.restore(m_clockwork->ui.phiSectionWidget);
2512 state.restore(m_clockwork->ui.frontRadioButton,
2513 m_clockwork->ui.backRadioButton,
2514 m_clockwork->ui.centerRadioButton);
2515 state.restore(m_clockwork->ui.embColorSel);
2516 state.restore(m_clockwork->ui.emecColorSel);
2517 state.restore(m_clockwork->ui.hecColorSel);
2518 state.restore(m_clockwork->ui.fcalColorSel);
2519 state.restore(m_clockwork->ui.hvToleranceSpinBox);
2520 state.restore(m_clockwork->ui.embNominalSpinBox);
2521 state.restore(m_clockwork->ui.hecNominalSpinBox);
2522 state.restore(m_clockwork->ui.fcal1NominalSpinBox);
2523 state.restore(m_clockwork->ui.fcal2NominalSpinBox);
2524 state.restore(m_clockwork->ui.fcal3NominalSpinBox);
2525 state.restore(m_clockwork->ui.emecNominalSpinBox_1);
2526 state.restore(m_clockwork->ui.emecNominalSpinBox_2);
2527 state.restore(m_clockwork->ui.emecNominalSpinBox_3);
2528 state.restore(m_clockwork->ui.emecNominalSpinBox_4);
2529 state.restore(m_clockwork->ui.emecNominalSpinBox_5);
2530 state.restore(m_clockwork->ui.emecNominalSpinBox_6);
2531 state.restore(m_clockwork->ui.emecNominalSpinBox_7);
2532 state.restore(m_clockwork->ui.emecNominalSpinBox_8);
2533 state.restore(m_clockwork->ui.emecNominalSpinBox_9);
2534 state.restore(m_clockwork->ui.embPresamplerNominalSpinBox);
2535 state.restore(m_clockwork->ui.emecPresamplerNominalSpinBox);
2537 if (state.version()>=2)
2538 state.restore(m_clockwork->ui.caloReadoutToolBox);
2540 state.warnUnrestored(controllerWidget());
2543void VP1CaloReadoutSystem::acceptHV() {
2544 if (!m_clockwork->permInit) return; // do not change switches
2545 // if the switches are not yet built!!
2547 for (int i=0;i<4;i++) {
2548 if (i<3) m_clockwork->fcalNormalSep[i]->removeAllChildren();
2549 if (i<3) m_clockwork->fcalMissingSep[i]->removeAllChildren();
2550 if (i<3) m_clockwork->fcalBadSep[i]->removeAllChildren();
2551 m_clockwork->hecNormalSep[i]->removeAllChildren();
2552 m_clockwork->hecMissingSep[i]->removeAllChildren();
2553 m_clockwork->hecBadSep[i]->removeAllChildren();
2554 m_clockwork->embModsSeparator->removeAllChildren();
2555 m_clockwork->embPreModsSeparator->removeAllChildren();
2556 m_clockwork->emecPreModsSeparator->removeAllChildren();
2557 m_clockwork->emecModsSeparator->removeAllChildren();
2559 m_clockwork->hvInit=false;
std::vector< Identifier > ID
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
GeoIntrusivePtr< const EMBCell > EMBCellConstLink
GeoIntrusivePtr< const FCALTube > FCALTubeConstLink
GeoIntrusivePtr< const HECCell > HECCellConstLink
@Class: HECCellConstLink
char data[hepevt_bytes_allocation_ATLAS]
#define INSERTCHECKBOX(checkboxname)
Hold mapping of ranges to condition objects.
const GeoStraightAccSection * getAbsorberSections() const
Absorber position details:
A manager class providing access to readout geometry information for the electromagnetic barrel calor...
std::vector< constEMBDetectorRegion * >::const_iterator DetectorRegionConstIterator
unsigned int beginPhiIndex() const
Returns the first phi index in the region.
EMBCellConstLink getEMBCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
unsigned int beginEtaIndex() const
Returns the first eta index in the region.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
const EMBHVModule & getModule() const
double voltage(const EMBHVElectrode &electrode, const int &iGap) const
This class provides direct access to information on the HV electrodes within the barrels.
unsigned int beginPhiIndex() const
unsigned int endEtaIndex() const
static unsigned int endSectorIndex()
unsigned int beginEtaIndex() const
static unsigned int beginSectorIndex()
const EMBHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
EMBHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
Describes one HV Module within the EMB.
const EMBHVElectrode & getElectrode(unsigned int iElectrode) const
unsigned int getNumElectrodes() const
double voltage(const EMBPresamplerHVModule &module, const int &iGap) const
This class provides direct access to information on the HV electrodes within the barrels.
const EMBPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi) const
EMBPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
unsigned int endPhiIndex() const
unsigned int beginPhiIndex() const
static unsigned int endSideIndex()
unsigned int endEtaIndex() const
unsigned int beginEtaIndex() const
Describes one HV Module within the EMB Presampler.
Smart Pointer to EMEC Cells.
A manager class providing access to readout geometry information for the electromagnetic endcap calor...
std::vector< constEMECDetectorRegion * >::const_iterator DetectorRegionConstIterator
EMECCellConstLink getEMECCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
unsigned int beginPhiIndex() const
returns the first phi index in the region.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the EMEC.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
unsigned int beginEtaIndex() const
returns the first eta index in the region.
const EMECHVModule & getModule() const
double voltage(const EMECHVElectrode &electrode, const int &iGap) const
This class provides direct access to information on the HV electrodes within the EMEC.
unsigned int beginEtaIndex() const
const EMECHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
unsigned int beginSectorIndex() const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
unsigned int endEtaIndex() const
unsigned int endSectorIndex() const
unsigned int beginPhiIndex() const
EMECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
const EMECHVElectrode & getElectrode(unsigned int iElectrode) const
unsigned int getNumElectrodes() const
double voltage(const EMECPresamplerHVModule &module, const int &iGap) const
This class provides direct access to information on the HV electrodes within the EMEC.
EMECPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
unsigned int beginPhiIndex() const
unsigned int endPhiIndex() const
const EMECPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iPhi) const
static unsigned int endSideIndex()
static unsigned int beginSideIndex()
Describes one HV Module within the EMEc Presampler.
A manager class providing access to readout geometry information for the forward calorimeter.
std::vector< constFCALModule * >::const_iterator ConstIterator
FCALDetectorManager::ConstIterator beginFCAL() const
Iterate over FCAL Modules.
FCALDetectorManager::ConstIterator endFCAL() const
Iterate over FCAL Modules.
double voltage(const FCALHVLine &line) const
This class provides direct access to information on the HV electrodes within the barrels.
static unsigned int beginSideIndex()
static unsigned int endSamplingIndex()
static unsigned int endSideIndex()
static unsigned int beginSectorIndex(unsigned int iSampling)
static unsigned int beginSamplingIndex()
const FCALHVModule & getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
static unsigned int endSectorIndex(unsigned int iSampling)
FCALHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Describes one HV Module within the FCAL.
const FCALHVLine & getHVLine(unsigned int iLine) const
static unsigned int getNumHVLines()
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
double getFullWidthY(const FCALTile &tile) const
Gets Tile Full Width in Y.
double getFullDepthZ(const FCALTile &) const
Gets Tile (full) Depth.
double getFullWidthX(const FCALTile &tile) const
Gets Tile Full Width in X.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
std::vector< FCALTile >::const_iterator ConstIterator
FCALModule::ConstIterator beginTiles() const
Iteration over FCAL Tiles.
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3)
FCALModule::ConstIterator endTiles() const
Iteration over FCAL Tiles.
Record of All Electrode Straight Pieces.
const double & YCent(int stackid, int cellid) const
const double & Cosu(int stackid, int cellid) const
const double & HalfLength(int stackid, int cellid) const
const double & Sinu(int stackid, int cellid) const
const double & XCent(int stackid, int cellid) const
A manager class providing access to readout geometry information for the hadronic endcap calorimeter.
const HECDetectorRegion * getDetectorRegion(unsigned int endcap, unsigned int sampling, unsigned int region) const
Random Access to detector regions.
std::vector< constHECDetectorRegion * >::const_iterator DetectorRegionConstIterator
Description of a region of homogenous granularity in the hadronic endcap calorimeter.
HECCellConstLink getHECCell(unsigned int ieta, unsigned int iphi) const
Retrieve a cell with eta index and phi index.
unsigned int beginPhiIndex() const
returns the first phi index in the region.
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the HEC.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index (0-3)
unsigned int beginEtaIndex() const
returns the first eta index in the region.
double voltage(const HECHVSubgap &subgap) const
This class provides direct access to information on the HV electrodes within the barrels.
static unsigned int beginPhiIndex()
static unsigned int endSamplingIndex()
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
static unsigned int endSideIndex()
HECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
static unsigned int beginSamplingIndex()
static unsigned int endPhiIndex()
Describes one HV Module within the HEC.
const HECHVSubgap & getSubgap(unsigned int iElectrode) const
static unsigned int getNumSubgaps()
IVP13DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
void messageVerbose(const QString &) const
void messageDebug(const QString &) const
void message(const QString &) const
This class provides access to the High Voltage throughout the LAr.
const HECHVManager & getHECHVManager() const
const EMECHVManager & getEMECHVManager(IOType IO) const
const EMECPresamplerHVManager & getEMECPresamplerHVManager() const
const FCALHVManager & getFCALHVManager() const
const EMBHVManager & getEMBHVManager() const
const EMBPresamplerHVManager & getEMBPresamplerHVManager() const
StatusCode initialize(bool used=true)
const std::string & key() const
Return the StoreGate ID for the referenced object.
const ServiceHandle< IProxyDict > & storeHandle() const
Return handle to the referenced store.
The Athena Transient Store API.
SoSwitch * hecBadSwitch[4]
SoSwitch * emecModsSwitch
std::map< SoNode *, const FCALTile * > TileMap
SoSwitch * fcalHVSwitch[3]
SoSeparator * fcalSubSep[3]
SoSeparator * embMissingSep
SoSwitch * emecPreModsSwitch
SoSeparator * emecNormalSep
SoSeparator * emecPreModsSeparator
SoSwitch * embMissingSwitch
SoSeparator * emecModsSeparator
SoSeparator * hecSeparator[4]
SoSeparator * embPreNormalSep
std::map< SoNode *, const FCALHVLine * > FCALHVMap
SoSeparator * fcalMissingSep[3]
SoSeparator * hecNormalSep[4]
SoSwitch * embPreNormalSwitch
SoSeparator * embPreModsSeparator
SoSeparator * emecPreBadSep
SoSwitch * fcalMissingSwitch[3]
SoSwitch * emecMissingSwitch
SoSwitch * emecPreHVSwitch
SoSwitch * emecPreBadSwitch
SoSwitch * embPreMissingSwitch
SoSwitch * emecPreNormalSwitch
SoSwitch * embAccViewSwitch
SoSwitch * emecPreMissingSwitch
SoSeparator * emecSeparator[4]
SoSwitch * emecNormalSwitch
SoSwitch * hecNormalSwitch[4]
SoSeparator * embSubSep[4][NPHISECTORS]
SoSeparator * embPreMissingSep
SoSeparator * accordionSubSep[NPHISECTORS]
SoMaterial * emecMaterial
SoSeparator * emecHVSeparator
SoMaterial * embAccMaterial
Ui::CaloReadoutSystemControllerForm ui
std::map< SoNode *, EMECCellConstLink > EMECMap
SoSwitch * embSubSwitch[4][NPHISECTORS]
SoSwitch * embNormalSwitch
SoSeparator * emecPreNormalSep
SoSwitch * hecSubSwitch[4][NPHISECTORS]
SoSwitch * embPreHVSwitch
QMap< QString, SoSwitch * > switchMap
std::map< SoNode *, EMBCellConstLink > EMBMap
SoSeparator * hecMissingSep[4]
SoMaterial * fcalMaterial
SoSeparator * embNormalSep
QMap< QString, QCheckBox * > checkBoxMap
SoSwitch * embPreBadSwitch
QMap< QCheckBox *, QString > checkBoxNamesMap
SoSeparator * emecSubSep[4][NPHISECTORS]
SoSeparator * emecMissingSep
std::map< SoNode *, const HECHVSubgap * > HECHVMap
SoSwitch * emecSubSwitch[4][NPHISECTORS]
SoSwitch * hecMissingSwitch[4]
VP1CaloReadoutSystem::POSITION pos
SoSeparator * embHVSeparator
SoSwitch * fcalNormalSwitch[3]
std::map< SoNode *, HECCellConstLink > HECMap
SoSeparator * hecSubSep[4][NPHISECTORS]
SoSeparator * fcalHVSeparator[3]
SoSeparator * fcalSeparator[3]
SoSwitch * fcalBadSwitch[3]
SoSeparator * emecPreMissingSep
SoSwitch * accordionSubSwitch[NPHISECTORS]
SoSeparator * embModsSeparator
SoSeparator * embPreHVSeparator
SoSeparator * embPreBadSep
SoSeparator * fcalBadSep[3]
SoSwitch * hecFocalSwitch
SoSwitch * hecHVSwitch[4]
SoSeparator * hecHVSeparator[4]
SoSwitch * embPreModsSwitch
std::map< SoNode *, const EMBHVElectrode * > EMBHVMap
SoSwitch * emecFocalSwitch
SoSeparator * hecBadSep[4]
SoSeparator * fcalNormalSep[3]
std::map< SoNode *, const EMECHVElectrode * > EMECHVMap
SoSeparator * embSeparator[4]
SoSeparator * volatileSeparator
QVector< bool > currentlyEnabledPhiSectors
SoSeparator * emecPreHVSeparator
void enabledPhiSectorsChanged()
QWidget * buildController()
void phiSectorTurnoff(int)
void userPickedNode(SoNode *pickedNode, SoPath *pickedPath)
void positionOptionChanged()
void systemcreate(StoreGateSvc *detstore)
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
void buildPermanentSceneGraph(StoreGateSvc *detstore, SoSeparator *root)
void setGeomSelectable(bool)
void phiSectorTurnon(int)
static const FCALDetectorManager * fcalDetMgr()
static const EMECDetectorManager * emecDetMgr()
static void ensureInit(IVP1System *)
static const EMBDetectorManager * embDetMgr()
static const HECDetectorManager * hecDetMgr()
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Default, invalid implementation of ClassID_traits.