ATLAS Offline Software
VP1CaloReadoutSystem.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "ui_caloreadoutsystemcontroller.h"
7 #include "VP1Base/VP1Serialise.h"
9 
10 #include "VP1Utils/VP1DetInfo.h"
12 
13 #include <QMap>
14 #include <QVector>
15 
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>
27 
32 
35 
38 
43 
48 #include "LArHV/EMBHVElectrode.h"
49 #include "LArHV/EMBHVModule.h"
50 #include "LArHV/EMBHVManager.h"
51 #include "LArHV/FCALHVLine.h"
52 #include "LArHV/FCALHVModule.h"
53 #include "LArHV/FCALHVManager.h"
54 #include "LArHV/HECHVManager.h"
55 #include "LArHV/HECHVModule.h"
56 #include "LArHV/HECHVSubgap.h"
57 #include "LArHV/LArHVManager.h"
62 
64 
66 #include <sstream>
67 
68 
69 #define MAX_OBJECTS_PER_TECHNOLOGY 3000
70 #define NPHISECTORS 16
71 
73 {
74 public:
75 
76  SoSeparator *volatileSeparator = nullptr;
77 
78  QMap<QString,SoSwitch*> switchMap;
79 
80  // Two maps for controller check boxes
81  QMap<QCheckBox*,QString> checkBoxNamesMap;
82  QMap<QString,QCheckBox*> checkBoxMap;
83  SoPickStyle *pickStyle = nullptr;
84 
85  SoSwitch *fcalSwitch[3]{}; // FCAL
86  SoSwitch *fcalHVSwitch[3]{}; // FCAL
87  SoSwitch *fcalNormalSwitch[3]{};
88  SoSwitch *fcalBadSwitch[3]{};
89  SoSwitch *fcalMissingSwitch[3]{};
90 
91  SoSwitch *hecSwitch[4]{}; // HEC
92  SoSwitch *hecHVSwitch[4]{}; // HEC
93  SoSwitch *hecNormalSwitch[4]{};
94  SoSwitch *hecBadSwitch[4]{};
95  SoSwitch *hecMissingSwitch[4]{};
96 
97  SoSwitch *embSwitch[4]{}; // EMB
98  SoSwitch *embHVSwitch = nullptr;
99  SoSwitch *embModsSwitch = nullptr;
100  SoSwitch *embNormalSwitch = nullptr;
101  SoSwitch *embBadSwitch = nullptr;
102  SoSwitch *embMissingSwitch = nullptr;
103  SoSwitch *embPreHVSwitch = nullptr;
104  SoSwitch *embPreModsSwitch = nullptr;
105  SoSwitch *embPreNormalSwitch = nullptr;
106  SoSwitch *embPreBadSwitch = nullptr;
107  SoSwitch *embPreMissingSwitch = nullptr;
108 
109  SoSwitch *emecPreHVSwitch = nullptr;
110  SoSwitch *emecPreModsSwitch = nullptr;
111  SoSwitch *emecPreNormalSwitch = nullptr;
112  SoSwitch *emecPreBadSwitch = nullptr;
113  SoSwitch *emecPreMissingSwitch = nullptr;
114 
115 
116  SoSwitch *emecSwitch[4]{}; // EMEC
117  SoSwitch *emecHVSwitch = nullptr; // EMB
118  SoSwitch *emecModsSwitch = nullptr;
119  SoSwitch *emecNormalSwitch = nullptr;
120  SoSwitch *emecBadSwitch = nullptr;
121  SoSwitch *emecMissingSwitch = nullptr;
122 
123  SoSeparator *fcalSeparator[3]{}; // FCAL
124  SoSeparator *hecSeparator [4]{}; // HEC
125  SoSeparator *emecSeparator[4]{}; // EMEC
126  SoSeparator *embSeparator [4]{}; // EMB
127 
128 
129  SoSeparator *fcalHVSeparator[3]{};
130  SoSeparator *hecHVSeparator[4]{};
131  SoSeparator *embPreHVSeparator = nullptr;
132  SoSeparator *emecPreHVSeparator = nullptr;
133 
134  SoSeparator *embHVSeparator = nullptr;
135  SoSeparator *emecHVSeparator = nullptr;
136  SoSeparator *embModsSeparator = nullptr;
137  SoSeparator *embPreModsSeparator = nullptr;
138  SoSeparator *emecPreModsSeparator = nullptr;
139  SoSeparator *emecModsSeparator = nullptr;
140 
141  SoSwitch *embSubSwitch[4][NPHISECTORS]{};
142  SoSwitch *emecSubSwitch[4][NPHISECTORS]{};
143  SoSwitch *hecSubSwitch[4][NPHISECTORS]{};
144 
145  SoSeparator *embSubSep[4][NPHISECTORS]{};
146  SoSeparator *emecSubSep[4][NPHISECTORS]{};
147  SoSeparator *hecSubSep[4][NPHISECTORS]{};
148  SoSeparator *fcalSubSep[3]{};
149 
150  SoSeparator *fcalNormalSep[3]{};
151  SoSeparator *fcalMissingSep[3]{};
152  SoSeparator *fcalBadSep[3]{};
153 
154  SoSeparator *hecNormalSep[4]{};
155  SoSeparator *hecMissingSep[4]{};
156  SoSeparator *hecBadSep[4]{};
157 
158  SoSeparator *embNormalSep = nullptr;
159  SoSeparator *embMissingSep = nullptr;
160  SoSeparator *embBadSep = nullptr;
161 
162  SoSeparator *embPreNormalSep = nullptr;
163  SoSeparator *embPreMissingSep = nullptr;
164  SoSeparator *embPreBadSep = nullptr;
165 
166  SoSeparator *emecPreNormalSep = nullptr;
167  SoSeparator *emecPreMissingSep = nullptr;
168  SoSeparator *emecPreBadSep = nullptr;
169 
170  SoSeparator *emecNormalSep = nullptr;
171  SoSeparator *emecMissingSep = nullptr;
172  SoSeparator *emecBadSep = nullptr;
173 
174 
176  SoSeparator *accordionSubSep[NPHISECTORS]{};
177 
178 
179  SoSwitch *emecFocalSwitch = nullptr;
180  SoSwitch *hecFocalSwitch = nullptr;
181  SoSwitch *embAccViewSwitch = nullptr;
182 
183  SoMaterial *embMaterial = nullptr;
184  SoMaterial *emecMaterial = nullptr;
185  SoMaterial *hecMaterial = nullptr;
186  SoMaterial *fcalMaterial = nullptr;
187  SoMaterial *embAccMaterial = nullptr;
188 
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;
193 
194  std::map < SoNode *, const EMBHVElectrode*> EMBHVMap;
195  std::map < SoNode *, const EMECHVElectrode*> EMECHVMap;
196  std::map < SoNode *, const FCALHVLine*> FCALHVMap;
197  std::map < SoNode *, const HECHVSubgap*> HECHVMap;
198 
200 
201  Ui::CaloReadoutSystemControllerForm ui{};
202  bool hvInit = false;
203  bool permInit = false;
205 };
206 
208  :IVP13DSystemSimple("CaloReadout","Display the calorimeter readout segmentation","boudreau@pitt.edu"),
209  m_clockwork(new Clockwork())
210 {
211  m_clockwork->hvInit=false;
212  m_clockwork->permInit=false;
213 }
214 
216 {
217  delete m_clockwork;
218  m_clockwork = 0;
219 }
220 
221 #define INSERTCHECKBOX(checkboxname) \
222 m_clockwork->checkBoxNamesMap.insert(m_clockwork->ui.checkboxname, m_clockwork->ui.checkboxname->objectName())
223 
225 {
226  QWidget* controller = new QWidget(0);
227  m_clockwork->ui.setupUi(controller);
228 
229  // Populate Check Box Names Map
230  INSERTCHECKBOX(embS0CheckBox);
231  INSERTCHECKBOX(embS1CheckBox);
232  INSERTCHECKBOX(embS2CheckBox);
233  INSERTCHECKBOX(embS3CheckBox);
234 
235  INSERTCHECKBOX(emecS0CheckBox);
236  INSERTCHECKBOX(emecS1CheckBox);
237  INSERTCHECKBOX(emecS2CheckBox);
238  INSERTCHECKBOX(emecS3CheckBox);
239 
240  INSERTCHECKBOX(hecS0CheckBox);
241  INSERTCHECKBOX(hecS1CheckBox);
242  INSERTCHECKBOX(hecS2CheckBox);
243  INSERTCHECKBOX(hecS3CheckBox);
244 
245  INSERTCHECKBOX(fcalS0CheckBox);
246  INSERTCHECKBOX(fcalS1CheckBox);
247  INSERTCHECKBOX(fcalS2CheckBox);
248 
249 
250  INSERTCHECKBOX(embCheckBoxHV);
251  INSERTCHECKBOX(embCheckBoxMods);
252  INSERTCHECKBOX(emecCheckBoxHV);
253  INSERTCHECKBOX(emecCheckBoxMods);
254  INSERTCHECKBOX(embPresamplerCheckBoxHV);
255  INSERTCHECKBOX(embPresamplerCheckBoxMods);
256  INSERTCHECKBOX(emecPresamplerCheckBoxHV);
257  INSERTCHECKBOX(emecPresamplerCheckBoxMods);
258 
259  INSERTCHECKBOX(hecS0CheckBoxHV);
260  INSERTCHECKBOX(hecS1CheckBoxHV);
261  INSERTCHECKBOX(hecS2CheckBoxHV);
262  INSERTCHECKBOX(hecS3CheckBoxHV);
263 
264  INSERTCHECKBOX(fcalS0CheckBoxHV);
265  INSERTCHECKBOX(fcalS1CheckBoxHV);
266  INSERTCHECKBOX(fcalS2CheckBoxHV);
267 
268 
269  INSERTCHECKBOX(emecFocalCheckBox);
270  INSERTCHECKBOX(hecFocalCheckBox);
271 
272  INSERTCHECKBOX(embAccordionCheckBox);
273 
274  INSERTCHECKBOX(geomSelectableCheckBox);
275 
276  INSERTCHECKBOX(indicesCheckBox);
277  INSERTCHECKBOX(etaBoundariesCheckBox);
278  INSERTCHECKBOX(phiBoundariesCheckBox);
279  INSERTCHECKBOX(fcalTubesCheckBox);
280  INSERTCHECKBOX(highVoltageCheckBox);
281  INSERTCHECKBOX(badHVDisplayCheckBox);
282  INSERTCHECKBOX(missingHVDisplayCheckBox);
283  INSERTCHECKBOX(normalHVDisplayCheckBox);
284 
285  m_clockwork->currentlyEnabledPhiSectors = QVector<bool>(NPHISECTORS,false);
286  QList<int> l; l << 4 << 8 << NPHISECTORS;//NB: All must be divisors in NPHISECTORS
287  m_clockwork->ui.phiSectionWidget->setNumberOfSectors(16);
288  m_clockwork->ui.phiSectionWidget->setAllowedNumberOfSectors(l);
289 
290  // Populate Check Box Map and connect slots
291  for(QCheckBox* cb : m_clockwork->checkBoxNamesMap.keys())
292  {
293  connect(cb,SIGNAL(toggled(bool)),this,SLOT(checkboxChanged()));
295  }
296 
297  if (m_clockwork->ui.frontRadioButton->isChecked()) m_clockwork->pos=VP1CaloReadoutSystem::FRONT;
298  if (m_clockwork->ui.backRadioButton->isChecked()) m_clockwork->pos=VP1CaloReadoutSystem::BACK;
299  if (m_clockwork->ui.centerRadioButton->isChecked()) m_clockwork->pos=VP1CaloReadoutSystem::CENTER;
300 
301  connect(m_clockwork->ui.frontRadioButton, SIGNAL(clicked()), this, SLOT(positionOptionChanged()));
302  connect(m_clockwork->ui.backRadioButton, SIGNAL(clicked()), this, SLOT(positionOptionChanged()));
303  connect(m_clockwork->ui.centerRadioButton, SIGNAL(clicked()), this, SLOT(positionOptionChanged()));
304  connect(m_clockwork->ui.acceptHVPushButton, SIGNAL(clicked()), this, SLOT(acceptHV()));
305 
306  connect(m_clockwork->ui.geomSelectableCheckBox, SIGNAL(toggled(bool)), this, SLOT(setGeomSelectable(bool)));
307 
308  // Connect the PhiSectionWidget:
309  connect(m_clockwork->ui.phiSectionWidget,SIGNAL(enabledPhiRangesChanged(const QList<VP1Interval>&)),
310  this,SLOT(enabledPhiSectorsChanged()));
311 
312  return controller;
313 }
314 
316 {
317 
318  QVector<bool> v = m_clockwork->ui.phiSectionWidget->virtualSectorsEnabled(NPHISECTORS);
320  return;
321  QList<int> justEnabledPhiSectors;
322  QList<int> justDisabledPhiSectors;
323  for (int iphi = 0; iphi < NPHISECTORS; ++iphi) {
324  bool currentstate=m_clockwork->currentlyEnabledPhiSectors[iphi];
325  if (currentstate!=v[iphi]) {
326  if (currentstate)
327  justDisabledPhiSectors << iphi;
328  else
329  justEnabledPhiSectors << iphi;
330  }
331  }
333  for (int iphi : justDisabledPhiSectors)
334  phiSectorTurnoff(iphi);
335  for (int iphi : justEnabledPhiSectors)
336  phiSectorTurnon(iphi);
337 }
338 
340 {
341 }
342 
344 
345  if (m_clockwork->permInit) return;
346  m_clockwork->permInit = true;
347 
348  // Styles & cet:
349  SoDrawStyle *drawStyle = new SoDrawStyle();
350  drawStyle->lineWidth=2;
351  drawStyle->pointSize=3;
352 
353  SoLightModel *lightModel = new SoLightModel();
354  lightModel->model=SoLightModel::BASE_COLOR;
355 
356  m_clockwork->pickStyle = new SoPickStyle();
357  m_clockwork->pickStyle->style = m_clockwork->ui.geomSelectableCheckBox->isChecked() ? SoPickStyleElement::SHAPE : SoPickStyleElement::UNPICKABLE;
358  m_clockwork->ui.etaBoundariesCheckBox->setEnabled(m_clockwork->ui.geomSelectableCheckBox->isChecked());
359  m_clockwork->ui.phiBoundariesCheckBox->setEnabled(m_clockwork->ui.geomSelectableCheckBox->isChecked());
360  m_clockwork->ui.fcalTubesCheckBox->setEnabled(m_clockwork->ui.geomSelectableCheckBox->isChecked());
361  m_clockwork->ui.highVoltageCheckBox->setEnabled(m_clockwork->ui.geomSelectableCheckBox->isChecked());
362  m_clockwork->ui.indicesCheckBox->setEnabled(m_clockwork->ui.geomSelectableCheckBox->isChecked());
363 
364 
365  root->addChild(m_clockwork->pickStyle);
366  root->addChild(drawStyle);
367  root->addChild(lightModel);
368 
369  m_clockwork->volatileSeparator = new SoSeparator();
370 // SoMaterial *red = new SoMaterial();
371 // red->diffuseColor.setValue(1,0,0);
372 
373  SoMaterial *white = new SoMaterial();
374  white->diffuseColor.setValue(1,1,1);
375 
376 // SoMaterial *blue = new SoMaterial();
377 // blue->diffuseColor.setValue(0,0,1);
378 
379  root->addChild(white);
380  root->addChild(m_clockwork->volatileSeparator);
381 
382  // Blue, basically:
383  m_clockwork->embMaterial= new SoMaterial();
384  m_clockwork->embMaterial->diffuseColor.setValue(0,0,1);
385 
386  // Green, basically:
387  m_clockwork->fcalMaterial= new SoMaterial();
388  m_clockwork->fcalMaterial->diffuseColor.setValue(0 , 1, 0);
389 
390  // Yaller, basically:
391  m_clockwork->hecMaterial= new SoMaterial();
392  m_clockwork->hecMaterial->diffuseColor.setValue(0, 1.00, 1.00);
393 
394  // Pink, basically:
395  m_clockwork->emecMaterial = new SoMaterial();
396  m_clockwork->emecMaterial->diffuseColor.setValue(1.00,0.00, 1.00);
397 
398  // White, totally:
399  m_clockwork->embAccMaterial = new SoMaterial();
400  m_clockwork->embAccMaterial->diffuseColor.setValue(1.00,1.00, 1.00);
401 
402  m_clockwork->ui.embColorSel->setMaterial(m_clockwork->embMaterial);
403  m_clockwork->ui.emecColorSel->setMaterial(m_clockwork->emecMaterial);
404  m_clockwork->ui.hecColorSel->setMaterial(m_clockwork->hecMaterial);
405  m_clockwork->ui.fcalColorSel->setMaterial(m_clockwork->fcalMaterial);
406 
407 // SoPickStyle *hvPickStyle=new SoPickStyle();
408 // hvPickStyle->style = SoPickStyleElement::UNPICKABLE;
409 
410  for (int i=0;i<3;i++) {
411  m_clockwork->fcalSwitch[i] = new SoSwitch();
412  m_clockwork->fcalHVSwitch[i] = new SoSwitch();
413  m_clockwork->fcalNormalSwitch[i] = new SoSwitch();
414  m_clockwork->fcalBadSwitch[i] = new SoSwitch();
415  m_clockwork->fcalMissingSwitch[i] = new SoSwitch();
416  m_clockwork->fcalSeparator[i] = new SoSeparator();
417  m_clockwork->fcalHVSeparator[i]= new SoSeparator();
418  // m_clockwork->fcalHVSeparator[i]->addChild(hvPickStyle);
421 
423  m_clockwork->fcalSubSep[i]= new SoSeparator();
425 
426  m_clockwork->fcalHVSeparator[i]->addChild(drawStyle);
427  m_clockwork->fcalHVSeparator[i]->addChild(lightModel);
428 
432 
433  m_clockwork->fcalNormalSep[i] =new SoSeparator(); m_clockwork->fcalNormalSwitch[i] ->addChild(m_clockwork->fcalNormalSep[i]);
434  m_clockwork->fcalBadSep[i] =new SoSeparator(); m_clockwork->fcalBadSwitch[i] ->addChild(m_clockwork->fcalBadSep[i]);
436 
437  root->addChild(m_clockwork->fcalSwitch[i]);
438  root->addChild(m_clockwork->fcalHVSwitch[i]);
439  }
440 
441  {
442  m_clockwork->embModsSwitch = new SoSwitch();
443  m_clockwork->embModsSeparator = new SoSeparator();
445  m_clockwork->embModsSeparator->addChild(drawStyle);
446  m_clockwork->embModsSeparator->addChild(lightModel);
447 
448 
449  m_clockwork->embHVSwitch = new SoSwitch();
450  m_clockwork->embHVSeparator = new SoSeparator();
452  m_clockwork->embHVSeparator->addChild(drawStyle);
453  m_clockwork->embHVSeparator->addChild(lightModel);
454 
455  m_clockwork->embNormalSep = new SoSeparator();
456  m_clockwork->embNormalSwitch = new SoSwitch();
459 
460  m_clockwork->embMissingSep = new SoSeparator();
461  m_clockwork->embMissingSwitch = new SoSwitch();
464 
465  m_clockwork->embBadSep = new SoSeparator();
466  m_clockwork->embBadSwitch = new SoSwitch();
469 
470  }
471 
472  {
473  m_clockwork->embPreModsSwitch = new SoSwitch();
474  m_clockwork->embPreModsSeparator = new SoSeparator();
476  m_clockwork->embPreModsSeparator->addChild(drawStyle);
477  m_clockwork->embPreModsSeparator->addChild(lightModel);
478 
479  m_clockwork->embPreHVSwitch = new SoSwitch();
480  m_clockwork->embPreHVSeparator = new SoSeparator();
482  m_clockwork->embPreHVSeparator->addChild(drawStyle);
483  m_clockwork->embPreHVSeparator->addChild(lightModel);
484 
485  m_clockwork->embPreNormalSep = new SoSeparator();
486  m_clockwork->embPreNormalSwitch = new SoSwitch();
489 
490  m_clockwork->embPreMissingSep = new SoSeparator();
491  m_clockwork->embPreMissingSwitch = new SoSwitch();
494 
495  m_clockwork->embPreBadSep = new SoSeparator();
496  m_clockwork->embPreBadSwitch = new SoSwitch();
499 
500  }
501 
502  {
503  m_clockwork->emecModsSwitch = new SoSwitch();
504  m_clockwork->emecModsSeparator = new SoSeparator();
506  m_clockwork->emecModsSeparator->addChild(drawStyle);
507  m_clockwork->emecModsSeparator->addChild(lightModel);
508 
509  m_clockwork->emecHVSwitch = new SoSwitch();
510  m_clockwork->emecHVSeparator = new SoSeparator();
512  m_clockwork->emecHVSeparator->addChild(drawStyle);
513  m_clockwork->emecHVSeparator->addChild(lightModel);
514 
515  m_clockwork->emecNormalSep = new SoSeparator();
516  m_clockwork->emecNormalSwitch = new SoSwitch();
519 
520  m_clockwork->emecMissingSep = new SoSeparator();
521  m_clockwork->emecMissingSwitch = new SoSwitch();
524 
525  m_clockwork->emecBadSep = new SoSeparator();
526  m_clockwork->emecBadSwitch = new SoSwitch();
529  }
530 
531  {
532  m_clockwork->emecPreModsSwitch = new SoSwitch();
533  m_clockwork->emecPreModsSeparator = new SoSeparator();
535  m_clockwork->emecPreModsSeparator->addChild(drawStyle);
536  m_clockwork->emecPreModsSeparator->addChild(lightModel);
537 
538  m_clockwork->emecPreHVSwitch = new SoSwitch();
539  m_clockwork->emecPreHVSeparator = new SoSeparator();
541  m_clockwork->emecPreHVSeparator->addChild(drawStyle);
542  m_clockwork->emecPreHVSeparator->addChild(lightModel);
543 
544  m_clockwork->emecPreNormalSep = new SoSeparator();
545  m_clockwork->emecPreNormalSwitch = new SoSwitch();
548 
549  m_clockwork->emecPreMissingSep = new SoSeparator();
550  m_clockwork->emecPreMissingSwitch = new SoSwitch();
553 
554  m_clockwork->emecPreBadSep = new SoSeparator();
555  m_clockwork->emecPreBadSwitch = new SoSwitch();
558 
559  }
560 
561  root->addChild(m_clockwork->embHVSwitch);
562  root->addChild(m_clockwork->embPreHVSwitch);
563  root->addChild(m_clockwork->emecPreHVSwitch);
564  root->addChild(m_clockwork->emecHVSwitch);
565  root->addChild(m_clockwork->embModsSwitch);
566  root->addChild(m_clockwork->emecModsSwitch);
567  root->addChild(m_clockwork->embPreModsSwitch);
568  root->addChild(m_clockwork->emecPreModsSwitch);
569 
570  for (int i=0;i<4;i++) {
571  m_clockwork->embSwitch[i] = new SoSwitch();
572  m_clockwork->embSeparator[i] = new SoSeparator();
575 
576  for (int p=0;p<NPHISECTORS;p++) {
577  m_clockwork->embSubSwitch[i][p] = new SoSwitch();
578  m_clockwork->embSubSep [i][p] = new SoSeparator();
579  m_clockwork->embSubSwitch[i][p]->addChild(m_clockwork->embSubSep[i][p]);
581  m_clockwork->embSubSwitch[i][p]->whichChild= SO_SWITCH_ALL;
582  }
583 
584  root->addChild(m_clockwork->embSwitch[i]);
585 
586  m_clockwork->emecSwitch[i] = new SoSwitch();
587  m_clockwork->emecSeparator[i] = new SoSeparator();
590 
591  for (int p=0;p<NPHISECTORS;p++) {
592  m_clockwork->emecSubSwitch[i][p] = new SoSwitch();
593  m_clockwork->emecSubSep [i][p] = new SoSeparator();
596  m_clockwork->emecSubSwitch[i][p]->whichChild= SO_SWITCH_ALL;
597  }
598 
599  root->addChild(m_clockwork->emecSwitch[i]);
600 
601  m_clockwork->hecSwitch[i] = new SoSwitch();
602  m_clockwork->hecHVSwitch[i] = new SoSwitch();
603  m_clockwork->hecHVSeparator[i] = new SoSeparator();
605  m_clockwork->hecHVSeparator[i]->addChild(drawStyle);
606  m_clockwork->hecHVSeparator[i]->addChild(lightModel);
607 
608  m_clockwork->hecNormalSep[i] = new SoSeparator();
609  m_clockwork->hecNormalSwitch[i] = new SoSwitch();
612 
613  m_clockwork->hecMissingSep[i] = new SoSeparator();
614  m_clockwork->hecMissingSwitch[i] = new SoSwitch();
617 
618  m_clockwork->hecBadSep[i] = new SoSeparator();
619  m_clockwork->hecBadSwitch[i] = new SoSwitch();
622 
623  m_clockwork->hecSeparator[i] = new SoSeparator();
626 
627  for (int p=0;p<NPHISECTORS;p++) {
628  m_clockwork->hecSubSwitch[i][p] = new SoSwitch();
629  m_clockwork->hecSubSep [i][p] = new SoSeparator();
630  m_clockwork->hecSubSwitch[i][p]->addChild(m_clockwork->hecSubSep[i][p]);
632  m_clockwork->hecSubSwitch[i][p]->whichChild= SO_SWITCH_ALL;
633 
634  }
635 
636  root->addChild(m_clockwork->hecSwitch[i]);
637  root->addChild(m_clockwork->hecHVSwitch[i]);
638  }
639 
640  m_clockwork->emecFocalSwitch = new SoSwitch();
642  root->addChild(m_clockwork->emecFocalSwitch);
643 
644  m_clockwork->hecFocalSwitch = new SoSwitch();
646  root->addChild(m_clockwork->hecFocalSwitch);
647 
648  m_clockwork->embAccViewSwitch = new SoSwitch();
650  root->addChild(m_clockwork->embAccViewSwitch);
651 
652  for (int p=0;p<NPHISECTORS;p++) {
653  m_clockwork->accordionSubSwitch[p] = new SoSwitch();
654  m_clockwork->accordionSubSep [p] = new SoSeparator();
657  m_clockwork->accordionSubSwitch[p]->whichChild= SO_SWITCH_ALL;
658  }
659 
660 
661  m_clockwork->switchMap["embS0CheckBox"] = m_clockwork->embSwitch[0];
662  m_clockwork->switchMap["embS1CheckBox"] = m_clockwork->embSwitch[1];
663  m_clockwork->switchMap["embS2CheckBox"] = m_clockwork->embSwitch[2];
664  m_clockwork->switchMap["embS3CheckBox"] = m_clockwork->embSwitch[3];
665 
666  m_clockwork->switchMap["emecS0CheckBox"] = m_clockwork->emecSwitch[0];
667  m_clockwork->switchMap["emecS1CheckBox"] = m_clockwork->emecSwitch[1];
668  m_clockwork->switchMap["emecS2CheckBox"] = m_clockwork->emecSwitch[2];
669  m_clockwork->switchMap["emecS3CheckBox"] = m_clockwork->emecSwitch[3];
670 
671  m_clockwork->switchMap["hecS0CheckBox"] = m_clockwork->hecSwitch[0];
672  m_clockwork->switchMap["hecS1CheckBox"] = m_clockwork->hecSwitch[1];
673  m_clockwork->switchMap["hecS2CheckBox"] = m_clockwork->hecSwitch[2];
674  m_clockwork->switchMap["hecS3CheckBox"] = m_clockwork->hecSwitch[3];
675 
676  m_clockwork->switchMap["fcalS0CheckBox"] = m_clockwork->fcalSwitch[0];
677  m_clockwork->switchMap["fcalS1CheckBox"] = m_clockwork->fcalSwitch[1];
678  m_clockwork->switchMap["fcalS2CheckBox"] = m_clockwork->fcalSwitch[2];
679 
680  m_clockwork->switchMap["fcalS0CheckBoxHV"] = m_clockwork->fcalHVSwitch[0];
681  m_clockwork->switchMap["fcalS1CheckBoxHV"] = m_clockwork->fcalHVSwitch[1];
682  m_clockwork->switchMap["fcalS2CheckBoxHV"] = m_clockwork->fcalHVSwitch[2];
683 
684  m_clockwork->switchMap["hecS0CheckBoxHV"] = m_clockwork->hecHVSwitch[0];
685  m_clockwork->switchMap["hecS1CheckBoxHV"] = m_clockwork->hecHVSwitch[1];
686  m_clockwork->switchMap["hecS2CheckBoxHV"] = m_clockwork->hecHVSwitch[2];
687  m_clockwork->switchMap["hecS3CheckBoxHV"] = m_clockwork->hecHVSwitch[3];
688 
689  m_clockwork->switchMap["emecCheckBoxHV"] = m_clockwork->emecHVSwitch;
690  m_clockwork->switchMap["embCheckBoxHV"] = m_clockwork->embHVSwitch;
691  m_clockwork->switchMap["emecCheckBoxMods"] = m_clockwork->emecModsSwitch;
692  m_clockwork->switchMap["embCheckBoxMods"] = m_clockwork->embModsSwitch;
693 
694  m_clockwork->switchMap["embPresamplerCheckBoxHV"] = m_clockwork->embPreHVSwitch;
695  m_clockwork->switchMap["embPresamplerCheckBoxMods"] = m_clockwork->embPreModsSwitch;
696  m_clockwork->switchMap["emecPresamplerCheckBoxHV"] = m_clockwork->emecPreHVSwitch;
697  m_clockwork->switchMap["emecPresamplerCheckBoxMods"] = m_clockwork->emecPreModsSwitch;
698 
699  m_clockwork->switchMap["emecFocalCheckBox"] = m_clockwork->emecFocalSwitch;
700  m_clockwork->switchMap["hecFocalCheckBox"] = m_clockwork->hecFocalSwitch;
701  m_clockwork->switchMap["embAccordionCheckBox"] = m_clockwork->embAccViewSwitch;
702 
703  createEtaPhi();
704 
705  //Finally, make sure we start in a correct state:
706  m_clockwork->currentlyEnabledPhiSectors = QVector<bool>(NPHISECTORS,true);//we need this line for some reason...
707  QMapIterator<QString,QCheckBox*> it(m_clockwork->checkBoxMap);
708  while (it.hasNext()) {
709  it.next();
710  if (it.value()->isChecked())
711  checkboxChanged(it.value());
712  }
713  enabledPhiSectorsChanged();//To init properly
714 }
715 
717 
718  if (m_clockwork->hvInit) return;
719  m_clockwork->hvInit=true;
720 
721 
722  SoMaterial *red = new SoMaterial();
723  red->diffuseColor.setValue(1,.3,.3);
724  red->ref();
725 
726  SoMaterial *white = new SoMaterial();
727  white->diffuseColor.setValue(1,1,1);
728  white->ref();
729 
730  SoMaterial *blue = new SoMaterial();
731  blue->diffuseColor.setValue(0,0,1);
732  blue->ref();
733 
734  for (int i=0;i<3;i++) {
735  m_clockwork->fcalNormalSep[i]->addChild(blue);
736  m_clockwork->fcalBadSep[i]->addChild(red);
737  m_clockwork->fcalMissingSep[i]->addChild(white);
738  }
739 
740  for (int i=0;i<4;i++) {
741  m_clockwork->hecNormalSep[i]->addChild(blue);
742  m_clockwork->hecBadSep[i]->addChild(red);
743  m_clockwork->hecMissingSep[i]->addChild(white);
744 
745  }
746  m_clockwork->emecNormalSep->addChild(blue);
747  m_clockwork->emecBadSep->addChild(red);
748  m_clockwork->emecMissingSep->addChild(white);
749  m_clockwork->emecModsSeparator->addChild(white);
750 
751  m_clockwork->embNormalSep->addChild(blue);
752  m_clockwork->embBadSep->addChild(red);
753  m_clockwork->embMissingSep->addChild(white);
754  m_clockwork->embModsSeparator->addChild(white);
755 
756  m_clockwork->embPreNormalSep->addChild(blue);
757  m_clockwork->embPreBadSep->addChild(red);
758  m_clockwork->embPreMissingSep->addChild(white);
759  m_clockwork->embPreModsSeparator->addChild(white);
760 
761  m_clockwork->emecPreNormalSep->addChild(blue);
762  m_clockwork->emecPreBadSep->addChild(red);
763  m_clockwork->emecPreMissingSep->addChild(white);
764  m_clockwork->emecPreModsSeparator->addChild(white);
765 
766  red->unref();
767  white->unref();
768  blue->unref();
769 
770 
771  const LArHVManager *larHVManager=NULL;
772  if (!VP1SGAccessHelper(this,true).retrieve(larHVManager,"LArHVManager")) {
773  message("No Access To HV Information. The LArHVManager is NULL");
774  return;
775  }
776 
777  SG::ReadCondHandleKey<LArHVIdMapping> hvCablingKey ("LArHVIdMap");
778  if (hvCablingKey.initialize().isFailure()) {
779  message("No Access To HV Information. Cannot retrieve LArHVIdMap.");
780  return;
781  }
782  if (hvCablingKey.storeHandle()->proxy (ClassID_traits<CondCont<LArHVIdMapping> >::ID(),
783  hvCablingKey.key()) == nullptr)
784  {
785  message("No Access To HV Information. Cannot retrieve LArHVIdMap.");
786  return;
787  }
788  SG::ReadCondHandle<LArHVIdMapping> hvCabling (hvCablingKey);
789 
790  std::vector<const CondAttrListCollection*> attrLists;
791  {
792  // Not a typo --- this folder has a lower-case l in the database...
793  SG::ReadCondHandleKey<CondAttrListCollection> i16Key ("/LAR/DCS/HV/BARREl/I16");
794  SG::ReadCondHandleKey<CondAttrListCollection> i8Key ("/LAR/DCS/HV/BARREL/I8");
795  if (i16Key.initialize().isFailure()) {
796  message("No Access To HV Information. Cannot retrieve I16.");
797  return;
798  }
799  if (i8Key.initialize().isFailure()) {
800  message("No Access To HV Information. Cannot retrieve I8.");
801  return;
802  }
804  i16Key.key()) == nullptr ||
806  i8Key.key()) == nullptr)
807  {
808  message("No Access To HV Information. Cannot retrieve LArHVIdMap.");
809  return;
810  }
813  attrLists.push_back (*i16);
814  attrLists.push_back (*i8);
815  }
816 
817  int tolerance =m_clockwork->ui.hvToleranceSpinBox->value();
818 
819  const EMBHVManager& embHVManager = larHVManager->getEMBHVManager();
820  const EMBHVManager::EMBHVData hvdata_EMB = embHVManager.getData(**hvCabling,
821  attrLists);
822  for (unsigned int e=embHVManager.beginSideIndex();e!=embHVManager.endSideIndex();e++) {
823  for (unsigned int s=embHVManager.beginSectorIndex();s!=embHVManager.endSectorIndex();s++) {
824  for (unsigned int y=embHVManager.beginEtaIndex();y!=embHVManager.endEtaIndex();y++) {
825  for (unsigned int p=embHVManager.beginPhiIndex();p!=embHVManager.endPhiIndex();p++) {
826  const EMBHVModule& embMod=embHVManager.getHVModule(e,y,p,s);
827 
828  double r=1970; // Radius to draw stuff at for barrel HV.
829 
830 
831 
832  {
833  int cc=0;
834  double etaMin=embMod.getEtaMin();
835  double etaMax=embMod.getEtaMax();
836  double phiMin=embMod.getPhiMin();
837  double phiMax=embMod.getPhiMax();
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)));
844 
845  SoLineSet *ls = new SoLineSet();
846  ls->numVertices=5;
847  ls->vertexProperty=vtxProperty;
848  m_clockwork->embModsSeparator->addChild(ls);
849  }
850 
851 
852  for (unsigned int i=0;i<embMod.getNumElectrodes();i++) {
853  const EMBHVElectrode& electrode = embMod.getElectrode(i);
854 
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;
860  {
861  int cc=0;
862  SoVertexProperty *vtxProperty = new SoVertexProperty();
863  vtxProperty->vertex.set1Value(cc++, SbVec3f(r*cos(electrode.getPhi()),r*sin(electrode.getPhi()) ,r*sinh(electrode.getModule().getEtaMin())));
864  vtxProperty->vertex.set1Value(cc++, SbVec3f(r*cos(electrode.getPhi()),r*sin(electrode.getPhi()) ,r*sinh(electrode.getModule().getEtaMax())));
865 
866  SoLineSet *ls = new SoLineSet();
867  ls->numVertices=2;
868  ls->vertexProperty=vtxProperty;
869 
870  if (missing) {
871  m_clockwork->embMissingSep->addChild(ls);
872  }
873  else if (outOfTolerance) {
874  m_clockwork->embBadSep->addChild(ls);
875  }
876  else {
877  m_clockwork->embNormalSep->addChild(ls);
878  }
879  m_clockwork->EMBHVMap[ls]=&electrode;
880  }
881  }
882  }
883  }
884  }
885  }
886 
887  const EMBPresamplerHVManager& embPreHVManager = larHVManager->getEMBPresamplerHVManager();
888  const EMBPresamplerHVManager::EMBPresamplerHVData hvdata_EMBPS = embPreHVManager.getData(**hvCabling,
889  attrLists);
890  for (unsigned int e=embPreHVManager.beginSideIndex();e!=embPreHVManager.endSideIndex();e++) {
891  for (unsigned int y=embPreHVManager.beginEtaIndex();y!=embPreHVManager.endEtaIndex();y++) {
892  for (unsigned int p=embPreHVManager.beginPhiIndex();p!=embPreHVManager.endPhiIndex();p++) {
893  const EMBPresamplerHVModule& embMod=embPreHVManager.getHVModule(e,y,p);
894 
895  double r=1900; // Radius to draw stuff at for barrel Presampler HV.
896 
897  {
898  int cc=0;
899  double etaMin=embMod.getEtaMin();
900  double etaMax=embMod.getEtaMax();
901  double phiMin=embMod.getPhiMin();
902  double phiMax=embMod.getPhiMax();
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)));
909 
910  SoLineSet *ls = new SoLineSet();
911  ls->numVertices=5;
912  ls->vertexProperty=vtxProperty;
913  m_clockwork->embPreModsSeparator->addChild(ls);
914 
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;
920 
921 
922  if (missing) {
923  m_clockwork->embPreMissingSep->addChild(ls);
924  }
925  else if (outOfTolerance) {
926  m_clockwork->embPreBadSep->addChild(ls);
927  }
928  else {
929  m_clockwork->embPreNormalSep->addChild(ls);
930  }
931  m_clockwork->embPreModsSeparator->addChild(ls);
932  //m_clockwork->EMBPresamplerHVMap[ls]=embMod;
933  }
934  }
935  }
936  }
937 
938  QSpinBox *emecSpinBoxOuter[]= {m_clockwork->ui.emecNominalSpinBox_1,
939  m_clockwork->ui.emecNominalSpinBox_2,
940  m_clockwork->ui.emecNominalSpinBox_3,
941  m_clockwork->ui.emecNominalSpinBox_4,
942  m_clockwork->ui.emecNominalSpinBox_5,
943  m_clockwork->ui.emecNominalSpinBox_6,
944  m_clockwork->ui.emecNominalSpinBox_7};
945  QSpinBox *emecSpinBoxInner[]= {m_clockwork->ui.emecNominalSpinBox_8,
946  m_clockwork->ui.emecNominalSpinBox_9};
947 
948 
949  for (int t=0;t<2;t++) {
950 
952  QSpinBox **spinBoxes = iotype==EMECHVModule::OUTER ? emecSpinBoxOuter : emecSpinBoxInner;
953 
954  const EMECHVManager& emecHVManager = larHVManager->getEMECHVManager(iotype);
955  const EMECHVManager::EMECHVData hvdata_EMEC = emecHVManager.getData(**hvCabling,
956  attrLists);
957  for (unsigned int e=emecHVManager.beginSideIndex();e!=emecHVManager.endSideIndex();e++) {
958  double z = e==0 ? -3740:3740;
959  for (unsigned int s=emecHVManager.beginSectorIndex();s!=emecHVManager.endSectorIndex();s++) {
960  for (unsigned int y=emecHVManager.beginEtaIndex();y!=emecHVManager.endEtaIndex();y++) {
961  for (unsigned int p=emecHVManager.beginPhiIndex();p!=emecHVManager.endPhiIndex();p++) {
962  const EMECHVModule& emecMod=emecHVManager.getHVModule(e,y,p,s);
963 
964  double phiMin = emecMod.getPhiMin();
965  double phiMax = emecMod.getPhiMax();
966  double etaMin = emecMod.getEtaMin();
967  double etaMax = emecMod.getEtaMax();
968  double rMax=fabs(z/sinh(etaMin));
969  double rMin=fabs(z/sinh(etaMax));
970 
971 
972  int cc=0;
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));
979 
980 
981  SoLineSet *ls = new SoLineSet();
982  ls->numVertices=5;
983  ls->vertexProperty=vtxProperty;
984  m_clockwork->emecModsSeparator->addChild(ls);
985 
986  for (unsigned int i=0;i<emecMod.getNumElectrodes();i++) {
987  const EMECHVElectrode& electrode = emecMod.getElectrode(i);
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;
993  double etaMax=electrode.getModule().getEtaMax();
994  double etaMin=electrode.getModule().getEtaMin();
995  double rMin=fabs(z/sinh(etaMin));
996  double rMax=fabs(z/sinh(etaMax));
997 
998  {
999  int cc=0;
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));
1003 
1004  SoLineSet *ls = new SoLineSet();
1005  ls->numVertices=2;
1006  ls->vertexProperty=vtxProperty;
1007 
1008  if (missing) {
1009  m_clockwork->emecMissingSep->addChild(ls);
1010  }
1011  else if (outOfTolerance) {
1012  m_clockwork->emecBadSep->addChild(ls);
1013  }
1014  else {
1015  m_clockwork->emecNormalSep->addChild(ls);
1016  }
1017  m_clockwork->EMECHVMap[ls]=&electrode;
1018  }
1019  }
1020  }
1021  }
1022  }
1023  }
1024  }
1025 
1026  const EMECPresamplerHVManager& emecPreHVManager = larHVManager->getEMECPresamplerHVManager();
1027  const EMECPresamplerHVManager::EMECPresamplerHVData hvdata_EMECPS = emecPreHVManager.getData(**hvCabling,
1028  attrLists);
1029  for (unsigned int e=emecPreHVManager.beginSideIndex();e!=emecPreHVManager.endSideIndex();e++) {
1030  double z = e==0 ? -3650:3650;
1031  for (unsigned int p=emecPreHVManager.beginPhiIndex();p!=emecPreHVManager.endPhiIndex();p++) {
1032  const EMECPresamplerHVModule& emecMod=emecPreHVManager.getHVModule(e,p);
1033 
1034  double phiMin = emecMod.getPhiMin();
1035  double phiMax = emecMod.getPhiMax();
1036  double etaMin = emecMod.getEtaMin();
1037  double etaMax = emecMod.getEtaMax();
1038  double rMax=fabs(z/sinh(etaMin));
1039  double rMin=fabs(z/sinh(etaMax));
1040 
1041 
1042  int cc=0;
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));
1049 
1050 
1051  SoLineSet *ls = new SoLineSet();
1052  ls->numVertices=5;
1053  ls->vertexProperty=vtxProperty;
1054  m_clockwork->emecPreModsSeparator->addChild(ls);
1055 
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;
1061 
1062  if (missing) {
1063  m_clockwork->emecPreMissingSep->addChild(ls);
1064  }
1065  else if (outOfTolerance) {
1066  m_clockwork->emecPreBadSep->addChild(ls);
1067  }
1068  else {
1069  m_clockwork->emecPreNormalSep->addChild(ls);
1070  }
1071  m_clockwork->emecPreModsSeparator->addChild(ls);
1072  //m_clockwork->EMECPreHVMap[ls]=module;
1073  }
1074  }
1075 
1076 
1077  const HECDetectorManager *hecManager = VP1DetInfo::hecDetMgr();
1078  const HECHVManager& hecHVManager = larHVManager->getHECHVManager();
1079  const HECHVManager::HECHVData hvdata_HEC = hecHVManager.getData(**hvCabling,
1080  attrLists);
1081  for (unsigned int e=hecHVManager.beginSideIndex();e!=hecHVManager.endSideIndex();e++) {
1082  for (unsigned int s=hecHVManager.beginSamplingIndex();s!=hecHVManager.endSamplingIndex();s++) {
1083  for (unsigned int p=hecHVManager.beginPhiIndex();p!=hecHVManager.endPhiIndex();p++) {
1084  const HECHVModule& hecMod=hecHVManager.getHVModule(e,p,s);
1085  for (unsigned int i=0;i<hecMod.getNumSubgaps();i++) {
1086  const HECHVSubgap& subgap = hecMod.getSubgap(i);
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;
1091 
1092 
1093  HECCellConstLink element = hecManager->getDetectorRegion(e,s,0)->getHECCell(0,0); // 5 is relatively arbitrary. middle of HEC
1094 
1095  // we comment out to avoid compilation warnings, because they're not used, apparently
1096 // HECCell::CELLPOS pos=HECCell::FRONT;
1097 // if (m_clockwork->pos==BACK) pos=HECCell::BACK;
1098 // if (m_clockwork->pos==CENTER) pos=HECCell::CENTER;
1099 
1100  const HECDetectorManager *hecManager = VP1DetInfo::hecDetMgr();
1101  const HECDetectorRegion *region = hecManager->getDetectorRegion(element->getEndcapIndex(),element->getSamplingIndex(),element->getRegionIndex());
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();
1105 
1106 
1107  double z = z0 + i*(z1-z0)/4;
1108  double phiMin = hecMod.getPhiMin();
1109  double phiMax = hecMod.getPhiMax();
1110  double rMax = 2130;
1111  double rMin = s==0 ? 371 : 474;
1112 
1113  int cc=0;
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));
1120 
1121  SoLineSet *ls = new SoLineSet();
1122  ls->numVertices=5;
1123  ls->vertexProperty=vtxProperty;
1124  if (missing) {
1125  m_clockwork->hecMissingSep[s]->addChild(ls);
1126  }
1127  else if (outOfTolerance) {
1128  m_clockwork->hecBadSep[s]->addChild(ls);
1129  }
1130  else {
1131  m_clockwork->hecNormalSep[s]->addChild(ls);
1132  }
1133  m_clockwork->HECHVMap[ls]=&subgap;
1134 
1135  }
1136  }
1137  }
1138  }
1139 
1140  const FCALHVManager& fcalHVManager = larHVManager->getFCALHVManager();
1141  const FCALHVManager::FCALHVData hvdata_FCAL = fcalHVManager.getData(**hvCabling,
1142  attrLists);
1143  for (unsigned int e=fcalHVManager.beginSideIndex();e!=fcalHVManager.endSideIndex();e++) {
1144  for (unsigned int s=fcalHVManager.beginSamplingIndex();s!=fcalHVManager.endSamplingIndex();s++) {
1145  for (unsigned int x=fcalHVManager.beginSectorIndex(s);x!=fcalHVManager.endSectorIndex(s);x++) {
1146  const FCALHVModule& fcalMod=fcalHVManager.getHVModule(e,x,s);
1147  for (unsigned int l=0;l<fcalMod.getNumHVLines();l++) {
1148  const FCALHVLine& fcalLine=fcalMod.getHVLine(l);
1149  double voltage = hvdata_FCAL.voltage (fcalLine);
1150 
1151  //
1152  // Determine whether this is in bounds, or not..
1153  //
1154 
1155  const QSpinBox *fcalSpin[] = {m_clockwork->ui.fcal1NominalSpinBox,m_clockwork->ui.fcal2NominalSpinBox,m_clockwork->ui.fcal3NominalSpinBox};
1156  const QSpinBox *spinBox=fcalSpin[s];
1157  double nominalVoltage = double (spinBox->value());
1158 
1159  bool outOfTolerance = fabs(voltage-nominalVoltage) > double(tolerance);
1160  bool missing = voltage == -99999;
1161 
1162  //
1163  // Loop over every single tube in the system. If the tube is associated with the HV Line then put a dot where the tube is:
1164  //
1165  const FCALDetectorManager *fcalManager=VP1DetInfo::fcalDetMgr();
1166  if (fcalManager) {
1168  for (e=fcalManager->beginFCAL();e!=fcalManager->endFCAL(); ++e) {
1169 
1170  const FCALModule *fcalMod = *e;
1172 
1173  SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
1174  SoSeparator *sep = new SoSeparator();
1175  sep->addChild(XF);
1176 
1177  SoVertexProperty *vtxProperty = new SoVertexProperty();
1178  int cc=0;
1179 
1181  for (t=fcalMod->beginTiles();t!=fcalMod->endTiles();++t) {
1182 
1183  double zf = fcalMod->getEndcapIndex()== 0 ? +fcalMod->getFullDepthZ(*t)/2.0 : -fcalMod->getFullDepthZ(*t)/2.0;
1184  // double zc = 0;
1185  // double zb = fcalMod->getEndcapIndex()== 0 ? -fcalMod->getFullDepthZ(*t)/2.0 : +fcalMod->getFullDepthZ(*t)/2.0;
1186 
1187  double z=zf;
1188  //if (m_clockwork->pos==CENTER) z=zc;
1189  //if (m_clockwork->pos==BACK) z=zb;
1190 
1191  for (unsigned int p=0;p<(*t).getNumTubes();p++) {
1192  FCALTubeConstLink T = (*t).getTube(p);
1193  const FCALHVLine& Line = T->getHVLine();
1194  if (&Line==&fcalLine) {
1195  vtxProperty->vertex.set1Value(cc++, SbVec3f(T->getXLocal(),T->getYLocal(),z));
1196  }
1197  }
1198  }
1199  SoPointSet *ps = new SoPointSet();
1200  ps->numPoints=cc;
1201  ps->vertexProperty=vtxProperty;
1202  sep->addChild(ps);
1203  if (missing) {
1204  m_clockwork->fcalMissingSep[fcalMod->getModuleIndex()-1]->addChild(sep);
1205  }
1206  else if (outOfTolerance) {
1207  m_clockwork->fcalBadSep[fcalMod->getModuleIndex()-1]->addChild(sep);
1208  }
1209  else {
1210  m_clockwork->fcalNormalSep[fcalMod->getModuleIndex()-1]->addChild(sep);
1211  }
1212  m_clockwork->FCALHVMap[ps]=&fcalLine;
1213  }
1214  }
1215  }
1216  }
1217  }
1218  }
1219 }
1220 
1222  {
1223  VP1DetInfo::ensureInit(this);
1225  if (manager) {
1226 
1228  for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
1229  const EMBDetectorRegion *region = *e;
1231  SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
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()};
1236 
1237  for (int p=0;p<NPHISECTORS;p++) sep[p]->addChild(XF);
1238 
1239  for (unsigned int iPhi=region->beginPhiIndex();iPhi<region->endPhiIndex();iPhi++) {
1240  for (unsigned int iEta=region->beginEtaIndex();iEta<region->endEtaIndex();iEta++) {
1241 
1242 
1246 
1247 
1248  EMBCellConstLink cellPtr = region->getEMBCell(iEta,iPhi);
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();
1254 
1255  int cc=0;
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));
1262 
1263  SoLineSet *ls = new SoLineSet();
1264  ls->numVertices=5;
1265  ls->vertexProperty=vtxProperty;
1266  m_clockwork->EMBMap[ls]=cellPtr;
1267  int p = int ((cellPtr->getPhiMaxNominal() + cellPtr->getPhiMinNominal())/2.0 * NPHISECTORS/2.0/M_PI);
1268  if (p < 0) {
1269  messageDebug("P LT 0; repairing that..."+str(p));
1270  p=0;
1271  }
1272  if (p>15) {
1273  messageDebug("P GT 15; repairing that..."+str(p));
1274  p=15;
1275  }
1276  sep[p]->addChild(ls);
1277  }
1278  }
1279  for (int p=0;p<NPHISECTORS;p++) m_clockwork->embSubSep[region->getSamplingIndex()][p]->addChild(sep[p]);
1280  }
1281  }
1282  }
1283  {
1285  if (manager) {
1286 
1287  const EMBAccordionDetails *accordionDetails = manager->getAccordionDetails();
1288  const GeoStraightAccSection *absorberSection = accordionDetails->getAbsorberSections();
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()};
1293 
1294 
1295  for (int i=0;i<1024;i++) {
1296 
1297  int cc=0;
1298  SoVertexProperty *vtxProperty = new SoVertexProperty();
1299 
1300 
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);
1309  }
1310  SoLineSet *ls = new SoLineSet();
1311  ls->numVertices=cc;
1312  ls->vertexProperty=vtxProperty;
1313  int p = i/64;
1314  sep[p]->addChild(ls);
1315 
1316  }
1317  for (int p=0;p<NPHISECTORS;p++) m_clockwork->accordionSubSep[p]->addChild(sep[p]);
1318 
1319  }
1320  }
1321 
1322 
1323  {
1325  if (manager) {
1326 
1328  for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
1329  const EMECDetectorRegion *region = *e;
1331 
1332  // First Focal Points:
1333  try {
1334  if (region->getSamplingIndex()==1) {
1335  SoSeparator *fsep = new SoSeparator;
1336  HepGeom::Point3D<double> vFocal = region->getFocalPointPos();
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);
1343  m_clockwork->emecFocalSwitch->addChild(fsep);
1344  }
1345  }
1346  // This will be the case of the presampler.
1347  catch (const std::runtime_error & e) {
1348  }
1349 
1350  // Then grid:
1351 
1352 
1353  SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
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()};
1358 
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++) {
1362  EMECCellConstLink cellPtr = region->getEMECCell(iEta,iPhi);
1363 
1367 
1368 
1369 
1370 
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();
1376 
1377  int cc=0;
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));
1384 
1385  SoLineSet *ls = new SoLineSet();
1386  ls->numVertices=5;
1387  ls->vertexProperty=vtxProperty;
1388  m_clockwork->EMECMap[ls]=cellPtr;
1389  int p = int ((cellPtr->getPhiMaxNominal() + cellPtr->getPhiMinNominal())/2.0 * NPHISECTORS/2.0/M_PI);
1390  if (p < 0) {
1391  messageDebug("P LT 0; repairing that..."+str(p));
1392  p=0;
1393  }
1394  if (p>15) {
1395  messageDebug("P GT 15; repairing that..."+str(p));
1396  p=15;
1397  }
1398  sep[p]->addChild(ls);
1399  }
1400  }
1401  for (int p=0;p<NPHISECTORS;p++) m_clockwork->emecSubSep[region->getSamplingIndex()][p]->addChild(sep[p]);
1402  }
1403  }
1404  }
1405  {
1407  if (manager) {
1408 
1410  for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
1411 
1412 
1413  const HECDetectorRegion *region = *e;
1415 
1416  // First Focal Points:
1417  if (region->getSamplingIndex()==1) {
1418  SoSeparator *fsep = new SoSeparator;
1419  HepGeom::Point3D<double> vFocal = region->getFocalPointPos();
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);
1426  m_clockwork->hecFocalSwitch->addChild(fsep);
1427  }
1428 
1429  // Then grid:
1430 
1431 
1432  SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
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()};
1437 
1438  for (int p=0;p<NPHISECTORS;p++) sep[p]->addChild(XF);
1439 
1440  for (unsigned int iPhi=region->beginPhiIndex();iPhi<region->endPhiIndex();iPhi++) {
1441  for (unsigned int iEta=region->beginEtaIndex();iEta<region->endEtaIndex();iEta++) {
1442  HECCellConstLink cellPtr = region->getHECCell(iEta,iPhi);
1443  if (cellPtr) {
1444 
1445 
1446  // double rMin = cellPtr->getRMin(0);
1447  // double rMax = cellPtr->getRMax(0);
1448 
1452 
1453 
1454  double z = cellPtr->getZLocal(pos);
1455  double rMin = cellPtr->getRMinLocalNominal(pos);
1456  double rMax = cellPtr->getRMaxLocalNominal(pos);
1457 
1458 
1459  double phiMin = cellPtr->getPhiLocalUpper();
1460  double phiMax = cellPtr->getPhiLocalLower();
1461 
1462  int cc=0;
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));
1469 
1470  SoLineSet *ls = new SoLineSet();
1471  ls->numVertices=5;
1472  ls->vertexProperty=vtxProperty;
1473 
1474  m_clockwork->HECMap[ls]=cellPtr;
1475  int p = int ((cellPtr->getPhiMaxNominal() + cellPtr->getPhiMinNominal())/2.0 * NPHISECTORS/2.0/M_PI);
1476  if (p < 0) {
1477  messageDebug("P LT 0; repairing that..."+str(p));
1478  p=0;
1479  }
1480  if (p>15) {
1481  messageDebug("P GT 15; repairing that..."+str(p));
1482  p=15;
1483  }
1484  sep[p]->addChild(ls);
1485  }
1486  }
1487  }
1488  for (int p=0;p<NPHISECTORS;p++) m_clockwork->hecSubSep[region->getSamplingIndex()][p]->addChild(sep[p]);
1489  }
1490  }
1491  }
1492 
1493  {
1495  if (manager) {
1497  for (e=manager->beginFCAL();e!=manager->endFCAL(); ++e) {
1498 
1499  const FCALModule *fcalMod = *e;
1501 
1502  SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
1503 
1504 
1505 
1506  SoSeparator *sep = new SoSeparator();
1507  sep->addChild(XF);
1509  for (t=fcalMod->beginTiles();t!=fcalMod->endTiles();++t) {
1510  double x = t->getX();
1511  double y = t->getY();
1512  double dx = fcalMod->getFullWidthX(*t)/2.0;
1513  double dy = fcalMod->getFullWidthY(*t)/2.0;
1514  double zf = fcalMod->getEndcapIndex()== 0 ? +fcalMod->getFullDepthZ(*t)/2.0 : -fcalMod->getFullDepthZ(*t)/2.0;
1515  double zc = 0;
1516  double zb = fcalMod->getEndcapIndex()== 0 ? -fcalMod->getFullDepthZ(*t)/2.0 : +fcalMod->getFullDepthZ(*t)/2.0;
1517 
1518  double z=zf;
1519  if (m_clockwork->pos==CENTER) z=zc;
1520  if (m_clockwork->pos==BACK) z=zb;
1521 
1522  int cc=0;
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));
1529 
1530  SoLineSet *ls = new SoLineSet();
1531  ls->numVertices=5;
1532  ls->vertexProperty=vtxProperty;
1533  sep->addChild(ls);
1534 
1535  m_clockwork->TileMap[ls]=&(*t);
1536  }
1537  int sp = fcalMod->getModuleIndex()-1;
1538  m_clockwork->fcalSubSep[sp]->addChild(sep);
1539 
1540  }
1541  }
1542  }
1543 
1544 }
1545 
1547 {
1548 
1549 
1550 }
1551 
1553 
1554  if (!m_clockwork->permInit) return; // do not change switches
1555  // if the switches are not yet built!!
1556 
1557 
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);
1564 }
1565 
1567  if (!m_clockwork->permInit) return; // do not change switches
1568  // if the switches are not yet built!!
1569 
1570 
1572 
1573  if (m_clockwork->ui.frontRadioButton->isChecked()) pos=FRONT;
1574  if (m_clockwork->ui.backRadioButton->isChecked()) pos=BACK;
1575  if (m_clockwork->ui.centerRadioButton->isChecked()) pos=CENTER;
1576 
1577 
1578  if (pos!=m_clockwork->pos) {
1579 
1580 
1581  m_clockwork->pos=pos;
1582  for (int i=0;i<4;i++) {
1583  if (i<3) m_clockwork->fcalSubSep[i]->removeAllChildren();
1584  for (int p=0;p<NPHISECTORS;p++) {
1585  m_clockwork->embSubSep[i][p]->removeAllChildren();
1586  m_clockwork->emecSubSep[i][p]->removeAllChildren();
1587  m_clockwork->hecSubSep[i][p]->removeAllChildren();
1588  }
1589  }
1590  m_clockwork->emecFocalSwitch->removeAllChildren();
1591  m_clockwork->hecFocalSwitch->removeAllChildren();
1592 
1593  for (int p=0;p<NPHISECTORS;p++) m_clockwork->accordionSubSep[p]->removeAllChildren();
1594 
1595  m_clockwork->TileMap.erase(m_clockwork->TileMap.begin(),m_clockwork->TileMap.end());
1596  m_clockwork->HECMap.erase(m_clockwork->HECMap.begin(),m_clockwork->HECMap.end());
1597  m_clockwork->EMECMap.erase(m_clockwork->EMECMap.begin(),m_clockwork->EMECMap.end());
1598  m_clockwork->EMBMap.erase(m_clockwork->EMBMap.begin(),m_clockwork->EMBMap.end());
1599  m_clockwork->EMBHVMap.erase(m_clockwork->EMBHVMap.begin(),m_clockwork->EMBHVMap.end());
1601  m_clockwork->HECHVMap.erase(m_clockwork->HECHVMap.begin(),m_clockwork->HECHVMap.end());
1603 
1604  m_clockwork->volatileSeparator->removeAllChildren();
1605 
1606  createEtaPhi();
1607  }
1608 
1609 }
1610 
1612  if (m_clockwork->currentlyEnabledPhiSectors.isEmpty())
1613  return;
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;
1618 }
1619 
1621  if (m_clockwork->currentlyEnabledPhiSectors.isEmpty())
1622  return;
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;
1627 }
1628 
1630 {
1631  checkboxChanged(dynamic_cast<QCheckBox*>(sender()));
1632 }
1633 
1635 {
1636  if (!m_clockwork->permInit) return; // do not change switches
1637  // if the switches are not yet built!!
1638 
1639 
1640  if(cb && m_clockwork->checkBoxNamesMap.contains(cb))
1641  {
1642  // Get technology name
1643  QString swName = m_clockwork->checkBoxNamesMap[cb];
1644 
1645 
1646  // See if HV needs to be updated:
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" )
1662  {
1663  if (cb->isChecked()) createHV();
1664  }
1665 
1666 
1667 
1668 
1669  if(m_clockwork->switchMap.contains(swName))
1670  {
1671  // Get swtich
1672  SoSwitch* sw = m_clockwork->switchMap[swName];
1673  if(cb->isChecked())
1674  {
1675  sw->whichChild = SO_SWITCH_ALL;
1676  }
1677  else
1678  sw->whichChild = SO_SWITCH_NONE;
1679  }
1680  else if (swName=="badHVDisplayCheckBox")
1681  {
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;
1688  }
1689  else if (swName=="missingHVDisplayCheckBox")
1690  {
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;
1697  }
1698  else if (swName=="normalHVDisplayCheckBox")
1699  {
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;
1706  }
1707  else {
1708 
1709  }
1710 
1711  }
1712 }
1713 
1715  messageVerbose("VP1CaloReadoutSystem::userClickedOnBgd");
1716  m_clockwork->volatileSeparator->removeAllChildren();
1717  deselectAll();
1718 }
1719 
1720 void VP1CaloReadoutSystem::userPickedNode(SoNode* /*mySelectedNode*/, SoPath */*pickedPath*/)
1721 {
1722 
1723 #if 0
1724  m_clockwork->volatileSeparator->removeAllChildren();
1725  deselectAll();
1726  SoPickStyle *pickStyle = new SoPickStyle();
1727  pickStyle->style=SoPickStyleElement::UNPICKABLE;
1728  m_clockwork->volatileSeparator->addChild(pickStyle);
1729 
1730 
1731  std::ostringstream indexStream, etaBoundaryStream, phiBoundaryStream;
1732 
1733  // EMB HV
1734  {
1735  std::map < SoNode *, const EMBHVElectrode*>::const_iterator p = m_clockwork->EMBHVMap.find(mySelectedNode);
1736  if (p!=m_clockwork->EMBHVMap.end()) {
1737 
1738  const EMBHVElectrode& electrode = *p->second;
1739  const EMBHVModule& module = electrode.getModule();
1740  const EMBHVManager& manager = module.getManager();
1741  const EMBHVManager::EMBHVData hvdata = manager.getData(**hvCabling,
1742  attrLists);
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());
1754  }
1755  }
1756  // EMEC HV
1757  {
1758  std::map < SoNode *, const EMECHVElectrode*>::const_iterator p = m_clockwork->EMECHVMap.find(mySelectedNode);
1759  if (p!=m_clockwork->EMECHVMap.end()) {
1760 
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,
1765  attrLists);
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());
1778  }
1779  }
1780 
1781  // HEC HV
1782  {
1783  std::map < SoNode *, const HECHVSubgap*>::const_iterator p = m_clockwork->HECHVMap.find(mySelectedNode);
1784  if (p!=m_clockwork->HECHVMap.end()) {
1785 
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,
1790  attrLists);
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());
1799  }
1800  }
1801  // FCAL HV
1802  {
1803  std::map < SoNode *, const FCALHVLine*>::const_iterator p = m_clockwork->FCALHVMap.find(mySelectedNode);
1804  if (p!=m_clockwork->FCALHVMap.end()) {
1805 
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,
1810  attrLists);
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());
1819  }
1820  }
1821 
1822  // See if it is in the FCAL
1823  {
1824  std::map < SoNode *, const FCALTile *>::const_iterator p = m_clockwork->TileMap.find(mySelectedNode);
1825  if (p!=m_clockwork->TileMap.end()) {
1826 
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());
1835 
1836  const FCALHVLine* line = nullptr;
1837  for (unsigned int i=0;i<element->getNumHVLines();i++) {
1838  line = element->getHVLine(i);
1839  if (line) break;
1840  }
1841 
1842  if (line) {
1843  const FCALHVModule& module = line->getModule();
1844  const FCALHVManager& manager = module.getManager();
1845  const FCALHVManager::FCALHVData hvdata = manager.getData(**hvCabling,
1846  attrLists);
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;
1851  }
1852  message(highVoltageStream.str().c_str());
1853  }
1854  }
1855  }
1856 
1857 
1858 
1859 
1860  if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
1861 
1862  const FCALModule *fcalMod=element->getModule();
1863 
1864 
1866  SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
1867 
1868  SoSeparator * sep = new SoSeparator();
1869  sep->addChild(XF);
1870 
1871  double zf = fcalMod->getEndcapIndex()== 0 ? +fcalMod->getFullDepthZ(*element)/2.0 : -fcalMod->getFullDepthZ(*element)/2.0;
1872  double zc = 0;
1873  double zb = fcalMod->getEndcapIndex()== 0 ? -fcalMod->getFullDepthZ(*element)/2.0 : +fcalMod->getFullDepthZ(*element)/2.0;
1874 
1875  double z=zf;
1876  if (m_clockwork->pos==CENTER) z=zc;
1877  if (m_clockwork->pos==BACK) z=zb;
1878 
1879  SoMaterial *white = new SoMaterial();
1880  white->diffuseColor.setValue(1.00,1.00, 1.00);
1881 
1882  SoDrawStyle *drawStyle = new SoDrawStyle();
1883  drawStyle->lineWidth=3;
1884  drawStyle->pointSize=3;
1885 
1886  SoLightModel *lm = new SoLightModel();
1887  lm->model=SoLightModel::BASE_COLOR;
1888  sep->addChild(white);
1889  sep->addChild(drawStyle);
1890  sep->addChild(lm);
1891 
1892 
1893  int cc=0;
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));
1903  }
1904  }
1905  }
1906  SoPointSet *ps = new SoPointSet();
1907  ps->numPoints=cc;
1908  ps->vertexProperty=vtxProperty;
1909  sep->addChild(ps);
1910  m_clockwork->volatileSeparator->addChild(sep);
1911  }
1912  if (m_clockwork->ui.fcalTubesCheckBox->isChecked()) {
1913  const FCALModule *fcalMod=element->getModule();
1915  SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf);
1916 
1917  SoSeparator * sep = new SoSeparator();
1918  sep->addChild(XF);
1919 
1920  double zf = fcalMod->getEndcapIndex()== 0 ? +fcalMod->getFullDepthZ(*element)/2.0 : -fcalMod->getFullDepthZ(*element)/2.0;
1921  double zc = 0;
1922  double zb = fcalMod->getEndcapIndex()== 0 ? -fcalMod->getFullDepthZ(*element)/2.0 : +fcalMod->getFullDepthZ(*element)/2.0;
1923 
1924  double z=zf;
1925  if (m_clockwork->pos==CENTER) z=zc;
1926  if (m_clockwork->pos==BACK) z=zb;
1927 
1928  SoMaterial *white = new SoMaterial();
1929  white->diffuseColor.setValue(1.00,1.00, 1.00);
1930 
1931  SoDrawStyle *drawStyle = new SoDrawStyle();
1932  drawStyle->lineWidth=3;
1933  drawStyle->pointSize=3;
1934 
1935  SoLightModel *lm = new SoLightModel();
1936  lm->model=SoLightModel::BASE_COLOR;
1937  sep->addChild(white);
1938  sep->addChild(drawStyle);
1939  sep->addChild(lm);
1940 
1941 
1942  int cc=0;
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));
1947  }
1948  SoPointSet *ps = new SoPointSet();
1949  ps->numPoints=cc;
1950  ps->vertexProperty=vtxProperty;
1951  sep->addChild(ps);
1952  m_clockwork->volatileSeparator->addChild(sep);
1953  }
1954  }
1955  }
1956 
1957 
1958  // See if it is in the HEC:
1959  {
1960  std::map < SoNode *, HECCellConstLink>::const_iterator p = m_clockwork->HECMap.find(mySelectedNode);
1961  if (p!=m_clockwork->HECMap.end()) {
1962 
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());
1971  }
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,
1977  attrLists);
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))
1984  << std::endl;
1985  message(highVoltageStream.str().c_str());
1986  }
1987  //
1988  // Now let's show the module, and where she is:
1989  //
1990  const HECHVModule& module = element->getSubgap(i).getModule();
1991 
1992  if (!m_clockwork->ui.highVoltageCheckBox->isChecked()) continue;
1993 
1994  SoSeparator * sep = new SoSeparator();
1995 
1996  SoMaterial *white = new SoMaterial();
1997  white->diffuseColor.setValue(1.00,1.00, 1.00);
1998 
1999  SoDrawStyle *drawStyle = new SoDrawStyle();
2000  drawStyle->lineWidth=3;
2001  drawStyle->pointSize=3;
2002 
2003  SoLightModel *lm = new SoLightModel();
2004  lm->model=SoLightModel::BASE_COLOR;
2005 
2006 
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;
2011 
2012 
2013  const HECDetectorManager *hecManager = VP1DetInfo::hecDetMgr();
2014  const HECDetectorRegion *region = hecManager->getDetectorRegion(element->getEndcapIndex(),element->getSamplingIndex(),element->getRegionIndex());
2016  double z = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(HECCell::FRONT))).z();
2017 
2018  double phiMin = module.getPhiMin();
2019  double phiMax = module.getPhiMax();
2020 
2021 
2022  double rMax=2130;
2023  double rMin=element->getSamplingIndex()==0 ? 371 : 474;
2024 
2025  sep->addChild(white);
2026  sep->addChild(drawStyle);
2027  sep->addChild(lm);
2028  if (modSet.find(&module)==modSet.end()) {
2029  modSet.insert(&module);
2030  int cc=0;
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));
2037 
2038 
2039  SoLineSet *ls = new SoLineSet();
2040  ls->numVertices=5;
2041  ls->vertexProperty=vtxProperty;
2042  sep->addChild(ls);
2043  }
2044  m_clockwork->volatileSeparator->addChild(sep);
2045  }
2046  }
2047  }
2048  }
2049  // See if it is in the EMEC:
2050  {
2051  std::map < SoNode *, EMECCellConstLink>::const_iterator p = m_clockwork->EMECMap.find(mySelectedNode);
2052  if (p!=m_clockwork->EMECMap.end()) {
2053 
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;
2058  //
2059 
2060  if (element->getSamplingIndex()==0) {
2061 
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,
2066  attrLists);
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';
2075 
2076  message(highVoltageStream.str().c_str());
2077 
2078 
2079  SoSeparator * sep = new SoSeparator();
2080 
2081  SoMaterial *white = new SoMaterial();
2082  white->diffuseColor.setValue(1.00,1.00, 1.00);
2083 
2084  SoDrawStyle *drawStyle = new SoDrawStyle();
2085  drawStyle->lineWidth=3;
2086  drawStyle->pointSize=3;
2087 
2088  SoLightModel *lm = new SoLightModel();
2089  lm->model=SoLightModel::BASE_COLOR;
2090 
2091 
2095 
2096 
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();
2104 
2105 
2106  double rMax=fabs(z/sinh(etaMin));
2107  double rMin=fabs(z/sinh(etaMax));
2108 
2109  sep->addChild(white);
2110  sep->addChild(drawStyle);
2111  sep->addChild(lm);
2112  int cc=0;
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));
2119 
2120 
2121  SoLineSet *ls = new SoLineSet();
2122  ls->numVertices=5;
2123  ls->vertexProperty=vtxProperty;
2124  sep->addChild(ls);
2125  m_clockwork->volatileSeparator->addChild(sep);
2126  }
2127  }
2128  else {
2129 
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());
2134  }
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,
2142  attrLists);
2143  if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
2144  {
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());
2151  }
2152  {
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());
2159  }
2160  {
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());
2166  }
2167  }
2168  //
2169  // Now let's show the module, and where she is:
2170  //
2171  const EMECHVModule& module = element->getElectrode(i).getModule();
2172 
2173  if (!m_clockwork->ui.highVoltageCheckBox->isChecked()) continue;
2174 
2175  SoSeparator * sep = new SoSeparator();
2176 
2177  SoMaterial *white = new SoMaterial();
2178  white->diffuseColor.setValue(1.00,1.00, 1.00);
2179 
2180  SoDrawStyle *drawStyle = new SoDrawStyle();
2181  drawStyle->lineWidth=3;
2182  drawStyle->pointSize=3;
2183 
2184  SoLightModel *lm = new SoLightModel();
2185  lm->model=SoLightModel::BASE_COLOR;
2186 
2187 
2191 
2192 
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();
2200 
2201 
2202  double rMax=fabs(z/sinh(etaMin));
2203  double rMin=fabs(z/sinh(etaMax));
2204 
2205  sep->addChild(white);
2206  sep->addChild(drawStyle);
2207  sep->addChild(lm);
2208  if (modSet.find(&module)==modSet.end()) {
2209  modSet.insert(&module);
2210  int cc=0;
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));
2217 
2218 
2219  SoLineSet *ls = new SoLineSet();
2220  ls->numVertices=5;
2221  ls->vertexProperty=vtxProperty;
2222  sep->addChild(ls);
2223  }
2224  {
2225 
2226  int cc=0;
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();
2231  ls->numVertices=2;
2232  ls->vertexProperty=vtxProperty;
2233  sep->addChild(ls);
2234  }
2235 
2236  m_clockwork->volatileSeparator->addChild(sep);
2237  }
2238  }
2239  }
2240  }
2241  }
2242 
2243 
2244  // See if it is in the EMB:
2245  {
2246  std::map < SoNode *, EMBCellConstLink>::const_iterator p = m_clockwork->EMBMap.find(mySelectedNode);
2247  if (p!=m_clockwork->EMBMap.end()) {
2248 
2249  EMBCellConstLink element = (*p).second;
2250  //element->print();
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';
2254  //
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,
2260  attrLists);
2261 
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';
2274 
2275  message(highVoltageStream.str().c_str());
2276 
2277  SoSeparator * sep = new SoSeparator();
2278 
2279  SoMaterial *white = new SoMaterial();
2280  white->diffuseColor.setValue(1.00,1.00, 1.00);
2281 
2282  SoDrawStyle *drawStyle = new SoDrawStyle();
2283  drawStyle->lineWidth=3;
2284  drawStyle->pointSize=3;
2285 
2286  SoLightModel *lm = new SoLightModel();
2287  lm->model=SoLightModel::BASE_COLOR;
2288 
2289 
2293 
2294 
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);
2302  sep->addChild(lm);
2303 
2304 
2305 
2306  int cc=0;
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)));
2313 
2314  SoLineSet *ls = new SoLineSet();
2315  ls->numVertices=5;
2316  ls->vertexProperty=vtxProperty;
2317  sep->addChild(ls);
2318 
2319  m_clockwork->volatileSeparator->addChild(sep);
2320  }
2321  else {
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,
2330  attrLists);
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());
2343  //
2344  // Now let's show the module, and where she is:
2345  //
2346  const EMBHVModule& module = element->getElectrode(i).getModule();
2347 
2348  if (!m_clockwork->ui.highVoltageCheckBox->isChecked()) continue;
2349 
2350  SoSeparator * sep = new SoSeparator();
2351 
2352  SoMaterial *white = new SoMaterial();
2353  white->diffuseColor.setValue(1.00,1.00, 1.00);
2354 
2355  SoDrawStyle *drawStyle = new SoDrawStyle();
2356  drawStyle->lineWidth=3;
2357  drawStyle->pointSize=3;
2358 
2359  SoLightModel *lm = new SoLightModel();
2360  lm->model=SoLightModel::BASE_COLOR;
2361 
2362 
2366 
2367 
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);
2375  sep->addChild(lm);
2376 
2377  if (modSet.find(&module)==modSet.end()) {
2378  modSet.insert(&module);
2379 
2380 
2381 
2382  int cc=0;
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)));
2389 
2390  SoLineSet *ls = new SoLineSet();
2391  ls->numVertices=5;
2392  ls->vertexProperty=vtxProperty;
2393  sep->addChild(ls);
2394 
2395  }
2396  {
2397  int cc=0;
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)));
2401 
2402  SoLineSet *ls = new SoLineSet();
2403  ls->numVertices=2;
2404  ls->vertexProperty=vtxProperty;
2405 
2406  sep->addChild(ls);
2407  }
2408 
2409  m_clockwork->volatileSeparator->addChild(sep);
2410  }
2411  }
2412  }
2413  }
2414  }
2415  }
2416 
2417  if (m_clockwork->ui.etaBoundariesCheckBox->isChecked()) {
2418  message(etaBoundaryStream.str().c_str());
2419  }
2420  if (m_clockwork->ui.phiBoundariesCheckBox->isChecked()) {
2421  message(phiBoundaryStream.str().c_str());
2422  }
2423  if (m_clockwork->ui.indicesCheckBox->isChecked()) {
2424  message(indexStream.str().c_str());
2425  }
2426 #endif
2427 }
2428 
2430 {
2431 
2433 
2434  VP1Serialise serialise(3/*version*/,this);
2436 
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()) {
2441  it.next();
2442  checkboxstate.insert(it.key(),it.value()->isChecked());
2443  serialise.widgetHandled(it.value());
2444  }
2445  serialise.save(checkboxstate);
2446 
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);
2472 
2473  serialise.save(m_clockwork->ui.caloReadoutToolBox); //Version 2+
2474  serialise.warnUnsaved(controllerWidget());
2475  return serialise.result();
2476 
2477 }
2478 
2480 {
2481  VP1Deserialise state(ba,this);
2482  if (state.version()==0) {
2483  message("Warning: State data in .vp1 file has obsolete format - ignoring!");
2484  return;
2485  }
2486  if (state.version()<1||state.version()>3) {
2487  message("Warning: State data in .vp1 file is in wrong format - ignoring!");
2488  return;
2489  }
2491  IVP13DSystemSimple::restoreFromState(state.restoreByteArray());
2492 
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()) {
2497  it.next();
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);
2503  }
2504  }
2505 
2506  if (state.version()<=2) {
2507  state.ignoreObsoletePhiSectionWidgetState();
2508  state.ignoreWidget(m_clockwork->ui.phiSectionWidget);
2509  } else {
2510  state.restore(m_clockwork->ui.phiSectionWidget);
2511  }
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);
2536 
2537  if (state.version()>=2)
2538  state.restore(m_clockwork->ui.caloReadoutToolBox);
2539 
2540  state.warnUnrestored(controllerWidget());
2541 }
2542 
2544  if (!m_clockwork->permInit) return; // do not change switches
2545  // if the switches are not yet built!!
2546 
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();
2558  }
2559  m_clockwork->hvInit=false;
2560  createHV();
2561 }
FCALHVManager::getData
FCALHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Definition: FCALHVManager.cxx:276
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
EMBHVManager::EMBHVData::hvOn
bool hvOn(const EMBHVElectrode &electrode, const int &iGap) const
Definition: EMBHVManager.cxx:124
VP1Serialise.h
VP1CaloReadoutSystem::Clockwork::EMBMap
std::map< SoNode *, EMBCellConstLink > EMBMap
Definition: VP1CaloReadoutSystem.cxx:192
VP1CaloReadoutSystem::Clockwork::fcalNormalSwitch
SoSwitch * fcalNormalSwitch[3]
Definition: VP1CaloReadoutSystem.cxx:87
EMECPresamplerHVManager
This class provides direct access to information on the HV electrodes within the EMEC....
Definition: EMECPresamplerHVManager.h:36
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
FCALTile::getNumTubes
unsigned int getNumTubes() const
Gets the number of tubes in the tile.
Definition: FCALTile.cxx:56
VP1CaloReadoutSystem::Clockwork::embSubSwitch
SoSwitch * embSubSwitch[4][NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:141
beamspotman.r
def r
Definition: beamspotman.py:676
EMBHVManager::beginEtaIndex
unsigned int beginEtaIndex() const
Definition: EMBHVManager.cxx:184
VP1CaloReadoutSystem::Clockwork::checkBoxNamesMap
QMap< QCheckBox *, QString > checkBoxNamesMap
Definition: VP1CaloReadoutSystem.cxx:81
EMBDetectorRegion::beginEtaIndex
unsigned int beginEtaIndex() const
Returns the first eta index in the region.
Definition: EMBDetectorRegion.h:147
EMECHVManager::EMECHVData::hvOn
bool hvOn(const EMECHVElectrode &electrode, const int &iGap) const
Definition: EMECHVManager.cxx:131
EMBHVElectrode
Definition: EMBHVElectrode.h:15
LArHVManager.h
VP1CaloReadoutSystem::Clockwork::embPreBadSep
SoSeparator * embPreBadSep
Definition: VP1CaloReadoutSystem.cxx:164
EMBPresamplerHVManager::endSideIndex
static unsigned int endSideIndex()
Definition: EMBPresamplerHVManager.cxx:182
VP1CaloReadoutSystem::Clockwork::permInit
bool permInit
Definition: VP1CaloReadoutSystem.cxx:203
HECHVModule
Describes one HV Module within the HEC.
Definition: HECHVModule.h:21
LArHVManager::getEMECPresamplerHVManager
const EMECPresamplerHVManager & getEMECPresamplerHVManager() const
Definition: LArHVManager.cxx:51
EMECPresamplerHVModule::getEtaMin
double getEtaMin() const
Definition: EMECPresamplerHVModule.cxx:46
EMECHVManager::beginSideIndex
static unsigned int beginSideIndex()
Definition: EMECHVManager.cxx:230
VP1CaloReadoutSystem::Clockwork::emecSwitch
SoSwitch * emecSwitch[4]
Definition: VP1CaloReadoutSystem.cxx:116
VP1CaloReadoutSystem::Clockwork::embBadSep
SoSeparator * embBadSep
Definition: VP1CaloReadoutSystem.cxx:160
VP1CaloReadoutSystem::Clockwork::emecPreNormalSwitch
SoSwitch * emecPreNormalSwitch
Definition: VP1CaloReadoutSystem.cxx:111
checkFileSG.line
line
Definition: checkFileSG.py:75
FCALDetectorManager
A manager class providing access to readout geometry information for the forward calorimeter.
Definition: FCALDetectorManager.h:29
VP1CaloReadoutSystem::Clockwork::fcalSwitch
SoSwitch * fcalSwitch[3]
Definition: VP1CaloReadoutSystem.cxx:85
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1CaloReadoutSystem::Clockwork::emecPreModsSeparator
SoSeparator * emecPreModsSeparator
Definition: VP1CaloReadoutSystem.cxx:138
VP1Deserialise.h
EMECHVModule::getEtaMin
double getEtaMin() const
Definition: EMECHVModule.cxx:106
VP1CaloReadoutSystem::Clockwork::emecPreMissingSep
SoSeparator * emecPreMissingSep
Definition: VP1CaloReadoutSystem.cxx:167
VP1Serialise
Definition: VP1Serialise.h:45
EMECHVManager::getHVModule
const EMECHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
Definition: EMECHVManager.cxx:222
IVP13DSystemSimple
Definition: IVP13DSystemSimple.h:24
VP1CaloReadoutSystem::Clockwork::hvInit
bool hvInit
Definition: VP1CaloReadoutSystem.cxx:202
EMECHVModule::getManager
const EMECHVManager & getManager() const
Definition: EMECHVModule.cxx:140
VP1CaloReadoutSystem::Clockwork::switchMap
QMap< QString, SoSwitch * > switchMap
Definition: VP1CaloReadoutSystem.cxx:78
GeoStraightAccSection
Record of All Electrode Straight Pieces.
Definition: GeoStraightAccSection.h:24
VP1CaloReadoutSystem::Clockwork
Definition: VP1CaloReadoutSystem.cxx:73
HECHVManager::beginSideIndex
static unsigned int beginSideIndex()
Definition: HECHVManager.cxx:164
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
EMECPresamplerHVManager::EMECPresamplerHVData::current
double current(const EMECPresamplerHVModule &module, const int &iGap) const
Definition: EMECPresamplerHVManager.cxx:106
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
EMECPresamplerHVManager::EMECPresamplerHVData::voltage
double voltage(const EMECPresamplerHVModule &module, const int &iGap) const
Definition: EMECPresamplerHVManager.cxx:99
FCALDetectorManager::ConstIterator
std::vector< const FCALModule * >::const_iterator ConstIterator
Definition: FCALDetectorManager.h:34
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
EMBDetectorRegion.h
EMECPresamplerHVManager::endSideIndex
static unsigned int endSideIndex()
Definition: EMECPresamplerHVManager.cxx:162
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
VP1CaloReadoutSystem::BACK
@ BACK
Definition: VP1CaloReadoutSystem.h:20
EMECDetectorManager
A manager class providing access to readout geometry information for the electromagnetic endcap calor...
Definition: EMECDetectorManager.h:31
VP1CaloReadoutSystem.h
VP1CaloReadoutSystem::Clockwork::hecBadSwitch
SoSwitch * hecBadSwitch[4]
Definition: VP1CaloReadoutSystem.cxx:94
EMBHVManager::endPhiIndex
unsigned int endPhiIndex() const
Definition: EMBHVManager.cxx:179
HECHVManager::beginPhiIndex
static unsigned int beginPhiIndex()
Definition: HECHVManager.cxx:174
HECDetectorRegion::beginPhiIndex
unsigned int beginPhiIndex() const
returns the first phi index in the region.
Definition: HECDetectorRegion.h:179
EMBHVModule::getEtaMax
double getEtaMax() const
Definition: EMBHVModule.cxx:89
VP1CaloReadoutSystem::Clockwork::embPreBadSwitch
SoSwitch * embPreBadSwitch
Definition: VP1CaloReadoutSystem.cxx:106
EMECPresamplerHVManager::beginSideIndex
static unsigned int beginSideIndex()
Definition: EMECPresamplerHVManager.cxx:157
VP1CaloReadoutSystem::Clockwork::emecSeparator
SoSeparator * emecSeparator[4]
Definition: VP1CaloReadoutSystem.cxx:125
EMBAccordionDetails
Definition: EMBAccordionDetails.h:9
VP1CaloReadoutSystem::Clockwork::embMissingSwitch
SoSwitch * embMissingSwitch
Definition: VP1CaloReadoutSystem.cxx:102
SG::VarHandleKey::storeHandle
const ServiceHandle< IProxyDict > & storeHandle() const
Return handle to the referenced store.
VP1CaloReadoutSystem::Clockwork::embPreHVSwitch
SoSwitch * embPreHVSwitch
Definition: VP1CaloReadoutSystem.cxx:103
EMBPresamplerHVModule::getEtaMin
double getEtaMin() const
Definition: EMBPresamplerHVModule.cxx:55
VP1CaloReadoutSystem::Clockwork::HECMap
std::map< SoNode *, HECCellConstLink > HECMap
Definition: VP1CaloReadoutSystem.cxx:190
EMBPresamplerHVManager.h
EMECDetectorManager.h
FCALDetectorManager.h
VP1CaloReadoutSystem::Clockwork::emecSubSep
SoSeparator * emecSubSep[4][NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:146
EMBHVModule::getPhiMax
double getPhiMax() const
Definition: EMBHVModule.cxx:106
EMECHVModule::getElectrode
const EMECHVElectrode & getElectrode(unsigned int iElectrode) const
Definition: EMECHVModule.cxx:81
FCALModule::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: FCALModule.cxx:94
VP1CaloReadoutSystem::Clockwork::hecMissingSep
SoSeparator * hecMissingSep[4]
Definition: VP1CaloReadoutSystem.cxx:155
FCALModule::endTiles
FCALModule::ConstIterator endTiles() const
Iteration over FCAL Tiles.
Definition: FCALModule.cxx:51
VP1CaloReadoutSystem::m_clockwork
Clockwork * m_clockwork
Definition: VP1CaloReadoutSystem.h:53
VP1CaloReadoutSystem::Clockwork::emecNormalSwitch
SoSwitch * emecNormalSwitch
Definition: VP1CaloReadoutSystem.cxx:119
EMECPresamplerHVManager::getData
EMECPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Definition: EMECPresamplerHVManager.cxx:241
GeoStraightAccSection::Sinu
const double & Sinu(int stackid, int cellid) const
python.HLT.MinBias.MinBiasMenuSequences.zf
zf
Definition: MinBiasMenuSequences.py:220
HECHVManager::getData
HECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Definition: HECHVManager.cxx:290
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
FCALTile::getIndexI
int getIndexI() const
Returns the index "i" of the tile.
Definition: FCALTile.cxx:61
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
EMECHVManager::getData
EMECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Definition: EMECHVManager.cxx:388
FCALHVManager::FCALHVData::voltage
double voltage(const FCALHVLine &line) const
Definition: FCALHVManager.cxx:119
EMECHVManager::EMECHVData::voltage
double voltage(const EMECHVElectrode &electrode, const int &iGap) const
Definition: EMECHVManager.cxx:137
EMECHVManager::endSectorIndex
unsigned int endSectorIndex() const
Definition: EMECHVManager.cxx:245
VP1CaloReadoutSystem::userClickedOnBgd
void userClickedOnBgd()
Definition: VP1CaloReadoutSystem.cxx:1714
EMECHVElectrode::getPhi
double getPhi() const
Definition: EMECHVElectrode.cxx:42
skel.it
it
Definition: skel.GENtoEVGEN.py:396
NPHISECTORS
#define NPHISECTORS
Definition: VP1CaloReadoutSystem.cxx:70
VP1CaloReadoutSystem::Clockwork::hecSubSep
SoSeparator * hecSubSep[4][NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:147
EMECHVManager::endEtaIndex
unsigned int endEtaIndex() const
Definition: EMECHVManager.cxx:217
VP1CaloReadoutSystem::Clockwork::emecHVSeparator
SoSeparator * emecHVSeparator
Definition: VP1CaloReadoutSystem.cxx:135
EMBDetectorRegion::getSamplingIndex
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
Definition: EMBDetectorRegion.h:119
EMECDetectorRegion::beginPhiIndex
unsigned int beginPhiIndex() const
returns the first phi index in the region.
Definition: EMECDetectorRegion.h:185
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
EMECDetectorRegion::beginEtaIndex
unsigned int beginEtaIndex() const
returns the first eta index in the region.
Definition: EMECDetectorRegion.h:199
VP1DetInfo::embDetMgr
static const EMBDetectorManager * embDetMgr()
Definition: VP1DetInfo.cxx:150
VP1CaloReadoutSystem::Clockwork::emecBadSwitch
SoSwitch * emecBadSwitch
Definition: VP1CaloReadoutSystem.cxx:120
VP1CaloReadoutSystem::createEtaPhi
void createEtaPhi()
Definition: VP1CaloReadoutSystem.cxx:1221
VP1CaloReadoutSystem::Clockwork::EMECMap
std::map< SoNode *, EMECCellConstLink > EMECMap
Definition: VP1CaloReadoutSystem.cxx:191
VP1CaloReadoutSystem::Clockwork::embPreMissingSwitch
SoSwitch * embPreMissingSwitch
Definition: VP1CaloReadoutSystem.cxx:107
EMECHVManager::endPhiIndex
unsigned int endPhiIndex() const
Definition: EMECHVManager.cxx:207
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1CaloReadoutSystem::restoreFromState
void restoreFromState(QByteArray ba)
Definition: VP1CaloReadoutSystem.cxx:2479
EMBPresamplerHVManager::endPhiIndex
unsigned int endPhiIndex() const
Definition: EMBPresamplerHVManager.cxx:157
VP1CaloReadoutSystem::Clockwork::embSeparator
SoSeparator * embSeparator[4]
Definition: VP1CaloReadoutSystem.cxx:126
HECDetectorRegion::beginEtaIndex
unsigned int beginEtaIndex() const
returns the first eta index in the region.
Definition: HECDetectorRegion.h:193
EMECDetectorRegion
Definition: EMECDetectorRegion.h:30
HECHVModule::getManager
const HECHVManager & getManager() const
Definition: HECHVModule.cxx:89
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
EMECPresamplerHVManager.h
VP1CaloReadoutSystem::buildPermanentSceneGraph
void buildPermanentSceneGraph(StoreGateSvc *detstore, SoSeparator *root)
Definition: VP1CaloReadoutSystem.cxx:343
EMBHVManager::beginSectorIndex
static unsigned int beginSectorIndex()
Definition: EMBHVManager.cxx:199
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
EMBHVManager::EMBHVData::current
double current(const EMBHVElectrode &electrode, const int &iGap) const
Definition: EMBHVManager.cxx:136
FCALHVManager::getHVModule
const FCALHVModule & getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
Definition: FCALHVManager.cxx:190
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
VP1CaloReadoutSystem::Clockwork::emecModsSeparator
SoSeparator * emecModsSeparator
Definition: VP1CaloReadoutSystem.cxx:139
HECDetectorRegion.h
EMECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMECDetectorRegion.cxx:52
VP1CaloReadoutSystem::systemcreate
void systemcreate(StoreGateSvc *detstore)
Definition: VP1CaloReadoutSystem.cxx:339
VP1CaloReadoutSystem::VP1CaloReadoutSystem
VP1CaloReadoutSystem()
Definition: VP1CaloReadoutSystem.cxx:207
x
#define x
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
EMECPresamplerHVManager::beginPhiIndex
unsigned int beginPhiIndex() const
Definition: EMECPresamplerHVManager.cxx:142
EMECCell::FRONT
@ FRONT
Definition: EMECCell.h:36
VP1CaloReadoutSystem::Clockwork::emecPreBadSwitch
SoSwitch * emecPreBadSwitch
Definition: VP1CaloReadoutSystem.cxx:112
VP1CaloReadoutSystem::Clockwork::embPreModsSeparator
SoSeparator * embPreModsSeparator
Definition: VP1CaloReadoutSystem.cxx:137
VP1CaloReadoutSystem::CENTER
@ CENTER
Definition: VP1CaloReadoutSystem.h:20
EMECHVModule::getPhiMin
double getPhiMin() const
Definition: EMECHVModule.cxx:126
EMECPresamplerHVManager::getHVModule
const EMECPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iPhi) const
Definition: EMECPresamplerHVManager.cxx:152
EMBHVManager::beginSideIndex
static unsigned int beginSideIndex()
Definition: EMBHVManager.cxx:209
EMBHVManager::endEtaIndex
unsigned int endEtaIndex() const
Definition: EMBHVManager.cxx:189
EMECHVModule
Definition: EMECHVModule.h:20
EMECPresamplerHVModule.h
VP1DetInfo::hecDetMgr
static const HECDetectorManager * hecDetMgr()
Definition: VP1DetInfo.cxx:151
VP1CaloReadoutSystem::Clockwork::fcalSeparator
SoSeparator * fcalSeparator[3]
Definition: VP1CaloReadoutSystem.cxx:123
EMBHVElectrode.h
GeoStraightAccSection.h
ReadCondHandle.h
VP1CaloReadoutSystem::Clockwork::embNormalSwitch
SoSwitch * embNormalSwitch
Definition: VP1CaloReadoutSystem.cxx:100
EMECDetectorRegion::getFocalPointPos
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the EMEC.
Definition: EMECDetectorRegion.cxx:44
GeoStraightAccSection::YCent
const double & YCent(int stackid, int cellid) const
EMBPresamplerHVModule::getPhiMin
double getPhiMin() const
Definition: EMBPresamplerHVModule.cxx:75
LArHVManager::getEMBHVManager
const EMBHVManager & getEMBHVManager() const
Definition: LArHVManager.cxx:26
HECHVManager.h
IVP1System::state
State state() const
Definition: IVP1System.cxx:129
EMBDetectorRegion::beginPhiIndex
unsigned int beginPhiIndex() const
Returns the first phi index in the region.
Definition: EMBDetectorRegion.h:133
IVP1System::saveState
virtual QByteArray saveState()
Definition: IVP1System.cxx:294
EMBHVManager::getHVModule
const EMBHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
Definition: EMBHVManager.cxx:194
FCALHVLine.h
VP1CaloReadoutSystem::createHV
void createHV()
Definition: VP1CaloReadoutSystem.cxx:716
EMECHVManager::beginEtaIndex
unsigned int beginEtaIndex() const
Definition: EMECHVManager.cxx:212
VP1DetInfo::fcalDetMgr
static const FCALDetectorManager * fcalDetMgr()
Definition: VP1DetInfo.cxx:154
VP1CaloReadoutSystem::Clockwork::embPreHVSeparator
SoSeparator * embPreHVSeparator
Definition: VP1CaloReadoutSystem.cxx:131
VP1CaloReadoutSystem::Clockwork::emecMaterial
SoMaterial * emecMaterial
Definition: VP1CaloReadoutSystem.cxx:184
EMBCell::CELLPOS
CELLPOS
Definition: EMBCell.h:33
VP1CaloReadoutSystem::Clockwork::embPreModsSwitch
SoSwitch * embPreModsSwitch
Definition: VP1CaloReadoutSystem.cxx:104
VP1LinAlgUtils.h
VP1DetInfo.h
EMBPresamplerHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: EMBPresamplerHVManager.h:37
HECCell::BACK
@ BACK
Definition: HECCell.h:34
EMBPresamplerHVManager::beginPhiIndex
unsigned int beginPhiIndex() const
Definition: EMBPresamplerHVManager.cxx:152
VP1CaloReadoutSystem::Clockwork::embSwitch
SoSwitch * embSwitch[4]
Definition: VP1CaloReadoutSystem.cxx:97
FCALTile
A tile of the forward calorimeter readout geometry.
Definition: FCALTile.h:27
EMBHVModule::getNumElectrodes
unsigned int getNumElectrodes() const
Definition: EMBHVModule.h:34
python.PyAthena.module
module
Definition: PyAthena.py:131
EMECPresamplerHVManager::EMECPresamplerHVData::hvOn
bool hvOn(const EMECPresamplerHVModule &module, const int &iGap) const
Definition: EMECPresamplerHVManager.cxx:92
EMBDetectorManager
A manager class providing access to readout geometry information for the electromagnetic barrel calor...
Definition: EMBDetectorManager.h:32
FCALHVLine
Definition: FCALHVLine.h:15
EMBHVModule::getManager
const EMBHVManager & getManager() const
Definition: EMBHVModule.cxx:114
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
HECHVManager::HECHVData
Definition: HECHVManager.h:39
VP1CaloReadoutSystem::Clockwork::hecNormalSwitch
SoSwitch * hecNormalSwitch[4]
Definition: VP1CaloReadoutSystem.cxx:93
VP1DetInfo::emecDetMgr
static const EMECDetectorManager * emecDetMgr()
Definition: VP1DetInfo.cxx:152
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
EMECCell::CENTER
@ CENTER
Definition: EMECCell.h:36
VP1CaloReadoutSystem::setGeomSelectable
void setGeomSelectable(bool)
Definition: VP1CaloReadoutSystem.cxx:1552
HECHVManager::endSideIndex
static unsigned int endSideIndex()
Definition: HECHVManager.cxx:169
EMBPresamplerHVManager::EMBPresamplerHVData
Definition: EMBPresamplerHVManager.h:40
HECCell::FRONT
@ FRONT
Definition: HECCell.h:34
VP1DetInfo::ensureInit
static void ensureInit(IVP1System *)
Definition: VP1DetInfo.h:49
LArHVManager::getEMECHVManager
const EMECHVManager & getEMECHVManager(IOType IO) const
Definition: LArHVManager.cxx:31
VP1CaloReadoutSystem::Clockwork::EMBHVMap
std::map< SoNode *, const EMBHVElectrode * > EMBHVMap
Definition: VP1CaloReadoutSystem.cxx:194
EMBPresamplerHVManager::EMBPresamplerHVData::current
double current(const EMBPresamplerHVModule &module, const int &iGap) const
Definition: EMBPresamplerHVManager.cxx:115
VP1CaloReadoutSystem::Clockwork::pickStyle
SoPickStyle * pickStyle
Definition: VP1CaloReadoutSystem.cxx:83
VP1CaloReadoutSystem::POSITION
POSITION
Definition: VP1CaloReadoutSystem.h:20
VP1CaloReadoutSystem::Clockwork::hecSubSwitch
SoSwitch * hecSubSwitch[4][NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:143
VP1CaloReadoutSystem::Clockwork::FCALHVMap
std::map< SoNode *, const FCALHVLine * > FCALHVMap
Definition: VP1CaloReadoutSystem.cxx:196
lumiFormat.i
int i
Definition: lumiFormat.py:85
FCALHVModule::getNumHVLines
static unsigned int getNumHVLines()
Definition: FCALHVModule.cxx:67
EMBHVManager::EMBHVData::voltage
double voltage(const EMBHVElectrode &electrode, const int &iGap) const
Definition: EMBHVManager.cxx:130
FCALModule::ConstIterator
std::vector< FCALTile >::const_iterator ConstIterator
Definition: FCALModule.h:36
z
#define z
EMBPresamplerHVModule::getEtaMax
double getEtaMax() const
Definition: EMBPresamplerHVModule.cxx:65
HECDetectorRegion
Description of a region of homogenous granularity in the hadronic endcap calorimeter.
Definition: HECDetectorRegion.h:31
VP1CaloReadoutSystem::Clockwork::fcalMissingSwitch
SoSwitch * fcalMissingSwitch[3]
Definition: VP1CaloReadoutSystem.cxx:89
EMBHVElectrode::getElectrodeIndex
unsigned int getElectrodeIndex() const
Definition: EMBHVElectrode.cxx:48
HECHVModule::getSubgap
const HECHVSubgap & getSubgap(unsigned int iElectrode) const
Definition: HECHVModule.cxx:69
EMECHVManager::EMECHVData
Definition: EMECHVManager.h:41
FCALTile.h
FCALModule::getFullDepthZ
double getFullDepthZ(const FCALTile &) const
Gets Tile (full) Depth.
Definition: FCALModule.cxx:89
LArHVIdMapping.h
EMBHVModule::getEtaMin
double getEtaMin() const
Definition: EMBHVModule.cxx:79
LArHVManager::getFCALHVManager
const FCALHVManager & getFCALHVManager() const
Definition: LArHVManager.cxx:41
EMECHVManager::EMECHVData::current
double current(const EMECHVElectrode &electrode, const int &iGap) const
Definition: EMECHVManager.cxx:143
EMECHVModule::getEtaMax
double getEtaMax() const
Definition: EMECHVModule.cxx:116
EMECCell::BACK
@ BACK
Definition: EMECCell.h:36
VP1CaloReadoutSystem::Clockwork::emecHVSwitch
SoSwitch * emecHVSwitch
Definition: VP1CaloReadoutSystem.cxx:117
EMECHVModule::getPhiMax
double getPhiMax() const
Definition: EMECHVModule.cxx:133
VP1CaloReadoutSystem::enabledPhiSectorsChanged
void enabledPhiSectorsChanged()
Definition: VP1CaloReadoutSystem.cxx:315
master.flag
bool flag
Definition: master.py:29
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
FCALTube.h
VP1CaloReadoutSystem::phiSectorTurnon
void phiSectorTurnon(int)
Definition: VP1CaloReadoutSystem.cxx:1611
VP1CaloReadoutSystem::Clockwork::hecHVSeparator
SoSeparator * hecHVSeparator[4]
Definition: VP1CaloReadoutSystem.cxx:130
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
HECHVManager::HECHVData::voltage
double voltage(const HECHVSubgap &subgap) const
Definition: HECHVManager.cxx:124
HECHVManager::endSamplingIndex
static unsigned int endSamplingIndex()
Definition: HECHVManager.cxx:189
VP1CaloReadoutSystem::Clockwork::fcalMissingSep
SoSeparator * fcalMissingSep[3]
Definition: VP1CaloReadoutSystem.cxx:151
VP1CaloReadoutSystem::Clockwork::emecPreHVSwitch
SoSwitch * emecPreHVSwitch
Definition: VP1CaloReadoutSystem.cxx:109
EMBDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMBDetectorRegion.cxx:27
VP1CaloReadoutSystem::Clockwork::emecPreNormalSep
SoSeparator * emecPreNormalSep
Definition: VP1CaloReadoutSystem.cxx:166
VP1CaloReadoutSystem::Clockwork::embSubSep
SoSeparator * embSubSep[4][NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:145
VP1CaloReadoutSystem::Clockwork::accordionSubSep
SoSeparator * accordionSubSep[NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:176
FCALModule::getFullWidthX
double getFullWidthX(const FCALTile &tile) const
Gets Tile Full Width in X.
Definition: FCALModule.cxx:79
VP1CaloReadoutSystem::Clockwork::currentlyEnabledPhiSectors
QVector< bool > currentlyEnabledPhiSectors
Definition: VP1CaloReadoutSystem.cxx:204
EMECPresamplerHVManager::EMECPresamplerHVData
Definition: EMECPresamplerHVManager.h:39
FCALTile::getModule
const FCALModule * getModule() const
Get the Module.
Definition: FCALTile.cxx:76
HECHVManager::HECHVData::current
double current(const HECHVSubgap &subgap) const
Definition: HECHVManager.cxx:130
hist_file_dump.f
f
Definition: hist_file_dump.py:135
EMBPresamplerHVManager::EMBPresamplerHVData::hvOn
bool hvOn(const EMBPresamplerHVModule &module, const int &iGap) const
Definition: EMBPresamplerHVManager.cxx:101
VP1CaloReadoutSystem::Clockwork::embPreMissingSep
SoSeparator * embPreMissingSep
Definition: VP1CaloReadoutSystem.cxx:163
VP1CaloReadoutSystem::userPickedNode
void userPickedNode(SoNode *pickedNode, SoPath *pickedPath)
Definition: VP1CaloReadoutSystem.cxx:1720
IVP13DSystemSimple::ensureBuildController
void ensureBuildController()
Definition: IVP13DSystemSimple.cxx:90
VP1CaloReadoutSystem::Clockwork::fcalBadSep
SoSeparator * fcalBadSep[3]
Definition: VP1CaloReadoutSystem.cxx:152
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
VP1CaloReadoutSystem::Clockwork::emecMissingSwitch
SoSwitch * emecMissingSwitch
Definition: VP1CaloReadoutSystem.cxx:121
VP1CaloReadoutSystem::Clockwork::HECHVMap
std::map< SoNode *, const HECHVSubgap * > HECHVMap
Definition: VP1CaloReadoutSystem.cxx:197
EMECPresamplerHVModule::getEtaMax
double getEtaMax() const
Definition: EMECPresamplerHVModule.cxx:52
VP1Deserialise
Definition: VP1Deserialise.h:44
HECHVSubgap.h
VP1CaloReadoutSystem::FRONT
@ FRONT
Definition: VP1CaloReadoutSystem.h:20
EMBPresamplerHVManager::endEtaIndex
unsigned int endEtaIndex() const
Definition: EMBPresamplerHVManager.cxx:167
VP1CaloReadoutSystem::buildEventSceneGraph
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
Definition: VP1CaloReadoutSystem.cxx:1546
FCALHVManager::FCALHVData::current
double current(const FCALHVLine &line) const
Definition: FCALHVManager.cxx:125
HECHVSubgap::getModule
const HECHVModule & getModule() const
Definition: HECHVSubgap.cxx:34
EMBPresamplerHVManager::getData
EMBPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Definition: EMBPresamplerHVManager.cxx:276
VP1CaloReadoutSystem::Clockwork::embMaterial
SoMaterial * embMaterial
Definition: VP1CaloReadoutSystem.cxx:183
HECDetectorManager
A manager class providing access to readout geometry information for the hadronic endcap calorimeter.
Definition: HECDetectorManager.h:28
EMECPresamplerHVModule::getPhiMin
double getPhiMin() const
Definition: EMECPresamplerHVModule.cxx:58
VP1CaloReadoutSystem::Clockwork::emecMissingSep
SoSeparator * emecMissingSep
Definition: VP1CaloReadoutSystem.cxx:171
VP1CaloReadoutSystem::Clockwork::emecNormalSep
SoSeparator * emecNormalSep
Definition: VP1CaloReadoutSystem.cxx:170
VP1CaloReadoutSystem::Clockwork::embMissingSep
SoSeparator * embMissingSep
Definition: VP1CaloReadoutSystem.cxx:159
FCALTile::getNumHVLines
static unsigned int getNumHVLines()
Get num hvlines.
Definition: FCALTile.cxx:81
GeoStraightAccSection::Cosu
const double & Cosu(int stackid, int cellid) const
HECHVModule::getNumSubgaps
static unsigned int getNumSubgaps()
Definition: HECHVModule.cxx:64
ReadCondHandleKey.h
FCALModule::getModuleIndex
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3)
Definition: FCALModule.cxx:74
CLHEPtoEigenConverter.h
tolerance
Definition: suep_shower.h:17
HECHVSubgap::getSubgapIndex
unsigned int getSubgapIndex() const
Definition: HECHVSubgap.cxx:39
VP1CaloReadoutSystem::Clockwork::embModsSeparator
SoSeparator * embModsSeparator
Definition: VP1CaloReadoutSystem.cxx:136
VP1CaloReadoutSystem::phiSectorTurnoff
void phiSectorTurnoff(int)
Definition: VP1CaloReadoutSystem.cxx:1620
HECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: HECDetectorRegion.cxx:37
grepfile.sep
sep
Definition: grepfile.py:38
EMBHVManager::beginPhiIndex
unsigned int beginPhiIndex() const
Definition: EMBHVManager.cxx:174
EMECHVModule::getNumElectrodes
unsigned int getNumElectrodes() const
Definition: EMECHVModule.cxx:70
EMBPresamplerHVModule.h
EMBHVModule::getPhiMin
double getPhiMin() const
Definition: EMBHVModule.cxx:99
EMBHVElectrode::getModule
const EMBHVModule & getModule() const
Definition: EMBHVElectrode.cxx:32
EMBCell::BACK
@ BACK
Definition: EMBCell.h:33
VP1CaloReadoutSystem::Clockwork::hecFocalSwitch
SoSwitch * hecFocalSwitch
Definition: VP1CaloReadoutSystem.cxx:180
EMBHVManager::EMBHVData
Definition: EMBHVManager.h:39
EMBPresamplerHVManager::EMBPresamplerHVData::voltage
double voltage(const EMBPresamplerHVModule &module, const int &iGap) const
Definition: EMBPresamplerHVManager.cxx:108
VP1CaloReadoutSystem::positionOptionChanged
void positionOptionChanged()
Definition: VP1CaloReadoutSystem.cxx:1566
IVP1System::messageDebug
void messageDebug(const QString &) const
Definition: IVP1System.cxx:347
VP1CaloReadoutSystem::Clockwork::fcalMaterial
SoMaterial * fcalMaterial
Definition: VP1CaloReadoutSystem.cxx:186
VP1CaloReadoutSystem::Clockwork::hecHVSwitch
SoSwitch * hecHVSwitch[4]
Definition: VP1CaloReadoutSystem.cxx:92
INSERTCHECKBOX
#define INSERTCHECKBOX(checkboxname)
Definition: VP1CaloReadoutSystem.cxx:221
VP1CaloReadoutSystem::Clockwork::embPreNormalSwitch
SoSwitch * embPreNormalSwitch
Definition: VP1CaloReadoutSystem.cxx:105
EMECDetectorRegion::getSamplingIndex
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
Definition: EMECDetectorRegion.h:164
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
EMBHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: EMBHVManager.h:36
FCALModule
Definition: FCALModule.h:33
EMECHVManager::endSideIndex
static unsigned int endSideIndex()
Definition: EMECHVManager.cxx:235
HECHVModule::getPhiMax
double getPhiMax() const
Definition: HECHVModule.cxx:84
VP1CaloReadoutSystem::Clockwork::hecMaterial
SoMaterial * hecMaterial
Definition: VP1CaloReadoutSystem.cxx:185
EMBDetectorRegion::getEMBCell
EMBCellConstLink getEMBCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
Definition: EMBDetectorRegion.cxx:22
VP1CaloReadoutSystem::Clockwork::hecNormalSep
SoSeparator * hecNormalSep[4]
Definition: VP1CaloReadoutSystem.cxx:154
EMECHVElectrode::getModule
const EMECHVModule & getModule() const
Definition: EMECHVElectrode.cxx:37
EMECCell::CELLPOS
CELLPOS
Definition: EMECCell.h:36
EMBPresamplerHVManager::beginEtaIndex
unsigned int beginEtaIndex() const
Definition: EMBPresamplerHVManager.cxx:162
VP1CaloReadoutSystem::Clockwork::emecPreBadSep
SoSeparator * emecPreBadSep
Definition: VP1CaloReadoutSystem.cxx:168
FCALHVModule::getHVLine
const FCALHVLine & getHVLine(unsigned int iLine) const
Definition: FCALHVModule.cxx:72
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
EMBPresamplerHVManager::beginSideIndex
static unsigned int beginSideIndex()
Definition: EMBPresamplerHVManager.cxx:177
FCALModule::getEndcapIndex
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
Definition: FCALModule.cxx:69
FCALDetectorManager::beginFCAL
FCALDetectorManager::ConstIterator beginFCAL() const
Iterate over FCAL Modules.
Definition: FCALDetectorManager.cxx:49
FCALTile::getIndexJ
int getIndexJ() const
Returns the index "J" of the tile.
Definition: FCALTile.cxx:66
VP1CaloReadoutSystem::Clockwork::hecSeparator
SoSeparator * hecSeparator[4]
Definition: VP1CaloReadoutSystem.cxx:124
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
EMECHVModule::OUTER
@ OUTER
Definition: EMECHVModule.h:22
SG::ReadCondHandleKey< LArHVIdMapping >
python.PyAthena.v
v
Definition: PyAthena.py:154
FCALHVManager::endSamplingIndex
static unsigned int endSamplingIndex()
Definition: FCALHVManager.cxx:185
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
HECHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: HECHVManager.h:36
FCALHVManager::beginSectorIndex
static unsigned int beginSectorIndex(unsigned int iSampling)
Definition: FCALHVManager.cxx:167
VP1CaloReadoutSystem::Clockwork::emecPreMissingSwitch
SoSwitch * emecPreMissingSwitch
Definition: VP1CaloReadoutSystem.cxx:113
HECHVManager::HECHVData::hvOn
bool hvOn(const HECHVSubgap &subgap) const
Definition: HECHVManager.cxx:118
EMECPresamplerHVModule::getPhiMax
double getPhiMax() const
Definition: EMECPresamplerHVModule.cxx:63
VP1CaloReadoutSystem::Clockwork::hecBadSep
SoSeparator * hecBadSep[4]
Definition: VP1CaloReadoutSystem.cxx:156
VP1CaloReadoutSystem::Clockwork::embModsSwitch
SoSwitch * embModsSwitch
Definition: VP1CaloReadoutSystem.cxx:99
VP1CaloReadoutSystem::checkboxChanged
void checkboxChanged()
Definition: VP1CaloReadoutSystem.cxx:1629
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
LArHVManager
This class provides access to the High Voltage throughout the LAr. High voltage conditions can also b...
Definition: LArHVManager.h:24
EMECDetectorRegion::getEMECCell
EMECCellConstLink getEMECCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
Definition: EMECDetectorRegion.cxx:26
y
#define y
CondCont< LArHVIdMapping >
VP1CaloReadoutSystem::Clockwork::emecSubSwitch
SoSwitch * emecSubSwitch[4][NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:142
EMBHVElectrode::getPhi
double getPhi() const
Definition: EMBHVElectrode.cxx:37
FCALModule::getFullWidthY
double getFullWidthY(const FCALTile &tile) const
Gets Tile Full Width in Y.
Definition: FCALModule.cxx:84
LArHVManager::getHECHVManager
const HECHVManager & getHECHVManager() const
Definition: LArHVManager.cxx:36
FCALHVModule.h
FCALHVManager.h
VP1CaloReadoutSystem::Clockwork::fcalBadSwitch
SoSwitch * fcalBadSwitch[3]
Definition: VP1CaloReadoutSystem.cxx:88
VP1CaloReadoutSystem::Clockwork::embPreNormalSep
SoSeparator * embPreNormalSep
Definition: VP1CaloReadoutSystem.cxx:162
HECCell::CENTER
@ CENTER
Definition: HECCell.h:34
VP1CaloReadoutSystem::Clockwork::fcalNormalSep
SoSeparator * fcalNormalSep[3]
Definition: VP1CaloReadoutSystem.cxx:150
FCALDetectorManager::endFCAL
FCALDetectorManager::ConstIterator endFCAL() const
Iterate over FCAL Modules.
Definition: FCALDetectorManager.cxx:54
VP1CaloReadoutSystem::Clockwork::ui
Ui::CaloReadoutSystemControllerForm ui
Definition: VP1CaloReadoutSystem.cxx:201
FCALTile::getHVLine
const FCALHVLine * getHVLine(unsigned int i) const
Get hvline.
Definition: FCALTile.cxx:85
HECHVManager::endPhiIndex
static unsigned int endPhiIndex()
Definition: HECHVManager.cxx:179
EMECHVManager::beginPhiIndex
unsigned int beginPhiIndex() const
Definition: EMECHVManager.cxx:202
VP1CaloReadoutSystem::Clockwork::embAccViewSwitch
SoSwitch * embAccViewSwitch
Definition: VP1CaloReadoutSystem.cxx:181
EMBDetectorManager::DetectorRegionConstIterator
std::vector< const EMBDetectorRegion * >::const_iterator DetectorRegionConstIterator
Definition: EMBDetectorManager.h:35
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
GeoStraightAccSection::HalfLength
const double & HalfLength(int stackid, int cellid) const
EMECHVModule::IOType
IOType
Definition: EMECHVModule.h:22
Amg::EigenTransformToCLHEP
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Definition: CLHEPtoEigenConverter.h:120
HECDetectorRegion::getHECCell
HECCellConstLink getHECCell(unsigned int ieta, unsigned int iphi) const
Retrieve a cell with eta index and phi index.
Definition: HECDetectorRegion.cxx:26
HECHVModule::getPhiMin
double getPhiMin() const
Definition: HECHVModule.cxx:79
EMBAccordionDetails::getAbsorberSections
const GeoStraightAccSection * getAbsorberSections() const
Absorber position details:
Definition: EMBAccordionDetails.cxx:291
EMECHVElectrode::getElectrodeIndex
unsigned int getElectrodeIndex() const
Definition: EMECHVElectrode.cxx:27
VP1CaloReadoutSystem::Clockwork::emecModsSwitch
SoSwitch * emecModsSwitch
Definition: VP1CaloReadoutSystem.cxx:118
FCALHVManager::endSectorIndex
static unsigned int endSectorIndex(unsigned int iSampling)
Definition: FCALHVManager.cxx:172
VP1CaloReadoutSystem::Clockwork::fcalSubSep
SoSeparator * fcalSubSep[3]
Definition: VP1CaloReadoutSystem.cxx:148
VP1CaloReadoutSystem::Clockwork::checkBoxMap
QMap< QString, QCheckBox * > checkBoxMap
Definition: VP1CaloReadoutSystem.cxx:82
VP1CaloReadoutSystem::buildController
QWidget * buildController()
Definition: VP1CaloReadoutSystem.cxx:224
EMECPresamplerHVModule
Describes one HV Module within the EMEc Presampler.
Definition: EMECPresamplerHVModule.h:22
GeoStraightAccSection::XCent
const double & XCent(int stackid, int cellid) const
HECDetectorManager::DetectorRegionConstIterator
std::vector< const HECDetectorRegion * >::const_iterator DetectorRegionConstIterator
Definition: HECDetectorManager.h:33
EMBHVModule::getElectrode
const EMBHVElectrode & getElectrode(unsigned int iElectrode) const
Definition: EMBHVModule.cxx:69
FCALHVModule
Describes one HV Module within the FCAL.
Definition: FCALHVModule.h:20
EMECHVManager::beginSectorIndex
unsigned int beginSectorIndex() const
Definition: EMECHVManager.cxx:240
VP1CaloReadoutSystem::acceptHV
void acceptHV()
Definition: VP1CaloReadoutSystem.cxx:2543
HECHVModule.h
FCALHVManager::beginSideIndex
static unsigned int beginSideIndex()
Definition: FCALHVManager.cxx:157
HECCell::CELLPOS
CELLPOS
Definition: HECCell.h:34
python.Logging.manager
manager
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/Logging.py:92
EMBCell::CENTER
@ CENTER
Definition: EMBCell.h:33
HECHVManager::beginSamplingIndex
static unsigned int beginSamplingIndex()
Definition: HECHVManager.cxx:184
VP1SGAccessHelper
Definition: VP1SGAccessHelper.h:25
EMBHVManager::getData
EMBHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Definition: EMBHVManager.cxx:343
EMBHVManager::endSectorIndex
static unsigned int endSectorIndex()
Definition: EMBHVManager.cxx:204
VP1CaloReadoutSystem::Clockwork::embBadSwitch
SoSwitch * embBadSwitch
Definition: VP1CaloReadoutSystem.cxx:101
EMECPresamplerHVManager::endPhiIndex
unsigned int endPhiIndex() const
Definition: EMECPresamplerHVManager.cxx:147
HECDetectorManager::getDetectorRegion
const HECDetectorRegion * getDetectorRegion(unsigned int endcap, unsigned int sampling, unsigned int region) const
Random Access to detector regions.
Definition: HECDetectorManager.cxx:130
EMECHVElectrode
Definition: EMECHVElectrode.h:15
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
VP1CaloReadoutSystem::Clockwork::embHVSeparator
SoSeparator * embHVSeparator
Definition: VP1CaloReadoutSystem.cxx:134
VP1CaloReadoutSystem::Clockwork::hecSwitch
SoSwitch * hecSwitch[4]
Definition: VP1CaloReadoutSystem.cxx:91
EMECHVManager
This class provides direct access to information on the HV electrodes within the EMEC....
Definition: EMECHVManager.h:36
FCALTile::getTube
FCALTubeConstLink getTube(unsigned int i) const
Get a tube.
Definition: FCALTile.cxx:100
EMBHVModule
Describes one HV Module within the EMB.
Definition: EMBHVModule.h:20
EMBHVManager::endSideIndex
static unsigned int endSideIndex()
Definition: EMBHVManager.cxx:214
VP1CaloReadoutSystem::Clockwork::emecFocalSwitch
SoSwitch * emecFocalSwitch
Definition: VP1CaloReadoutSystem.cxx:179
EMBPresamplerHVModule::getPhiMax
double getPhiMax() const
Definition: EMBPresamplerHVModule.cxx:80
EMBAccordionDetails.h
EMBPresamplerHVManager::getHVModule
const EMBPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi) const
Definition: EMBPresamplerHVManager.cxx:172
HECDetectorRegion::getFocalPointPos
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the HEC.
Definition: HECDetectorRegion.cxx:76
VP1CaloReadoutSystem::Clockwork::emecPreHVSeparator
SoSeparator * emecPreHVSeparator
Definition: VP1CaloReadoutSystem.cxx:132
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
getReferenceRun.ls
def ls(fpath)
Definition: getReferenceRun.py:29
VP1CaloReadoutSystem::Clockwork::hecMissingSwitch
SoSwitch * hecMissingSwitch[4]
Definition: VP1CaloReadoutSystem.cxx:95
FCALHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: FCALHVManager.h:35
EMBDetectorRegion
Definition: EMBDetectorRegion.h:28
VP1CaloReadoutSystem::Clockwork::volatileSeparator
SoSeparator * volatileSeparator
Definition: VP1CaloReadoutSystem.cxx:76
VP1CaloReadoutSystem::saveState
QByteArray saveState()
Definition: VP1CaloReadoutSystem.cxx:2429
VP1CaloReadoutSystem::Clockwork::emecBadSep
SoSeparator * emecBadSep
Definition: VP1CaloReadoutSystem.cxx:172
red
@ red
Definition: BinsDiffFromStripMedian.h:18
VP1CaloReadoutSystem::Clockwork::emecPreModsSwitch
SoSwitch * emecPreModsSwitch
Definition: VP1CaloReadoutSystem.cxx:110
EMECDetectorRegion.h
VP1LinAlgUtils::toSoTransform
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
Definition: VP1LinAlgUtils.cxx:40
VP1CaloReadoutSystem::Clockwork::embAccMaterial
SoMaterial * embAccMaterial
Definition: VP1CaloReadoutSystem.cxx:187
VP1CaloReadoutSystem::Clockwork::embHVSwitch
SoSwitch * embHVSwitch
Definition: VP1CaloReadoutSystem.cxx:98
VP1SGAccessHelper.h
FCALModule::beginTiles
FCALModule::ConstIterator beginTiles() const
Iteration over FCAL Tiles.
Definition: FCALModule.cxx:46
EMBDetectorManager.h
FCALTile::identify
unsigned int identify() const
Returns the identifier of this tile (convention: comes from the FCAL Channel Map).
Definition: FCALTile.cxx:71
VP1CaloReadoutSystem::Clockwork::accordionSubSwitch
SoSwitch * accordionSubSwitch[NPHISECTORS]
Definition: VP1CaloReadoutSystem.cxx:175
HECHVSubgap
Definition: HECHVSubgap.h:15
FCALHVManager::FCALHVData
Definition: FCALHVManager.h:38
VP1CaloReadoutSystem::Clockwork::TileMap
std::map< SoNode *, const FCALTile * > TileMap
Definition: VP1CaloReadoutSystem.cxx:189
EMBHVModule.h
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
FCALModule.h
EMBHVManager.h
HECDetectorRegion::getSamplingIndex
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index (0-3)
Definition: HECDetectorRegion.h:165
TrackingGeometryValidation.blue
blue
Definition: TrackingGeometryValidation.py:33
IVP13DSystem::deselectAll
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
Definition: IVP13DSystem.cxx:331
EMECDetectorManager::DetectorRegionConstIterator
std::vector< const EMECDetectorRegion * >::const_iterator DetectorRegionConstIterator
Definition: EMECDetectorManager.h:34
HECHVManager::getHVModule
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
Definition: HECHVManager.cxx:194
HECDetectorManager.h
IVP1System::messageVerbose
void messageVerbose(const QString &) const
Definition: IVP1System.cxx:354
EMBPresamplerHVModule
Describes one HV Module within the EMB Presampler.
Definition: EMBPresamplerHVModule.h:22
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
FCALHVManager::beginSamplingIndex
static unsigned int beginSamplingIndex()
Definition: FCALHVManager.cxx:180
VP1CaloReadoutSystem::~VP1CaloReadoutSystem
~VP1CaloReadoutSystem()
Definition: VP1CaloReadoutSystem.cxx:215
python.handimod.cc
int cc
Definition: handimod.py:523
VP1CaloReadoutSystem::Clockwork::pos
VP1CaloReadoutSystem::POSITION pos
Definition: VP1CaloReadoutSystem.cxx:199
FCALHVManager::endSideIndex
static unsigned int endSideIndex()
Definition: FCALHVManager.cxx:162
VP1CaloReadoutSystem::Clockwork::embNormalSep
SoSeparator * embNormalSep
Definition: VP1CaloReadoutSystem.cxx:158
IVP1System::controllerWidget
QWidget * controllerWidget()
Definition: IVP1System.cxx:202
VP1CaloReadoutSystem::Clockwork::fcalHVSeparator
SoSeparator * fcalHVSeparator[3]
Definition: VP1CaloReadoutSystem.cxx:129
IVP1System::restoreFromState
virtual void restoreFromState(QByteArray)
Definition: IVP1System.cxx:302
LArHVManager::getEMBPresamplerHVManager
const EMBPresamplerHVManager & getEMBPresamplerHVManager() const
Definition: LArHVManager.cxx:46
VP1CaloReadoutSystem::Clockwork::EMECHVMap
std::map< SoNode *, const EMECHVElectrode * > EMECHVMap
Definition: VP1CaloReadoutSystem.cxx:195
VP1CaloReadoutSystem::Clockwork::fcalHVSwitch
SoSwitch * fcalHVSwitch[3]
Definition: VP1CaloReadoutSystem.cxx:86
EMBCell::FRONT
@ FRONT
Definition: EMBCell.h:33