|
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>
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;
104 VP1Msg::messageVerbose(
"IParticleHandle_TrackParticle::nodes() - already have sep so not doing anything.");
108 m_d->
sep =
new SoSeparator();
117 #ifndef BUILDVP1LIGHT
119 #endif // BUILDVP1LIGHT
130 SoPointSet* parameterPoints = 0;
131 SoVertexProperty * vertices2 = 0;
136 parameterPoints =
new SoPointSet;
137 vertices2 =
new SoVertexProperty;
143 for (std::pair<xAOD::ParameterPosition, Amg::Vector3D> parpos : parAndPoses ) {
146 if (colourByParamType) {
149 vertices2->vertex.set1Value(0,
pos.x(),
pos.y(),
pos.z());
150 parameterPoints->numPoints=1;
151 parameterPoints->vertexProperty = vertices2;
152 m_d->
sep->addChild(parameterPoints);
153 parameterPoints =
new SoPointSet;
154 vertices2 =
new SoVertexProperty;
156 vertices2->vertex.set1Value(
i++,
pos.x(),
pos.y(),
pos.z());
160 if (colourByParamType) {
162 parameterPoints->unref();
166 parameterPoints->numPoints=
i;
167 parameterPoints->vertexProperty = vertices2;
169 m_d->
sep->addChild(parameterPoints);
175 std::vector<Amg::Vector3D> positions, momenta;
177 #if defined BUILDVP1LIGHT
183 positions.push_back(
Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()));
184 momenta. push_back(
Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
186 #endif // BUILDVP1LIGHT
214 float x =
a.x() + (
b.x()-
a.x())*
t;
215 float y =
a.y() + (
b.y()-
a.y())*
t;
216 float z =
a.z() + (
b.z()-
a.z())*
t;
233 unsigned int npointsused(0);
239 SoVertexProperty * vertices =
new SoVertexProperty();
250 for (
unsigned int i=1;
i<positions.size(); ++
i){
253 if (useExistingParams){
254 float scale = ( (positions[
i]-positions[
i-1]).
mag() )/3.0;
266 float t=
static_cast<float>(
count)/
static_cast<float>(maxCount);
272 vertices->vertex.set1Value(iver++,
pos.x(),
pos.y(),
pos.z());
278 vertices->vertex.set1Value(iver++,positions[
i].
x(),positions[
i].
y(),positions[
i].
z());
289 m_d->
line->numVertices.set1Value(0,npointsused);
290 m_d->
line->vertexProperty = vertices;
294 #ifndef BUILDVP1LIGHT
317 std::vector<Amg::Vector3D> positions;
318 std::vector<Amg::Vector3D> momenta;
321 positions.push_back(
Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()));
322 momenta. push_back(
Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
340 positions.push_back(
pos);
341 momenta.push_back(
mom);
349 positions.push_back(
pos);
350 momenta.push_back(
mom);
364 #endif // BUILDVP1LIGHT
370 l <<
"TrackParticle:";
376 #if defined BUILDVP1LIGHT
412 #endif // BUILDVP1LIGHT
416 #if defined BUILDVP1LIGHT
509 l+=
"Muon prec. layers/holes [";
519 TSOSitem->setText(0, QString(
"Def. Parameters " ) );
520 QString dParameters(
"(");
531 TSOSitem->setText(1, dParameters );
536 QString
pos(
", Position = (");
546 TSOSitem->setText(1, QString(
"BeamLine" )+
pos );
549 TSOSitem->setText(1, QString(
"FirstMeasurement")+
pos );
552 TSOSitem->setText(1, QString(
"LastMeasurement" )+
pos );
555 TSOSitem->setText(1, QString(
"CalorimeterEntrance")+
pos );
558 TSOSitem->setText(1, QString(
"CalorimeterExit" )+
pos );
561 TSOSitem->setText(1, QString(
"MuonSpectrometerEntrance")+
pos );
564 TSOSitem->setText(1, QString(
"Undefined")+
pos );
576 typedef std::pair<xAOD::ParameterPosition, Amg::Vector3D> paramAndPos;
578 #if defined BUILDVP1LIGHT
583 #endif // BUILDVP1LIGHT
600 str <<
"\"dparams\": ["
virtual unsigned getNMuonPrecisionHoleLayers() const
virtual void dumpToJSON(std::ofstream &) const
virtual Amg::Vector3D position() const
IParticleCollHandle_TrackParticle * collHandle
@ CalorimeterExit
Parameter defined at the exit of the calorimeter.
@ numberOfPrecisionHoleLayers
layers with holes AND no hits [unit8_t].
Scalar phi() const
phi method
SoMaterial * material() const
virtual double charge() const
Returns unknown() in case of trouble.
void fillLineFromSplineFit(const std::vector< Amg::Vector3D > &positions, const std::vector< Amg::Vector3D > &momenta)
Fill d->line with a SoLineSet made from a spline fit between the information in positions and momenta...
virtual Amg::Vector3D momentum() const
constexpr double INVALID_P(10e9)
float charge() const
Returns the charge.
virtual unsigned getNSCTHits() const
const Amg::Vector3D & position() const
Access method for the position.
@ BeamLine
Parameter defined at the Vertex/Beamline.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Scalar theta() const
theta method
float parameterPX(unsigned int index) const
Returns the parameter x momentum component, for 'index'.
virtual ~IParticleHandle_TrackParticle()
@ numberOfPhiHoleLayers
layers with trigger phi holes but no hits [unit8_t].
const xAOD::TrackParticle * trackparticle
float z0() const
Returns the parameter.
float chiSquared() const
Returns the of the overall track fit.
bool useExistingParameters() const
const xAOD::IParticle & iParticle() const
const AODCollHandleBase * collHandle() const
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
int numOfStepsForInterpolation() const
Returns true if the propagation should use the parameters already on the particle,...
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ 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.
void bezier(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, Amg::Vector3D &c, Amg::Vector3D &d, float t)
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
const AODSysCommonData * common() const
void addLine_FromTrackParticle()
Make the line, but only using information on the track (a spline fit will be done from the parameters...
bool colourParametersByType() const
bool showParameters() const
Returns the number of steps to use when interpolating between paramters (0 is no interpolation....
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
Create and fill the object browser QTreeWidgetItem.
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'.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
const TrackParticleCollectionSettingsButton & collSettingsButton() const
SummaryType
Enumerates the different types of information stored in Summary.
const Trk::IExtrapolationEngine * extrapolator() const
IParticleHandle_TrackParticle(IParticleCollHandleBase *, const xAOD::TrackParticle *)
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
const QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > & parametersAndPositions() const
void linear(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, float t)
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
virtual unsigned getNPixelHits() const
virtual QStringList clicked() const
Called when user selects the node (stringlist is displayed in messagebox).
QString shortInfo() const
This returns the information shown about the object in the object browser.
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
virtual unsigned getNMuonPrecisionLayers() const
QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > parametersAndPositions
virtual QStringList baseInfo() const
float phi0() const
Returns the parameter, which has range to .
QList< Amg::Vector3D > positionsToWrite
float qOverP() const
Returns the parameter.
float parameterPZ(unsigned int index) const
Returns the parameter z momentum component, for 'index'.
virtual unsigned getNMuonPhiHoleLayers() const
IParticleHandle_TrackParticle * theclass
static void messageVerbose(const QString &)
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
Eigen::Matrix< double, 3, 1 > Vector3D
virtual unsigned getNMuonPhiLayers() const
virtual unsigned getNTRTHits() const
void addLine_Extrapolated()
Extrapolate the initial track parameters to get the line (a spline fit is done between the extrapolat...
const Amg::Vector3D & momentum() const
Access method for the momentum.
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 addParameterShapes()
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ MuonSpectrometerEntrance
Parameter defined at the entrance to the Muon Spectrometer.
virtual unsigned summaryValue(xAOD::SummaryType type) const
float parameterZ(unsigned int index) const
Returns the parameter z position, for 'index'.
float numberDoF() const
Returns the number of degrees of freedom of the overall track or vertex fit as float.
SoMaterial * parameterMaterial(xAOD::ParameterPosition) const
virtual void clear3DObjects()
Delete objects.
Class describing a TrackParticle.
virtual SoNode * nodes()
Returns the 3Dobjects.
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
@ numberOfPhiLayers
layers with a trigger phi hit [unit8_t].
float theta() const
Returns the parameter, which has range 0 to .
Scalar mag() const
mag method
virtual QString type() const
return very short word with type (maybe link with collection type?)
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].