ATLAS Offline Software
Loading...
Searching...
No Matches
VP1CaloReadoutSystem Class Reference

#include <VP1CaloReadoutSystem.h>

Inheritance diagram for VP1CaloReadoutSystem:
Collaboration diagram for VP1CaloReadoutSystem:

Classes

class  Clockwork

Public Types

enum  POSITION { FRONT , CENTER , BACK }
typedef std::set< SoCamera * > CamList
typedef CamList::iterator CamListItr
enum  State { CONSTRUCTED =0 , REFRESHED , ERASED , UNCREATED }
enum  ActiveState { ON =0 , OFF }

Signals

void itemFromSystemSelected ()
void sysmessage (QString) const
void inactiveSystemTurnedActive ()
void needErase ()

Public Member Functions

 VP1CaloReadoutSystem ()
 ~VP1CaloReadoutSystem ()
QWidget * buildController ()
void systemcreate (StoreGateSvc *detstore)
void buildPermanentSceneGraph (StoreGateSvc *detstore, SoSeparator *root)
void buildEventSceneGraph (StoreGateSvc *sg, SoSeparator *root)
void createEtaPhi ()
void createHV ()
void userPickedNode (SoNode *pickedNode, SoPath *pickedPath)
void userClickedOnBgd ()
QByteArray saveState ()
void restoreFromState (QByteArray ba)
void ensureBuildController ()
void updateGUI ()
virtual void systemerase ()
virtual void systemuncreate ()
void warnOnDisabledNotifications () const
void registerCamera (SoCamera *camera)
void registerViewer (SoQtViewer *viewer)
void registerSelectionNode (SoCooperativeSelection *)
void unregisterSelectionNode (SoCooperativeSelection *)
void setUserSelectionNotificationsEnabled (SoCooperativeSelection *sel, bool enabled)
virtual void userSelectedSingleNode (SoCooperativeSelection *, SoNode *, SoPath *)
virtual void userDeselectedSingleNode (SoCooperativeSelection *, SoNode *, SoPath *)
virtual void userChangedSelection (SoCooperativeSelection *, const QSet< SoNode * > &, QSet< SoPath * >)
virtual void deselectAll (SoCooperativeSelection *exception_sel=0)
CamList getCameraList ()
virtual QWidget * buildExtraDisplayWidget ()
const QString & name () const
const QString & information () const
const QString & contact_info () const
QWidget * controllerWidget ()
void message (const QString &) const
void message (const QStringList &, const QString &addtoend="") const
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &) const
void messageDebug (const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &) const
void messageVerbose (const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
StoreGateSvcstoreGate () const
StoreGateSvceventStore () const
StoreGateSvcdetectorStore () const
ISvcLocator * serviceLocator () const
IToolSvc * toolSvc () const
State state () const
ActiveState activeState () const

Static Public Member Functions

static bool verbose ()
static QString str (const QString &s)
static QString str (const char *c)
static QString str (const bool b)
static QString str (const QColor &)
static QString str (const SbColor &)
static QString str (const VP1Interval &)
static QString str (const SbVec2d &)
static QString str (const SbVec2f &)
static QString str (const SbVec2s &)
static QString str (const SbVec3d &)
static QString str (const SbVec3f &)
static QString str (const SbVec3s &)
static QString str (const SbVec4d &)
static QString str (const SbVec4f &)
static QString str (short int n)
static QString str (unsigned short int n)
static QString str (long n)
static QString str (ulong n)
static QString str (int n)
static QString str (uint n)
static QString str (qlonglong n)
static QString str (qulonglong n)
static QString str (const double &d)
static QString str (const float &f)
static QString str (const void *)
template<class T>
static QString str (const T *t)
template<class T>
static QString str (const QFlags< T > &f)
template<class T>
static QString str (const HepGeom::BasicVector3D< T > &t)
static QString str (const Amg::Vector3D &t)
template<class T>
static QString str (const QList< T > &t)

Protected Slots

void checkboxChanged ()
void checkboxChanged (QCheckBox *cb)
void phiSectorTurnon (int)
void phiSectorTurnoff (int)
void positionOptionChanged ()
void setGeomSelectable (bool)
void acceptHV ()
void enabledPhiSectorsChanged ()

Protected Member Functions

void registerController (QWidget *)

Private Slots

void activateClickedOutside ()

Private Member Functions

SoSeparator * getSceneGraph () const
void create (StoreGateSvc *detstore)
void refresh (StoreGateSvc *storegate)
void erase ()
void uncreate ()
void disallowUpdateGUI ()
void allowUpdateGUI ()
void setChannel (IVP1ChannelWidget *)
IVP1ChannelWidgetchannel () const
void deleteController ()
void setState (const State &)
void setActiveState (const ActiveState &, const bool &donttriggererase=true)
bool isRefreshing ()
void setRefreshing (const bool &)
void setCanRegisterController (const bool &)

Private Attributes

Clockworkm_clockwork
Impm_d

Static Private Attributes

static const bool s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")

Detailed Description

Definition at line 12 of file VP1CaloReadoutSystem.h.

Member Typedef Documentation

◆ CamList

typedef std::set<SoCamera*> IVP13DSystem::CamList
inherited

Definition at line 90 of file IVP13DSystem.h.

◆ CamListItr

typedef CamList::iterator IVP13DSystem::CamListItr
inherited

Definition at line 91 of file IVP13DSystem.h.

Member Enumeration Documentation

◆ ActiveState

enum IVP1System::ActiveState
inherited
Enumerator
ON 
OFF 

Definition at line 144 of file IVP1System.h.

144{ ON=0, OFF };//Whether it is part of the erase/refresh cycle.

◆ POSITION

◆ State

enum IVP1System::State
inherited
Enumerator
CONSTRUCTED 
REFRESHED 
ERASED 
UNCREATED 

Definition at line 143 of file IVP1System.h.

Constructor & Destructor Documentation

◆ VP1CaloReadoutSystem()

VP1CaloReadoutSystem::VP1CaloReadoutSystem ( )

Definition at line 207 of file VP1CaloReadoutSystem.cxx.

208 :IVP13DSystemSimple("CaloReadout","Display the calorimeter readout segmentation","boudreau@pitt.edu"),
210{
211 m_clockwork->hvInit=false;
212 m_clockwork->permInit=false;
213}
IVP13DSystemSimple(const QString &name, const QString &information, const QString &contact_info)

◆ ~VP1CaloReadoutSystem()

VP1CaloReadoutSystem::~VP1CaloReadoutSystem ( )

Definition at line 215 of file VP1CaloReadoutSystem.cxx.

216{
217 delete m_clockwork;
218 m_clockwork = 0;
219}

Member Function Documentation

◆ acceptHV

void VP1CaloReadoutSystem::acceptHV ( )
protectedslot

Definition at line 2543 of file VP1CaloReadoutSystem.cxx.

2543 {
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}

◆ activateClickedOutside

void IVP13DSystem::activateClickedOutside ( )
privateslotinherited

Definition at line 85 of file IVP13DSystem.cxx.

86{
87 if (!m_d->clickedoutsideScheduled)
88 return;
89 m_d->clickedoutsideScheduled = false;
91}
virtual void userClickedOnBgd()

◆ activeState()

IVP1System::ActiveState IVP1System::activeState ( ) const
inherited

Definition at line 135 of file IVP1System.cxx.

136{
137 return m_d->activeState;
138}

◆ allowUpdateGUI()

void IVP1System::allowUpdateGUI ( )
privateinherited

Definition at line 256 of file IVP1System.cxx.

257{
258 m_d->allowupdategui=true;
259}

◆ buildController()

QWidget * VP1CaloReadoutSystem::buildController ( )
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 224 of file VP1CaloReadoutSystem.cxx.

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()));
294 m_clockwork->checkBoxMap.insert(m_clockwork->checkBoxNamesMap[cb],cb);
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}
#define NPHISECTORS
#define INSERTCHECKBOX(checkboxname)
l
Printing final latex table to .tex output file.

