|
ATLAS Offline Software
|
Go to the documentation of this file.
23 #include <Inventor/C/errors/debugerror.h>
24 #include <Inventor/nodes/SoLineSet.h>
25 #include <Inventor/nodes/SoPointSet.h>
26 #include <Inventor/nodes/SoVertexProperty.h>
27 #include <Inventor/nodes/SoMaterial.h>
28 #include <Inventor/nodes/SoCone.h>
29 #include <Inventor/nodes/SoSeparator.h>
30 #include <Inventor/nodes/SoTranslation.h>
31 #include <Inventor/nodes/SoRotationXYZ.h>
34 #include "CLHEP/Units/SystemOfUnits.h"
35 #endif // BUILDVP1LIGHT
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'
54 SoSeparator *
sep =
nullptr;
55 SoLineSet *
line =
nullptr;
187 m_d->
sep =
new SoSeparator();
199 SoPointSet* parameterPoints =
new SoPointSet;
200 SoVertexProperty* vertices2 =
new SoVertexProperty;
205 for (std::pair<xAOD::ParameterPosition, Amg::Vector3D> parpos : parAndPoses ) {
207 vertices2->vertex.set1Value(
i++,
pos.x(),
pos.y(),
pos.z());
210 parameterPoints->numPoints=
i;
211 parameterPoints->vertexProperty = vertices2;
214 m_d->
sep->addChild(parameterPoints);
220 std::vector<Amg::Vector3D> positions, momenta;
223 if (!trackparticle) {
224 VP1Msg::message(
"ERROR : no primary track particle associated with this Muon. Can't visualise it.");
227 #if defined BUILDVP1LIGHT
233 positions.push_back(
Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()));
234 momenta. push_back(
Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
236 #endif // BUILDVP1LIGHT
248 if ( positions.size()<2 ) {
249 VP1Msg::messageVerbose(
"IParticleHandle_Muon::addLine_FromTrackParticle - WARNING - not enough points to make a line.");
263 float x =
a.x() + (
b.x()-
a.x())*
t;
264 float y =
a.y() + (
b.y()-
a.y())*
t;
265 float z =
a.z() + (
b.z()-
a.z())*
t;
282 unsigned int npointsused(0);
289 SoVertexProperty * vertices =
new SoVertexProperty();
291 for (
unsigned int i=1;
i<positions.size(); ++
i){
294 unsigned int maxCount=4;
295 float scale = ( (positions[
i]-positions[
i-1]).
mag() )/2.0;
309 vertices->vertex.set1Value(iver++,
pos.x(),
pos.y(),
pos.z());
315 m_d->
line->numVertices.set1Value(0,npointsused);
316 m_d->
line->vertexProperty = vertices;
328 l <<
"Type = Combined";
330 case xAOD::Muon::MuonStandAlone:
331 l <<
"Type = MuonStandAlone";
333 case xAOD::Muon::SegmentTagged:
334 l <<
"Type = SegmentTagged";
336 case xAOD::Muon::CaloTagged:
337 l <<
"Type = CaloTagged";
339 case xAOD::Muon::SiliconAssociatedForwardMuon:
340 l <<
"Type = SiliconAssociatedForwardMuon";
343 l <<
"Type = Unknown";
348 l <<
"Quality = Tight";
351 l <<
"Quality = Medium";
354 l <<
"Quality = Loose";
357 l <<
"Quality = VeryLoose";
360 l <<
"Quality = Unknown";
367 #if defined BUILDVP1LIGHT
416 #if defined BUILDVP1LIGHT
485 return QString(
"Combined");
486 case xAOD::Muon::MuonStandAlone:
487 return QString(
"MuonStandAlone");
488 case xAOD::Muon::SegmentTagged:
489 return QString(
"SegmentTagged");
490 case xAOD::Muon::CaloTagged:
491 return QString(
"CaloTagged");
492 case xAOD::Muon::SiliconAssociatedForwardMuon:
493 return QString(
"SiliconAssociatedForwardMuon");
495 return QString(
"Unknown Muon type");
502 return QString(
"Tight");
504 return QString(
"Medium");
506 return QString(
"Loose");
508 return QString(
"VeryLoose");
510 return QString(
"Unknown Muon quality");
549 TSOSitem->setText(0, QString(
"Def. Parameters [d0,z0,phi0,theta,qOverP]" ) );
550 QString dParameters(
"(");
561 TSOSitem->setText(1, dParameters );
566 QString
pos(
", Position = (");
576 TSOSitem->setText(1, QString(
"BeamLine" )+
pos );
579 TSOSitem->setText(1, QString(
"FirstMeasurement")+
pos );
582 TSOSitem->setText(1, QString(
"LastMeasurement" )+
pos );
585 TSOSitem->setText(1, QString(
"CalorimeterEntrance")+
pos );
588 TSOSitem->setText(1, QString(
"CalorimeterExit" )+
pos );
591 TSOSitem->setText(1, QString(
"MuonSpectrometerEntrance")+
pos );
594 TSOSitem->setText(1, QString(
"Undefined")+
pos );
606 typedef std::pair<xAOD::ParameterPosition, Amg::Vector3D> paramAndPos;
608 #if defined BUILDVP1LIGHT
617 #endif // BUILDVP1LIGHT
const QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > & parametersAndPositions() const
@ CalorimeterExit
Parameter defined at the exit of the calorimeter.
unsigned int quality() const
Scalar phi() const
phi method
SoMaterial * material() const
constexpr double INVALID_P(10e9)
float charge() const
Returns the charge.
@ BeamLine
Parameter defined at the Vertex/Beamline.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
Create and fill the object browser QTreeWidgetItem.
IParticleHandle_Muon(IParticleCollHandleBase *, const xAOD::Muon *)
void addLine_FromTrackParticle()
Quality quality() const
The Muon Quality information is defined on the MCP twiki: https://twiki.cern.ch/twiki/bin/view/Atlas/...
Scalar theta() const
theta method
float parameterPX(unsigned int index) const
Returns the parameter x momentum component, for 'index'.
float z0() const
Returns the parameter.
void fillLineFromSplineFit(const std::vector< Amg::Vector3D > &positions, const std::vector< Amg::Vector3D > &momenta)
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
virtual Amg::Vector3D momentum() const
virtual SoNode * nodes()
Returns the 3Dobjects.
@ CalorimeterEntrance
Parameter defined at the entrance to the calorimeter.
@ LastMeasurement
Parameter defined at the position of the last measurement.
Class providing the definition of the 4-vector interface.
static QString str(const QString &s)
constexpr double INVALID_QOP(10e-9)
float d0() const
Returns the parameter.
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
float parameterY(unsigned int index) const
Returns the parameter y position, for 'index'.
float parameterPY(unsigned int index) const
Returns the parameter y momentum component, for 'index'.
virtual Amg::Vector3D position() const
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
void linear(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, float t)
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > parametersAndPositions
void addParameterShapes()
void printMsgNoTrackParticle()
const xAOD::Muon & muon() const
const xAOD::IParticle & iParticle() const
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
virtual QStringList clicked() const
Called when user selects the node (stringlist is displayed in messagebox).
virtual QStringList baseInfo() const
virtual double charge() const
Returns unknown() in case of trouble.
float phi0() const
Returns the parameter, which has range to .
float qOverP() const
Returns the parameter.
virtual void clear3DObjects()
Delete objects.
float parameterPZ(unsigned int index) const
Returns the parameter z momentum component, for 'index'.
static void messageVerbose(const QString &)
QString shortInfo() const
This returns the information shown about the object in the object browser.
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
Eigen::Matrix< double, 3, 1 > Vector3D
bool hasPrimaryTrackParticleInfo()
IParticleHandle_Muon * theclass
static void message(const QString &, IVP1System *sys=0)
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
void bezier(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, Amg::Vector3D &c, Amg::Vector3D &d, float t)
@ MuonSpectrometerEntrance
Parameter defined at the entrance to the Muon Spectrometer.
float parameterZ(unsigned int index) const
Returns the parameter z position, for 'index'.
QString muonTypeString() const
const TrackParticle * primaryTrackParticle() const
Returns a pointer (which should not usually be NULL, but might be if the muon has been stripped of in...
IParticleCollHandle_Muon * collHandle
virtual ~IParticleHandle_Muon()
Class describing a TrackParticle.
QString qualityString() const
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
float theta() const
Returns the parameter, which has range 0 to .
Scalar mag() const
mag method
MuonType muonType() const