ATLAS Offline Software
PhiSectorManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Implementation of class PhiSectorManager //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial VP1 version: September 2007 //
12 // //
14 
18 #include "VP1Base/VP1Msg.h"
19 #include "VP1Base/IVP1System.h"
21 
22 #include <VP1HEPVis/nodes/SoTubs.h>
24 #include "VP1HEPVis/nodes/SoCons.h"
25 #include "VP1HEPVis/nodes/SoLAr.h"
26 
27 #include <Inventor/nodes/SoSwitch.h>
28 #include <Inventor/nodes/SoSeparator.h>
29 #include <Inventor/actions/SoGetBoundingBoxAction.h>
30 
31 #include <Inventor/SbLinear.h>
32 #include <Inventor/SbViewportRegion.h>
33 
34 #include <map>
35 #include <set>
36 #include <cmath>
37 
38 #define NPHISECTORS 36
39 
40 //____________________________________________________________________
42 public:
44  IVP1System * system = nullptr;
45 
46  std::map<VP1GeoFlags::SubSystemFlag,SoSeparator *> subsysflag2sep;
47  std::map<VP1GeoFlags::SubSystemFlag,SoSeparator *> subsysflag2labelsep;
48  std::map<VP1GeoFlags::SubSystemFlag,std::map<int,VP1ExtraSepLayerHelper*> > subsysflag_2_iphi2sephelper;
49  std::map<VP1GeoFlags::SubSystemFlag,std::map<int,VP1ExtraSepLayerHelper*> > subsysflag_2_iphi2labelsephelper;
50  std::map<VP1GeoFlags::SubSystemFlag,VP1ExtraSepLayerHelper*> subsysflag_2_volAroundZSepHelper;
51 
52  //NB: If in the future we implement the phi-sector switching on a per-subsystem basis, just keep track of which switches are from which subsystems:
53  std::map<int,std::set<SoSwitch*> > iphi2switches;
54  std::map<int,std::set<SoSwitch*> > iphi2Labelswitches;
55 
56  //The rest of the stuff is for the dynamical "slicing" of volumes around the Z-axis:
57  std::map<SoSwitch*,std::pair<SoTubs*,SoSeparator*> > volaroundZ_tubs;
58  std::map<SoSwitch*,std::pair<SoPcons*,SoSeparator*> > volaroundZ_pcons;
59  std::map<SoSwitch*,std::pair<SoCons*,SoSeparator*> > volaroundZ_cons;
60  std::map<SoSwitch*,std::pair<SoLAr*,SoSeparator*> > volaroundZ_lar;
61  std::map<SoSwitch*,std::pair<double,bool> > volaroundZ_switch2transfinfo;//switch -> phi rotation around z and rotated around y flag.
62  template <class T>
63  void updateRepresentationsOfVolsAroundZAxis_Specific(std::map<SoSwitch*,std::pair<T*,SoSeparator*> >& volaroundZ);
64  void getPhiExtentOfShape( const SoTubs* tubs, double& phistart, double& phispan);
65  void getPhiExtentOfShape( const SoPcons* pcons, double& phistart, double& phispan);
66  void getPhiExtentOfShape( const SoCons* cons, double& phistart, double& phispan);
67  void getPhiExtentOfShape( const SoLAr* lar, double& phistart, double& phispan);
68  void copyShapeFieldsAndOverridePhiRange( const SoTubs* source, SoTubs* dest, double phistart, double phispan);
69  void copyShapeFieldsAndOverridePhiRange( const SoPcons* source, SoPcons* dest, double phistart, double phispan);
70  void copyShapeFieldsAndOverridePhiRange( const SoCons* source, SoCons* dest, double phistart, double phispan);
71  void copyShapeFieldsAndOverridePhiRange( const SoLAr* source, SoLAr* dest, double phistart, double phispan);
73 
75 };
76 
77 //____________________________________________________________________
79 {
80  assert(m_d->subsysflag2sep.find(flag)==m_d->subsysflag2sep.end());
82  m_d->subsysflag_2_iphi2sephelper[flag] = std::map<int,VP1ExtraSepLayerHelper*>();
83  m_d->subsysflag2sep[flag] = subsystemsep;
84 
85  assert(m_d->subsysflag2labelsep.find(flag)==m_d->subsysflag2labelsep.end());
87  m_d->subsysflag_2_iphi2labelsephelper[flag] = std::map<int,VP1ExtraSepLayerHelper*>();
88  m_d->subsysflag2labelsep[flag] = subsystemsep;
89 }
90 
91 //____________________________________________________________________
93 {
94  assert(iphi>=-1);
95  assert(m_d->subsysflag2sep.find(flag)!=m_d->subsysflag2sep.end());
97 
99  return m_d->subsysflag_2_iphi2sephelper[flag][iphi];
100  }
101 
102  SoSwitch * sw = new SoSwitch;
103  sw->whichChild = (iphi>=0 ? m_d->phisectionwidget->virtualSectorEnabled(iphi,NPHISECTORS):!m_d->phisectionwidget->allSectorsOff()) ? SO_SWITCH_ALL : SO_SWITCH_NONE;
104 
105  m_d->iphi2switches[iphi].insert(sw);
106 
107  SoSeparator * sep = new SoSeparator;
108  sep->ref();
110  m_d->subsysflag_2_iphi2sephelper[flag][iphi] = sephelper;
111 
112  sw->addChild(sep);
113  m_d->subsysflag2sep[flag]->addChild(sw);
114  return sephelper;
115 }
116 
117 //____________________________________________________________________
119 {
120  assert(iphi>=-1);
121  assert(m_d->subsysflag2labelsep.find(flag)!=m_d->subsysflag2labelsep.end());
123 
126  }
127 
128  SoSwitch * sw = new SoSwitch;
129  sw->whichChild = (iphi>=0 ? m_d->phisectionwidget->virtualSectorEnabled(iphi,NPHISECTORS):!m_d->phisectionwidget->allSectorsOff()) ? SO_SWITCH_ALL : SO_SWITCH_NONE;
130 
131  m_d->iphi2Labelswitches[iphi].insert(sw);
132 
133  SoSeparator * sep = new SoSeparator;
134  sep->ref();
136  m_d->subsysflag_2_iphi2labelsephelper[flag][iphi] = sephelper;
137 
138  sw->addChild(sep);
139  m_d->subsysflag2labelsep[flag]->addChild(sw);
140  return sephelper;
141 }
142 
143 //____________________________________________________________________
145 {
146  //Assumes that the switch, sw, has the unsliced shape node as the
147  //first child (0) and a separator as the second child (1), under
148  //which shapes representing the phi-sliced shape will be placed.
149 
150  //If not all phi sectors are visible, the sep node will be
151  //populated with children representing the shape cut up
152  //appropriately, and the switch will show the sep rather than the
153  //shapeWithAllPhiSectors.
154 
155  assert(sw->getNumChildren()==2);
156 // assert(sw->getChild(0)->getTypeId().isDerivedFrom(SoShape::getClassTypeId()));
157  assert(sw->getChild(1)->getTypeId()==SoSeparator::getClassTypeId());
158 
159  SoNode* shape = static_cast<SoShape*>(sw->getChild(0));
160  SoSeparator* sep = static_cast<SoSeparator*>(sw->getChild(1));
161 
162  //Start unsliced:
163  if (sw->whichChild.getValue() != 0)
164  sw->whichChild = 0;
165 
166  // Register the shape according to type:
167  if (shape->getTypeId()==SoTubs::getClassTypeId()) {
168  m_d->volaroundZ_tubs[sw] = std::pair<SoTubs*,SoSeparator*>(static_cast<SoTubs*>(shape),sep);
169  } else if (shape->getTypeId()==SoPcons::getClassTypeId()) {
170  m_d->volaroundZ_pcons[sw] = std::pair<SoPcons*,SoSeparator*>(static_cast<SoPcons*>(shape),sep);
171  } else if (shape->getTypeId()==SoCons::getClassTypeId()) {
172  m_d->volaroundZ_cons[sw] = std::pair<SoCons*,SoSeparator*>(static_cast<SoCons*>(shape),sep);
173  } else {
174  assert(shape->getTypeId()==SoLAr::getClassTypeId());
175  m_d->volaroundZ_lar[sw] = std::pair<SoLAr*,SoSeparator*>(static_cast<SoLAr*>(shape),sep);
176  }
177 
178  //Test: Are we roughly given by a rotation around the y-axis?
179  SbVec3f unitz (0.0f, 0.0f, 1.0f);
180  SbVec3f transfunitz;
181 
182  SbVec3f translation; SbRotation rotation; SbVec3f scaleFactor; SbRotation scaleOrientation;
183  transf.getTransform (translation, rotation, scaleFactor, scaleOrientation);
184 
185  rotation.multVec(unitz,transfunitz);
186 
187  float x,y,z;
188  transfunitz.getValue(x,y,z);
189  //Look at direction in x-z plane - is it consistent with z<0 and |x|<<|z|? Then we have rotated around y:
190  bool rotaroundy = (z<0&&std::fabs(x)*10<std::fabs(z));
191 
192  //Test: Whats the rough value we are rotated around z?
193  SbVec3f unitx (1.0f, 0.0f, 0.0f);
194  SbVec3f transfunitx;
195  rotation.multVec(unitx,transfunitx);
196  transfunitx.getValue(x,y,z);
197  double phirot = VP1LinAlgUtils::phiFromXY(x, y );
198  m_d->volaroundZ_switch2transfinfo[sw] = std::pair<double,bool>(phirot,rotaroundy);
199 
200  //Return the sephelper for this subsystems volumes around Z:
203 
204  SoSeparator * subsyssep_volaroundZ = new SoSeparator;
205  assert(m_d->subsysflag2sep.find(flag)!=m_d->subsysflag2sep.end());
206  m_d->subsysflag2sep[flag]->addChild(subsyssep_volaroundZ);
207 
208  subsyssep_volaroundZ->ref();
209  VP1ExtraSepLayerHelper * sephelper = new VP1ExtraSepLayerHelper(subsyssep_volaroundZ);
211  return sephelper;
212 }
213 
214 //____________________________________________________________________
215 int PhiSectorManager::getVolumeType(const SbMatrix& transform, SoNode * shape) const {
216  if (!shape) {
217  VP1Msg::message("ERROR: getVolumeType got a NULL shape pointer");
218  return 0;
219  }
220 
221  //Step 1) Find the (projected) bounding box.
222  shape->ref();
223  SbViewportRegion dummyvp;
224  SoGetBoundingBoxAction a(dummyvp);//Fixme: Cache this guy?
225  a.apply(shape);
226  SbXfBox3f xfbox = a.getXfBoundingBox();
227  xfbox.transform(transform);
228  SbBox3f box = xfbox.project();
229  shape->unrefNoDelete();
230 
231  //Step 2) Does it enclose the Z-axis?
232  float minx, miny, minz, maxx, maxy, maxz;
233  box.getBounds(minx, miny, minz, maxx, maxy, maxz);
234  float x,y,z;
235  box.getCenter().getValue(x,y,z);
236  if (std::abs(x*20.0)<std::abs(std::min(minx,maxx))&&std::abs(y*20.0)<std::abs(std::min(miny,maxy))) {
237  // -> Yes: It is one of the volumes we can handle dynamically?
238  if (shape->getTypeId()==SoTubs::getClassTypeId()
239  ||shape->getTypeId()==SoPcons::getClassTypeId()
240  ||shape->getTypeId()==SoCons::getClassTypeId()
241  ||shape->getTypeId()==SoLAr::getClassTypeId()) {
242  // -> Yes:
243  return -2;
244  } else {
245  // -> No:
246  //Fixme: Move this message somewhere appropriate???
247  //shape cannot be NULL here, so 'false' case is redundant (coverity 16272)
248  //std::string Typenametest = shape ? shape->getTypeId().getName().getString() : "NULL";
249  std::string Typenametest = shape->getTypeId().getName().getString();
250  m_d->system->message("WARNING: Unknown volume type (boolean?) for volume around Z-axis (type "
251  +QString(Typenametest.c_str())+"). Phi-sector cuts won't work for this!");
252  return -1;
253  }
254  }
255 
256  //Step 3: Find phi of center and return appropriate iphi:
258 
259 }
260 
261 //____________________________________________________________________
263  : QObject(parent), m_d(new Imp)
264 {
265  m_d->phisectionwidget = psw;
266  m_d->system=sys;
268  m_d->currentlyEnabledPhiSectors = QVector<bool>(NPHISECTORS,false);
269  QList<int> l; l << 4 << 6 << 9 << 12 << 18 << NPHISECTORS;//NB: All must be divisors in NPHISECTORS
270  psw->setNumberOfSectors(12);
272 
273  connect(psw,SIGNAL(enabledPhiRangesChanged(const QList<VP1Interval>&)),this,SLOT(enabledPhiSectorsChanged()));
275 }
276 
277 //____________________________________________________________________
279 {
280 
281  std::map<VP1GeoFlags::SubSystemFlag,std::map<int,VP1ExtraSepLayerHelper*> >::iterator it, itE = m_d->subsysflag_2_iphi2sephelper.end();
282  for (it = m_d->subsysflag_2_iphi2sephelper.begin();it!=itE;++it) {
283  std::map<int,VP1ExtraSepLayerHelper*>::iterator it2(it->second.begin()),it2E(it->second.end());
284  for (;it2!=it2E;++it2) {
285  SoSeparator * sep = it2->second->topSeparator();
286  delete (it2->second);
287  sep->unref();
288  }
289  }
290 
291  std::map<VP1GeoFlags::SubSystemFlag,std::map<int,VP1ExtraSepLayerHelper*> >::iterator it4, itE4 = m_d->subsysflag_2_iphi2labelsephelper.end();
292  for (it4 = m_d->subsysflag_2_iphi2labelsephelper.begin();it4!=itE4;++it4) {
293  std::map<int,VP1ExtraSepLayerHelper*>::iterator it5(it4->second.begin()),it5E(it4->second.end());
294  for (;it5!=it5E;++it5) {
295  SoSeparator * sep = it5->second->topSeparator();
296  delete (it5->second);
297  sep->unref();
298  }
299  }
301  for (it3 = m_d->subsysflag_2_volAroundZSepHelper.begin();it3!=it3E;++it3) {
302  SoSeparator * sep = it3->second->topSeparator();
303  delete (it3->second);
304  sep->unref();
305  }
306  delete m_d; m_d=0;
307 }
308 
309 //_____________________________________________________________________________________
311 {
314  return;
315  QList<int> changedPhiSectors;
316  for (int iphi = 0; iphi < NPHISECTORS; ++iphi)
317  if (m_d->currentlyEnabledPhiSectors[iphi]!=v[iphi])
318  changedPhiSectors << iphi;
320  for (int iphi : changedPhiSectors)
322 }
323 
324 //_____________________________________________________________________________________
326  bool turnedon = m_d->currentlyEnabledPhiSectors.at(iphi);
327  if (m_d->iphi2switches.find(iphi)!=m_d->iphi2switches.end()) {
329  for (it = m_d->iphi2switches[iphi].begin();it!=itE;++it) {
330  if ((*it)->whichChild.getValue() != (turnedon?SO_SWITCH_ALL:SO_SWITCH_NONE))
331  (*it)->whichChild = (turnedon?SO_SWITCH_ALL:SO_SWITCH_NONE);
332  }
333  }
334 
335  if (m_d->iphi2Labelswitches.find(iphi)!=m_d->iphi2Labelswitches.end()) {
337  for (it = m_d->iphi2Labelswitches[iphi].begin();it!=itE;++it) {
338  if ((*it)->whichChild.getValue() != (turnedon?SO_SWITCH_ALL:SO_SWITCH_NONE))
339  (*it)->whichChild = (turnedon?SO_SWITCH_ALL:SO_SWITCH_NONE);
340  }
341  }
342  // FIXME - need to find a way to turn on labels for recently made visible phi sections, OR build them all by default.
343 
344  //Update the switches for boolean, etc., volumes around the Z axis.
345  bool alloff = m_d->phisectionwidget->allSectorsOff();
346  std::map<int,std::set<SoSwitch*> >::iterator it_zax_switches = m_d->iphi2switches.find(-1);
347  if (it_zax_switches!=m_d->iphi2switches.end()) {
348  std::set<SoSwitch*>::iterator it, itE = it_zax_switches->second.end();
349  for (it = it_zax_switches->second.begin();it!=itE;++it) {
350  if ((*it)->whichChild.getValue() != (alloff?SO_SWITCH_NONE:SO_SWITCH_ALL))
351  (*it)->whichChild = (alloff?SO_SWITCH_NONE:SO_SWITCH_ALL);
352  }
353  }
355 }
356 
357 //_____________________________________________________________________________________
358 void PhiSectorManager::Imp::getPhiExtentOfShape( const SoTubs* tubs, double& phistart, double& phispan)
359 {
360  phistart = tubs->pSPhi.getValue();
361  phispan = tubs->pDPhi.getValue();
362 }
363 
364 //_____________________________________________________________________________________
366 {
367  dest->pRMin.setValue(source->pRMin.getValue());
368  dest->pRMax.setValue(source->pRMax.getValue());
369  dest->pDz.setValue(source->pDz.getValue());
370  dest->pSPhi.setValue(phistart);
371  dest->pDPhi.setValue(phispan);
372  dest->drawEdgeLines.setValue(source->drawEdgeLines.getValue());
373 }
374 
375 //_____________________________________________________________________________________
376 void PhiSectorManager::Imp::getPhiExtentOfShape( const SoPcons* pcons, double& phistart, double& phispan)
377 {
378  phistart = pcons->fSPhi.getValue();
379  phispan = pcons->fDPhi.getValue();
380 }
381 
382 //_____________________________________________________________________________________
384 {
385  dest->fRmin = source->fRmin;
386  dest->fRmax = source->fRmax;
387  dest->fDz = source->fDz;
388  dest->fSPhi.setValue(phistart);
389  dest->fDPhi.setValue(phispan);
390  dest->drawEdgeLines.setValue(source->drawEdgeLines.getValue());
391 }
392 
393 //_____________________________________________________________________________________
394 void PhiSectorManager::Imp::getPhiExtentOfShape( const SoCons* cons, double& phistart, double& phispan)
395 {
396  phistart = cons->fSPhi.getValue();
397  phispan = cons->fDPhi.getValue();
398 }
399 
400 //_____________________________________________________________________________________
402 {
403  dest->fRmin1.setValue(source->fRmin1.getValue());
404  dest->fRmin2.setValue(source->fRmin2.getValue());
405  dest->fRmax1.setValue(source->fRmax1.getValue());
406  dest->fRmax2.setValue(source->fRmax2.getValue());
407  dest->fDz.setValue(source->fDz.getValue());
408  dest->fSPhi.setValue(phistart);
409  dest->fDPhi.setValue(phispan);
410 }
411 
412 //_____________________________________________________________________________________
413 void PhiSectorManager::Imp::getPhiExtentOfShape( const SoLAr* lar, double& phistart, double& phispan)
414 {
415  phistart = lar->fSPhi.getValue();
416  phispan = lar->fDPhi.getValue();
417 }
418 
419 //_____________________________________________________________________________________
420 void PhiSectorManager::Imp::copyShapeFieldsAndOverridePhiRange( const SoLAr* source, SoLAr* dest, double phistart, double phispan)
421 {
422  dest->fRmin = source->fRmin;
423  dest->fRmax = source->fRmax;
424  dest->fDz = source->fDz;
425  dest->fSPhi.setValue(phistart);
426  dest->fDPhi.setValue(phispan);
427 }
428 
429 //_____________________________________________________________________________________
430 template <class T>
431 void PhiSectorManager::Imp::updateRepresentationsOfVolsAroundZAxis_Specific(std::map<SoSwitch*,std::pair<T*,SoSeparator*> >& volaroundZ)
432 {
433 
434  typename std::map<SoSwitch*,std::pair<T*,SoSeparator*> >::iterator it, itE = volaroundZ.end();
435  for (it = volaroundZ.begin();it!=itE;++it) {
436  if (phisectionwidget->allSectorsOff()) {
437  if (it->first->whichChild.getValue() != SO_SWITCH_NONE)
438  it->first->whichChild = SO_SWITCH_NONE;
439  } else if (phisectionwidget->allSectorsOn()) {
440  if (it->first->whichChild.getValue() != 0)
441  it->first->whichChild = 0;
442  } else {
443  //Update and use sep node:
444  SbBool save = it->first->enableNotify(false);
445  SoSeparator * sep = it->second.second;
446  sep->removeAllChildren();
447  //Figure out phirot/yrot info:
448  std::map<SoSwitch*,std::pair<double,bool> >::iterator it_transfinfo = volaroundZ_switch2transfinfo.find(it->first);
449  if (it_transfinfo==volaroundZ_switch2transfinfo.end()) {
450  system->message("updateRepresentationsOfVolsAroundZAxis_Specific ERROR: Inconsistent maps");
451  continue;
452  }
453  double phirot = it_transfinfo->second.first;
454  bool rotaroundy = it_transfinfo->second.second;
455 
456  double sphi, dphi;
457  getPhiExtentOfShape(it->second.first,sphi,dphi);
458 
459  QList<VP1Interval> ranges = phisectionwidget->enabledPhiRanges( sphi, sphi+dphi );
460 
461  int n = ranges.count();
462  for (int i = 0; i< n; ++i) {
463  T * shape = new T;
464  double deltaphi = ranges.at(i).length();
465  double startphi = rotaroundy ? - ranges.at(i).upper() - 2*M_PI + phirot : ranges.at(i).lower()-phirot;
466  while (startphi<0) startphi += 2*M_PI;
467  while (startphi+deltaphi>2*M_PI) startphi -= 2*M_PI;
468  copyShapeFieldsAndOverridePhiRange( it->second.first, shape, startphi, deltaphi );
469  sep->addChild(shape);
470  }
471 
472  it->first->whichChild = 1;
473  it->first->enableNotify(save);
474  if (save)
475  it->first->touch();
476 
477  }
478  }
479 
480 }
481 
482 //_____________________________________________________________________________________
484 {
489 }
490 
491 //_____________________________________________________________________________________
493 {
494  if (++(m_d->nactivelargechanges)==1) {
495  VP1Msg::messageVerbose("PhiSectorManager disabling notifications begin");
496  std::map<VP1GeoFlags::SubSystemFlag,std::map<int,VP1ExtraSepLayerHelper*> >::iterator it, itE = m_d->subsysflag_2_iphi2sephelper.end();
497  for (it = m_d->subsysflag_2_iphi2sephelper.begin();it!=itE;++it) {
498  std::map<int,VP1ExtraSepLayerHelper*>::iterator it2(it->second.begin()),it2E(it->second.end());
499  for (;it2!=it2E;++it2)
500  it2->second->largeChangesBegin();
501  }
503  for (it3 = m_d->subsysflag_2_volAroundZSepHelper.begin();it3!=it3E;++it3)
504  it3->second->largeChangesBegin();
505  VP1Msg::messageVerbose("PhiSectorManager disabling notifications end");
506  }
507 }
508 
509 //_____________________________________________________________________________________
511 {
512  if (--(m_d->nactivelargechanges)==0) {
513  VP1Msg::messageVerbose("PhiSectorManager enabling notifications begin");
514  std::map<VP1GeoFlags::SubSystemFlag,std::map<int,VP1ExtraSepLayerHelper*> >::iterator it, itE = m_d->subsysflag_2_iphi2sephelper.end();
515  for (it = m_d->subsysflag_2_iphi2sephelper.begin();it!=itE;++it) {
516  std::map<int,VP1ExtraSepLayerHelper*>::iterator it2(it->second.begin()),it2E(it->second.end());
517  for (;it2!=it2E;++it2)
518  it2->second->largeChangesEnd();
519  }
521  for (it3 = m_d->subsysflag_2_volAroundZSepHelper.begin();it3!=it3E;++it3)
522  it3->second->largeChangesEnd();
523  VP1Msg::messageVerbose("PhiSectorManager enabling notifications end");
524  }
525 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
trigbs_pickEvents.ranges
ranges
Definition: trigbs_pickEvents.py:60
PhiSectionWidget::phiToVirtualSectorIndex
static int phiToVirtualSectorIndex(double phi, int nSectors)
Definition: PhiSectionWidget.cxx:716
PhiSectorManager::Imp::subsysflag_2_volAroundZSepHelper
std::map< VP1GeoFlags::SubSystemFlag, VP1ExtraSepLayerHelper * > subsysflag_2_volAroundZSepHelper
Definition: PhiSectorManager.cxx:50
SoLAr
SoLAr - Inventor version of the G4Cons Geant Geometry entity.
Definition: SoLAr.h:39
PhiSectorManager::m_d
Imp * m_d
Definition: PhiSectorManager.h:73
SoPcons
SoPcons - Inventor version of the G4Cons Geant Geometry entity.
Definition: SoPcons.h:42
SoCons.h
VP1ExtraSepLayerHelper.h
SoTubs
SoTubs - Inventor version of the G4Tubs Geant Geometry entity.
Definition: SoTubs.h:52
PhiSectorManager::getSepHelperForNode
VP1ExtraSepLayerHelper * getSepHelperForNode(VP1GeoFlags::SubSystemFlag flag, int iphi)
Definition: PhiSectorManager.cxx:92
PhiSectorManager::largeChangesBegin
void largeChangesBegin()
Definition: PhiSectorManager.cxx:492
VP1Msg.h
PhiSectorManager::updateEnabledPhiSections
void updateEnabledPhiSections(int)
Definition: PhiSectorManager.cxx:325
SoCons::fDPhi
SoSFFloat fDPhi
Delta-angle, in radians.
Definition: SoCons.h:87
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
PhiSectionWidget::allSectorsOff
bool allSectorsOff() const
Definition: PhiSectionWidget.cxx:492
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
PhiSectorManager::Imp::subsysflag_2_iphi2sephelper
std::map< VP1GeoFlags::SubSystemFlag, std::map< int, VP1ExtraSepLayerHelper * > > subsysflag_2_iphi2sephelper
Definition: PhiSectorManager.cxx:48
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
PhiSectorManager::Imp::nactivelargechanges
int nactivelargechanges
Definition: PhiSectorManager.cxx:72
skel.it
it
Definition: skel.GENtoEVGEN.py:396
SoCons::fSPhi
SoSFFloat fSPhi
Starting angle, in radians.
Definition: SoCons.h:83
M_PI
#define M_PI
Definition: ActiveFraction.h:11
PhiSectorManager::Imp::subsysflag2labelsep
std::map< VP1GeoFlags::SubSystemFlag, SoSeparator * > subsysflag2labelsep
Definition: PhiSectorManager.cxx:47
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
SoPcons::fSPhi
SoSFFloat fSPhi
Starting angle, in radians.
Definition: SoPcons.h:64
PhiSectorManager::Imp::phisectionwidget
PhiSectionWidget * phisectionwidget
Definition: PhiSectorManager.cxx:43
PhiSectorManager::largeChangesEnd
void largeChangesEnd()
Definition: PhiSectorManager.cxx:510
x
#define x
PhiSectorManager::Imp::volaroundZ_tubs
std::map< SoSwitch *, std::pair< SoTubs *, SoSeparator * > > volaroundZ_tubs
Definition: PhiSectorManager.cxx:57
PhiSectorManager::Imp::volaroundZ_switch2transfinfo
std::map< SoSwitch *, std::pair< double, bool > > volaroundZ_switch2transfinfo
Definition: PhiSectorManager.cxx:61
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
PhiSectorManager::Imp::volaroundZ_lar
std::map< SoSwitch *, std::pair< SoLAr *, SoSeparator * > > volaroundZ_lar
Definition: PhiSectorManager.cxx:60
TruthTest.itE
itE
Definition: TruthTest.py:25
PhiSectorManager::getVolumeType
int getVolumeType(const SbMatrix &transform, SoNode *shape) const
Definition: PhiSectorManager.cxx:215
PhiSectorManager::registerVolumeAroundZAxis
VP1ExtraSepLayerHelper * registerVolumeAroundZAxis(VP1GeoFlags::SubSystemFlag flag, SoSwitch *sw, const SbMatrix &tranformation)
Definition: PhiSectorManager.cxx:144
VP1LinAlgUtils::phiFromXY
static double phiFromXY(const double &x, const double &y)
Definition: VP1LinAlgUtils.cxx:374
VP1LinAlgUtils.h
SoPcons.h
PhiSectorManager::Imp::volaroundZ_pcons
std::map< SoSwitch *, std::pair< SoPcons *, SoSeparator * > > volaroundZ_pcons
Definition: PhiSectorManager.cxx:58
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
IVP1System
Definition: IVP1System.h:36
VP1ExtraSepLayerHelper
Definition: VP1ExtraSepLayerHelper.h:22
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
PhiSectionWidget::setAllowedNumberOfSectors
void setAllowedNumberOfSectors(QList< int > allowedNSectors, bool allowCustom=false)
Definition: PhiSectionWidget.cxx:831
PhiSectionWidget::setNumberOfSectors
void setNumberOfSectors(int, bool forceAllEnabled=false)
Definition: PhiSectionWidget.cxx:153
PhiSectorManager::Imp::subsysflag2sep
std::map< VP1GeoFlags::SubSystemFlag, SoSeparator * > subsysflag2sep
Definition: PhiSectorManager.cxx:46
beamspotman.n
n
Definition: beamspotman.py:731
PhiSectorManager::Imp
Definition: PhiSectorManager.cxx:41
xAOD::rotation
rotation
Definition: TrackSurface_v1.cxx:15
master.flag
bool flag
Definition: master.py:29
PhiSectorManager::Imp::system
IVP1System * system
Definition: PhiSectorManager.cxx:44
PhiSectorManager::~PhiSectorManager
virtual ~PhiSectorManager()
Definition: PhiSectorManager.cxx:278
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
PhiSectorManager::Imp::getPhiExtentOfShape
void getPhiExtentOfShape(const SoTubs *tubs, double &phistart, double &phispan)
Definition: PhiSectorManager.cxx:358
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PhiSectorManager::Imp::volaroundZ_cons
std::map< SoSwitch *, std::pair< SoCons *, SoSeparator * > > volaroundZ_cons
Definition: PhiSectorManager.cxx:59
hist_file_dump.f
f
Definition: hist_file_dump.py:135
PhiSectionWidget.h
PhiSectionWidget
Definition: PhiSectionWidget.h:26
PhiSectorManager::Imp::currentlyEnabledPhiSectors
QVector< bool > currentlyEnabledPhiSectors
Definition: PhiSectorManager.cxx:74
PhiSectorManager::registerSubSystemSeparator
void registerSubSystemSeparator(VP1GeoFlags::SubSystemFlag flag, SoSeparator *subsystemsep)
Definition: PhiSectorManager.cxx:78
PhiSectorManager::Imp::copyShapeFieldsAndOverridePhiRange
void copyShapeFieldsAndOverridePhiRange(const SoTubs *source, SoTubs *dest, double phistart, double phispan)
Definition: PhiSectorManager.cxx:365
grepfile.sep
sep
Definition: grepfile.py:38
PhiSectorManager::Imp::subsysflag_2_iphi2labelsephelper
std::map< VP1GeoFlags::SubSystemFlag, std::map< int, VP1ExtraSepLayerHelper * > > subsysflag_2_iphi2labelsephelper
Definition: PhiSectorManager.cxx:49
PhiSectorManager::enabledPhiSectorsChanged
void enabledPhiSectorsChanged()
Definition: PhiSectorManager.cxx:310
SoTubs::pDPhi
SoSFFloat pDPhi
Delta-angle, in radians.
Definition: SoTubs.h:78
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
SoLAr::fSPhi
SoSFFloat fSPhi
Starting angle, in radians.
Definition: SoLAr.h:61
PhiSectorManager::Imp::iphi2Labelswitches
std::map< int, std::set< SoSwitch * > > iphi2Labelswitches
Definition: PhiSectorManager.cxx:54
PhiSectorManager::Imp::updateRepresentationsOfVolsAroundZAxis_Specific
void updateRepresentationsOfVolsAroundZAxis_Specific(std::map< SoSwitch *, std::pair< T *, SoSeparator * > > &volaroundZ)
Definition: PhiSectorManager.cxx:431
SoLAr::fDPhi
SoSFFloat fDPhi
Delta-angle, in radians.
Definition: SoLAr.h:65
SoPcons::fDPhi
SoSFFloat fDPhi
Delta-angle, in radians.
Definition: SoPcons.h:68
PhiSectorManager::getLabelSepHelperForNode
VP1ExtraSepLayerHelper * getLabelSepHelperForNode(VP1GeoFlags::SubSystemFlag flag, int iphi)
Addition to handle label separators, in exactly the same way as getSepHelperForNode(....
Definition: PhiSectorManager.cxx:118
python.PyAthena.v
v
Definition: PyAthena.py:154
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
VP1Msg::message
static void message(const QString &, IVP1System *sys=0)
Definition: VP1Msg.cxx:30
PhiSectorManager.h
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
SoTubs.h
PhiSectorManager::updateRepresentationsOfVolsAroundZAxis
void updateRepresentationsOfVolsAroundZAxis()
Definition: PhiSectorManager.cxx:483
NPHISECTORS
#define NPHISECTORS
Definition: PhiSectorManager.cxx:38
SoCons
SoCons - Inventor version of the G4Cons Geant Geometry entity.
Definition: SoCons.h:53
copySelective.source
string source
Definition: copySelective.py:32
VP1GeoFlags::SubSystemFlag
SubSystemFlag
Definition: VP1GeoFlags.h:30
SoLAr.h
PhiSectorManager::PhiSectorManager
PhiSectorManager(PhiSectionWidget *, IVP1System *, QObject *parent=0)
Definition: PhiSectorManager.cxx:262
PhiSectorManager::Imp::iphi2switches
std::map< int, std::set< SoSwitch * > > iphi2switches
Definition: PhiSectorManager.cxx:53
PhiSectionWidget::virtualSectorsEnabled
QVector< bool > virtualSectorsEnabled(int nSectors) const
Definition: PhiSectionWidget.cxx:704
PhiSectionWidget::virtualSectorEnabled
bool virtualSectorEnabled(int iSector, int nSectors) const
Definition: PhiSectionWidget.cxx:677
IVP1System.h
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
SoTubs::pSPhi
SoSFFloat pSPhi
Starting angle, in radians.
Definition: SoTubs.h:74