◆ buildEventSceneGraph()

void VP1CaloReadoutSystem::buildEventSceneGraph ( StoreGateSvc * sg,
SoSeparator * root )
virtual

Implements IVP13DSystemSimple.

Definition at line 1546 of file VP1CaloReadoutSystem.cxx.

1547{
1548
1549
1550}

◆ buildExtraDisplayWidget()

virtual QWidget * IVP13DSystem::buildExtraDisplayWidget ( )
inlinevirtualinherited

Definition at line 106 of file IVP13DSystem.h.

106{ return 0; }

◆ buildPermanentSceneGraph()

void VP1CaloReadoutSystem::buildPermanentSceneGraph ( StoreGateSvc * detstore,
SoSeparator * root )
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 343 of file VP1CaloReadoutSystem.cxx.

343 {
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);
419 m_clockwork->fcalSwitch[i]->addChild(m_clockwork->fcalSeparator[i]);
420 m_clockwork->fcalHVSwitch[i]->addChild(m_clockwork->fcalHVSeparator[i]);
421
422 m_clockwork->fcalSeparator[i]->addChild(m_clockwork->fcalMaterial);
423 m_clockwork->fcalSubSep[i]= new SoSeparator();
424 m_clockwork->fcalSeparator[i]->addChild(m_clockwork->fcalSubSep[i]);
425
426 m_clockwork->fcalHVSeparator[i]->addChild(drawStyle);
427 m_clockwork->fcalHVSeparator[i]->addChild(lightModel);
428
429 m_clockwork->fcalHVSeparator[i]->addChild(m_clockwork->fcalNormalSwitch[i]);
430 m_clockwork->fcalHVSeparator[i]->addChild(m_clockwork->fcalBadSwitch[i]);
431 m_clockwork->fcalHVSeparator[i]->addChild(m_clockwork->fcalMissingSwitch[i]);
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]);
435 m_clockwork->fcalMissingSep[i]=new SoSeparator(); m_clockwork->fcalMissingSwitch[i]->addChild(m_clockwork->fcalMissingSep[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();
444 m_clockwork->embModsSwitch->addChild(m_clockwork->embModsSeparator);
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();
451 m_clockwork->embHVSwitch->addChild(m_clockwork->embHVSeparator);
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();
457 m_clockwork->embNormalSwitch->addChild(m_clockwork->embNormalSep);
458 m_clockwork->embHVSeparator->addChild(m_clockwork->embNormalSwitch);
459
460 m_clockwork->embMissingSep = new SoSeparator();
461 m_clockwork->embMissingSwitch = new SoSwitch();
462 m_clockwork->embMissingSwitch->addChild(m_clockwork->embMissingSep);
463 m_clockwork->embHVSeparator->addChild(m_clockwork->embMissingSwitch);
464
465 m_clockwork->embBadSep = new SoSeparator();
466 m_clockwork->embBadSwitch = new SoSwitch();
467 m_clockwork->embBadSwitch->addChild(m_clockwork->embBadSep);
468 m_clockwork->embHVSeparator->addChild(m_clockwork->embBadSwitch);
469
470 }
471
472 {
473 m_clockwork->embPreModsSwitch = new SoSwitch();
474 m_clockwork->embPreModsSeparator = new SoSeparator();
475 m_clockwork->embPreModsSwitch->addChild(m_clockwork->embPreModsSeparator);
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();
481 m_clockwork->embPreHVSwitch->addChild(m_clockwork->embPreHVSeparator);
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();
487 m_clockwork->embPreNormalSwitch->addChild(m_clockwork->embPreNormalSep);
488 m_clockwork->embPreHVSeparator->addChild(m_clockwork->embPreNormalSwitch);
489
490 m_clockwork->embPreMissingSep = new SoSeparator();
491 m_clockwork->embPreMissingSwitch = new SoSwitch();
492 m_clockwork->embPreMissingSwitch->addChild(m_clockwork->embPreMissingSep);
493 m_clockwork->embPreHVSeparator->addChild(m_clockwork->embPreMissingSwitch);
494
495 m_clockwork->embPreBadSep = new SoSeparator();
496 m_clockwork->embPreBadSwitch = new SoSwitch();
497 m_clockwork->embPreBadSwitch->addChild(m_clockwork->embPreBadSep);
498 m_clockwork->embPreHVSeparator->addChild(m_clockwork->embPreBadSwitch);
499
500 }
501
502 {
503 m_clockwork->emecModsSwitch = new SoSwitch();
504 m_clockwork->emecModsSeparator = new SoSeparator();
505 m_clockwork->emecModsSwitch->addChild(m_clockwork->emecModsSeparator);
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();
511 m_clockwork->emecHVSwitch->addChild(m_clockwork->emecHVSeparator);
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();
517 m_clockwork->emecNormalSwitch->addChild(m_clockwork->emecNormalSep);
518 m_clockwork->emecHVSeparator->addChild(m_clockwork->emecNormalSwitch);
519
520 m_clockwork->emecMissingSep = new SoSeparator();
521 m_clockwork->emecMissingSwitch = new SoSwitch();
522 m_clockwork->emecMissingSwitch->addChild(m_clockwork->emecMissingSep);
523 m_clockwork->emecHVSeparator->addChild(m_clockwork->emecMissingSwitch);
524
525 m_clockwork->emecBadSep = new SoSeparator();
526 m_clockwork->emecBadSwitch = new SoSwitch();
527 m_clockwork->emecBadSwitch->addChild(m_clockwork->emecBadSep);
528 m_clockwork->emecHVSeparator->addChild(m_clockwork->emecBadSwitch);
529 }
530
531 {
532 m_clockwork->emecPreModsSwitch = new SoSwitch();
533 m_clockwork->emecPreModsSeparator = new SoSeparator();
534 m_clockwork->emecPreModsSwitch->addChild(m_clockwork->emecPreModsSeparator);
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();
540 m_clockwork->emecPreHVSwitch->addChild(m_clockwork->emecPreHVSeparator);
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();
546 m_clockwork->emecPreNormalSwitch->addChild(m_clockwork->emecPreNormalSep);
547 m_clockwork->emecPreHVSeparator->addChild(m_clockwork->emecPreNormalSwitch);
548
549 m_clockwork->emecPreMissingSep = new SoSeparator();
550 m_clockwork->emecPreMissingSwitch = new SoSwitch();
551 m_clockwork->emecPreMissingSwitch->addChild(m_clockwork->emecPreMissingSep);
552 m_clockwork->emecPreHVSeparator->addChild(m_clockwork->emecPreMissingSwitch);
553
554 m_clockwork->emecPreBadSep = new SoSeparator();
555 m_clockwork->emecPreBadSwitch = new SoSwitch();
556 m_clockwork->emecPreBadSwitch->addChild(m_clockwork->emecPreBadSep);
557 m_clockwork->emecPreHVSeparator->addChild(m_clockwork->emecPreBadSwitch);
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();
573 m_clockwork->embSwitch[i]->addChild(m_clockwork->embSeparator[i]);
574 m_clockwork->embSeparator[i]->addChild(m_clockwork->embMaterial);
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]);
580 m_clockwork->embSeparator[i]->addChild(m_clockwork->embSubSwitch[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();
588 m_clockwork->emecSwitch[i]->addChild(m_clockwork->emecSeparator[i]);
589 m_clockwork->emecSeparator[i]->addChild(m_clockwork->emecMaterial);
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();
594 m_clockwork->emecSubSwitch[i][p]->addChild(m_clockwork->emecSubSep[i][p]);
595 m_clockwork->emecSeparator[i]->addChild(m_clockwork->emecSubSwitch[i][p]);
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();
604 m_clockwork->hecHVSwitch[i]->addChild(m_clockwork->hecHVSeparator[i]);
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();
610 m_clockwork->hecNormalSwitch[i]->addChild(m_clockwork->hecNormalSep[i]);
611 m_clockwork->hecHVSeparator[i]->addChild(m_clockwork->hecNormalSwitch[i]);
612
613 m_clockwork->hecMissingSep[i] = new SoSeparator();
614 m_clockwork->hecMissingSwitch[i] = new SoSwitch();
615 m_clockwork->hecMissingSwitch[i]->addChild(m_clockwork->hecMissingSep[i]);
616 m_clockwork->hecHVSeparator[i]->addChild(m_clockwork->hecMissingSwitch[i]);
617
618 m_clockwork->hecBadSep[i] = new SoSeparator();
619 m_clockwork->hecBadSwitch[i] = new SoSwitch();
620 m_clockwork->hecBadSwitch[i]->addChild(m_clockwork->hecBadSep[i]);
621 m_clockwork->hecHVSeparator[i]->addChild(m_clockwork->hecBadSwitch[i]);
622
623 m_clockwork->hecSeparator[i] = new SoSeparator();
624 m_clockwork->hecSwitch[i]->addChild(m_clockwork->hecSeparator[i]);
625 m_clockwork->hecSeparator[i]->addChild(m_clockwork->hecMaterial);
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]);
631 m_clockwork->hecSeparator[i]->addChild(m_clockwork->hecSubSwitch[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();
641 m_clockwork->emecFocalSwitch->addChild(m_clockwork->emecMaterial);
642 root->addChild(m_clockwork->emecFocalSwitch);
643
644 m_clockwork->hecFocalSwitch = new SoSwitch();
645 m_clockwork->hecFocalSwitch->addChild(m_clockwork->hecMaterial);
646 root->addChild(m_clockwork->hecFocalSwitch);
647
648 m_clockwork->embAccViewSwitch = new SoSwitch();
649 m_clockwork->embAccViewSwitch->addChild(m_clockwork->embAccMaterial);
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();
655 m_clockwork->accordionSubSwitch[p]->addChild(m_clockwork->accordionSubSep[p]);
656 m_clockwork->embAccViewSwitch->addChild(m_clockwork->accordionSubSwitch[p]);
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}

◆ channel()

IVP1ChannelWidget * IVP1System::channel ( ) const
privateinherited

Definition at line 275 of file IVP1System.cxx.

276{
277 if (VP1Msg::verbose()&&!m_d->channel){
278 messageVerbose("WARNING channel() returning NULL");
279 }
280 assert(m_d->channel);
281 return m_d->channel;
282}
void messageVerbose(const QString &) const
static bool verbose()
Definition VP1Msg.h:31

◆ checkboxChanged [1/2]

void VP1CaloReadoutSystem::checkboxChanged ( )
protectedslot

Definition at line 1629 of file VP1CaloReadoutSystem.cxx.

1630{
1631 checkboxChanged(dynamic_cast<QCheckBox*>(sender()));
1632}

◆ checkboxChanged [2/2]

void VP1CaloReadoutSystem::checkboxChanged ( QCheckBox * cb)
protectedslot

Definition at line 1634 of file VP1CaloReadoutSystem.cxx.

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}

