|
ATLAS Offline Software
|
Definition at line 75 of file TrackHandleBase.cxx.
◆ Imp()
◆ ~Imp()
TrackHandleBase::Imp::~Imp |
( |
| ) |
|
|
inline |
◆ addPathsToSoLineSetAndSoVertexProperty()
void TrackHandleBase::Imp::addPathsToSoLineSetAndSoVertexProperty |
( |
const Amg::SetVectorVector3D * |
paths, |
|
|
int & |
iver, |
|
|
int & |
numlines, |
|
|
SoLineSet * |
line, |
|
|
SoVertexProperty * |
vertices |
|
) |
| const |
Definition at line 603 of file TrackHandleBase.cxx.
617 Amg::SetVectorVector3D::const_iterator itProjPart, itProjPartEnd(
paths->end());
618 for (itProjPart =
paths->begin();itProjPart!=itProjPartEnd;++itProjPart)
◆ addPathToSoLineSetAndSoVertexProperty()
void TrackHandleBase::Imp::addPathToSoLineSetAndSoVertexProperty |
( |
const std::vector< Amg::Vector3D > & |
points, |
|
|
int & |
iver, |
|
|
int & |
numlines, |
|
|
SoLineSet * |
line, |
|
|
SoVertexProperty * |
vertices |
|
) |
| const |
Definition at line 539 of file TrackHandleBase.cxx.
553 std::vector<Amg::Vector3D >::const_iterator pointsIt, pointsItEnd(points.end());
554 unsigned npointsused(0);
563 vertexPlanePhi-=
M_PI;
576 double newPhi= vertexPlanePhi+
M_PI;
577 if (
cos(vertexPlanePhi-trkPhi)>0) newPhi=vertexPlanePhi;
580 for (pointsIt = points.begin();pointsIt!=pointsItEnd && pointsIt->mag2()<maxR2; ++pointsIt) {
588 tempPoint = *pointsIt;
593 vertices->vertex.set1Value(iver++,tempPoint.x(),tempPoint.y(),tempPoint.z());
595 vertices->vertex.set1Value(iver++,pointsIt->x(),pointsIt->y(),pointsIt->z());
599 line->numVertices.set1Value(numlines++,npointsused);
◆ addTSOS()
◆ attach3DObjects()
void TrackHandleBase::Imp::attach3DObjects |
( |
| ) |
|
◆ convertLineSetToCylinders()
void TrackHandleBase::Imp::convertLineSetToCylinders |
( |
SoLineSet * |
line, |
|
|
SoSeparator * |
sep, |
|
|
const double & |
cylradius |
|
) |
| |
|
static |
Definition at line 834 of file TrackHandleBase.cxx.
837 SoVertexProperty *vertices =
static_cast<SoVertexProperty *
>(
line->vertexProperty.getValue());
842 lastTransf.makeIdentity();
844 for (
int iline=0;iline<
line->numVertices.getNum();++iline) {
845 int nvert=
line->numVertices[iline];
850 for (
int jvert= ivert; jvert<ivert+nvert-1;++jvert) {
851 SbVec3f p1 = vertices->vertex[jvert].getValue();
852 SbVec3f p2 = vertices->vertex[jvert+1].getValue();
853 SoCylinder * cyl =
new SoCylinder;
854 cyl->radius = cylradius;
855 const double l(
dist(p1,p2));
859 m.setTranslate(SbVec3f(0,0.5*
l,0));
860 SbVec3f
v(p2);
v -= p1;
861 SbRotation rot(SbVec3f(0,1,0),
v);
862 SbMatrix
m2;
m2.setRotate(rot);
871 mat.multRight(lastTransf.inverse());
872 SoMatrixTransform * mt =
new SoMatrixTransform;
873 mt->matrix.setValue(
mat);
◆ detach3DObjects()
void TrackHandleBase::Imp::detach3DObjects |
( |
| ) |
|
◆ determineMaterial()
SoMaterial * TrackHandleBase::Imp::determineMaterial |
( |
| ) |
|
Definition at line 1269 of file TrackHandleBase.cxx.
1308 if (handle==
nullptr) {
1316 float phiDistance = sqrt (
pow( selectedTrackMom.phi() - thisTrackMom.phi(),2) );
1317 float etaDistance = sqrt (
pow( selectedTrackMom.eta() - thisTrackMom.eta(),2) );
1321 float brightness=
std::max(0.2, 1.0-(etaDistance/5.0) );
1324 SoMaterial*
mat =
new SoMaterial;
1333 if (colScale>0.01) {
1336 QColor tempCol = QColor::fromRgbF(
r,
g,
b );
1338 tempCol.getHsvF(&
h,&
s,&
v);
1343 tempCol.setHsvF(
h,
s,
v);
1345 tempCol.getRgbF(&r2,&
g2,&b2);
1348 r3 =
r+(
r2-
r)*colScale;
1349 b3 =
b+(b2-
b)*colScale;
1350 g3 =
g+(
g2-
g)*colScale;
◆ dist()
double TrackHandleBase::Imp::dist |
( |
const SbVec3f & |
p1, |
|
|
const SbVec3f & |
p2 |
|
) |
| |
|
static |
◆ ensureInitPointsProjections_InDet()
void TrackHandleBase::Imp::ensureInitPointsProjections_InDet |
( |
bool |
raw | ) |
|
Definition at line 1077 of file TrackHandleBase.cxx.
1100 std::vector<Amg::Vector3D > * points=
nullptr;
1112 if ( !points || points->empty() || points->size()<2 ) {
1113 projections->clear();
1114 projections->insert(std::vector<Amg::Vector3D >());
1133 projections->clear();
1134 projections->insert(std::vector<Amg::Vector3D >());
◆ ensureInitPointsProjections_Muon()
void TrackHandleBase::Imp::ensureInitPointsProjections_Muon |
( |
bool |
raw | ) |
|
Definition at line 1139 of file TrackHandleBase.cxx.
1162 std::vector<Amg::Vector3D > * points;
1176 projections->insert(std::vector<Amg::Vector3D >());
1183 bool outsidechamber;
1184 std::vector<Amg::Vector3D > proj1, proj2;
1197 std::vector<Amg::Vector3D >::const_iterator pointsIt=points->begin(), pointsItEnd=points->end()-1;
1198 for (;pointsIt!=pointsItEnd; ++pointsIt) {
1202 firstEndWall_pointA, firstEndWall_pointB,
1203 secondEndWall_pointA, secondEndWall_pointB,
1208 "Problems with projectAndConstrainLineSegmentToMDTChamberEndWalls(..)");
1214 if (!outsidechamber){
1215 if ( proj1.empty() ) {
1216 proj1.push_back(firstEndWall_pointA); proj1.push_back(firstEndWall_pointB);
1218 if ( proj1[proj1.size()-1] == firstEndWall_pointA ) {
1219 proj1.push_back(firstEndWall_pointB);
1222 projections->insert(proj1); proj1.clear();
1223 proj1.push_back(firstEndWall_pointA); proj1.push_back(firstEndWall_pointB);
1226 if ( proj2.empty() ) {
1227 proj2.push_back(secondEndWall_pointA); proj2.push_back(secondEndWall_pointB);
1231 if ( proj2[proj2.size()-1] == secondEndWall_pointA ) {
1232 proj2.push_back(secondEndWall_pointB);
1235 projections->insert(proj2); proj2.clear();
1236 proj2.push_back(secondEndWall_pointA); proj2.push_back(secondEndWall_pointB);
1242 if ( !proj1.empty() ) {
1243 projections->insert(proj1);
1245 if ( !proj2.empty() ) {
1246 projections->insert(proj2);
◆ ensureInitPointsPropagated()
void TrackHandleBase::Imp::ensureInitPointsPropagated |
( |
| ) |
|
◆ ensureInitPointsRaw()
void TrackHandleBase::Imp::ensureInitPointsRaw |
( |
| ) |
|
Definition at line 967 of file TrackHandleBase.cxx.
986 bool unsafeparts(
false);
990 for (; tsos_iter != tsos_end; ++tsos_iter) {
997 trackParam = (*tsos_iter)->trackParameters();
1005 if (!firstmomentum) {
1013 if (!firstmomentum) {
1017 if (firstmomentum->mag()==0.0) {
1028 delete firstmomentum;
1029 firstmomentum =
nullptr;
1040 +
" points for track.");
◆ ensureInitTSOSs()
void TrackHandleBase::Imp::ensureInitTSOSs |
( |
| ) |
|
Definition at line 376 of file TrackHandleBase.cxx.
387 unsigned parindex(0);
393 for (; tsos_iter != tsos_end; ++tsos_iter) {
394 trackParam = (*tsos_iter)->trackParameters();
404 if (ascObjNeedDistToNext&&trackParam) {
405 ascObjNeedDistToNext->setDistToNextPar((trackParam->position()-ascObjNeedDistToNext->approxCenter()).mag());
406 ascObjNeedDistToNext =
nullptr;
409 ascObjNeedDistToNext =
addTSOS(*tsos_iter,parindex++);
◆ ensureLoadPathInfo()
void TrackHandleBase::Imp::ensureLoadPathInfo |
( |
| ) |
|
◆ isSane()
◆ materialChanged()
void TrackHandleBase::Imp::materialChanged |
( |
| ) |
|
◆ rebuild3DObjects()
void TrackHandleBase::Imp::rebuild3DObjects |
( |
| ) |
|
Definition at line 641 of file TrackHandleBase.cxx.
666 std::vector<Amg::Vector3D > * points;
681 line =
new SoLineSet();
685 SoVertexProperty * vertices =
new SoVertexProperty();
687 int iver(0), numlines(0);
697 line->vertexProperty = vertices;
705 std::vector<Trk::PlaneSurface>::const_iterator surfIt=surfaces.begin(), surfEnd=surfaces.end();
708 for (;surfIt!=surfEnd;++surfIt){
711 SoNode * nodeToAdd = theSurfSep;
727 SoText2 *labelText =
new SoText2;
763 if (
mom.mag2()==0.0) {
764 text <<
"Momentum : 0 (undefined)";
769 double pseudoRapidity =
mom.eta();
778 labelText->string.set1Value(
row++,
array.data());
783 unsigned int point=(points->size()-1)*labelTrackOffset;
794 SoTranslation *labelTranslate =
new SoTranslation;
799 labelTranslate->translation.setValue(labelPos.x()+(xOffset*offScale),labelPos.y()+(yOffset*offScale),labelPos.z()+(zOffset*offScale));
801 SoMaterial *sMat =
new SoMaterial();
803 sColor.setValue(SbColor(0, 0, 1));
804 sMat->diffuseColor = sColor;
◆ associatedObjects
◆ attachmentHandles
◆ charge
double TrackHandleBase::Imp::charge |
◆ chargeinit
bool TrackHandleBase::Imp::chargeinit |
◆ customColouredTSOSParts
TrackCommonFlags::TSOSPartsFlags TrackHandleBase::Imp::customColouredTSOSParts |
◆ extrapSurfaces_sep
SoSeparator* TrackHandleBase::Imp::extrapSurfaces_sep |
◆ extraRepAttached
bool TrackHandleBase::Imp::extraRepAttached |
◆ extraRepresentation
SoSeparator* TrackHandleBase::Imp::extraRepresentation |
◆ inittouchedchambers
bool TrackHandleBase::Imp::inittouchedchambers |
|
mutable |
◆ label_sep
SoSeparator* TrackHandleBase::Imp::label_sep |
◆ line
SoLineSet* TrackHandleBase::Imp::line |
◆ m_objBrowseTree
QTreeWidgetItem* TrackHandleBase::Imp::m_objBrowseTree |
◆ mass
double TrackHandleBase::Imp::mass |
◆ massinit
bool TrackHandleBase::Imp::massinit |
◆ ntrackhandles
int TrackHandleBase::Imp::ntrackhandles = 0 |
|
static |
◆ pathInfo_Points
◆ pathInfo_TrkTrack
◆ pathInfoLoaded
bool TrackHandleBase::Imp::pathInfoLoaded |
◆ points_propagated
std::vector<Amg::Vector3D >* TrackHandleBase::Imp::points_propagated |
◆ points_propagated_id_projections
◆ points_propagated_muon_projections
◆ points_raw
◆ points_raw_id_projections
◆ points_raw_muon_projections
◆ randommaterial
SoMaterial* TrackHandleBase::Imp::randommaterial |
◆ shownTSOSParts
TrackCommonFlags::TSOSPartsFlags TrackHandleBase::Imp::shownTSOSParts |
◆ tempMaxPropRadius
float TrackHandleBase::Imp::tempMaxPropRadius |
◆ theclass
◆ touchedmuonchambers
std::set<GeoPVConstLink> TrackHandleBase::Imp::touchedmuonchambers |
|
mutable |
◆ tsos_ascobjs
std::vector<AscObj_TSOS*>* TrackHandleBase::Imp::tsos_ascobjs |
The documentation for this class was generated from the following file:
JetConstituentVector::iterator iterator
SoMaterial * getMaterialForCharge(const double &charge) const
static double dist(const SbVec3f &p1, const SbVec3f &p2)
MuonChamberProjectionHelper * muonChamberProjectionHelper() const
TrackPropagationHelper * trackPropagationHelper() const
const std::set< GeoPVConstLink > & touchedMuonChambers() const
int labelZOffset()
Absolute z offset.
TrackHandleBase * theclass
double collMaterialTransparency() const
bool extendTracks() const
int labelXOffset()
Absolute x offset.
Const iterator class for DataVector/DataList.
AscObj_TSOS * addTSOS(const Trk::TrackStateOnSurface *tsos, unsigned index) const
TrackCommonFlags::TSOSPartsFlags parts() const
TrackSystemController * controller() const
std::map< std::pair< int, double >, AssocObjAttachmentHandle * > attachmentHandles
SoMaterial * material() const
virtual void currentMaterialChanged()
TrackCommonFlags::TrackPartsFlags parts() const
const Amg::Vector3D & position() const
Access method for the position.
float trackLabelTrkOffset()
Percentage of postion along track.
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
SoMaterial * m_currentmaterial
static bool isSafe(const Trk::TrackStateOnSurface *)
static void convertLineSetToCylinders(SoLineSet *line, SoSeparator *sep, const double &cylradius)
virtual unsigned getNTGCHits() const
TrackCollHandleBase * collHandle() const
void ensureInitPointsProjections_InDet(bool raw)
VP1TrackSystem * system() const
static bool isSane(const Amg::Vector3D &p)
int vertexProjectionAngle() const
void registerTrack(SoNode *, TrackHandleBase *)
SoSeparator * extraRepresentation
virtual unsigned getNSCTHits() const
SoMaterial * materialFromVertex(const TrackHandleBase *trk) const
Returns the material for the vertex which knows this trackhandle (if known)
std::set< std::vector< Amg::Vector3D >, VectorVector3DComparer > SetVectorVector3D
static QString str(const QString &s)
std::vector< Trk::PlaneSurface > & getExtrapolationSurfaces() const
bool ignoreMEOTinProp() const
std::vector< AscObj_TSOS * > * tsos_ascobjs
Amg::SetVectorVector3D * points_propagated_muon_projections
Amg::RotationMatrix3D setPhi(Amg::RotationMatrix3D mat, double angle, int convention=0)
static double phiFromXY(const double &x, const double &y)
virtual unsigned getNsTGCHits() const
SoMaterial * determineMaterial()
int labelYOffset()
Absolute y offset.
void registerAssocObject(AssociatedObjectHandleBase *)
Trackhandle assumes ownership.
virtual unsigned getNTRTHits() const
virtual const Trk::FitQuality * getFitQuality() const
Amg::SetVectorVector3D * points_propagated_id_projections
QTreeWidgetItem * m_objBrowseTree
SoMaterial * randommaterial
void projectPath(const std::vector< Amg::Vector3D > &path, Amg::SetVectorVector3D &resulting_projections) const
const Trk::Track * pathInfo_TrkTrack
virtual Amg::Vector3D momentum() const
static const int unknownPDG
virtual unsigned getNRPCHits() const
COLOURBY colourBy() const
void rerandomiseRandomMaterial()
virtual const std::vector< Amg::Vector3D > * provide_pathInfoPoints() const
TrackLabelModes trackLabels()
SoNode * translateSurface(const Trk::Surface &sf, const bool &simple=false) const
InDetProjHelper * indetProjHelper_SCT() const
void ensureInitPointsPropagated()
bool projectAndConstrainLineSegmentToMDTChamberEndWalls(const GeoPVConstLink &mdtChamber, const Amg::Vector3D &pointA, const Amg::Vector3D &pointB, Amg::Vector3D &firstEndWall_pointA, Amg::Vector3D &firstEndWall_pointB, Amg::Vector3D &secondEndWall_pointA, Amg::Vector3D &secondEndWall_pointB, bool &outsidechamber)
bool showExtrapolationSurfaces() const
double collMaterialBrightness() const
Trk::IExtrapolator * propagator() const
virtual int pdgCode() const
0 means unknown
virtual unsigned getNMDTHits() const
double trackTubeRadius() const
virtual unsigned getNMMHits() const
TrackCollHandleBase * m_collhandle
TrackSysCommonData * common() const
virtual Trk::ParticleHypothesis extrapolationParticleHypothesis() const
Default implementation of this next method bases hypothesis on pdgCode() and charge():
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
virtual unsigned getNPixelHits() const
SoMaterial * getMaterialForPDGCode(const int &pdgcode) const
void addPathsToSoLineSetAndSoVertexProperty(const Amg::SetVectorVector3D *paths, int &iver, int &numlines, SoLineSet *, SoVertexProperty *) const
IVP1System * systemBase() const
TrackCommonFlags::TSOSPartsFlags shownTSOSParts
SoSeparator * extrapSurfaces_sep
for debugging.
TrackHandleBase * lastSelectedTrackHandle()
pointer to base of last selected track (zero if nothing selected)
static void messageVerbose(const QString &)
const std::vector< Amg::Vector3D > * pathInfo_Points
Eigen::Matrix< double, 3, 1 > Vector3D
static QString shortInfo(const Trk::MeasurementBase &mb)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
bool isKnownMDTChamber(const GeoPVConstLink &mdtChamber)
const Amg::Vector3D & momentum() const
Access method for the momentum.
virtual unsigned getNCSCHits() const
void ensureInitPointsProjections_Muon(bool raw)
static void messageDebug(const QString &)
bool makePointsCharged(std::vector< Amg::Vector3D > &points, const Trk::Track *, Trk::IExtrapolator *extrapolator, Trk::ParticleHypothesis hypo=Trk::nonInteracting, bool useMEOT=false, const Trk::Volume *volume=0)
void ensureLoadPathInfo()
virtual const Trk::Track * provide_pathInfoTrkTrack() const
InDetProjHelper * indetProjHelper_TRT() const
InDetProjHelper * indetProjHelper_Pixel() const
Amg::SetVectorVector3D * points_raw_muon_projections
float propMaxRadius() const
Amg::SetVectorVector3D * points_raw_id_projections
void ensureInitPointsRaw()
void addPathToSoLineSetAndSoVertexProperty(const std::vector< Amg::Vector3D > &points, int &iver, int &numlines, SoLineSet *, SoVertexProperty *) const
TrackCommonFlags::TSOSPartsFlags customColouredTSOSParts
virtual void setVisible(bool)
std::vector< Amg::Vector3D > * points_propagated
SoMaterial * getMaterialForMomentum(const double &absmom) const
static bool hasMuonGeometry()
VP1ExtraSepLayerHelper * sephelper() const
void message(const QString &) const
void messageVerbose(const QString &) const
static QString particleName(const int &pdgcode, bool &ok)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const Trk::Volume * extrapolateToThisVolume() const
Returns the volume to which we extrapolate ID tracks, or zero if no VolumesSvc found.
std::vector< Amg::Vector3D > * points_raw
bool makePointsNeutral(std::vector< Amg::Vector3D > &points, const Trk::Track *)