|
ATLAS Offline Software
|
Go to the documentation of this file.
29 #endif // BUILDVP1LIGHT
32 #include <QStringList>
39 #include <Inventor/C/errors/debugerror.h>
40 #include <Inventor/nodes/SoSeparator.h>
41 #include <Inventor/nodes/SoSwitch.h>
42 #include <Inventor/nodes/SoMaterial.h>
45 #include <Inventor/nodes/SoTexture2.h>
53 #endif // BUILDVP1LIGHT
57 #include "GeoModelKernel/Units.h"
58 #define SYSTEM_OF_UNITS GeoModelKernelUnits // --> 'GeoModelKernelUnits::cm'
60 #include "GaudiKernel/SystemOfUnits.h"
61 #define SYSTEM_OF_UNITS Gaudi::Units // --> 'Gaudi::Units::cm'
65 #if defined BUILDVP1LIGHT
75 #endif // BUILDVP1LIGHT
93 #endif // BUILDVP1LIGHT
144 QString safetext(
text());
145 safetext.replace(
' ',
'_');
146 safetext.replace(
'[',
'_');
147 safetext.replace(
']',
'_');
148 safetext.replace(
'/',
'_');
149 safetext.replace(
'.',
'_');
150 safetext.replace(
',',
'_');
151 safetext.replace(
'<',
'_');
152 safetext.replace(
'>',
'_');
153 safetext.replace(
'&',
'_');
231 messageDebug(
"IParticleCollHandle_Jet::setupSettingsFromControllerSpecific()");
242 connect(controller,SIGNAL(cutAllowedPhiChanged(
const QList<VP1Interval>&)),
this,SLOT(
setCutAllowedPhi(
const QList<VP1Interval>&)));
251 connect(controller,SIGNAL(scaleChanged(
const double&)),
this,SLOT(
setScale(
const double&)));
260 connect(controller, SIGNAL(maxRChanged(
const double&)),
this, SLOT(
setMaxR(
const double&)));
265 connect(controller, SIGNAL(bTaggingTaggerChanged(
const QString &)),
this, SLOT(
setBTaggingTagger(
const QString &)));
267 connect(controller, SIGNAL(bTaggingCutChanged(
const double &)),
this, SLOT(
setBTaggingCut(
const double &)));
281 messageVerbose(
"Jet - No collSettingsButton set! Can't call init(), so crash is imminent...");
307 m_d->
scale = isEt ? tmpScale : -tmpScale;
321 if (
jet &&
jet->has3DObjects()) {
322 jet->setScale(tmpScale, isEt);
325 message(
"ERROR Handle of wrong type!");
369 if (
jet &&
jet->has3DObjects()) {
373 message(
"ERROR Handle of wrong type!");
416 if (
jet &&
jet->has3DObjects()) {
421 jet->updateMaterial( randomColors );
424 message(
"ERROR Handle of wrong type!");
436 messageVerbose(
"IParticleCollHandle_Jet::rerandomise() - Returning.");
440 VP1Msg::message(
"'Random jet colours' is not checked. Nothing to do. Returning.");
450 if (
jet &&
jet->has3DObjects()) {
451 jet->rerandomiseMaterial();
453 message(
"ERROR Handle of wrong type!");
467 #if defined BUILDVP1LIGHT
479 QString errMsg =
"Failed to retrieve " +
name();
480 message(
"Error: Could not retrieve collection with key="+
name());
485 message(
"Error: Could not retrieve Jet collection with key="+
name());
490 #endif // BUILDVP1LIGHT
497 if( ! coll->hasStore() ) {
498 message(
"No auxiliary store got associated to the Jet container with key: " +
name());
540 double jEnergy = handle->energyForCuts();
541 double jEnergySqr = jEnergy * jEnergy;
558 double phi = handle->phi();
580 messageVerbose(
"Not a IParticleCollHandle_Jet. Calling base method...");
716 messageVerbose(
"IParticleCollHandle_Jet::updateBTaggingAllJets()");
723 if (
jet &&
jet->has3DObjects()) {
726 message(
"ERROR Handle of wrong type!");
735 messageVerbose(
"IParticleCollHandle_Jet::updateBTaggingSwitchAllJets()");
742 if (
jet &&
jet->has3DObjects()) {
745 message(
"ERROR Handle of wrong type!");
756 messageVerbose(
"IParticleCollHandle_Jet::setBTaggingMaterialChanged()");
771 messageDebug(
"IParticleCollHandle_Jet::persistifiableState() - start...");
797 messageDebug(
"IParticleCollHandle_Jet::persistifiableState() - end.");
807 des.disableUnrestoredChecks();
808 if (
des.version()!=0&&
des.version()!=1) {
809 messageDebug(
"Warning: Ignoring state with wrong version");
815 bool vis =
des.restoreBool();
819 QByteArray extraWidgetState =
des.version()>=1 ?
des.restoreByteArray() : QByteArray();
822 if (extraWidgetState!=QByteArray())
826 messageDebug(
"restoring material collection button...");
829 messageDebug(
"reset all caches storing values for cuts...");
856 str <<
"\""<<
name().toLatin1().data()<<
"\":{";
860 if (handle->visible()) {
862 handle->dumpToJSON(
str);
def retrieve(aClass, aKey=None)
void setExtraWidgetsState(const QByteArray &)
JetCollectionSettingsButton * collSettingsButton
Const iterator class for DataVector/DataList.
SoTexture2 * bTaggingTexture
IParticleCollHandle_Jet(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType type)
Scalar phi() const
phi method
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
void setBTaggingTagger(const QString &)
void messageVerbose(const QString &) const
void setState(const QByteArray &)
Provide specific implementation.
virtual void init(VP1MaterialButtonBase *button=0)
virtual void largeChangesBegin()
void setMaxR(const double &max)
virtual QColor defaultColor() const
static QString str(const QString &s)
void messageDebug(const QString &) const
void setCutAllowedPt(const VP1Interval &)
void setCutAllowedPhi(const QList< VP1Interval > &)
virtual void setupSettingsFromControllerSpecific(const AODSystemController *)
For extensions specific to this collection.
const VP1Interval & getCutAllowedEta()
void resetCachedValuesCuts()
const AODSysCommonData * common() const
virtual bool cut(AODHandleBase *)
QStringList getKeys() const
QList< AODHandleBase * > getHandlesList() const
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
SoSwitch * bTaggingSwitch
SoMaterial * bTaggingMaterial
void showParametersChanged(bool)
void setRandomJetColours(const bool &)
void visibilityChanged(bool)
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
virtual void init(VP1MaterialButtonBase *matBut=0)
QByteArray extraWidgetsState() const
void setBTaggingEnabled(const bool &)
virtual void dumpToJSON(std::ofstream &) const
virtual bool cut(AODHandleBase *)
void setCutAllowedEta(const VP1Interval &)
void setBTaggingMaterialChanged(const bool &)
void setBTaggingMaterial(SoMaterial *mat=NULL)
void updateBTaggingSwitchAllJets()
void setupSettingsFromController(const AODSystemController *)
void setScale(const double &s)
IVP1System * systemBase() const
QByteArray persistifiableState() const
Provide specific implementation.
static void messageVerbose(const QString &)
void setBTaggingSkin(const QString &filename)
bool isRandomColors() const
virtual void largeChangesEnd()
Interface for non-const operations on an auxiliary store.
virtual void handleIterationBegin()
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
void collVisibilityChanged(bool)
const JetCollectionSettingsButton & collSettingsButton() const
static QStringList availableCollections(IVP1System *)
IParticleCollHandle_Jet * theclass
void setBTaggingCut(const double &)
static void message(const QString &, IVP1System *sys=0)
void setBTaggingSkinChanged(const bool &ok)
const VP1Interval & getCutAllowedPt()
virtual AODHandleBase * getNextHandle()
SoMaterial * m_jetMaterialDefault
void addHandle(AODHandleBase *)
virtual ~IParticleCollHandle_Jet()
void message(const QString &) const
QList< VP1Interval > getCutAllowedPhi()
void update3DObjectsOfAllHandles()
void updateBTaggingAllJets()
std::string bTaggingTagger
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
void recheckCutStatusOfAllVisibleHandles()
Jet_v1 Jet
Definition of the current "jet version".
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.