◆ contact_info()

const QString & IVP1System::contact_info ( ) const
inherited

Definition at line 62 of file IVP1System.cxx.

63{
64 return m_d->contact_info;
65}

◆ controllerWidget()

QWidget * IVP1System::controllerWidget ( )
inherited

Definition at line 202 of file IVP1System.cxx.

202 {
203 if (VP1Msg::verbose()) {
204 messageVerbose("controllerWidget()");
205 messageVerbose("registerController m_d->state==ERASED = "+QString(m_d->state==ERASED?"true":"false"));
206 messageVerbose("registerController m_d->state==REFRESHED = "+QString(m_d->state==REFRESHED?"true":"false"));
207 }
208 assert(m_d->state==REFRESHED||m_d->state==ERASED);
209 return m_d->controller;
210 }

◆ create()

void IVP13DSystemSimple::create ( StoreGateSvc * detstore)
privatevirtualinherited

Implements IVP1System.

Definition at line 133 of file IVP13DSystemSimple.cxx.

134{
135 if(VP1Msg::verbose()){
136 messageVerbose("IVP13DSystemSimple create");
137 }
138 assert(!m_d->wasrefreshed);
139 assert(!m_d->wascreated);
140 ensureBuildController();//TODO: Move to refresh.
141 m_d->wascreated=true;
142 m_d->wasrefreshed=false;
143}

◆ createEtaPhi()

void VP1CaloReadoutSystem::createEtaPhi ( )

Definition at line 1221 of file VP1CaloReadoutSystem.cxx.

