ATLAS Offline Software
PRDCollHandleBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
14 #include "VP1Base/VP1Serialise.h"
16 #include "VP1Base/VP1Deserialise.h"
17 #include "VP1Base/VP1Msg.h"
18 
29 
31 
32 #include <Inventor/nodes/SoSeparator.h>
33 #include <Inventor/nodes/SoLevelOfDetail.h>
34 #include <Inventor/nodes/SoMaterial.h>
35 
36 #include <QComboBox>
37 
38 //____________________________________________________________________
40 public:
42 
43  //Collection definition:
44  QString storegate_key;
46 
47  template <class T>
48  bool actualLoad();//Templated according to collection type.
49 
52  SoSeparator * sep_lods = nullptr;
53  std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > > regionindex2lodhelpers;//idx->(sephelperdetailed,sephelpersimple)
56 
57  SoMaterial * highlightmaterial = nullptr;
58  bool highlightoutliers = false;
59  bool drawerrors = false;
60  bool drawrdos = false;
61 
63  QList<VP1Interval> allowedPhi;
64 
65  bool ensureLoaded();//first call each event will attempt to load
66  //PRDs from storegate. Returns false in case of
67  //problems this events. (This is inexpensive to
68  //call)
69 
70  //Vector of prd handles:
71  std::vector<PRDHandleBase*> prdhandles;
72 
73  bool etaPhiCut(PRDHandleBase*);
74 
75  //Extra widgets:
76  QComboBox * comboBox_detailLevel = nullptr;
77 };
78 
79 //____________________________________________________________________
81  : VP1StdCollection(cd->system(),"PRDCollHandle_"+PRDDetType::typeToString(type)+"_"+key), m_d(new Imp), m_common(cd),m_nshownhandles(0),
82  m_colourmethod(ByTechOnly), m_highlightweight(999999.0)
83 {
84  m_d->theclass = this;
85  m_d->detType = type;
88  m_d->highlightoutliers = false;
89  m_d->drawerrors = false;
90  m_d->drawrdos = false;
91  m_d->sephelper_detail = 0;
92  m_d->sephelper_simple = 0;
93  m_d->sep_lods = 0;
94  m_d->comboBox_detailLevel = new QComboBox;
95  m_d->comboBox_detailLevel->setToolTip("Level of realism in representation"
96  " (\"Auto\" switches mode based on distance to camera)");
97  m_d->comboBox_detailLevel->addItems(QStringList()<<"Low"<<"Auto"<<"High");//Low==simple, High==detailed. Don't change order.
99  m_d->comboBox_detailLevel->setCurrentIndex(0);//corresponds to simple.
100  connect(m_d->comboBox_detailLevel,SIGNAL(currentIndexChanged(int)),this,SLOT(detailComboBoxItemChanged()));
101  connect(this,SIGNAL(visibilityChanged(bool)),this,SLOT(collVisibilityChanged(bool)));
102 }
103 
104 //____________________________________________________________________
106 {
107  VP1StdCollection::init();//this call is required
108 
109  SoSeparator * sep_detail = new SoSeparator;
110  sep_detail->setName("PRDColl_sep_detail");
111  SoSeparator * sep_simple = new SoSeparator;
112  sep_simple->setName("PRDColl_sep_simple");
113  m_d->sep_lods = new SoSeparator;
114  m_d->sep_lods->setName("PRDColl_sep_lods");
115  sep_detail->ref();
116  sep_simple->ref();
117  m_d->sep_lods->ref();
118 
119  m_d->sephelper_detail = new VP1ExtraSepLayerHelper(sep_detail,128);
120  m_d->sephelper_simple = new VP1ExtraSepLayerHelper(sep_simple,128);
121 
122  setupSettingsFromController(common()->controller());
123 
124  //Setup detail level:
127 
128 }
129 
130 
131 //____________________________________________________________________
133 {
134  //Lod sep-helpers:
135  std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > >::iterator it, itE = m_d->regionindex2lodhelpers.end();
136  for (it = m_d->regionindex2lodhelpers.begin();it!=itE;++it) {
137  delete it->second.second.first;
138  delete it->second.second.second;
139  it->second.first->unref();
140  }
141  m_d->regionindex2lodhelpers.clear();
142 
143  //Cleanup separators:
144  if (m_d->sephelper_detail) {
145  SoSeparator * sep_detail = m_d->sephelper_detail->topSeparator();
146  delete m_d->sephelper_detail;
147  sep_detail->unref();
148  }
149  if (m_d->sephelper_simple) {
150  SoSeparator * sep_simple = m_d->sephelper_simple->topSeparator();
151  delete m_d->sephelper_simple;
152  sep_simple->unref();
153  }
154  if (m_d->sep_lods)
155  m_d->sep_lods->unref();
156 
158 
159  if (m_d->highlightmaterial)
160  m_d->highlightmaterial->unref();
161 
162  delete m_d;
163 }
164 
165 //____________________________________________________________________
167  bool safeToLoad(false);
168  switch (m_d->detType){
169  case PRDDetType::TRT:
170  safeToLoad = VP1JobConfigInfo::hasTRTGeometry();
171  break;
172  case PRDDetType::Pixel:
173  safeToLoad = VP1JobConfigInfo::hasPixelGeometry();
174  break;
175  case PRDDetType::SCT:
176  safeToLoad = VP1JobConfigInfo::hasSCTGeometry();
177  break;
178  case PRDDetType::CSC:
180  case PRDDetType::RPC:
181  case PRDDetType::TGC:
182  case PRDDetType::MDT:
183  case PRDDetType::MM:
184  case PRDDetType::sTGC:
185  safeToLoad = VP1JobConfigInfo::hasMuonGeometry();
186  break;
187  default:
188  safeToLoad = false;
189  }
190 
191  if (!safeToLoad){
192  message("Required geometry not enabled in job.");
193  return false;
194  }
195 
196  switch (m_d->detType){
207  //SpacePoints implements their own load.
208  default:
209  return false;
210  }
211 }
212 
213 //____________________________________________________________________
215 {
216  if (VP1Msg::verbose())
217  messageVerbose("TrackCollHandleBase::collVisibilityChanged => "+str(vis));
218  if (vis)
219  recheckCutStatusOfAllNotVisibleHandles();//Fixme -> ofallhandles? All must be not visible anyway...
220  else
222 }
223 
224 //____________________________________________________________________
225 template <class T>
227 {
229  // Retrieve element container from event store:
230  const T* container;
231  VP1SGAccessHelper sg_access(theclass->systemBase());
232  if(!sg_access.retrieve(container,storegate_key))
233  return false;
234 
235  typename T::const_iterator element, lastElement(container->end());
236 
238  // Sanity check:
239  if ( container->size()==0 && container->begin()!=lastElement ) {
240  theclass->message("ERROR: container '"+storegate_key+"' has size()==0, but different begin() and end() iterators!");
241  return false;
242  }
243 
245  // In case the container was created incorrectly we must fallback to a different method of getting the prds:
246  bool fallback(false);
247  SG::ConstIterator<typename T::base_value_type> firstElementD, lastElementD;
248  if ( container->size()!=0 && container->begin()==lastElement ) {
249  //This is either an empty container, or it is a case of an incorrectly created container which we must get by SG::ConstIterator's.
250  theclass->messageDebug("Retrieved empty container. This might be misleading. Now going to attempt to load prds via iterators instead.");
251  if (VP1SGContentsHelper(theclass->systemBase()).getKeys<T>().count()!=1) {
252  theclass->messageDebug("But seems that there is not exactly one collection of type "+QString(typeid(T).name())
253  +", so we won't attempt that anyway!! Thus we assume there there are simply no prd's.");
254  } else {
255  if(sg_access.retrieve(firstElementD, lastElementD,true)) {
256  if (firstElementD==lastElementD) {
257  theclass->messageDebug("No prd's found when accessed by iterators either. It seems that there really are just no prds in this collection.");
258  } else {
259  fallback = true;
260  }
261  } else {
262  theclass->messageDebug("Failed retrieval by iterators. We take that as a sign that there really are just no prds in this collection ");
263  }
264  }
265  }
266 
267  theclass->messageVerbose("Loop over actual prd's and create handles");
268  //Retrieve prds and create handles:
269 
270  int ignoredUnsafeHandle_NoPRD(0);
271  int ignoredUnsafeHandle_NoDetElem(0);
272  int ignoredUnsafeHandle_NotSane(0);
273  typename T::base_value_type::const_iterator prd, prdLast;
274  int iprds(0);
275  if (!fallback) {
276  // element = container->begin();
277  // prd = (*element)->begin();
278  // ++iprds;
279  // PRDHandleBase * handle = theclass->addPRD(*prd);
280  // theclass->addHandle(handle);
281  // theclass->common()->registerPRD2Handle(*prd,handle);
282  // theclass->systemBase()->updateGUI();
283  for ( element = container->begin(); element!=lastElement ; ++element) {
284  prd = (*element)->begin(), prdLast = (*element)->end();
285  for ( ; prd!=prdLast ; ++prd) {
286  ++iprds;
287  if (!*prd) {
288  ++ignoredUnsafeHandle_NoPRD;
289  continue;
290  }
291  PRDHandleBase * handle = theclass->addPRD(*prd);
292  if (handle) {
293  if (!handle->isSane()) ignoredUnsafeHandle_NotSane++;
294  if (!handle->getPRD()->detectorElement()) {
295  ++ignoredUnsafeHandle_NoDetElem;
296  delete handle;
297  } else {
298  theclass->addHandle(handle);
299  theclass->common()->registerPRD2Handle(*prd,handle);
300  }
301  }
302  }
303  if (!(iprds%100))
305  }
306 
307  } else {
308 
309  for (; firstElementD!=lastElementD; ++firstElementD ) {
310  prd = firstElementD->begin(), prdLast = firstElementD->end();
311  for ( ; prd!=prdLast ; ++prd) {
312  ++iprds;
313  if (!*prd) {
314  ++ignoredUnsafeHandle_NoPRD;
315  continue;
316  }
317  PRDHandleBase * handle = theclass->addPRD(*prd);
318  if (handle) {
319  if (!handle->isSane()) ignoredUnsafeHandle_NotSane++;
320 
321  if (!handle->getPRD()->detectorElement()) {
322  ++ignoredUnsafeHandle_NoDetElem;
323  delete handle;
324  } else {
325  theclass->addHandle(handle);
326  theclass->common()->registerPRD2Handle(*prd,handle);
327  }
328  }
329  if (!(iprds%100))
331  }
332  }
333  }
335  prdhandles.resize(prdhandles.size());
336 
337  if (ignoredUnsafeHandle_NoPRD)
338  theclass->message("WARNING - ignoring "+str(ignoredUnsafeHandle_NoPRD)+" null prd pointer(s).");
339  if (ignoredUnsafeHandle_NoDetElem)
340  theclass->message("WARNING - ignoring "+str(ignoredUnsafeHandle_NoDetElem)+" prd pointer(s) with null detector elements.");
341  if (ignoredUnsafeHandle_NotSane)
342  theclass->message("WARNING - found "+str(ignoredUnsafeHandle_NotSane)+" prd pointer(s) which fail sanity checks (i.e. contain NaNs).");
343 
344  //Perform initialisation needed for cuts (e.g. those of the "global" type, such as requiring a number of PRDs in the same detector module):
345  theclass->messageVerbose("postLoadInitialisation");
347 
349 
350  //Show the handles that need to be shown:
351  theclass->recheckCutStatusOfAllNotVisibleHandles();//Use this method to not get the deselectAll call
352 
353  theclass->message("Found "+QString::number(iprds)+" ("+QString::number(theclass->nShownHandles())+" shown) PRDs in container '"+storegate_key+"'");
354 
355  return true;
356 
357 }
358 
359 //____________________________________________________________________
361 {
362  SoSeparator * collsep = theclass->collSep();
363  if (!collsep)
364  return;
365  bool save = collsep->enableNotify(false);
366  if (generalprddetaillevel==PRDCollHandleBase::DETAILED) {
367  //Detail
368  if (collsep->findChild(sephelper_detail->topSeparator())<0)
369  collsep->addChild(sephelper_detail->topSeparator());
370  } else {
371  //No detail
372  if (collsep->findChild(sephelper_detail->topSeparator())>-1)
373  collsep->removeChild(sephelper_detail->topSeparator());
374  }
375  if (generalprddetaillevel==PRDCollHandleBase::SIMPLE) {
376  //Simple
377  if (collsep->findChild(sephelper_simple->topSeparator())<0)
378  collsep->addChild(sephelper_simple->topSeparator());
379  } else {
380  //No simple
381  if (collsep->findChild(sephelper_simple->topSeparator())>-1)
382  collsep->removeChild(sephelper_simple->topSeparator());
383  }
384  if (generalprddetaillevel==PRDCollHandleBase::AUTO) {
385  //LOD
386  if (collsep->findChild(sep_lods)<0)
387  collsep->addChild(sep_lods);
388  } else {
389  //No LOD
390  if (collsep->findChild(sep_lods)>-1)
391  collsep->removeChild(sep_lods);
392  }
393  if (save) {
394  collsep->enableNotify(true);
395  collsep->touch();
396  }
397 }
398 
399 //____________________________________________________________________
401 {
402  return m_d->sephelper_detail;
403 }
404 
405 //____________________________________________________________________
407 {
408  return m_d->sephelper_simple;
409 }
410 
411 //____________________________________________________________________
413 {
414  messageVerbose("Collection detail level combo box changed index");
415  switch(m_d->comboBox_detailLevel->currentIndex()) {
416  case 1:
418  break;
419  case 2:
421  break;
422  default:
423  case 0:
425  break;
426  }
427 }
428 
429 //____________________________________________________________________
431 {
432  return m_d->generalprddetaillevel;
433 }
434 
435 //____________________________________________________________________
437 {
439  return;
441  messageVerbose("Detail level changed");
442 // common()->system()->deselectAll();
443 
444  //Update gui combobox:
445  int targetIndex(0);
446  switch(m_d->generalprddetaillevel) {
447  case AUTO:
448  targetIndex = 1;
449  break;
450  case DETAILED:
451  targetIndex = 2;
452  break;
453  default:
454  case SIMPLE:
455  targetIndex = 0;
456  break;
457  }
458  if (targetIndex!=m_d->comboBox_detailLevel->currentIndex()) {
459  bool save = m_d->comboBox_detailLevel->blockSignals(true);
460  m_d->comboBox_detailLevel->setCurrentIndex(targetIndex);
461  m_d->comboBox_detailLevel->blockSignals(save);
462  }
463 
464  //Actual changes to 3D representation:
466 
468 
469 }
470 
471 //____________________________________________________________________
473 {
474  const float complexity = 0.3f;//Fixme: Hardcoded here.
475  std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > >::iterator it = m_d->regionindex2lodhelpers.find(index);
476  if (it!=m_d->regionindex2lodhelpers.end()) {
477  sephelper_detail = it->second.second.first;
478  sephelper_simple = it->second.second.second;
479  //To try to scale somehow different regions to change at "the same time":
480  it->second.first->screenArea.setValue(lodArea()*(sephelper_detail->topSeparator()->getNumChildren()+1)/(complexity+0.5f));
481  return;
482  }
483  SoLevelOfDetail * lod = new SoLevelOfDetail;
484  SoSeparator * sep_detail = new SoSeparator;
485  SoSeparator * sep_simple = new SoSeparator;
486  lod->addChild(sep_detail);
487  lod->addChild(sep_simple);
488  lod->screenArea.setValue(lodArea()/(complexity+0.5f));
489  m_d->sep_lods->addChild(lod);
490  sephelper_detail = new VP1ExtraSepLayerHelper(sep_detail);
491  sephelper_simple = new VP1ExtraSepLayerHelper(sep_simple);
492 
493  lod->ref();
495  std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> >
496  (lod,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*>(sephelper_detail,sephelper_simple));
497 }
498 
499 //____________________________________________________________________
501 {
502  if (handle)
503  m_d->prdhandles.push_back(handle);
504 }
505 
506 //____________________________________________________________________
507 std::vector<PRDHandleBase*>& PRDCollHandleBase::getPrdHandles()
508 {
509  return m_d->prdhandles;
510 }
511 
512 //____________________________________________________________________
513 const std::vector<PRDHandleBase*>& PRDCollHandleBase::getPrdHandles() const
514 {
515  return m_d->prdhandles;
516 }
517 
518 //____________________________________________________________________
520 {
521  handle->setVisible( visible() && cut(handle) && m_d->etaPhiCut(handle) );
522 }
523 
524 //Fixme: A few of the methods of this class should be inlined (requires a few more public data members)
525 
526 //____________________________________________________________________
528 {
529  assert(controller);
531 
532  collSep()->addChild(controller->drawOptions(m_d->detType));
533 
534  m_d->highlightmaterial = controller->getHighLightMaterial();
535  m_d->highlightmaterial->ref();
536 
537  connect(controller,SIGNAL(highLightOutliersChanged(bool)),this,SLOT(setHighLightOutliers(bool)));
539 
540  connect(controller,SIGNAL(colourMethodChanged(PRDCollHandleBase::COLOURMETHOD)),this,SLOT(setColourMethod(PRDCollHandleBase::COLOURMETHOD)));
541  setColourMethod(controller->colourMethod());
542 
543  connect(controller,SIGNAL(drawErrorsChanged(bool)),this,SLOT(setDrawErrors(bool)));
544  setDrawErrors(controller->drawErrors());
545 
546  connect(controller,SIGNAL(drawRDOsChanged(bool)),this,SLOT(setDrawRDOs(bool)));
547  setDrawRDOs(controller->drawRDOs());
548 
549  connect(controller,SIGNAL(highLightMaterialWeightChanged(const double&)),this,SLOT(setHighLightWeight(const double&)));
551 
552  connect(controller,SIGNAL(cutAllowedEtaChanged(const VP1Interval&)),
553  this,SLOT(setAllowedEta(const VP1Interval&)));
554  setAllowedEta(controller->cutAllowedEta());
555 
556  connect(controller,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)),
557  this,SLOT(setAllowedPhi(const QList<VP1Interval>&)));
558  setAllowedPhi(controller->cutAllowedPhi());
559 
561  largeChangesEnd();
562 }
563 
564 
565 //____________________________________________________________________
567 {
568  messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllHandles");
569 
570  common()->system()->deselectAll();
571 
574  int i(0);
575  for (;it!=itE;++it) {
577  if (!(i++%200))
578  systemBase()->updateGUI();//since called from ::actualLoad<..>(..)
579  }
580  largeChangesEnd();
581  if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
582 }
583 
584 //____________________________________________________________________
586 {
587  messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllVisibleHandles");
588  if (!visible()) return;
589  //This method is called when a cut is tightened - thus we better start by deselectAll to avoid weird highlighting issues.
590  common()->system()->deselectAll();
591 
594  for (;it!=itE;++it) {
595  if ((*it)->visible())
597  }
598  largeChangesEnd();
599  if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
600 }
601 
602 //____________________________________________________________________
604 {
605  messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllNotVisibleHandles");
606 
609  for (;it!=itE;++it) {
610  if (!(*it)->visible())
612  }
613  largeChangesEnd();
614  if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
615 }
616 
617 
618 //____________________________________________________________________
620 {
621  return m_d->highlightoutliers;
622 }
623 
624 //____________________________________________________________________
626 {
627  return m_d->drawerrors;
628 }
629 
630 //____________________________________________________________________
632 {
633  return m_d->drawrdos;
634 }
635 
636 //____________________________________________________________________
638 {
639  return m_d->highlightmaterial;
640 }
641 
642 //____________________________________________________________________
644 {
645  if (m_d->highlightoutliers==b)
646  return;
650  for (;it!=itE;++it) {
651  (*it)->updateMaterial();
652  //Fixme: Improve performance by only calling updateMaterial() on
653  //those that are outliers on at least one track.
654  }
655  largeChangesEnd();
656 }
657 
658 //____________________________________________________________________
660 {
661  if (m_d->drawerrors==b)
662  return;
663  m_d->drawerrors = b;
666  for (;it!=itE;++it) {
667  (*it)->update3DObjects();
668  //Fixme: Improve performance by only calling updateMaterial() on
669  //those that are outliers on at least one track.
670  }
671  largeChangesEnd();
672 }
673 
674 //____________________________________________________________________
676 {
677  if (m_d->drawrdos==b)
678  return;
679  m_d->drawrdos = b;
682  for (;it!=itE;++it) {
683  (*it)->update3DObjects();
684  //Fixme: Improve performance by only calling updateMaterial() on
685  //those that are outliers on at least one track.
686  }
687  largeChangesEnd();
688 }
689 
690 
691 //____________________________________________________________________
693 {
694  if (m_highlightweight == hlw)
695  return;
696  m_highlightweight = hlw;
699  for (;it!=itE;++it) {
700  if (m_d->highlightoutliers || (*it)->highLight())
701  (*it)->updateMaterial();
702  //Fixme: We can improve performance here by investigating whether
703  //the handle actually is an outlier for at least one track, or if
704  //highlighting is at all applicable for the collection (maybe it is turned off).
705  }
706  largeChangesEnd();
707 }
708 
709 //____________________________________________________________________
711 {
712  if (m_colourmethod==cm)
713  return;
714  m_colourmethod = cm;
715 
718  for (;it!=itE;++it) {
719  (*it)->updateMaterial();
720  //Fixme: Improve performance by only calling on those that are on tracks/segments as relevant.
721  }
722  largeChangesEnd();
723 
724 }
725 
726 //____________________________________________________________________
728 {
729  switch (d) {
730  case SIMPLE: return "SIMPLE";
731  case DETAILED: return "DETAILED";
732  case AUTO: return "AUTO";
733  default: return "Unknown (ERROR)";
734  }
735 }
736 
737 //____________________________________________________________________
739 {
740  switch (cm) {
741  case ByTechOnly: return "ByTechOnly";
742  case BySegment: return "BySegment";
743  case ByTrack: return "ByTrack";
744  case BySegmentAndTrack: return "BySegmentAndTrack";
745  default: return "Unknown (ERROR)";
746  }
747 }
748 
749 //____________________________________________________________________
751 {
753 }
754 
755 //____________________________________________________________________
757 {
758  return m_d->storegate_key;
759 }
760 
761 //____________________________________________________________________
763 {
764  VP1QtInventorUtils::setMatColor( m, defaultColor(), 0.18/*brightness*/ );
765 }
766 
767 //____________________________________________________________________
769 {
770  switch (m_d->detType) {
771  case PRDDetType::Pixel:
772  case PRDDetType::SCT:
773  case PRDDetType::TRT:
774  return "Inner Detector PRDs";
776  return "ID Space Points";
777  case PRDDetType::CSC:
779  case PRDDetType::RPC:
780  case PRDDetType::TGC:
781  case PRDDetType::MDT:
782  case PRDDetType::MM:
783  case PRDDetType::sTGC:
784  return "Muon Spectrometer PRDs";
785  default: return "Unknown Section";
786  }
787 }
788 
789 //____________________________________________________________________
791 {
792  switch (m_d->detType) {
793  case PRDDetType::Pixel:
794  case PRDDetType::SCT:
795  case PRDDetType::TRT:
796  return "Inner Detector PRD collections in event";
798  return "Space Point collections in event";
799  case PRDDetType::CSC:
801  case PRDDetType::RPC:
802  case PRDDetType::TGC:
803  case PRDDetType::MDT:
804  return "Muon Spectrometer PRD collections in event";
805  default: return "Error: PRDDetType not recognised.";
806  }
807 }
808 
809 //____________________________________________________________________
811 {
812  return QList<QWidget*>() << m_d->comboBox_detailLevel;
813 }
814 
815 //____________________________________________________________________
817 {
818  VP1Serialise serialise(0/*version*/,systemBase());
820  serialise.disableUnsavedChecks();
821  return serialise.result();
822 }
823 
824 //____________________________________________________________________
825 void PRDCollHandleBase::setExtraWidgetsState(const QByteArray& ba)
826 {
827  VP1Deserialise state(ba, systemBase());
828  if (state.version()!=0)
829  return;//just ignore silently... i guess we ought to warn?
831  state.disableUnrestoredChecks();
833 }
834 
835 //____________________________________________________________________
837 {
838  if (m_d->allowedEta==e)
839  return;
840  bool relaxed(e.contains(m_d->allowedEta));
841  bool tightened(m_d->allowedEta.contains(e));
842  m_d->allowedEta=e;
843  if (relaxed)
845  else if (tightened)
847  else
849 }
850 
851 //____________________________________________________________________
852 void PRDCollHandleBase::setAllowedPhi(const QList<VP1Interval>& l)
853 {
854  if (m_d->allowedPhi==l)
855  return;
856  m_d->allowedPhi=l;
858 }
859 
860 //____________________________________________________________________
862 {
863  bool allPhiAllowed = allowedPhi.count()==1&&allowedPhi.at(0).isAllR();
864  bool allEtaAllowed = allowedEta.isAllR();
865  if (allEtaAllowed&&allPhiAllowed)
866  return true;
867  if (allowedPhi.isEmpty()||allowedEta.isEmpty())
868  return false;
869  Amg::Vector3D p = handle->center();
870  if (!allEtaAllowed) {
871  if (!allowedEta.contains(p.eta()))
872  return false;
873  }
874  if (!allPhiAllowed) {
875  double phi(p.phi());
876  for(const VP1Interval& i : allowedPhi) {
877  if (i.contains(phi)||i.contains(phi+2*M_PI)||i.contains(phi-2*M_PI))
878  return true;
879  }
880  return false;
881  }
882  return true;
883 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1Serialise.h
PRDCollHandleBase::Imp::detType
PRDDetType::Type detType
Definition: PRDCollHandleBase.cxx:45
PRDHandleBase::setVisible
void setVisible(bool)
Definition: PRDHandleBase.cxx:234
PRDCollHandleBase::detailLevelChanged
void detailLevelChanged()
PRDCollHandleBase::Imp::allowedPhi
QList< VP1Interval > allowedPhi
Definition: PRDCollHandleBase.cxx:63
PRDCollHandleBase::BySegmentAndTrack
@ BySegmentAndTrack
Definition: PRDCollHandleBase.h:71
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
PRDCollHandleBase::m_d
Imp * m_d
Definition: PRDCollHandleBase.h:141
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
CscStripPrepDataContainer.h
PRDCollHandleBase.h
PRDDetType::MM
@ MM
Definition: PRDDetTypes.h:13
PRDCollHandleBase::defaultDetailLevel
virtual DETAIL defaultDetailLevel() const
Definition: PRDCollHandleBase.h:97
PRDCollHandleBase::~PRDCollHandleBase
virtual ~PRDCollHandleBase()
Definition: PRDCollHandleBase.cxx:132
PRDCollHandleBase::cut
virtual bool cut(PRDHandleBase *)=0
PRDCollHandleBase::ByTechOnly
@ ByTechOnly
Definition: PRDCollHandleBase.h:71
VP1Deserialise.h
VP1Serialise
Definition: VP1Serialise.h:45
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PRDCollHandleBase::Imp::drawrdos
bool drawrdos
Definition: PRDCollHandleBase.cxx:60
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
PRDCollHandleBase::SIMPLE
@ SIMPLE
Definition: PRDCollHandleBase.h:66
PRDCollHandleBase::Imp::drawerrors
bool drawerrors
Definition: PRDCollHandleBase.cxx:59
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
PRDCollHandleBase::provideSection
QString provideSection() const
Definition: PRDCollHandleBase.cxx:768
VP1ExtraSepLayerHelper.h
index
Definition: index.py:1
PRDDetType::CSC
@ CSC
Definition: PRDDetTypes.h:13
hist_file_dump.d
d
Definition: hist_file_dump.py:137
VP1Msg.h
PRDCollHandleBase::recheckCutStatus
void recheckCutStatus(PRDHandleBase *)
Definition: PRDCollHandleBase.cxx:519
PRDCollHandleBase::setGeneralPRDDetailLevel
void setGeneralPRDDetailLevel(DETAIL)
Definition: PRDCollHandleBase.cxx:436
PRDDetType::SpacePoints
@ SpacePoints
Definition: PRDDetTypes.h:13
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
PRDCollHandleBase::drawRDOs
bool drawRDOs() const
Definition: PRDCollHandleBase.cxx:631
VP1Deserialise::disableUnrestoredChecks
void disableUnrestoredChecks()
Definition: VP1Deserialise.cxx:690
PRDSystemController
Definition: PRDSystemController.h:34
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
PRDCollHandleBase::postLoadInitialisation
virtual void postLoadInitialisation()
Definition: PRDCollHandleBase.h:103
skel.it
it
Definition: skel.GENtoEVGEN.py:423
PRDCollHandleBase::common
PRDSysCommonData * common() const
Definition: PRDCollHandleBase.h:49
PRDCollHandleBase::DETAILED
@ DETAILED
Definition: PRDCollHandleBase.h:66
M_PI
#define M_PI
Definition: ActiveFraction.h:11
PRDCollHandleBase::defaultColor
virtual QColor defaultColor() const =0
PRDCollHandleBase::addHandle
void addHandle(PRDHandleBase *)
Definition: PRDCollHandleBase.cxx:500
VP1StdCollection::init
virtual void init(VP1MaterialButtonBase *button=0)
Definition: VP1StdCollection.cxx:73
InDet::SCT_ClusterContainer
Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer
Definition: SCT_ClusterContainer.h:27
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1StdCollection::largeChangesBegin
virtual void largeChangesBegin()
Definition: VP1StdCollection.cxx:228
PRDSystemController::drawRDOs
bool drawRDOs() const
Definition: PRDSystemController.cxx:492
MMPrepDataContainer.h
PRDCollHandleBase::toString
static QString toString(const DETAIL &)
Definition: PRDCollHandleBase.cxx:727
RpcPrepDataContainer.h
PRDCollHandleBase::collVisibilityChanged
void collVisibilityChanged(bool)
Definition: PRDCollHandleBase.cxx:214
PRDCollHandleBase::Imp::highlightoutliers
bool highlightoutliers
Definition: PRDCollHandleBase.cxx:58
InDet::PixelClusterContainer
Trk::PrepRawDataContainer< PixelClusterCollection > PixelClusterContainer
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelClusterContainer.h:28
PRDCollHandleBase::recheckCutStatusOfAllHandles
void recheckCutStatusOfAllHandles()
Definition: PRDCollHandleBase.cxx:566
PRDCollHandleBase::BySegment
@ BySegment
Definition: PRDCollHandleBase.h:71
PRDCollHandleBase::COLOURMETHOD
COLOURMETHOD
Definition: PRDCollHandleBase.h:71
PRDCollHandleBase::setDrawRDOs
void setDrawRDOs(bool)
Definition: PRDCollHandleBase.cxx:675
PRDHandleBase::isSane
virtual bool isSane() const
Returns false if the PRD is not safe to draw.
Definition: PRDHandleBase.h:75
PRDCollHandleBase::Imp::storegate_key
QString storegate_key
Definition: PRDCollHandleBase.cxx:44
PRDSysCommonData
Definition: PRDSysCommonData.h:35
PRDCollHandleBase::Imp::allowedEta
VP1Interval allowedEta
Definition: PRDCollHandleBase.cxx:62
PRDCollHandleBase::m_colourmethod
COLOURMETHOD m_colourmethod
Definition: PRDCollHandleBase.h:146
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
PRDSysCommonData.h
PRDCollHandleBase::Imp::generalprddetaillevel
DETAIL generalprddetaillevel
Definition: PRDCollHandleBase.cxx:54
sTgcPrepDataContainer.h
VP1HelperClassBase::messageDebug
void messageDebug(const QString &) const
Definition: VP1HelperClassBase.cxx:65
PRDCollHandleBase::addPRD
virtual PRDHandleBase * addPRD(const Trk::PrepRawData *)=0
PRDCollHandleBase::DETAIL
DETAIL
Definition: PRDCollHandleBase.h:66
TruthTest.itE
itE
Definition: TruthTest.py:25
PRDCollHandleBase::setAllowedPhi
void setAllowedPhi(const QList< VP1Interval > &)
Definition: PRDCollHandleBase.cxx:852
PRDDetType::SCT
@ SCT
Definition: PRDDetTypes.h:13
PRDCollHandleBase::provideCollTypeID
qint32 provideCollTypeID() const
Definition: PRDCollHandleBase.cxx:750
PRDCollHandleBase::assignDefaultMaterial
virtual void assignDefaultMaterial(SoMaterial *) const
Definition: PRDCollHandleBase.cxx:762
VP1SGContentsHelper::getKeys
QStringList getKeys() const
Definition: VP1SGContentsHelper.h:55
VP1QtInventorUtils.h
PRDCollHandleBase::Imp::comboBox_detailLevel
QComboBox * comboBox_detailLevel
Definition: PRDCollHandleBase.cxx:76
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
PRDCollHandleBase::AUTO
@ AUTO
Definition: PRDCollHandleBase.h:66
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PRDCollHandleBase::load
virtual bool load()
Definition: PRDCollHandleBase.cxx:166
VP1Deserialise::version
qint32 version() const
Definition: VP1Deserialise.cxx:143
MdtPrepDataContainer.h
PRDDetType::Type
Type
Definition: PRDDetTypes.h:12
PRDCollHandleBase::getLODSeparators
void getLODSeparators(int index, VP1ExtraSepLayerHelper *&sephelper_detail, VP1ExtraSepLayerHelper *&sephelper_simple)
Definition: PRDCollHandleBase.cxx:472
PRDCollHandleBase
Definition: PRDCollHandleBase.h:25
PRDCollHandleBase::setAllowedEta
void setAllowedEta(const VP1Interval &)
Definition: PRDCollHandleBase.cxx:836
PRDCollHandleBase::setupSettingsFromControllerSpecific
virtual void setupSettingsFromControllerSpecific(PRDSystemController *)
Definition: PRDCollHandleBase.h:40
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
PRDDetType::RPC
@ RPC
Definition: PRDDetTypes.h:13
PRDCollHandleBase::Imp::actualLoad
bool actualLoad()
Definition: PRDCollHandleBase.cxx:226
VP1ExtraSepLayerHelper
Definition: VP1ExtraSepLayerHelper.h:22
PRDCollHandleBase::PRDCollHandleBase
PRDCollHandleBase(PRDDetType::Type, PRDSysCommonData *, const QString &key)
Definition: PRDCollHandleBase.cxx:80
PRDCollHandleBase::setHighLightWeight
void setHighLightWeight(const double &)
Definition: PRDCollHandleBase.cxx:692
PRDSystemController::getHighLightMaterial
SoMaterial * getHighLightMaterial()
Definition: PRDSystemController.cxx:335
PRDSysCommonData::registerPRD2Handle
void registerPRD2Handle(const Trk::PrepRawData *prd, PRDHandleBase *handle)
Definition: PRDSysCommonData.cxx:97
PRDCollHandleBase::setExtraWidgetsState
void setExtraWidgetsState(const QByteArray &)
Definition: PRDCollHandleBase.cxx:825
lumiFormat.i
int i
Definition: lumiFormat.py:92
PRDCollHandleBase::ByTrack
@ ByTrack
Definition: PRDCollHandleBase.h:71
PRDCollHandleBase::Imp::sephelper_detail
VP1ExtraSepLayerHelper * sephelper_detail
Definition: PRDCollHandleBase.cxx:50
PRDCollHandleBase::provideSectionToolTip
QString provideSectionToolTip() const
Definition: PRDCollHandleBase.cxx:790
TgcPrepDataContainer.h
PRDCollHandleBase::provideExtraWidgetsForGuiRow
QList< QWidget * > provideExtraWidgetsForGuiRow() const
Definition: PRDCollHandleBase.cxx:810
PRDCollHandleBase::Imp::updateDetailSepAttachments
void updateDetailSepAttachments()
Definition: PRDCollHandleBase.cxx:360
VP1StdCollection::visibilityChanged
void visibilityChanged(bool)
PRDCollHandleBase::Imp
Definition: PRDCollHandleBase.cxx:39
VP1JobConfigInfo::hasSCTGeometry
static bool hasSCTGeometry()
Definition: VP1JobConfigInfo.cxx:128
PRDCollHandleBase::detailLevel
DETAIL detailLevel() const
Definition: PRDCollHandleBase.cxx:430
PRDCollHandleBase::setupSettingsFromController
void setupSettingsFromController(PRDSystemController *)
Definition: PRDCollHandleBase.cxx:527
VP1Deserialise::restore
void restore(QCheckBox *sb)
Definition: VP1Deserialise.cxx:245
PRDDetType::typeToInt
static qint32 typeToInt(const Type &t)
Definition: PRDDetTypes.cxx:47
PRDCollHandleBase::Imp::ensureLoaded
bool ensureLoaded()
VP1Deserialise
Definition: VP1Deserialise.h:44
VP1JobConfigInfo::hasTRTGeometry
static bool hasTRTGeometry()
Definition: VP1JobConfigInfo.cxx:129
PRDCollHandleBase::recheckCutStatusOfAllNotVisibleHandles
void recheckCutStatusOfAllNotVisibleHandles()
Definition: PRDCollHandleBase.cxx:603
ReadCellNoiseFromCool.dm
dm
Definition: ReadCellNoiseFromCool.py:235
PRDCollHandleBase::extraWidgetsState
QByteArray extraWidgetsState() const
Definition: PRDCollHandleBase.cxx:816
PRDDetType
Definition: PRDDetTypes.h:10
PRDSystemController::highLightMaterialWeight
double highLightMaterialWeight() const
Definition: PRDSystemController.cxx:542
PRDCollHandleBase::sephelperSimpleNodes
VP1ExtraSepLayerHelper * sephelperSimpleNodes() const
Definition: PRDCollHandleBase.cxx:406
InDet::TRT_DriftCircleContainer
Trk::PrepRawDataContainer< TRT_DriftCircleCollection > TRT_DriftCircleContainer
Definition: TRT_DriftCircleContainer.h:27
PRDCollHandleBase::cleanupPtrContainer
void cleanupPtrContainer(T &) const
Definition: PRDCollHandleBase.h:151
TRT_DriftCircleContainer.h
VP1SGAccessHelper::retrieve
bool retrieve(const T *&, const QString &key) const
EventPrimitives.h
PRDCollHandleBase::Imp::highlightmaterial
SoMaterial * highlightmaterial
Definition: PRDCollHandleBase.cxx:57
CscPrepDataContainer.h
PRDCollHandleBase::detailComboBoxItemChanged
void detailComboBoxItemChanged()
Definition: PRDCollHandleBase.cxx:412
PRDHandleBase::getPRD
virtual const Trk::PrepRawData * getPRD() const =0
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PixelClusterContainer.h
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1Interval::contains
bool contains(const double &x) const
PRDSystemController::cutAllowedPhi
QList< VP1Interval > cutAllowedPhi() const
Definition: PRDSystemController.cxx:372
PRDCollHandleBase::highLightOutliers
bool highLightOutliers() const
Definition: PRDCollHandleBase.cxx:619
PRDSystemController::colourMethod
PRDCollHandleBase::COLOURMETHOD colourMethod() const
Definition: PRDSystemController.cxx:469
PRDSystemController.h
PRDCollHandleBase::Imp::sephelper_simple
VP1ExtraSepLayerHelper * sephelper_simple
Definition: PRDCollHandleBase.cxx:51
PRDDetType::CSCstrip
@ CSCstrip
Definition: PRDDetTypes.h:13
PRDCollHandleBase::Imp::sep_lods
SoSeparator * sep_lods
Definition: PRDCollHandleBase.cxx:52
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
PRDCollHandleBase::lodArea
virtual float lodArea() const
Definition: PRDCollHandleBase.h:111
VP1SGContentsHelper
Definition: VP1SGContentsHelper.h:26
PRDDetType::sTGC
@ sTGC
Definition: PRDDetTypes.h:13
PRDCollHandleBase::sephelperDetailedNodes
VP1ExtraSepLayerHelper * sephelperDetailedNodes() const
Definition: PRDCollHandleBase.cxx:400
VP1MaterialButtonBase
Definition: VP1MaterialButton.h:25
PRDSystemController::cutAllowedEta
VP1Interval cutAllowedEta() const
Definition: PRDSystemController.cxx:366
FPTracker::typeToString
std::string typeToString(Magnet::Type type)
Definition: magnetFactory.cxx:20
PRDSystemController::drawErrors
bool drawErrors() const
Definition: PRDSystemController.cxx:485
VP1StdCollection::largeChangesEnd
virtual void largeChangesEnd()
Definition: VP1StdCollection.cxx:239
PRDDetType::MDT
@ MDT
Definition: PRDDetTypes.h:13
PRDCollHandleBase::Imp::etaPhiCut
bool etaPhiCut(PRDHandleBase *)
Definition: PRDCollHandleBase.cxx:861
DeMoScan.index
string index
Definition: DeMoScan.py:362
VP1Interval
Definition: VP1Interval.h:23
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
PRDCollHandleBase::init
virtual void init(VP1MaterialButtonBase *mat=0)
Definition: PRDCollHandleBase.cxx:105
PRDCollHandleBase::nShownHandles
int nShownHandles()
Definition: PRDCollHandleBase.h:121
IVP1System::updateGUI
void updateGUI()
Definition: IVP1System.cxx:262
VP1QtInventorUtils::setMatColor
static void setMatColor(SoMaterial *, const double &r, const double &g, const double &b, const double &brightness=0.0, const double &transp=0.0)
Definition: VP1QtInventorUtils.cxx:1480
PRDSysCommonData::system
IVP13DSystem * system() const
Definition: PRDSysCommonData.h:78
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PRDCollHandleBase::Imp::regionindex2lodhelpers
std::map< int, std::pair< SoLevelOfDetail *, std::pair< VP1ExtraSepLayerHelper *, VP1ExtraSepLayerHelper * > > > regionindex2lodhelpers
Definition: PRDCollHandleBase.cxx:53
PRDCollHandleBase::recheckCutStatusOfAllVisibleHandles
void recheckCutStatusOfAllVisibleHandles()
Definition: PRDCollHandleBase.cxx:585
PRDCollHandleBase::provideText
virtual QString provideText() const
Definition: PRDCollHandleBase.cxx:756
VP1ExtraSepLayerHelper::topSeparator
SoSeparator * topSeparator() const
Definition: VP1ExtraSepLayerHelper.cxx:178
VP1StdCollection::collSep
SoSeparator * collSep() const
All 3D objects from this coll.
Definition: VP1StdCollection.cxx:212
VP1StdCollection::visible
bool visible() const
Definition: VP1StdCollection.cxx:142
PRDDetType::Pixel
@ Pixel
Definition: PRDDetTypes.h:13
SCT_ClusterContainer.h
VP1PrepRawDataSystem.h
calibdata.cd
cd
Definition: calibdata.py:51
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
VP1JobConfigInfo.h
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
PRDHandleBase
Definition: PRDHandleBase.h:35
PRDCollHandleBase::Imp::prdhandles
std::vector< PRDHandleBase * > prdhandles
Definition: PRDCollHandleBase.cxx:71
VP1StdCollection
Definition: VP1StdCollection.h:31
VP1SGAccessHelper
Definition: VP1SGAccessHelper.h:25
PRDDetType::TGC
@ TGC
Definition: PRDDetTypes.h:13
VP1JobConfigInfo::hasPixelGeometry
static bool hasPixelGeometry()
Definition: VP1JobConfigInfo.cxx:127
PRDSystemController::drawOptions
SoGroup * drawOptions(PRDDetType::Type) const
Definition: PRDSystemController.cxx:288
PRDCollHandleBase::drawErrors
bool drawErrors() const
Definition: PRDCollHandleBase.cxx:625
PRDCollHandleBase::setHighLightOutliers
void setHighLightOutliers(bool)
Definition: PRDCollHandleBase.cxx:643
PRDSystemController::highLightOutliers
bool highLightOutliers() const
Definition: PRDSystemController.cxx:500
PRDCollHandleBase::highLightMaterial
SoMaterial * highLightMaterial() const
Definition: PRDCollHandleBase.cxx:637
VP1JobConfigInfo::hasMuonGeometry
static bool hasMuonGeometry()
Definition: VP1JobConfigInfo.cxx:134
PRDCollHandleBase::getPrdHandles
std::vector< PRDHandleBase * > & getPrdHandles()
Definition: PRDCollHandleBase.cxx:507
PRDDetType::TRT
@ TRT
Definition: PRDDetTypes.h:13
VP1SGAccessHelper.h
SG::ConstIterator
Definition: SGIterator.h:163
IVP13DSystem::deselectAll
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
Definition: IVP13DSystem.cxx:331
PRDCollHandleBase::setDrawErrors
void setDrawErrors(bool)
Definition: PRDCollHandleBase.cxx:659
PRDCollHandleBase::m_highlightweight
double m_highlightweight
Definition: PRDCollHandleBase.h:147
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
PRDHandleBase.h
PRDHandleBase::center
virtual Amg::Vector3D center() const
Definition: PRDHandleBase.cxx:316
VP1SGContentsHelper.h
PRDCollHandleBase::setColourMethod
void setColourMethod(PRDCollHandleBase::COLOURMETHOD)
Definition: PRDCollHandleBase.cxx:710
PRDCollHandleBase::Imp::theclass
PRDCollHandleBase * theclass
Definition: PRDCollHandleBase.cxx:41
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37