|  | 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 "GeoModelKernel/Units.h" 
   35   #define SYSTEM_OF_UNITS GeoModelKernelUnits // so we will get, e.g., 'GeoModelKernelUnits::cm' 
   39   #define SYSTEM_OF_UNITS Gaudi::Units // so we will get, e.g., 'Gaudi::Units::cm' 
   40 #endif // BUILDVP1LIGHT 
   49   SoSeparator * 
sep = 
nullptr; 
 
   50   SoLineSet * 
line = 
nullptr;
 
  107     m_d->
sep = 
new SoSeparator();
 
  116     #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;
 
  178   if (!trackparticle) {
 
  179     VP1Msg::message(
"ERROR : no primary track particle associated with this Electron. Can't visualise it.");
 
  183 #if defined BUILDVP1LIGHT 
  189   positions.push_back(
Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z())); 
 
  190   momenta.  push_back(
Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
 
  192 #endif // BUILDVP1LIGHT 
  218   float x = 
a.x() + (
b.x()-
a.x())*
t;
 
  219   float y = 
a.y() + (
b.y()-
a.y())*
t;
 
  220   float z = 
a.z() + (
b.z()-
a.z())*
t;
 
  237   unsigned int npointsused(0);
 
  243   SoVertexProperty * vertices = 
new SoVertexProperty();
 
  254   for (
unsigned int i=1; 
i<positions.size(); ++
i){
 
  257     if (useExistingParams){
 
  258       float scale = ( (positions[
i]-positions[
i-1]).
mag() )/3.0; 
 
  270         float t=
static_cast<float>(
count)/
static_cast<float>(maxCount);
 
  276         vertices->vertex.set1Value(iver++,
pos.x(),
pos.y(),
pos.z());
 
  282       vertices->vertex.set1Value(iver++,positions[
i].
x(),positions[
i].
y(),positions[
i].
z());
 
  293   m_d->
line->numVertices.set1Value(0,npointsused);
 
  294   m_d->
line->vertexProperty = vertices;
 
  298 #ifndef BUILDVP1LIGHT 
  321   std::vector<Amg::Vector3D> positions;
 
  322   std::vector<Amg::Vector3D> momenta;
 
  325   positions.push_back(
Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z())); 
 
  326   momenta.  push_back(
Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
 
  344         positions.push_back(
pos);
 
  345         momenta.push_back(
mom);
 
  353     positions.push_back(
pos);
 
  354     momenta.push_back(
mom);
 
  368 #endif // BUILDVP1LIGHT 
  380 #if defined BUILDVP1LIGHT 
  416 #endif // BUILDVP1LIGHT 
  419 #if defined BUILDVP1LIGHT 
  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 getNSCTHits() const
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
float charge() const
Obtain the charge of the object.
QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > parametersAndPositions
@ 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
const xAOD::Electron & electron() const
virtual QStringList clicked() const
Called when user selects the node (stringlist is displayed in messagebox).
constexpr double INVALID_P(10e9)
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'.
@ numberOfPhiHoleLayers
layers with trigger phi holes but no hits [unit8_t].
float z0() const
Returns the  parameter.
float chiSquared() const
Returns the  of the overall track fit.
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].
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
const QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > & parametersAndPositions() const
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ CalorimeterEntrance
Parameter defined at the entrance to the calorimeter.
virtual void dumpToJSON(std::ofstream &) const
@ 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)
virtual unsigned getNPixelHits() const
float d0() const
Returns the  parameter.
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
const AODSysCommonData * common() const
virtual Amg::Vector3D momentum() const
virtual SoNode * nodes()
Returns the 3Dobjects.
float parameterY(unsigned int index) const
Returns the parameter y position, for 'index'.
virtual unsigned getNMuonPhiHoleLayers() const
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.
SummaryType
Enumerates the different types of information stored in Summary.
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
Create and fill the object browser QTreeWidgetItem.
void addLine_Extrapolated()
Extrapolate the initial track parameters to get the line (a spline fit is done between the extrapolat...
const Trk::IExtrapolationEngine * extrapolator() const
QString shortInfo() const
This returns the information shown about the object in the object browser.
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
virtual ~IParticleHandle_Electron()
IParticleCollHandle_Electron * collHandle
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
void addParameterShapes()
const xAOD::IParticle & iParticle() const
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 QStringList baseInfo() const
virtual QString type() const
return very short word with type (maybe link with collection type?)
virtual unsigned getNMuonPrecisionLayers() const
float phi0() const
Returns the  parameter, which has range  to .
float qOverP() const
Returns the  parameter.
IParticleHandle_Electron(IParticleCollHandleBase *, const xAOD::Electron *)
virtual unsigned getNMuonPhiLayers() const
void linear(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, float t)
float parameterPZ(unsigned int index) const
Returns the parameter z momentum component, for 'index'.
const ElectronCollectionSettingsButton & collSettingsButton() const
static void messageVerbose(const QString &)
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
IParticleHandle_Electron * theclass
Eigen::Matrix< double, 3, 1 > Vector3D
virtual double charge() const
Returns unknown() in case of trouble.
virtual Amg::Vector3D position() const
const Amg::Vector3D & momentum() const
Access method for the momentum.
QList< Amg::Vector3D > positionsToWrite
virtual unsigned getNTRTHits() const
static void message(const QString &, IVP1System *sys=0)
const xAOD::Electron * electron
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
virtual void clear3DObjects()
Delete objects.
void addLine_FromElectron()
Make the line, but only using information on the track (a spline fit will be done from the parameters...
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ MuonSpectrometerEntrance
Parameter defined at the entrance to the Muon Spectrometer.
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.
Class describing a TrackParticle.
virtual unsigned getNMuonPrecisionHoleLayers() const
virtual unsigned summaryValue(xAOD::SummaryType type) const
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
void bezier(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, Amg::Vector3D &c, Amg::Vector3D &d, float t)
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].