1221 {
1222 {
1224 const EMBDetectorManager * manager=VP1DetInfo::embDetMgr();
1225 if (manager) {
1226
1228 for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
1229 const EMBDetectorRegion *region = *e;
1230 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(region->getAbsoluteTransform());
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
1244 if (m_clockwork->pos==BACK) pos=EMBCell::BACK;
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 {
1284 const EMBDetectorManager * manager=VP1DetInfo::embDetMgr();
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 {
1324 const EMECDetectorManager * manager=VP1DetInfo::emecDetMgr();
1325 if (manager) {
1326
1328 for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
1329 const EMECDetectorRegion *region = *e;
1330 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(region->getAbsoluteTransform());
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 {
1406 const HECDetectorManager * manager=VP1DetInfo::hecDetMgr();
1407 if (manager) {
1408
1410 for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); ++e) {
1411
1412
1413 const HECDetectorRegion *region = *e;
1414 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(region->getAbsoluteTransform());
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
1450 if (m_clockwork->pos==BACK) pos=HECCell::BACK;
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 {
1494 const FCALDetectorManager * manager=VP1DetInfo::fcalDetMgr();
1495 if (manager) {
1497 for (e=manager->beginFCAL();e!=manager->endFCAL(); ++e) {
1498
1499 const FCALModule *fcalMod = *e;
1500 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
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}
#define M_PI
static Double_t sp
#define y
#define x
#define z
const GeoStraightAccSection * getAbsorberSections() const
Absorber position details:
@ BACK
Definition EMBCell.h:33
@ CENTER
Definition EMBCell.h:33
@ FRONT
Definition EMBCell.h:33
std::vector< constEMBDetectorRegion * >::const_iterator DetectorRegionConstIterator
unsigned int beginPhiIndex() const
Returns the first phi index in the region.
EMBCellConstLink getEMBCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
unsigned int beginEtaIndex() const
Returns the first eta index in the region.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
std::vector< constEMECDetectorRegion * >::const_iterator DetectorRegionConstIterator
EMECCellConstLink getEMECCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
unsigned int beginPhiIndex() const
returns the first phi index in the region.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the EMEC.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
unsigned int beginEtaIndex() const
returns the first eta index in the region.
std::vector< constFCALModule * >::const_iterator ConstIterator
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
double getFullWidthY(const FCALTile &tile) const
Gets Tile Full Width in Y.
double getFullDepthZ(const FCALTile &) const
Gets Tile (full) Depth.
double getFullWidthX(const FCALTile &tile) const
Gets Tile Full Width in X.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
std::vector< FCALTile >::const_iterator ConstIterator
Definition FCALModule.h:36
FCALModule::ConstIterator beginTiles() const
Iteration over FCAL Tiles.
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3)
FCALModule::ConstIterator endTiles() const
Iteration over FCAL Tiles.
const double & YCent(int stackid, int cellid) const
const double & Cosu(int stackid, int cellid) const
const double & HalfLength(int stackid, int cellid) const
const double & Sinu(int stackid, int cellid) const
const double & XCent(int stackid, int cellid) const
@ BACK
Definition HECCell.h:34
@ FRONT
Definition HECCell.h:34
@ CENTER
Definition HECCell.h:34
std::vector< constHECDetectorRegion * >::const_iterator DetectorRegionConstIterator
HECCellConstLink getHECCell(unsigned int ieta, unsigned int iphi) const
Retrieve a cell with eta index and phi index.
unsigned int beginPhiIndex() const
returns the first phi index in the region.
HepGeom::Point3D< double > getFocalPointPos() const
Returns the position of the focal point of the HEC.
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index (0-3)
unsigned int beginEtaIndex() const
returns the first eta index in the region.
void messageDebug(const QString &) const
static const FCALDetectorManager * fcalDetMgr()
static const EMECDetectorManager * emecDetMgr()
static void ensureInit(IVP1System *)
Definition VP1DetInfo.h:49
static const EMBDetectorManager * embDetMgr()
static const HECDetectorManager * hecDetMgr()
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
static QString str(const QString &s)
Definition VP1String.h:49
int r
Definition globals.cxx:22
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
@ iPhi
Definition ParamDefs.h:47
ls(path, longls=False)
Definition DiskUtils.py:111
setScale setgFexType iEta

◆ createHV()

void VP1CaloReadoutSystem::createHV ( )

Definition at line 716 of file VP1CaloReadoutSystem.cxx.

716 {
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 }
803 if (i16Key.storeHandle()->proxy (ClassID_traits<CondCont<CondAttrListCollection> >::ID(),
804 i16Key.key()) == nullptr ||
805 i8Key.storeHandle()->proxy (ClassID_traits<CondCont<CondAttrListCollection> >::ID(),
806 i8Key.key()) == nullptr)
807 {
808 message("No Access To HV Information. Cannot retrieve LArHVIdMap.");
809 return;
810 }
811 SG::ReadCondHandle<CondAttrListCollection> i16 (i16Key);
812 SG::ReadCondHandle<CondAttrListCollection> i8 (i8Key);
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());
1102 const HepGeom::Transform3D &XF= Amg::EigenTransformToCLHEP(region->getAbsoluteTransform());
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;
1171 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
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}
std::vector< Identifier > ID
const EMBHVModule & getModule() const
double getPhi() const
double voltage(const EMBHVElectrode &electrode, const int &iGap) const
unsigned int beginPhiIndex() const
unsigned int endEtaIndex() const
static unsigned int endSectorIndex()
unsigned int beginEtaIndex() const
static unsigned int beginSectorIndex()
const EMBHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
EMBHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
const EMBHVElectrode & getElectrode(unsigned int iElectrode) const
double getEtaMin() const
double getPhiMax() const
double getEtaMax() const
double getPhiMin() const
unsigned int getNumElectrodes() const
Definition EMBHVModule.h:34
double voltage(const EMBPresamplerHVModule &module, const int &iGap) const
const EMBPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi) const
EMBPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
unsigned int beginPhiIndex() const
static unsigned int endSideIndex()
unsigned int beginEtaIndex() const
double getPhi() const
const EMECHVModule & getModule() const
double voltage(const EMECHVElectrode &electrode, const int &iGap) const
unsigned int beginEtaIndex() const
const EMECHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
unsigned int beginSectorIndex() const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
unsigned int endEtaIndex() const
unsigned int endSectorIndex() const
unsigned int beginPhiIndex() const
EMECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
double getEtaMax() const
const EMECHVElectrode & getElectrode(unsigned int iElectrode) const
unsigned int getNumElectrodes() const
double getPhiMin() const
double getEtaMin() const
double getPhiMax() const
double voltage(const EMECPresamplerHVModule &module, const int &iGap) const
EMECPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
const EMECPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iPhi) const
static unsigned int beginSideIndex()
FCALDetectorManager::ConstIterator beginFCAL() const
Iterate over FCAL Modules.
FCALDetectorManager::ConstIterator endFCAL() const
Iterate over FCAL Modules.
double voltage(const FCALHVLine &line) const
static unsigned int beginSideIndex()
static unsigned int endSamplingIndex()
static unsigned int endSideIndex()
static unsigned int beginSectorIndex(unsigned int iSampling)
static unsigned int beginSamplingIndex()
const FCALHVModule & getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
static unsigned int endSectorIndex(unsigned int iSampling)
FCALHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
const FCALHVLine & getHVLine(unsigned int iLine) const
static unsigned int getNumHVLines()
const HECDetectorRegion * getDetectorRegion(unsigned int endcap, unsigned int sampling, unsigned int region) const
Random Access to detector regions.
double voltage(const HECHVSubgap &subgap) const
static unsigned int beginPhiIndex()
static unsigned int endSamplingIndex()
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
static unsigned int endSideIndex()
HECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
static unsigned int beginSamplingIndex()
static unsigned int endPhiIndex()
const HECHVSubgap & getSubgap(unsigned int iElectrode) const
double getPhiMin() const
static unsigned int getNumSubgaps()
double getPhiMax() const
void message(const QString &) const
const HECHVManager & getHECHVManager() const
const EMECHVManager & getEMECHVManager(IOType IO) const
const EMECPresamplerHVManager & getEMECPresamplerHVManager() const
const FCALHVManager & getFCALHVManager() const
const EMBHVManager & getEMBHVManager() const
const EMBPresamplerHVManager & getEMBPresamplerHVManager() const
unsigned long long T
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
constexpr double tolerance

◆ deleteController()

void IVP1System::deleteController ( )
privateinherited

Definition at line 213 of file IVP1System.cxx.

214{
215 if (VP1Msg::verbose()){
216 messageVerbose("deleteController()");
217 }
218 if (m_d->controller)
219 m_d->controller->deleteLater();
220 m_d->controller = 0;
221}

◆ deselectAll()

void IVP13DSystem::deselectAll ( SoCooperativeSelection * exception_sel = 0)
virtualinherited

Reimplemented in VP1PrepRawDataSystem.

Definition at line 331 of file IVP13DSystem.cxx.

332{
333 static std::map<SoCooperativeSelection*,IVP13DSystem*>::iterator it, itE = Imp::selection2system.end();
334 for (it = Imp::selection2system.begin(); it!=itE;++it) {
335 if (it->second!=this)
336 continue;
337 if (it->first!=exception_sel) {
338 if (it->first->policy.getValue()!=SoCooperativeSelection::SINGLE) {
339 Imp::start_changeselection(this, it->first);
340 it->first->deselectAll();
341 Imp::finished_changeselection(this, it->first);
342 } else {
343 if (it->first->getList()->getLength()==1) {
344 Imp::start_changeselection(this, it->first);
345 SoPath * path = static_cast<SoPath*>(it->first->getList()->get(0));
346 Imp::made_deselection(it->first,path);
347 it->first->deselectAll();
348 Imp::finished_changeselection(this, it->first);
349 }
350 }
351 }
352 }
353}
static void start_changeselection(void *userdata, SoSelection *sel)
static void finished_changeselection(void *userdata, SoSelection *sel)
static std::map< SoCooperativeSelection *, IVP13DSystem * > selection2system
static void made_deselection(void *userdata, SoPath *path)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
path
python interpreter configuration --------------------------------------—
Definition athena.py:128

◆ detectorStore()

StoreGateSvc * IVP1System::detectorStore ( ) const
inherited

Definition at line 318 of file IVP1System.cxx.

319{
321}
static StoreGateSvc * detectorStore()

◆ disallowUpdateGUI()

void IVP1System::disallowUpdateGUI ( )
privateinherited

Definition at line 250 of file IVP1System.cxx.

251{
252 m_d->allowupdategui=false;
253}

◆ enabledPhiSectorsChanged

void VP1CaloReadoutSystem::enabledPhiSectorsChanged ( )
protectedslot

Definition at line 315 of file VP1CaloReadoutSystem.cxx.

316{
317
318 QVector<bool> v = m_clockwork->ui.phiSectionWidget->virtualSectorsEnabled(NPHISECTORS);
319 if (m_clockwork->currentlyEnabledPhiSectors == v)
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 }
332 m_clockwork->currentlyEnabledPhiSectors = v;
333 for (int iphi : justDisabledPhiSectors)
334 phiSectorTurnoff(iphi);
335 for (int iphi : justEnabledPhiSectors)
336 phiSectorTurnon(iphi);
337}

◆ ensureBuildController()

void IVP13DSystemSimple::ensureBuildController ( )
inherited

Definition at line 90 of file IVP13DSystemSimple.cxx.

91{
92 if (m_d->controllerBuilt)
93 return;
94 m_d->controllerBuilt=true;
95 if(VP1Msg::verbose()){
96 messageVerbose("IVP13DSystemSimple build controller");
97 }
98 QWidget * controller = buildController();
99 if (controller)
100 registerController(controller);
101 if(VP1Msg::verbose()){
102 messageVerbose("IVP13DSystemSimple controller was = "+str(controller));
103 }
104}
virtual QWidget * buildController()
void registerController(QWidget *)

◆ erase()

void IVP13DSystemSimple::erase ( )
privatevirtualinherited

Implements IVP1System.

Definition at line 173 of file IVP13DSystemSimple.cxx.

174{
175 if(VP1Msg::verbose()){
176 messageVerbose("IVP13DSystemSimple::erase() start");
177 }
178 assert(m_d->wascreated);
179 assert(m_d->wasrefreshed);
180
181 bool saveE = m_d->rootE->enableNotify(false);
182
183 systemerase();
184 if(VP1Msg::verbose()){
185 messageVerbose("IVP13DSystemSimple::erase() Removing all event objects from scene");
187 }
188 m_d->rootE->removeAllChildren();
189
190 if (saveE) {
191 m_d->rootE->enableNotify(true);
192 m_d->rootE->touch();
193 }
194
195 m_d->wasrefreshed=false;
196 if(VP1Msg::verbose()){
197 messageVerbose("IVP13DSystemSimple::erase() end");
198 }
199}
void warnOnDisabledNotifications() const

◆ eventStore()

StoreGateSvc * IVP1System::eventStore ( ) const
inherited

Definition at line 312 of file IVP1System.cxx.

313{
315}
static StoreGateSvc * eventStore()

◆ getCameraList()

std::set< SoCamera * > IVP13DSystem::getCameraList ( )
inherited

Definition at line 395 of file IVP13DSystem.cxx.

396{
397 std::set<SoCamera*> cameralist = m_d->staticcameras;
398 std::set<SoQtViewer*>::const_iterator it, itE=m_d->viewers.end();
399 for (it=m_d->viewers.begin();it!=itE;++it) {
400 SoCamera*cam = (*it)->getCamera();
401 if (cam)
402 cameralist.insert(cam);
403 }
404
405 //m_d->camerasfromviewer
406 return cameralist;
407}

◆ getSceneGraph()

SoSeparator * IVP13DSystemSimple::getSceneGraph ( ) const
privatevirtualinherited

Implements IVP13DSystem.

Definition at line 127 of file IVP13DSystemSimple.cxx.

128{
129 return static_cast<SoSeparator*>(m_d->root);
130}

◆ inactiveSystemTurnedActive

void IVP1System::inactiveSystemTurnedActive ( )
signalinherited

◆ information()

const QString & IVP1System::information ( ) const
inherited

Definition at line 56 of file IVP1System.cxx.

57{
58 return m_d->information;
59}

◆ isRefreshing()

bool IVP1System::isRefreshing ( )
privateinherited

Definition at line 108 of file IVP1System.cxx.

109{
110 return m_d->refreshing;
111}

◆ itemFromSystemSelected

void IVP13DSystem::itemFromSystemSelected ( )
signalinherited

◆ message() [1/3]

void IVP1System::message ( const QString & str) const
inherited

Definition at line 336 of file IVP1System.cxx.

337{
338 if (receivers(SIGNAL(sysmessage(QString))) > 0){
340 }
341 else{
342 std::cout<<VP1Msg::prefix_msg()<<" ["<<m_d->name.toStdString()<<"]: "<<str.toStdString()<<std::endl;
343 }
344}
void sysmessage(QString) const
static const char * prefix_msg()
Definition VP1Msg.h:56

◆ message() [2/3]

void IVP1System::message ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 400 of file IVP1System.cxx.

401{
402 if (addtostart.isEmpty()) {
403 message(l,addtoend);
404 return;
405 }
406 if (addtoend.isEmpty()) {
407 for (const QString& s : l)
408 message(addtostart+s);
409 } else {
410 for (const QString& s : l)
411 message(addtostart+s+addtoend);
412 }
413}

◆ message() [3/3]

void IVP1System::message ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 362 of file IVP1System.cxx.

363{
364 if (addtoend.isEmpty()) {
365 for (const QString& s : l)
366 message(s);
367 } else {
368 for (const QString& s : l)
369 message(s+addtoend);
370 }
371}

◆ messageDebug() [1/3]

void IVP1System::messageDebug ( const QString & str) const
inherited

Definition at line 347 of file IVP1System.cxx.

348{
349 if (VP1Msg::debug())
350 std::cout<<VP1Msg::prefix_debug()<<" ["<<m_d->name.toStdString()<<"]: "<<str.toStdString()<<std::endl;
351}
static bool debug()
Definition VP1Msg.h:32
static const char * prefix_debug()
Definition VP1Msg.h:57

◆ messageDebug() [2/3]

void IVP1System::messageDebug ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 416 of file IVP1System.cxx.

417{
418 if (addtostart.isEmpty()) {
419 messageDebug(l,addtoend);
420 return;
421 }
422 if (addtoend.isEmpty()) {
423 for (const QString& s : l)
424 messageDebug(addtostart+s);
425 } else {
426 for (const QString& s : l)
427 messageDebug(addtostart+s+addtoend);
428 }
429}

◆ messageDebug() [3/3]

void IVP1System::messageDebug ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 374 of file IVP1System.cxx.

375{
376 if (addtoend.isEmpty()) {
377 for (const QString& s : l)
378 messageDebug(s);
379 } else {
380 for (const QString& s : l)
381 messageDebug(s+addtoend);
382 }
383}

◆ messageVerbose() [1/3]

void IVP1System::messageVerbose ( const QString & str) const
inherited

Definition at line 354 of file IVP1System.cxx.

355{
356 if (VP1Msg::verbose())
357 std::cout<<VP1Msg::prefix_verbose()<<" ["<<m_d->name.toStdString()<<"]: "<<str.toStdString()<<std::endl;
358}
static const char * prefix_verbose()
Definition VP1Msg.h:59

◆ messageVerbose() [2/3]

void IVP1System::messageVerbose ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 432 of file IVP1System.cxx.

433{
434 if (!VP1Msg::verbose())
435 return;
436 if (addtostart.isEmpty()) {
437 messageVerbose(l,addtoend);
438 return;
439 }
440 if (addtoend.isEmpty()) {
441 for (const QString& s : l)
442 messageVerbose(addtostart+s);
443 } else {
444 for (const QString& s : l)
445 messageVerbose(addtostart+s+addtoend);
446 }
447}

◆ messageVerbose() [3/3]

void IVP1System::messageVerbose ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 386 of file IVP1System.cxx.

387{
388 if (!VP1Msg::verbose())
389 return;
390 if (addtoend.isEmpty()) {
391 for (const QString& s : l)
393 } else {
394 for (const QString& s : l)
395 messageVerbose(s+addtoend);
396 }
397}

◆ name()

const QString & IVP1System::name ( ) const
inherited

Definition at line 50 of file IVP1System.cxx.

51{
52 return m_d->name;
53}

◆ needErase

void IVP1System::needErase ( )
signalinherited

◆ phiSectorTurnoff

void VP1CaloReadoutSystem::phiSectorTurnoff ( int p)
protectedslot

Definition at line 1620 of file VP1CaloReadoutSystem.cxx.

1620 {
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}

◆ phiSectorTurnon

void VP1CaloReadoutSystem::phiSectorTurnon ( int p)
protectedslot

Definition at line 1611 of file VP1CaloReadoutSystem.cxx.

1611 {
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}

◆ positionOptionChanged

void VP1CaloReadoutSystem::positionOptionChanged ( )
protectedslot

Definition at line 1566 of file VP1CaloReadoutSystem.cxx.

1566 {
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());
1600 m_clockwork->EMECHVMap.erase(m_clockwork->EMECHVMap.begin(),m_clockwork->EMECHVMap.end());
1601 m_clockwork->HECHVMap.erase(m_clockwork->HECHVMap.begin(),m_clockwork->HECHVMap.end());
1602 m_clockwork->FCALHVMap.erase(m_clockwork->FCALHVMap.begin(),m_clockwork->FCALHVMap.end());
1603
1604 m_clockwork->volatileSeparator->removeAllChildren();
1605
1606 createEtaPhi();
1607 }
1608
1609}

◆ refresh()

void IVP13DSystemSimple::refresh ( StoreGateSvc * storegate)
privatevirtualinherited

Implements IVP1System.

Definition at line 146 of file IVP13DSystemSimple.cxx.

147{
148 assert(m_d->wascreated);
149 assert(!m_d->wasrefreshed);
150
151 if (m_d->first) {
152 if(VP1Msg::verbose()){
153 messageVerbose("IVP13DSystemSimple first refresh - so calling create methods (i.e. delayed create).");
154 }
156 m_d->first = false;
157 m_d->root->removeChild(m_d->rootR);
159 m_d->root->addChild(m_d->rootR);
160 }
161
162 m_d->root->removeChild(m_d->rootE);
163 updateGUI();
164 buildEventSceneGraph(sg, m_d->rootE);
165 updateGUI();
166 m_d->root->addChild(m_d->rootE);
167
168 m_d->wasrefreshed=true;
169
170}
virtual void systemcreate(StoreGateSvc *detstore)
virtual void buildPermanentSceneGraph(StoreGateSvc *detstore, SoSeparator *root)
virtual void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)=0
StoreGateSvc * detectorStore() const

