ATLAS Offline Software
MuonCollectionSettingsButton.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef VP1AODSYSTEMS_MUONCOLLSETTINGSBUTTON_H
6 #define VP1AODSYSTEMS_MUONCOLLSETTINGSBUTTON_H
7 
9 #ifndef Q_MOC_RUN
10 #include "xAODMuon/Muon.h"
11 #endif
12 
13 class SoDrawStyle;
14 class SoLightModel;
15 
17 
18  Q_OBJECT
19 
20 public:
21 
22  MuonCollectionSettingsButton(QWidget * parent = 0, int dim = 25);//dim<=0 => Won't change sizepolicy
24 
25  void setDimension(int dim);
26 
27  // The below are necessary to fulfill the interface, but will just be passed onto the VP1MaterialButton owned by the MuonCollectionSettingsButton form
28  virtual bool setMaterial(SoMaterial*);
29  virtual void copyValuesFromMaterial(SoMaterial*);
30  virtual double lastAppliedTransparency() const ;
31  virtual double lastAppliedShininess() const ;
32  virtual double lastAppliedBrightness() const;
33 
34  // GUI for track lines...
35  double trackTubeRadius() const;//0 => don't show tubes for tracks
36  bool hideActualTrackPath() const;
37 
38  // GUI for cuts
39  VP1Interval cutAllowedPt() const;
40  VP1Interval cutAllowedEta() const;
41  QList<VP1Interval> cutAllowedPhi() const;//All off: empty list. All on: list with one entry: ]-inf,inf[
42  // with a length of four (pixel,sct,trt,muon)
43 
44  //Overall drawstyles, complexities and light models:
45  SoDrawStyle * trackDrawStyle() const;
46  SoLightModel * trackLightModel() const;
47 
48  // Parameters
49  SoMaterial* defaultParameterMaterial() const;
50  SoMaterial* parameterMaterial( xAOD::ParameterPosition ) const;
51 
52  // Quality cuts
53  unsigned int minimumQuality() const;
54 
56  Nothing = 0x0,
62  CaloClusters = 0x6,
63  Segments = 0x7
64  };
65  Q_DECLARE_FLAGS(ShownAssociatedObjects, ShownAssociatedObject)
66  ShownAssociatedObjects shownAssociatedObjects() const;
67 
68  QByteArray saveState() const;
69  void restoreFromState( const QByteArray& );
70 
71  signals:
72  void trackTubeRadiusChanged(const double&);
73  void lastAppliedChanged(); // emitted when something related to material changes
75 
78  void cutAllowedPhiChanged(const QList<VP1Interval>&);
79 
80  void minimumQualityChanged(unsigned int);
81 
82  void shownAssociatedObjectsChanged(MuonCollectionSettingsButton::ShownAssociatedObjects);
83 
84  public Q_SLOTS:
86  void setMaterialText(const QString&);
87 
88  protected Q_SLOTS:
89  void updateButton();
90 
91 protected:
92  // void initEditWindow();//!< Make sure that edit window is constructed
93  void mousePressEvent(QMouseEvent *event);
94  void mouseMoveEvent(QMouseEvent *event);
95  void dropEvent(QDropEvent *event);
96  void dragEnterEvent(QDragEnterEvent *event);
97 private:
98 
99  class Imp;
100  Imp * m_d;
101 
102  private Q_SLOTS:
103  void updateTrackDrawStyle();
104  void updateTrackLightModel(bool);
105  void updateTrackTubeRadius();
106  void updateHideActualTrackPath(bool);
112 };
113 
114 Q_DECLARE_OPERATORS_FOR_FLAGS(MuonCollectionSettingsButton::ShownAssociatedObjects)
115 
116 #endif
117 
118 
MuonCollectionSettingsButton::saveState
QByteArray saveState() const
fill out with the state of the object (used for drag and drop etc)
Definition: MuonCollectionSettingsButton.cxx:411
MuonCollectionSettingsButton::possibleChange_cutAllowedPt
void possibleChange_cutAllowedPt()
Definition: MuonCollectionSettingsButton.cxx:502
MuonCollectionSettingsButton::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition: MuonCollectionSettingsButton.cxx:336
MuonCollectionSettingsButton::possibleChange_minimumQuality
void possibleChange_minimumQuality()
Definition: MuonCollectionSettingsButton.cxx:528
MuonCollectionSettingsButton::cutAllowedPhiChanged
void cutAllowedPhiChanged(const QList< VP1Interval > &)
MuonCollectionSettingsButton::hideActualTrackPath
bool hideActualTrackPath() const
Definition: MuonCollectionSettingsButton.cxx:328
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
MuonCollectionSettingsButton::minimumQualityChanged
void minimumQualityChanged(unsigned int)
MuonCollectionSettingsButton::TrackParticlesCB
@ TrackParticlesCB
Definition: MuonCollectionSettingsButton.h:58
MuonCollectionSettingsButton::setMaterialText
void setMaterialText(const QString &)
Definition: MuonCollectionSettingsButton.cxx:84
MuonCollectionSettingsButton::showEditMaterialDialog
void showEditMaterialDialog()
Definition: MuonCollectionSettingsButton.cxx:185
MuonCollectionSettingsButton::hideActualTrackPathChanged
void hideActualTrackPathChanged(bool)
MuonCollectionSettingsButton::m_d
Imp * m_d
Definition: MuonCollectionSettingsButton.h:99
VP1MaterialButton.h
Muon.h
MuonCollectionSettingsButton::Nothing
@ Nothing
Definition: MuonCollectionSettingsButton.h:56
MuonCollectionSettingsButton::parameterMaterial
SoMaterial * parameterMaterial(xAOD::ParameterPosition) const
Definition: MuonCollectionSettingsButton.cxx:279
MuonCollectionSettingsButton::lastAppliedTransparency
virtual double lastAppliedTransparency() const
Definition: MuonCollectionSettingsButton.cxx:209
MuonCollectionSettingsButton::cutAllowedPhi
QList< VP1Interval > cutAllowedPhi() const
Definition: MuonCollectionSettingsButton.cxx:495
MuonCollectionSettingsButton::shownAssociatedObjectsChanged
void shownAssociatedObjectsChanged(MuonCollectionSettingsButton::ShownAssociatedObjects)
MuonCollectionSettingsButton::ShownAssociatedObject
ShownAssociatedObject
Definition: MuonCollectionSettingsButton.h:55
MuonCollectionSettingsButton::updateButton
void updateButton()
Definition: MuonCollectionSettingsButton.cxx:169
MuonCollectionSettingsButton::trackTubeRadiusChanged
void trackTubeRadiusChanged(const double &)
xAOD::ParameterPosition
ParameterPosition
Enum allowing us to know where in ATLAS the parameters are defined.
Definition: TrackingPrimitives.h:209
MuonCollectionSettingsButton::defaultParameterMaterial
SoMaterial * defaultParameterMaterial() const
Definition: MuonCollectionSettingsButton.cxx:274
MuonCollectionSettingsButton::updateTrackLightModel
void updateTrackLightModel(bool)
Definition: MuonCollectionSettingsButton.cxx:247
MuonCollectionSettingsButton::Segments
@ Segments
Definition: MuonCollectionSettingsButton.h:63
MuonCollectionSettingsButton::CaloClusters
@ CaloClusters
Definition: MuonCollectionSettingsButton.h:62
MuonCollectionSettingsButton::minimumQuality
unsigned int minimumQuality() const
Definition: MuonCollectionSettingsButton.cxx:295
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
MuonCollectionSettingsButton::possibleChange_shownAssociatedObjects
void possibleChange_shownAssociatedObjects()
Definition: MuonCollectionSettingsButton.cxx:542
MuonCollectionSettingsButton::~MuonCollectionSettingsButton
virtual ~MuonCollectionSettingsButton()
Definition: MuonCollectionSettingsButton.cxx:161
MuonCollectionSettingsButton::TrackParticlesME
@ TrackParticlesME
Definition: MuonCollectionSettingsButton.h:61
MuonCollectionSettingsButton::lastAppliedChanged
void lastAppliedChanged()
MuonCollectionSettingsButton::lastAppliedBrightness
virtual double lastAppliedBrightness() const
Definition: MuonCollectionSettingsButton.cxx:219
MuonCollectionSettingsButton::possibleChange_cutAllowedPhi
void possibleChange_cutAllowedPhi()
Definition: MuonCollectionSettingsButton.cxx:520
MuonCollectionSettingsButton::TrackParticlesID
@ TrackParticlesID
Definition: MuonCollectionSettingsButton.h:59
MuonCollectionSettingsButton::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
Definition: MuonCollectionSettingsButton.cxx:344
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonCollectionSettingsButton::cutAllowedPtChanged
void cutAllowedPtChanged(const VP1Interval &)
MuonCollectionSettingsButton::TrackParticlesPrimary
@ TrackParticlesPrimary
Definition: MuonCollectionSettingsButton.h:57
MuonCollectionSettingsButton::trackTubeRadius
double trackTubeRadius() const
Definition: MuonCollectionSettingsButton.cxx:225
MuonCollectionSettingsButton::lastAppliedShininess
virtual double lastAppliedShininess() const
Definition: MuonCollectionSettingsButton.cxx:214
python.L1.Config.LegacyTopoMergerMap.signals
signals
Definition: LegacyTopoMergerMap.py:13
MuonCollectionSettingsButton::cutAllowedEtaChanged
void cutAllowedEtaChanged(const VP1Interval &)
MuonCollectionSettingsButton::possibleChange_cutAllowedEta
void possibleChange_cutAllowedEta()
Definition: MuonCollectionSettingsButton.cxx:512
MuonCollectionSettingsButton::setMaterial
virtual bool setMaterial(SoMaterial *)
Definition: MuonCollectionSettingsButton.cxx:196
VP1MaterialButtonBase
Definition: VP1MaterialButton.h:25
VP1Interval
Definition: VP1Interval.h:23
MuonCollectionSettingsButton
Definition: MuonCollectionSettingsButton.h:16
MuonCollectionSettingsButton::restoreFromState
void restoreFromState(const QByteArray &)
Definition: MuonCollectionSettingsButton.cxx:429
MuonCollectionSettingsButton::updateHideActualTrackPath
void updateHideActualTrackPath(bool)
Definition: MuonCollectionSettingsButton.cxx:258
MuonCollectionSettingsButton::updateTrackTubeRadius
void updateTrackTubeRadius()
Definition: MuonCollectionSettingsButton.cxx:231
MuonCollectionSettingsButton::copyValuesFromMaterial
virtual void copyValuesFromMaterial(SoMaterial *)
Definition: MuonCollectionSettingsButton.cxx:204
MuonCollectionSettingsButton::shownAssociatedObjects
ShownAssociatedObjects shownAssociatedObjects() const
Definition: MuonCollectionSettingsButton.cxx:310
MuonCollectionSettingsButton::cutAllowedEta
VP1Interval cutAllowedEta() const
Definition: MuonCollectionSettingsButton.cxx:487
MuonCollectionSettingsButton::trackLightModel
SoLightModel * trackLightModel() const
Definition: MuonCollectionSettingsButton.cxx:269
MuonCollectionSettingsButton::TrackParticlesMS
@ TrackParticlesMS
Definition: MuonCollectionSettingsButton.h:60
MuonCollectionSettingsButton::updateTrackDrawStyle
void updateTrackDrawStyle()
Definition: MuonCollectionSettingsButton.cxx:240
MuonCollectionSettingsButton::dropEvent
void dropEvent(QDropEvent *event)
Definition: MuonCollectionSettingsButton.cxx:403
MuonCollectionSettingsButton::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *event)
Definition: MuonCollectionSettingsButton.cxx:351
MuonCollectionSettingsButton::setDimension
void setDimension(int dim)
Definition: MuonCollectionSettingsButton.cxx:177
MuonCollectionSettingsButton::Imp
Definition: MuonCollectionSettingsButton.cxx:39
MuonCollectionSettingsButton::cutAllowedPt
VP1Interval cutAllowedPt() const
Definition: MuonCollectionSettingsButton.cxx:451
MuonCollectionSettingsButton::trackDrawStyle
SoDrawStyle * trackDrawStyle() const
Definition: MuonCollectionSettingsButton.cxx:264
MuonCollectionSettingsButton::MuonCollectionSettingsButton
MuonCollectionSettingsButton(QWidget *parent=0, int dim=25)
Definition: MuonCollectionSettingsButton.cxx:92