25#include <Inventor/nodes/SoLineSet.h>
26#include <Inventor/nodes/SoPointSet.h>
27#include <Inventor/nodes/SoVertexProperty.h>
28#include <Inventor/nodes/SoMaterial.h>
30#include <Inventor/nodes/SoSeparator.h>
31#include <Inventor/nodes/SoTranslation.h>
32#include <Inventor/nodes/SoRotationXYZ.h>
33#include <Inventor/nodes/SoScale.h>
34#include <Inventor/nodes/SoSwitch.h>
39 #include "GeoModelKernel/Units.h"
40 #define SYSTEM_OF_UNITS GeoModelKernelUnits
42 #include "GaudiKernel/SystemOfUnits.h"
43 #define SYSTEM_OF_UNITS Gaudi::Units
56 SoSeparator *
sep =
nullptr;
87 m_d->m_cluster = cluster;
89 m_d->m_genericBox = 0;
102 if (
m_d->m_genericBox)
m_d->m_genericBox->unref();
103 if (
m_d->sep)
m_d->sep->unref();
112 return m_d->genericBox();
120 if (not collHandleJet)
return false;
122 VP1Msg::messageDebug(
"IParticleHandle_CaloCluster::isConsiderTransverseEnergies() - " + QString::number(Et));
141 return 0 !=
m_d->sep;
153 if (
m_d->m_genericBox) {
154 m_d->m_genericBox->unref();
155 m_d->m_genericBox = 0;
180 m_d->sep =
new SoSeparator();
185 if (not coll_handle)
return m_d->sep;
193 m_d->createShapeFromParameters(coll_handle);
208 m_d->updateShapePars(coll);
218 const double dEta = 0.05;
219 const double dPhi = 0.05;
220 const double theEta =
eta();
221 const double thePhi =
phi();
224 m_genericBox->setParametersForBarrelEtaPhiCell( theEta-0.5*dEta, theEta+0.5*dEta,thePhi-0.5*dPhi, thePhi+0.5*dPhi,
227 m_genericBox->setParametersForEndCapEtaPhiCell( theEta-0.5*dEta, theEta+0.5*dEta,thePhi-0.5*dPhi, thePhi+0.5*dPhi,
408 l <<
"--CaloCluster:";
415 l +=
" - pt: " + QString::number(
m_d->m_cluster->pt() / SYSTEM_OF_UNITS::GeV) +
" [GeV]";
416 l +=
" - et: " + QString::number(
m_d->et() / SYSTEM_OF_UNITS::GeV) +
" [GeV]";
417 l +=
" - eta: " + QString::number(
m_d->eta());
418 l +=
" - phi: " + QString::number(
m_d->phi());
419 l +=
" - m: " + QString::number(
m_d->m_cluster->m() / SYSTEM_OF_UNITS::GeV) +
" [GeV] (invariant mass of the particle)";
420 l +=
" - e: " + QString::number(
m_d->m_cluster->e() / SYSTEM_OF_UNITS::GeV) +
" [GeV] (total energy of the particle)";
421 l +=
" - rapidity: " + QString::number(
m_d->m_cluster->rapidity());
422 l +=
" - type: " + QString::number(
m_d->m_cluster->type());
423 l +=
" - ClusterSize: " + QString::number(
m_d->m_cluster->clusterSize());
424 l +=
" - inBarrel: " + QString::number(
m_d->m_cluster->inBarrel());
425 l +=
" - inEndcap: " + QString::number(
m_d->m_cluster->inEndcap());
442 return *(
m_d->m_cluster);
480 QString dParameters(
"(");
484 dParameters +=
"pt: ";
485 dParameters += QString::number(
m_d->m_cluster->pt() / SYSTEM_OF_UNITS::GeV);
487 dParameters +=
", et: ";
488 dParameters += QString::number(
m_d->m_cluster->et() / SYSTEM_OF_UNITS::GeV);
490 dParameters +=
", eta: ";
491 dParameters += QString::number(
m_d->m_cluster->eta());
493 dParameters +=
", phi: ";
494 dParameters += QString::number(
m_d->m_cluster->phi());
515 TSOSitem->setText(0, QString(
"CaloCluster Parameters " ) );
518 dParameters +=
" [more info in the main Message Box]";
520 TSOSitem->setText(1, dParameters );
548 return m_d->energyForLengthAndCuts();
594 str <<
"\"phi\":" <<
m_d->phi() <<
", ";
595 str <<
"\"eta\":" <<
m_d->eta() <<
", ";
596 str <<
"\"energy\":" <<
m_d->e();
const AODCollHandleBase * collHandle() const
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
double energyToLength(const double &energy) const
static const double calo_start_r
static const double calo_start_z
static const double calo_crack_eta
bool showOutlines() const
bool isConsiderTransverseEnergy() const
IParticleHandleBase(IParticleCollHandleBase *)
const xAOD::CaloCluster * cluster() const
const xAOD::CaloCluster * m_cluster
void createShapeFromParameters(const IParticleCollHandle_CaloCluster *coll_handle)
const IParticleCollHandle_CaloCluster * theCollHandle
double energyForLengthAndCuts()
SoGenericBox * m_genericBox
SoGenericBox * genericBox()
void updateShapePars(const IParticleCollHandle_CaloCluster *coll_handle)
IParticleHandle_CaloCluster * theclass
bool considerTransverseEnergies
double energyForLengthAndCuts(const IParticleCollHandle_CaloCluster *coll_handle)
virtual SoNode * nodes()
Returns the 3Dobjects.
IParticleHandle_CaloCluster(IParticleCollHandleBase *, const xAOD::CaloCluster *)
virtual void dumpToJSON(std::ofstream &) const
virtual ~IParticleHandle_CaloCluster()
SoGenericBox * genericBox()
virtual void clear3DObjects()
Delete objects.
bool isConsiderTransverseEnergies() const
QString shortInfo() const
This returns the information shown about the object in the object browser.
virtual QStringList clicked() const
This gives the complete information about the object, shown in the main Message Box.
const xAOD::IParticle & iParticle() const
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
void updateShape(IParticleCollHandle_CaloCluster *coll)
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
This gives the list of object's properties, shown in the 'Information' field in the Browser,...
double energyForCuts() const
virtual double charge() const
Returns unknown() in case of trouble.
static void messageVerbose(const QString &)
static void messageDebug(const QString &)
SoMaterial * material() const
static QString str(const QString &s)
Class providing the definition of the 4-vector interface.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.