◆ registerCamera()

void IVP13DSystem::registerCamera ( SoCamera * camera)
inherited

Definition at line 410 of file IVP13DSystem.cxx.

410 {
411 if (!cam)
412 return;
413 m_d->staticcameras.insert(cam);
414 cam->ref();
415}

◆ registerController()

void IVP1System::registerController ( QWidget * w)
protectedinherited

Definition at line 224 of file IVP1System.cxx.

225{
226 if (VP1Msg::verbose()) {
227 messageVerbose("registerController ");
228 messageVerbose("registerController m_d->canregistercontroller = "+QString(m_d->canregistercontroller?"true":"false"));
229 messageVerbose("registerController m_d->state==CONSTRUCTED = "+QString(m_d->state==CONSTRUCTED?"true":"false"));
230 messageVerbose("registerController m_d->controller==0 = "+QString(m_d->controller==0?"true":"false"));
231 messageVerbose("registerController w!=0 = "+QString(w!=0?"true":"false"));
232 }
233 if (!m_d->canregistercontroller)
234 message("ERROR: Please don't register controllers after create().");
235 if (m_d->state!=CONSTRUCTED)
236 message("ERROR: Please only register controllers in CONSTRUCTED state.");
237 if (!w) {
238 message("ERROR: Attempt to register null controller.");
239 return;
240 }
241 if (m_d->controller) {
242 message("ERROR: Attempt to register controller twice.");
243 return;
244 }
245 m_d->controller = w;
246 w->setParent(0);
247}

