33#include <Inventor/C/errors/debugerror.h>
34#include <Inventor/nodes/SoSeparator.h>
35#include <Inventor/nodes/SoSwitch.h>
36#include <Inventor/nodes/SoMaterial.h>
37#include "Inventor/nodes/SoDrawStyle.h"
38#include "Inventor/nodes/SoLightModel.h"
47#if defined BUILDVP1LIGHT
80 m_d->updateGUICounter = 0;
81 m_d->collSettingsButton=0;
82 m_d->shouldLoad = shouldLoad;
85 QString safetext(
text());
86 safetext.replace(
' ',
'_');
87 safetext.replace(
'[',
'_');
88 safetext.replace(
']',
'_');
89 safetext.replace(
'/',
'_');
90 safetext.replace(
'.',
'_');
91 safetext.replace(
',',
'_');
92 safetext.replace(
'<',
'_');
93 safetext.replace(
'>',
'_');
94 safetext.replace(
'&',
'_');
115 m_d->collSettingsButton->setMaterialText(
name());
126 collSwitch()->addChild(
m_d->collSettingsButton->trackLightModel());
127 collSwitch()->addChild(
m_d->collSettingsButton->trackDrawStyle());
140 connect(
m_d->collSettingsButton,SIGNAL(cutAllowedPhiChanged(
const QList<VP1Interval>&)),
this,SLOT(
setCutAllowedPhi(
const QList<VP1Interval>&)));
148 connect(
m_d->collSettingsButton,SIGNAL(colourParametersByTypeChanged(
bool)),
this,SLOT(
showParametersChanged(
bool)));
167 if (!
m_d->collSettingsButton){
168 messageVerbose(
"No collSettingsButton set! Can't call init(), so crash is imminent...");
169 throw std::runtime_error(
"Electron - No collSettingsButton set!");
171 return *
m_d->collSettingsButton;
177 if (!
m_d->shouldLoad){
178 messageVerbose(
"not loading Electron collection - contains associated objects.");
186 #if defined BUILDVP1LIGHT
188 if( !(
systemBase()->getEvent())->retrieve( coll,
name().toStdString()).isSuccess() ) {
189 QString errMsg =
"Failed to retrieve " +
name();
190 message(
"Error: Could not retrieve collection with key="+
name());
195 message(
"Error: Could not retrieve track particle collection with key="+
name());
204 if( ! coll->hasStore() ) {
205 message(
"No auxiliary store got associated to the Electron container with key: " +
name());
216 for ( it = coll->
begin() ; it != itEnd; ++it) {
217 m_d->possiblyUpdateGUI();
219 messageDebug(
"WARNING: Ignoring null Electron pointer.");
222 if ((*it)->charge()==0.0) {
223 messageDebug(
"WARNING: Ignoring Electron which claims to be neutral (charge()==0.0).");
227 std::cout <<
"elHandle ---> " << elH->
electron().
eta() <<
", "
250 messageVerbose(
"IParticleCollHandle_Electron::showParametersChanged to "+
str(val));
255 messageVerbose(
"IParticleCollHandle_Electron::propagationOptionsChanged");
260 str <<
"\""<<
name().toLatin1().data()<<
"\":{";
264 if (handle->visible()) {
265 if (num)
str <<
",\n";
266 handle->dumpToJSON(
str);
const AODSysCommonData * common() const
void setupSettingsFromController(const AODSystemController *)
void update3DObjectsOfAllHandles()
void collVisibilityChanged(bool)
const QString & name() const
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
IParticleCollHandleBase(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType)
void setCutAllowedPt(const VP1Interval &)
virtual bool cut(AODHandleBase *)
QList< AODHandleBase * > getHandlesList() const
void setCutAllowedPhi(const QList< VP1Interval > &)
void addHandle(AODHandleBase *)
void setCutAllowedEta(const VP1Interval &)
ElectronCollectionSettingsButton * collSettingsButton
IParticleCollHandle_Electron * theclass
virtual void dumpToJSON(std::ofstream &) const
virtual void init(VP1MaterialButtonBase *matBut=0)
void resetCachedValuesCuts()
void propagationOptionsChanged()
virtual bool cut(AODHandleBase *)
virtual void setupSettingsFromControllerSpecific(const AODSystemController *)
For extensions specific to this collection.
static QStringList availableCollections(IVP1System *)
void showParametersChanged(bool)
virtual ~IParticleCollHandle_Electron()
IParticleCollHandle_Electron(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType type, bool shouldLoad=true)
shouldLoad is used to disable the call to load if the collhandle is for temporary (read: associated) ...
const ElectronCollectionSettingsButton & collSettingsButton() const
const xAOD::Electron & electron() const
Interface for non-const operations on an auxiliary store.
void messageVerbose(const QString &) const
void message(const QString &) const
IVP1System * systemBase() const
void messageDebug(const QString &) const
QStringList getKeys() const
virtual void init(VP1MaterialButtonBase *button=0)
SoSwitch * collSwitch() const
Add this somewhere in your scenegraph (do not add any children here!)
void visibilityChanged(bool)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
size_t nTrackParticles() const
Return the number xAOD::TrackParticles that match the electron candidate.
ObjectType
Type of objects that have a representation in the xAOD EDM.
@ Electron
The object is an electron.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".