|
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include <Inventor/C/errors/debugerror.h>
25 #include <Inventor/nodes/SoLineSet.h>
26 #include <Inventor/nodes/SoPointSet.h>
27 #include <Inventor/nodes/SoVertexProperty.h>
28 #include <Inventor/nodes/SoMaterial.h>
29 #include <Inventor/nodes/SoCone.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 // --> 'GeoModelKernelUnits::cm'
42 #include "GaudiKernel/SystemOfUnits.h"
43 #define SYSTEM_OF_UNITS Gaudi::Units // --> 'Gaudi::Units::cm'
62 SoSeparator *
sep =
nullptr;
203 m_d->
sep =
new SoSeparator();
208 if (not collHandleJet)
return m_d->
sep;
209 SbVec3f origin(0.,0.,0.);
246 const double&
phi,
const double&
energy,
const SbVec3f& origin)
252 sep =
new SoSeparator();
262 double thetaMax = 2.*
atan(
exp(-(
eta+inputconeR)));
263 double thetaMin = 2.*
atan(
exp(-(
eta-inputconeR)));
264 double deltaTheta = fabs(thetaMax-thetaMin);
265 double etaScale = deltaTheta/(2.*inputconeR);
268 SoTranslation *translate =
new SoTranslation();
270 SoRotationXYZ *flip =
new SoRotationXYZ();
274 SoRotationXYZ *ytoz =
new SoRotationXYZ();
279 SoRotationXYZ *rotationPhi =
new SoRotationXYZ();
281 rotationPhi->angle =
phi+
M_PI/2.;
284 SoRotationXYZ *rotationEta =
new SoRotationXYZ();
285 double signEta = fabs(
eta)/
eta;
289 rotationEta->angle=
theta;
296 SoScale* myScale =
new SoScale();
299 myScale->scaleFactor.setValue(etaScale,1.,etaScale);
302 SoTranslation *transvertex =
new SoTranslation();
303 transvertex->translation = origin;
305 sep->addChild(transvertex);
306 sep->addChild(rotationPhi);
307 sep->addChild(rotationEta);
310 sep->addChild(translate);
311 sep->addChild(myScale);
324 SoNode * lastChild =
sep->getChild(
sep->getNumChildren()-1 );
325 if (lastChild->getTypeId() == SoCone::getClassTypeId())
356 cone->bottomRadius =
tan(coneR()) *
h;
357 trans->translation = SbVec3f(0,-0.5*
h, 0);
362 SbString strHeight, strRadius;
363 (cone->height).
get(strHeight);
364 (cone->bottomRadius).
get(strRadius);
385 if (
sep->getNumChildren()<6) {
390 const double energyJet = energyForLengthAndCuts();
392 SoNode * sixthChild =
sep->getChild(5);
393 if (sixthChild->getTypeId()!=SoTranslation::getClassTypeId()) {
397 SoNode * lastChild =
sep->getChild(
sep->getNumChildren()-1);
398 if (lastChild->getTypeId()!=SoCone::getClassTypeId()) {
402 updateConeHeightParameters(
static_cast<SoCone*
>(lastChild),
static_cast<SoTranslation*
>(sixthChild), energyJet);
480 l +=
" - AlgorithmType: " + QString::fromStdString(
algName );
484 l +=
" - InputType: " + QString::fromStdString(
inputType );
529 TSOSitem->setText(0, QString(
"Info:" ) );
531 QString dParameters(
"(");
540 dParameters+=
", e: ";
542 dParameters+=
", eta: ";
544 dParameters+=
", phi: ";
546 dParameters+=
", m: ";
548 dParameters+=
", rapidity: ";
555 dParameters +=
" [more info in the main Message Box]";
557 TSOSitem->setText(1, dParameters );
600 if ( !m_randomMat ) {
610 r = (
rand() /
static_cast<double>(RAND_MAX));
611 g = (
rand() /
static_cast<double>(RAND_MAX));
612 b = (
rand() /
static_cast<double>(RAND_MAX));
616 if ( (
r-1.0)*(
r-1.0)+
g*
g+
b*
b < r2*0.5 )
620 else if (
r*
r+
g*
g+
b*
b < r2*2.0 )
630 " not be selected such as to satisfy all separation criterias");
662 if ( (
i>=0) == isRandomColors ) {
667 if (!isRandomColors )
703 std::cout <<
"B-TAG UPDATE - jet eta: " <<
m_d->
eta() <<
", phi: " <<
m_d->
phi() <<
" - tagger: " << bTaggingTagger <<
" - cut: " << bTaggingCut <<
" - weight: " << bTaggingWeight;
705 if (bTaggingWeight > bTaggingCut) {
707 std::cout <<
" ON" << std::endl;
711 std::cout <<
" OFF" << std::endl;
726 if (myBTag ==
nullptr) {
727 VP1Msg::messageWarningRed(
"It was not possible to access the pointer to b-tagging info, for the selected collection! Returning 'weight': 0.0");
759 else if (
tagger==
"MV2c10")
761 else if (
tagger==
"MV2c00")
764 VP1Msg::message(
"Tagger '" + QString::fromStdString(
tagger) +
"' not found! Returning weight=0.0 ...");
void updateMaterial()
Called after some configuration related to material changes.
void createShapeFromJetParameters(const IParticleCollHandle_Jet *collHandleJet, const double &coneR, const double &eta, const double &phi, const double &energy, const SbVec3f &origin)
void updateConeHeightParameters() const
Scalar phi() const
phi method
SoMaterial * material() const
const xAOD::IParticle & iParticle() const
Scalar eta() const
pseudorapidity method
virtual void clear3DObjects()
Delete objects.
const T * getAssociatedObject(const std::string &name) const
get a single associated object this compact form throws an exception if the object is not existing
const std::string & algName(ID id)
Converts a JetAlgorithmType::ID into a string.
Scalar theta() const
theta method
const AODCollHandleBase * collHandle() const
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
double transverseEnergy() const
virtual double phi() const
The azimuthal angle ( ) of the particle.
void updateConeHeightParameters(SoCone *, SoTranslation *, const double &energy) const
const Amg::Vector3D & position() const
Returns the 3-pos.
double transverseEnergy() const
JetAlgorithmType::ID getAlgorithmType() const
Class providing the definition of the 4-vector interface.
JetInput::Type getInputType() const
static QString str(const QString &s)
virtual QStringList clicked() const
This gives the complete information about the object, shown in the main Message Box.
virtual ~IParticleHandle_Jet()
double m_JetFitterCombNN_pb
virtual void dumpToJSON(std::ofstream &) const
virtual SoNode * nodes()
Returns the 3Dobjects.
float pz() const
The z-component of the jet's momentum.
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
virtual double charge() const
Returns unknown() in case of trouble.
float getSizeParameter() const
IParticleHandle_Jet * theclass
void rerandomiseMaterial()
double energyForLengthAndCuts() const
QString shortInfo() const
This returns the information shown about the object in the object browser.
double energyForCuts() const
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
double m_JetFitterCombNN_pc
ID
//////////////////////////////////////// JetAlgorithmType::ID defines most common physics jet finding...
float py() const
The y-component of the jet's momentum.
void updateBTagging(const std::string &bTaggingTagger, const double &bTaggingCut)
virtual double rapidity() const
The true rapidity (y) of the particle.
bool considerTransverseEnergies
virtual double eta() const
The pseudorapidity ( ) of the particle.
void rerandomiseMaterial()
float px() const
The x-component of the jet's momentum.
double m_JetFitterCombNN_pu
double m_bTagWeightMV2c10
static void messageVerbose(const QString &)
SoSwitch * m_bTaggingCollSwitch
void setScale(const double &sc, bool useEt)
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
virtual double m() const
The invariant mass of the particle.
Class describing a Vertex.
static void message(const QString &, IVP1System *sys=0)
virtual double e() const
The total energy of the particle.
IParticleHandle_Jet(IParticleCollHandleBase *, const xAOD::Jet *)
double m_bTagWeightMV2c20
void updateBTaggingSwitch(SoSwitch *bTaggingSwitch)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
void setMaxR(const double &maxR)
double getBTaggingWeight(const std::string &tagger)
static void messageWarningRed(const QString &str, IVP1System *sys=0)
const IParticleCollHandle_Jet * theCollHandle
size_t numConstituents() const
Number of constituents in this jets (this is valid even when reading a file where the constituents ha...
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
virtual double pt() const
The transverse momentum ( ) of the particle.
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
This gives the list of object's properties, shown in the 'Information' field in the Browser,...
bool MVx_discriminant(const std::string &taggername, double &value) const