◆ registerSelectionNode()

void IVP13DSystem::registerSelectionNode ( SoCooperativeSelection * selection)
inherited

Definition at line 257 of file IVP13DSystem.cxx.

258{
259 if (!selection) {
260 message("registerSelectionNode Error: NULL selection pointer!");
261 return;
262 }
264 message("registerSelectionNode Error: Trying to register selection node more than once!");
265 return;
266 }
267
268 selection->addSelectionCallback( Imp::made_selection, selection );
269 selection->addDeselectionCallback( Imp::made_deselection, selection );
270 selection->addStartCallback( Imp::start_changeselection, this );
271 selection->addFinishCallback( Imp::finished_changeselection, this );
272 selection->addClickOutsideCallback( Imp::clickedoutside, this );
273
275 selection->ref();
276
277 messageVerbose("selection node registered");
278}
static void clickedoutside(void *userdata, SoCooperativeSelection *sel)
static void made_selection(void *userdata, SoPath *path)
const std::string selection
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:138

◆ registerViewer()

void IVP13DSystem::registerViewer ( SoQtViewer * viewer)
inherited

Definition at line 418 of file IVP13DSystem.cxx.

419{
420 if (!viewer)
421 return;
422 m_d->viewers.insert(viewer);
423}

◆ restoreFromState()

void VP1CaloReadoutSystem::restoreFromState ( QByteArray ba)
virtual

Reimplemented from IVP1System.

Definition at line 2479 of file VP1CaloReadoutSystem.cxx.

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}
virtual void restoreFromState(QByteArray)
State state() const
QWidget * controllerWidget()

◆ saveState()

QByteArray VP1CaloReadoutSystem::saveState ( )
virtual

Reimplemented from IVP1System.

Definition at line 2429 of file VP1CaloReadoutSystem.cxx.

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}
virtual QByteArray saveState()
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors

◆ serviceLocator()

ISvcLocator * IVP1System::serviceLocator ( ) const
inherited

Definition at line 324 of file IVP1System.cxx.

325{
327}
static ISvcLocator * serviceLocator()

◆ setActiveState()

void IVP1System::setActiveState ( const ActiveState & s,
const bool & donttriggererase = true )
privateinherited

Definition at line 162 of file IVP1System.cxx.

163{
164 //First handle case where we dont actually change state. Only
165 //special consideration is OFF->OFF where we have to do something if
166 //we need to erase:
167 if (m_d->activeState==OFF&&s==OFF&&(m_d->state==REFRESHED||m_d->refreshing)&&!donttriggererase) {
168 needErase();
169 m_d->channel->emitRefreshInfoChanged();
170 return;
171 } else if (m_d->activeState==s) {
172 m_d->channel->emitRefreshInfoChanged();
173 return;
174 }
175
176 //Ok, we know that we are either ON->OFF or OFF->ON.
177 m_d->activeState = s;
178
179 if (s==ON) {
180 //OFF->ON: We might need a refresh, so send out a signal for the scheduler:
182 } else {
183 //ON->OFF: We might need an erase signal:
184 if ((m_d->state==REFRESHED||m_d->refreshing)&&!donttriggererase) {
185 needErase();
186 }
187 }
188 m_d->channel->emitRefreshInfoChanged();
189}
void inactiveSystemTurnedActive()
void needErase()

◆ setCanRegisterController()

void IVP1System::setCanRegisterController ( const bool & c)
privateinherited

Definition at line 285 of file IVP1System.cxx.

286{
287 if (VP1Msg::verbose()){
288 messageVerbose("setCanRegisterController called with"+QString(c?"true":"false"));
289 }
290 m_d->canregistercontroller=c;
291}

◆ setChannel()

void IVP1System::setChannel ( IVP1ChannelWidget * cw)
privateinherited

Definition at line 94 of file IVP1System.cxx.

95{
96 if (VP1Msg::verbose()) {
97 messageVerbose("setChannel ");
98 messageVerbose("setChannel m_d->state==CONSTRUCTED = "+QString(m_d->state==CONSTRUCTED?"true":"false"));
99 messageVerbose("setChannel cw!=0 = "+QString(cw!=0?"true":"false"));
100 }
101 assert(!m_d->channel);
102 assert(cw);
103 assert(m_d->state==CONSTRUCTED);
104 m_d->channel = cw;
105}

◆ setGeomSelectable

void VP1CaloReadoutSystem::setGeomSelectable ( bool flag)
protectedslot

Definition at line 1552 of file VP1CaloReadoutSystem.cxx.

1552 {
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}
bool flag
Definition master.py:29

◆ setRefreshing()

void IVP1System::setRefreshing ( const bool & b)
privateinherited

Definition at line 114 of file IVP1System.cxx.

115{
116 if (VP1Msg::verbose()){
117 messageVerbose("setRefreshing() called with b="+QString(b?"true":"false"));
118 }
119 if (b) {
120 assert(m_d->state==ERASED);
121 } else {
122 assert(m_d->state==REFRESHED);
123 }
124 m_d->refreshing = b;
125}

◆ setState()

void IVP1System::setState ( const State & s)
privateinherited

Definition at line 141 of file IVP1System.cxx.

142{
143#ifndef NDEBUG
144 assert (m_d->state != s);
145 assert(s!=CONSTRUCTED);
146 if (s==REFRESHED) {
147 assert(m_d->state==ERASED);
148 }
149 if (s==ERASED) {
150 assert(m_d->state==REFRESHED||m_d->state==CONSTRUCTED);
151 }
152 if (s==UNCREATED) {
153 assert(m_d->state==ERASED);
154 }
155#endif
156 m_d->state = s;
157 if (s==REFRESHED||s==ERASED)
158 m_d->channel->emitRefreshInfoChanged();
159}

◆ setUserSelectionNotificationsEnabled()

void IVP13DSystem::setUserSelectionNotificationsEnabled ( SoCooperativeSelection * sel,
bool enabled )
inherited

Definition at line 310 of file IVP13DSystem.cxx.

311{
312 if (!selection) {
313 message("setUserSelectionNotificationsEnabled Error: NULL selection pointer!");
314 return;
315 }
317 message("setUserSelectionNotificationsEnabled Error: Called for selection which was never registered!");
318 return;
319 }
320 if (enabled != m_d->selectionsWithDisabledNotifications.contains(selection))
321 return;
322
323 if (enabled)
324 m_d->selectionsWithDisabledNotifications.remove(selection);
325 else
326 m_d->selectionsWithDisabledNotifications << selection;
327
328}

◆ state()

IVP1System::State IVP1System::state ( ) const
inherited

Definition at line 129 of file IVP1System.cxx.

130{
131 return m_d->state;
132}

◆ storeGate()

StoreGateSvc * IVP1System::storeGate ( ) const
inlineinherited

Definition at line 119 of file IVP1System.h.

119{ return eventStore(); }//OBSOLETE NAME. Use eventStore() instead.
StoreGateSvc * eventStore() const

◆ str() [1/30]

QString VP1String::str ( const Amg::Vector3D & t)
inlinestaticinherited

Definition at line 98 of file VP1String.h.

98{ return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [2/30]

QString VP1String::str ( const bool b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

53{ return b?"True":"False"; }

◆ str() [3/30]

QString VP1String::str ( const char * c)
inlinestaticinherited

Definition at line 50 of file VP1String.h.

50{ return c; }

◆ str() [4/30]

QString VP1String::str ( const double & d)
inlinestaticinherited

Definition at line 81 of file VP1String.h.

81{ return QString::number(d); }

◆ str() [5/30]

QString VP1String::str ( const float & f)
inlinestaticinherited

Definition at line 82 of file VP1String.h.

82{ return QString::number(f); }

◆ str() [6/30]

template<class T>
QString VP1String::str ( const HepGeom::BasicVector3D< T > & t)
inlinestaticinherited

Definition at line 95 of file VP1String.h.

95{ return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [7/30]

QString VP1String::str ( const QColor & c)
staticinherited

Definition at line 30 of file VP1String.cxx.

31{
32 return c.isValid() ? c.name() : "Invalid";
33}

◆ str() [8/30]

template<class T>
QString VP1String::str ( const QFlags< T > & f)
inlinestaticinherited

Definition at line 91 of file VP1String.h.

91{ return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }

◆ str() [9/30]

template<class T>
QString VP1String::str ( const QList< T > & t)
inlinestaticinherited

Definition at line 102 of file VP1String.h.

102{ return "QList of size"+QString::number(t.size()); }

◆ str() [10/30]

QString VP1String::str ( const QString & s)
inlinestaticinherited

Definition at line 49 of file VP1String.h.

49{ return s; }

◆ str() [11/30]

QString VP1String::str ( const SbColor & c)
staticinherited

Definition at line 36 of file VP1String.cxx.

37{
39}
static QColor sbcol2qcol(const SbColor &)

◆ str() [12/30]

QString VP1String::str ( const SbVec2d & v)
staticinherited

Definition at line 61 of file VP1String.cxx.

61{ double x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [13/30]

QString VP1String::str ( const SbVec2f & v)
staticinherited

Definition at line 62 of file VP1String.cxx.

62{ float x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [14/30]

QString VP1String::str ( const SbVec2s & v)
staticinherited

Definition at line 63 of file VP1String.cxx.

63{ short x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [15/30]

QString VP1String::str ( const SbVec3d & v)
staticinherited

Definition at line 64 of file VP1String.cxx.

64{ double x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [16/30]

QString VP1String::str ( const SbVec3f & v)
staticinherited

Definition at line 65 of file VP1String.cxx.

65{ float x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [17/30]

QString VP1String::str ( const SbVec3s & v)
staticinherited

Definition at line 66 of file VP1String.cxx.

66{ short x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [18/30]

QString VP1String::str ( const SbVec4d & v)
staticinherited

Definition at line 67 of file VP1String.cxx.

67{ double x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [19/30]

QString VP1String::str ( const SbVec4f & v)
staticinherited

Definition at line 68 of file VP1String.cxx.

68{ float x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [20/30]

template<class T>
QString VP1String::str ( const T * t)
inlinestaticinherited

Definition at line 87 of file VP1String.h.

87{ return str(static_cast<const void* >(t)); }

◆ str() [21/30]

QString VP1String::str ( const void * p)
staticinherited

Definition at line 48 of file VP1String.cxx.

49{
50 if (p) {
51 std::ostringstream s;
52 s << p;
53 // Explicitly naming QString here avoids a cppcheck warning.
54 return QString (s.str().c_str());
55 } else {
56 return "NULL";
57 }
58}

◆ str() [22/30]

QString VP1String::str ( const VP1Interval & i)
staticinherited

Definition at line 42 of file VP1String.cxx.

43{
44 return i.toString();
45}

◆ str() [23/30]

QString VP1String::str ( int n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

77{ return QString::number(n); }

◆ str() [24/30]

QString VP1String::str ( long n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

75{ return QString::number(n); }

◆ str() [25/30]

QString VP1String::str ( qlonglong n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

79{ return QString::number(n); }

◆ str() [26/30]

QString VP1String::str ( qulonglong n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

80{ return QString::number(n); }

◆ str() [27/30]

QString VP1String::str ( short int n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

73{ return QString::number(n); }

◆ str() [28/30]

QString VP1String::str ( uint n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

78{ return QString::number(n); }

◆ str() [29/30]

QString VP1String::str ( ulong n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

76{ return QString::number(n); }

◆ str() [30/30]

QString VP1String::str ( unsigned short int n)
inlinestaticinherited

Definition at line 74 of file VP1String.h.

74{ return QString::number(n); }

◆ sysmessage

void IVP1System::sysmessage ( QString ) const
signalinherited

◆ systemcreate()

void VP1CaloReadoutSystem::systemcreate ( StoreGateSvc * detstore)
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 339 of file VP1CaloReadoutSystem.cxx.

340{
341}

◆ systemerase()

void IVP13DSystemSimple::systemerase ( )
virtualinherited

Reimplemented in VP1AODSystem, VP1CaloCellSystem, VP1CaloClusterSystem, VP1CaloHitLegoSystem, VP1CaloLegoSystem, VP1MissingEtSystem, VP1PrepRawDataSystem, VP1RawDataSystem, VP1TrackSystem, and VP1VertexSystem.

Definition at line 28 of file IVP13DSystemSimple.cxx.

29{
30 // messageVerbose("WARNING: Did not reimplement systemerase!");
31}

◆ systemuncreate()

void IVP13DSystemSimple::systemuncreate ( )
virtualinherited

◆ toolSvc()

IToolSvc * IVP1System::toolSvc ( ) const
inherited

Definition at line 330 of file IVP1System.cxx.

331{
332 return VP1AthenaPtrs::toolSvc();
333}
static IToolSvc * toolSvc()

◆ uncreate()

void IVP13DSystemSimple::uncreate ( )
privatevirtualinherited

Reimplemented from IVP1System.

Definition at line 202 of file IVP13DSystemSimple.cxx.

203{
204
205 if(VP1Msg::verbose()){
206 messageDebug("uncreate()...");
207 }
208
209 assert(m_d->wascreated);
210 assert(!m_d->wasrefreshed);
211 m_d->rootE->enableNotify(false);
212 m_d->rootR->enableNotify(false);
214 m_d->root->removeAllChildren();
215 m_d->rootE->removeAllChildren();
216 m_d->rootR->removeAllChildren();
217 m_d->wascreated=false;
218}
virtual void systemuncreate()

◆ unregisterSelectionNode()

void IVP13DSystem::unregisterSelectionNode ( SoCooperativeSelection * selection)
inherited

Definition at line 281 of file IVP13DSystem.cxx.

282{
283 if (!selection) {
284 message("unregisterSelectionNode Error: NULL selection pointer!");
285 return;
286 }
288 message("registerSelectionNode Error: Trying to unregister unknown selection node!");
289 return;
290 }
291
292 selection->removeSelectionCallback( Imp::made_selection, selection );
293 selection->removeDeselectionCallback( Imp::made_deselection, selection );
294 selection->removeStartCallback( Imp::start_changeselection, this );
295 selection->removeFinishCallback( Imp::finished_changeselection, this );
296 selection->removeClickOutsideCallback( Imp::clickedoutside, this );
297
299 if (m_d->selectionsWithDisabledNotifications.contains(selection))
300 m_d->selectionsWithDisabledNotifications.remove(selection);
301 selection->unref();
302
303 messageVerbose("selection node unregistered");
304
305}

◆ updateGUI()

void IVP13DSystemSimple::updateGUI ( )
inlineinherited

Definition at line 89 of file IVP13DSystemSimple.h.

◆ userChangedSelection()

void IVP13DSystem::userChangedSelection ( SoCooperativeSelection * ,
const QSet< SoNode * > & ,
QSet< SoPath * >  )
virtualinherited

◆ userClickedOnBgd()

void VP1CaloReadoutSystem::userClickedOnBgd ( )
virtual

Reimplemented from IVP13DSystem.

Definition at line 1714 of file VP1CaloReadoutSystem.cxx.

1714 {
1715 messageVerbose("VP1CaloReadoutSystem::userClickedOnBgd");
1716 m_clockwork->volatileSeparator->removeAllChildren();
1717 deselectAll();
1718}
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)

◆ userDeselectedSingleNode()

void IVP13DSystem::userDeselectedSingleNode ( SoCooperativeSelection * ,
SoNode * ,
SoPath *  )
virtualinherited

Reimplemented in VP1AODSystem, VP1PrepRawDataSystem, and VP1TrackSystem.

Definition at line 60 of file IVP13DSystem.cxx.

60{}

◆ userPickedNode()

void VP1CaloReadoutSystem::userPickedNode ( SoNode * pickedNode,
SoPath * pickedPath )
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 1720 of file VP1CaloReadoutSystem.cxx.

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
1865 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
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();
1914 const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
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());
2015 const HepGeom::Transform3D &XF= Amg::EigenTransformToCLHEP(region->getAbsoluteTransform());
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
2092 EMECCell::CELLPOS pos=EMECCell::FRONT;
2093 if (m_clockwork->pos==BACK) pos=EMECCell::BACK;
2094 if (m_clockwork->pos==CENTER) pos=EMECCell::CENTER;
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
2188 EMECCell::CELLPOS pos=EMECCell::FRONT;
2189 if (m_clockwork->pos==BACK) pos=EMECCell::BACK;
2190 if (m_clockwork->pos==CENTER) pos=EMECCell::CENTER;
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
2290 EMBCell::CELLPOS pos=EMBCell::FRONT;
2291 if (m_clockwork->pos==BACK) pos=EMBCell::BACK;
2292 if (m_clockwork->pos==CENTER) pos=EMBCell::CENTER;
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
2363 EMBCell::CELLPOS pos=EMBCell::FRONT;
2364 if (m_clockwork->pos==BACK) pos=EMBCell::BACK;
2365 if (m_clockwork->pos==CENTER) pos=EMBCell::CENTER;
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}
@ Presampler
#define I(x, y, z)
Definition MD5.cxx:116
@ Phi
Definition RPCdef.h:8
@ Eta
Definition RPCdef.h:8
#define deg
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
Status
Athena specific StatusCode values.
str index
Definition DeMoScan.py:362
std::pair< long int, long int > indices

◆ userSelectedSingleNode()

void IVP13DSystem::userSelectedSingleNode ( SoCooperativeSelection * ,
SoNode * ,
SoPath *  )
virtualinherited

Reimplemented in VP1AODSystem, VP1PrepRawDataSystem, and VP1TrackSystem.

Definition at line 59 of file IVP13DSystem.cxx.

59{}

◆ verbose()

bool IVP1System::verbose ( )
inlinestaticinherited

Definition at line 86 of file IVP1System.h.

86{ return s_vp1verbose; }// Returns true if env var VP1_VERBOSE_OUTPUT=1
static const bool s_vp1verbose
Definition IVP1System.h:158

◆ warnOnDisabledNotifications()

void IVP13DSystemSimple::warnOnDisabledNotifications ( ) const
inherited

Definition at line 221 of file IVP13DSystemSimple.cxx.

222{
223 QList<SoNode*> nodesR;
224 QList<SoNode*> nodesE;
225 m_d->getNodesWithDisabledNotifications(m_d->rootR, nodesR);
226 m_d->getNodesWithDisabledNotifications(m_d->rootE, nodesE);
227 if (!nodesR.isEmpty()) {
228 message("WARNING: Found "+str(nodesR.count())+" node"+QString(nodesR.count()>1?"s":0)+" with disabled notifications in permanent scenegraph:");
229 for (SoNode * node : nodesR)
230 message(" => Node ("+str(node)+") of type "+QString(node->getTypeId().getName().getString())+", named "+QString(node->getName().getString()));
231 }
232 if (!nodesE.isEmpty()) {
233 message("WARNING: Found "+str(nodesE.count())+" node"+QString(nodesE.count()>1?"s":0)+" with disabled notifications in event scenegraph:");
234 for (SoNode * node : nodesE)
235 message(" => Node ("+str(node)+") of type "+QString(node->getTypeId().getName().getString())+", named "+QString(node->getName().getString()));
236 }
237}

Member Data Documentation

◆ m_clockwork

Clockwork* VP1CaloReadoutSystem::m_clockwork
private

Definition at line 54 of file VP1CaloReadoutSystem.h.

◆ m_d

Imp* IVP13DSystemSimple::m_d
privateinherited

Definition at line 80 of file IVP13DSystemSimple.h.

◆ s_vp1verbose

const bool IVP1System::s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
staticprivateinherited

Definition at line 158 of file IVP1System.h.


The documentation for this class was generated from the following files: