ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
TrackHandleBase::Imp Class Reference
Collaboration diagram for TrackHandleBase::Imp:

Public Member Functions

 Imp (TrackHandleBase *tc)
 
 ~Imp ()
 
void ensureInitPointsRaw ()
 
void ensureInitPointsPropagated ()
 
void ensureInitPointsProjections_InDet (bool raw)
 
void ensureInitPointsProjections_Muon (bool raw)
 
void materialChanged ()
 
void rebuild3DObjects ()
 
void attach3DObjects ()
 
void detach3DObjects ()
 
void addPathToSoLineSetAndSoVertexProperty (const std::vector< Amg::Vector3D > &points, int &iver, int &numlines, SoLineSet *, SoVertexProperty *) const
 
void addPathsToSoLineSetAndSoVertexProperty (const Amg::SetVectorVector3D *paths, int &iver, int &numlines, SoLineSet *, SoVertexProperty *) const
 
SoMaterial * determineMaterial ()
 
void ensureLoadPathInfo ()
 
void ensureInitTSOSs ()
 
AscObj_TSOSaddTSOS (const Trk::TrackStateOnSurface *tsos, unsigned index) const
 

Static Public Member Functions

static void convertLineSetToCylinders (SoLineSet *line, SoSeparator *sep, const double &cylradius)
 
static double dist (const SbVec3f &p1, const SbVec3f &p2)
 
static bool isSane (const Amg::Vector3D &p)
 

Public Attributes

TrackHandleBasetheclass
 
bool chargeinit
 
double charge
 
bool massinit
 
double mass
 
SoLineSet * line
 
SoSeparator * extraRepresentation
 
SoSeparator * extrapSurfaces_sep
 for debugging. More...
 
bool extraRepAttached
 
std::vector< Amg::Vector3D > * points_raw
 
std::vector< Amg::Vector3D > * points_propagated
 
Amg::SetVectorVector3Dpoints_raw_id_projections
 
Amg::SetVectorVector3Dpoints_raw_muon_projections
 
Amg::SetVectorVector3Dpoints_propagated_id_projections
 
Amg::SetVectorVector3Dpoints_propagated_muon_projections
 
std::set< GeoPVConstLink > touchedmuonchambers
 
bool inittouchedchambers
 
SoMaterial * randommaterial
 
QList< AssociatedObjectHandleBase * > associatedObjects
 
std::map< std::pair< int, double >, AssocObjAttachmentHandle * > attachmentHandles
 
bool pathInfoLoaded
 
const Trk::TrackpathInfo_TrkTrack
 
const std::vector< Amg::Vector3D > * pathInfo_Points
 
SoSeparator * label_sep
 
TrackCommonFlags::TSOSPartsFlags shownTSOSParts
 
TrackCommonFlags::TSOSPartsFlags customColouredTSOSParts
 
std::vector< AscObj_TSOS * > * tsos_ascobjs
 
QTreeWidgetItem * m_objBrowseTree
 
float tempMaxPropRadius
 

Static Public Attributes

static int ntrackhandles = 0
 

Detailed Description

Definition at line 75 of file TrackHandleBase.cxx.

Constructor & Destructor Documentation

◆ Imp()

TrackHandleBase::Imp::Imp ( TrackHandleBase tc)
inline

Definition at line 82 of file TrackHandleBase.cxx.

82  : theclass(tc),
83  chargeinit(false),
85  massinit(false),
87  line(nullptr),
88  extraRepresentation(nullptr),
89  extrapSurfaces_sep(nullptr),
90  extraRepAttached(false),
91  points_raw(nullptr), points_propagated(nullptr),
96  inittouchedchambers(false),
97  randommaterial(nullptr),
98  pathInfoLoaded(false),
99  pathInfo_TrkTrack(nullptr),
100  pathInfo_Points(nullptr),
101  label_sep(nullptr),
104  tsos_ascobjs(nullptr),
105  m_objBrowseTree(nullptr),
106  tempMaxPropRadius(0.0){}

◆ ~Imp()

TrackHandleBase::Imp::~Imp ( )
inline

Definition at line 107 of file TrackHandleBase.cxx.

107 { delete tsos_ascobjs; }

Member Function Documentation

◆ 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.

606 {
607  if ( !paths || ( paths->size()==1 && paths->begin()->empty()) )
608  return;
609  if (!line) {
610  theclass->collHandle()->systemBase()->message("TrackHandleBase::Imp::addPathToSoLineSetAndSoVertexProperty (2) ERROR: Unexpected null SoLineSet pointer!");
611  return;
612  }
613  if (!vertices) {
614  theclass->collHandle()->systemBase()->message("TrackHandleBase::Imp::addPathToSoLineSetAndSoVertexProperty (2) ERROR: Unexpected null SoVertexPropery pointer!");
615  return;
616  }
617  Amg::SetVectorVector3D::const_iterator itProjPart, itProjPartEnd(paths->end());
618  for (itProjPart = paths->begin();itProjPart!=itProjPartEnd;++itProjPart)
619  addPathToSoLineSetAndSoVertexProperty(*itProjPart,iver,numlines,line,vertices);
620 }

◆ 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.

542 {
543  if (points.size()<2)
544  return;
545  if (!line) {
546  theclass->collHandle()->systemBase()->message("TrackHandleBase::Imp::addPathToSoLineSetAndSoVertexProperty (1) ERROR: Unexpected null SoLineSet pointer!");
547  return;
548  }
549  if (!vertices) {
550  theclass->collHandle()->systemBase()->message("TrackHandleBase::Imp::addPathToSoLineSetAndSoVertexProperty (1) ERROR: Unexpected null SoVertexPropery pointer!");
551  return;
552  }
553  std::vector<Amg::Vector3D >::const_iterator pointsIt, pointsItEnd(points.end());
554  unsigned npointsused(0);
555 
556 
558  if (tempMaxPropRadius>0.0){
560  theclass->collHandle()->systemBase()->messageVerbose("maxR2 is set to "+VP1Msg::str(maxR2));
561  }
562  float vertexPlanePhi = (theclass->common()->controller()->vertexProjectionAngle())*M_PI/180;// angle of plane to use for vertex projection
563  vertexPlanePhi-=M_PI; // ATLAS range is -PI to PI
564 
565  // debug msgs:
566  // theclass->collHandle()->systemBase()->messageVerbose("TrackHandleBase::Imp::addPathToSoLineSetAndSoVertexProperty - adding "
567  // +VP1Msg::str(points.size())+" points up to R2 of "+VP1Msg::str(maxR2));
568  theclass->collHandle()->systemBase()->messageVerbose("Vertex projection is set to "+VP1Msg::str(vertexPlanePhi));
569 
570  // unsigned int count=0; // for the debug msgs below
571 
572  //For vertex projection
573  Amg::Vector3D tempPoint;
574 
575  double trkPhi = theclass->momentum().phi(); // some tracks curve between sections otherwise.
576  double newPhi= vertexPlanePhi+M_PI;
577  if (cos(vertexPlanePhi-trkPhi)>0) newPhi=vertexPlanePhi;
578  // theclass->collHandle()->systemBase()->messageVerbose("Vertex projection is set to "+VP1Msg::str(vertexPlanePhi)+" trkPhi= "+VP1Msg::str(trkPhi)+" newPhi="+VP1Msg::str(newPhi)); // debug msg
579 
580  for (pointsIt = points.begin();pointsIt!=pointsItEnd && pointsIt->mag2()<maxR2; ++pointsIt) {
581  // theclass->collHandle()->systemBase()->messageVerbose(VP1Msg::str(count++)+": point has perp2="+VP1Msg::str(pointsIt->perp2())); // debug msg
582  if (!isSane(*pointsIt)) {
583  theclass->collHandle()->systemBase()->message("WARNING: Ignoring point on track:"+VP1Msg::str( *pointsIt ) );
584  continue;
585  }
586 
588  tempPoint = *pointsIt;
589  Amg::setPhi(tempPoint, newPhi);
590 
591  // std::cout<<trkPhi<<"\t"<<phi<<"\t"<<r0<<"\t"<<r1<<"\t"<<r2<<"\t"<<r3<<"\t"<<rotatePhi<<"\t"<<tempPoint.getPhi()<<std::endl; // debug msg
592 
593  vertices->vertex.set1Value(iver++,tempPoint.x(),tempPoint.y(),tempPoint.z());
594  } else {
595  vertices->vertex.set1Value(iver++,pointsIt->x(),pointsIt->y(),pointsIt->z());
596  }
597  ++npointsused;
598  }
599  line->numVertices.set1Value(numlines++,npointsused);
600 }

◆ addTSOS()

AscObj_TSOS * TrackHandleBase::Imp::addTSOS ( const Trk::TrackStateOnSurface tsos,
unsigned  index 
) const

Definition at line 415 of file TrackHandleBase.cxx.

416 {
417  AscObj_TSOS* ao = new AscObj_TSOS(theclass,tsos,index);
419  tsos_ascobjs->push_back(ao);
420  if (ao->parts()&shownTSOSParts)
421  ao->setVisible(true);
422  return ao;
423 }

◆ attach3DObjects()

void TrackHandleBase::Imp::attach3DObjects ( )

Definition at line 883 of file TrackHandleBase.cxx.

884 {
885  VP1Msg::messageDebug("TrackHandleBase::Imp::attach3DObjects() - 1");
886 
887  if (!theclass->m_currentmaterial) {
889  theclass->m_currentmaterial->ref();
890  materialChanged();
891  }
892  if (line && theclass->m_collhandle->sephelper()) {
893  VP1Msg::messageDebug("TrackHandleBase::Imp::attach3DObjects() - 2");
895  double tube_r(theclass->m_collhandle->trackTubeRadius());
896  if (tube_r) {
897  if (extraRepresentation) {
898  extraRepresentation->removeAllChildren();
899  } else {
900  extraRepresentation = new SoSeparator;
901  extraRepresentation->ref();
903  }
905  if (!extraRepAttached) {
907  extraRepAttached=true;
908  }
909  }
910  }
912  theclass->common()->textSep()->addChild(label_sep);
913 
915 }

◆ convertLineSetToCylinders()

void TrackHandleBase::Imp::convertLineSetToCylinders ( SoLineSet *  line,
SoSeparator *  sep,
const double &  cylradius 
)
static

Definition at line 834 of file TrackHandleBase.cxx.

835 {
836  //TODO: belongs in VP1Utils
837  SoVertexProperty *vertices = static_cast<SoVertexProperty *>(line->vertexProperty.getValue());
838  if (!vertices)
839  return;
840  int ivert(0);
841  SbMatrix lastTransf;
842  lastTransf.makeIdentity();
843 
844  for (int iline=0;iline<line->numVertices.getNum();++iline) {
845  int nvert=line->numVertices[iline];
846  if (nvert<2) {
847  ivert += nvert;
848  continue;
849  }
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));
856  cyl->height = l;
857  //First translate (0,l/2,0), then rotate (0,1,0) into (p2-p1), then translate p1.:
858  SbMatrix m;
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);
863  m.multRight(m2);
864  SbMatrix m3;
865  m3.setTranslate(p1);
866  m.multRight(m3);
867  //m is the transform we need in front of our cylinder.
868  //However, we need to first add the inverse of all previous transforms.
869  SbMatrix mat;
870  mat = m;
871  mat.multRight(lastTransf.inverse());
872  SoMatrixTransform * mt = new SoMatrixTransform;
873  mt->matrix.setValue(mat);
874  sep->addChild(mt);
875  sep->addChild(cyl);
876  lastTransf = m;
877  }
878  ivert += nvert;
879  }
880 }

◆ detach3DObjects()

void TrackHandleBase::Imp::detach3DObjects ( )

◆ determineMaterial()

SoMaterial * TrackHandleBase::Imp::determineMaterial ( )

Definition at line 1269 of file TrackHandleBase.cxx.

1270 {
1271  // debug msg:
1272  // theclass->collHandle()->systemBase()->message("determineMaterial with material = "+QString::number(static_cast<unsigned int>(theclass->collHandle()->colourBy()))); //too verbose. EJWM.
1273 
1274  int pdgcode(0);
1275  switch(theclass->collHandle()->colourBy()) {
1276 
1278  pdgcode = theclass->pdgCode();
1279  return theclass->common()->controller()->getMaterialForPDGCode(pdgcode == SimBarCode::unknownPDG ? 0 : pdgcode);
1280 
1282  if (!randommaterial) {
1283  randommaterial = new SoMaterial;
1284  randommaterial->ref();
1286  }
1287  return randommaterial;
1288 
1293 
1295  {
1296  // debug code:
1297  // AscObjSelectionManager* selManager= theclass->common()->ascObjSelectionManager();
1298  // TrackHandleBase* handle = 0;
1299  // if ( selManager ) {
1300  // QList<AssociatedObjectHandleBase*> selection = selManager->currentSelection();
1301  // if (!selection.empty()) handle = selection[0]->trackHandle(); // Take first at the moment, but should loop and colour by all. FIXME!
1302  // else theclass->collHandle()->systemBase()->message("Empty selection!");
1303  // } else {
1304  // theclass->collHandle()->systemBase()->message("No AscObjSelectionManager");
1305  // }
1306 
1308  if (handle==nullptr) {
1309  //theclass->collHandle()->systemBase()->message("No previously selected track.");
1310  return theclass->collHandle()->material(); // use collection colouring
1311  }
1312 
1313  Amg::Vector3D selectedTrackMom = handle->momentum();
1314  Amg::Vector3D thisTrackMom = theclass->momentum();
1315 
1316  float phiDistance = sqrt ( pow( selectedTrackMom.phi() - thisTrackMom.phi(),2) );
1317  float etaDistance = sqrt ( pow( selectedTrackMom.eta() - thisTrackMom.eta(),2) );
1318 
1319  //theclass->collHandle()->systemBase()->message("Distance "+QString::number(distance)); // debug msg
1320  float colScale=std::max(0.0, std::min(1.0,phiDistance/(M_PI))); // means that min scale is reached 0.5 of total possible distance away.
1321  float brightness= std::max(0.2, 1.0-(etaDistance/5.0) );
1322  //theclass->collHandle()->systemBase()->message("Distance "+QString::number(distance)+"\t brightness "+QString::number(brightness)); // debug msg
1323 
1324  SoMaterial* mat = new SoMaterial;
1325  mat->ref();
1326 
1327  // get colour of collection.
1328  const SbColor& col=theclass->collHandle()->material()->diffuseColor[0];
1329  float r,g,b;
1330  col.getValue(r,g,b);
1331 
1332  double r3,g3,b3;
1333  if (colScale>0.01) {
1334 
1335  //Use QColor to get HSL
1336  QColor tempCol = QColor::fromRgbF( r,g,b );
1337  double h,s,v;
1338  tempCol.getHsvF(&h,&s,&v);
1339 
1340  //get opposite hue for farthest away points.
1341  h+=0.5;
1342  if (h>1.0) h-=1.0;
1343  tempCol.setHsvF(h,s,v);
1344  double r2,g2,b2;
1345  tempCol.getRgbF(&r2,&g2,&b2);
1346 
1347  // closest will have collection colour - far away will have opposite colour
1348  r3 = r+(r2-r)*colScale;
1349  b3 = b+(b2-b)*colScale;
1350  g3 = g+(g2-g)*colScale;
1351 
1352  } else {
1353  // too close - take default values
1354  r3=r;b3=b;g3=g;
1355  }
1356 
1357  VP1MaterialButton::setMaterialParameters(mat,r3*brightness,g3*brightness,b3*brightness,
1360 
1361  return mat;
1362  }
1364  {
1365  SoMaterial* mat = theclass->common()->system()->materialFromVertex(theclass);
1366  if (mat)
1367  return mat;
1368  else
1369  return theclass->collHandle()->material();
1370  }
1372  default:
1373  return theclass->collHandle()->material();
1374  }
1375 }

◆ dist()

double TrackHandleBase::Imp::dist ( const SbVec3f &  p1,
const SbVec3f &  p2 
)
static

Definition at line 825 of file TrackHandleBase.cxx.

826 {
827  float x1,x2,y1,y2,z1,z2;
828  p1.getValue(x1,y1,z1);
829  p2.getValue(x2,y2,z2);
830  return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)+(z2-z1)*(z2-z1));
831 }

◆ ensureInitPointsProjections_InDet()

void TrackHandleBase::Imp::ensureInitPointsProjections_InDet ( bool  raw)

Definition at line 1077 of file TrackHandleBase.cxx.

1078 {
1080  return;
1081 
1083 
1084  //First check if we use same points for raw/propagated modes:
1086  if (raw) {
1089  return;
1090  }
1091  } else {
1094  return;
1095  }
1096  }
1097  }
1098 
1099  //Time for the hard work:
1100  std::vector<Amg::Vector3D > * points=nullptr;
1101  Amg::SetVectorVector3D* projections=nullptr;
1102  if (raw) {
1104  points = points_raw;
1105  projections = points_raw_id_projections;
1106  } else {
1108  points = points_propagated;
1109  projections = points_propagated_id_projections;
1110  }
1111 
1112  if ( !points || points->empty() || points->size()<2 ) {
1113  projections->clear();
1114  projections->insert(std::vector<Amg::Vector3D >());//error signature
1115  return;
1116  }
1117 
1118  bool oneok(false);
1120  theclass->common()->indetProjHelper_Pixel()->projectPath(*points,*projections);
1121  oneok = true;
1122  }
1123  if (theclass->common()->indetProjHelper_SCT()) {
1124  theclass->common()->indetProjHelper_SCT()->projectPath(*points,*projections);
1125  oneok = true;
1126  }
1127  if (theclass->common()->indetProjHelper_TRT()) {
1128  theclass->common()->indetProjHelper_TRT()->projectPath(*points,*projections);
1129  oneok = true;
1130  }
1131 
1132  if (!oneok) {
1133  projections->clear();
1134  projections->insert(std::vector<Amg::Vector3D >());//error signature
1135  }
1136 }

◆ ensureInitPointsProjections_Muon()

void TrackHandleBase::Imp::ensureInitPointsProjections_Muon ( bool  raw)

Definition at line 1139 of file TrackHandleBase.cxx.

1140 {
1142  return;
1143 
1145 
1146  //First check if we use same points for raw/propagated modes:
1148  if (raw) {
1151  return;
1152  }
1153  } else {
1156  return;
1157  }
1158  }
1159  }
1160 
1161  //Time for the hard work:
1162  std::vector<Amg::Vector3D > * points;
1163  Amg::SetVectorVector3D * projections;
1164  if (raw) {
1166  points = points_raw;
1167  projections = points_raw_muon_projections;
1168  } else {
1170  points = points_propagated;
1171  projections = points_propagated_muon_projections;
1172  }
1173 
1175  if ( !VP1JobConfigInfo::hasMuonGeometry() || !projhelper || !points || points->empty() ) {
1176  projections->insert(std::vector<Amg::Vector3D >());//error signature
1177  return;
1178  }
1179 
1180  //Temporary variables:
1181  Amg::Vector3D firstEndWall_pointA, firstEndWall_pointB;
1182  Amg::Vector3D secondEndWall_pointA, secondEndWall_pointB;
1183  bool outsidechamber;
1184  std::vector<Amg::Vector3D > proj1, proj2;
1185 
1186  //For each (MDT) chamber we try to project all line segments on "points" to the ends of that chamber.
1188 
1189  //For now, only project to end of MDT chambers:
1190  if (!projhelper->isKnownMDTChamber(*it))
1191  continue;
1192 
1193  proj1.clear();
1194  proj2.clear();
1195 
1196  // now loop over the stored points
1197  std::vector<Amg::Vector3D >::const_iterator pointsIt=points->begin(), pointsItEnd=points->end()-1;
1198  for (;pointsIt!=pointsItEnd; ++pointsIt) {
1199 
1200  // Do projections
1201  bool ok = projhelper->projectAndConstrainLineSegmentToMDTChamberEndWalls( *it, *pointsIt, *(pointsIt+1),
1202  firstEndWall_pointA, firstEndWall_pointB,
1203  secondEndWall_pointA, secondEndWall_pointB,
1204  outsidechamber );
1205 
1206  if (!ok) {
1207  theclass->collHandle()->systemBase()->message("TrackHandleBase Error: "
1208  "Problems with projectAndConstrainLineSegmentToMDTChamberEndWalls(..)");
1209  // projections->clear();
1210  // projections->push_back(std::vector<Amg::Vector3D >);//error signature
1211  continue;
1212  }
1213 
1214  if (!outsidechamber){
1215  if ( proj1.empty() ) {
1216  proj1.push_back(firstEndWall_pointA); proj1.push_back(firstEndWall_pointB);
1217  } else {
1218  if ( proj1[proj1.size()-1] == firstEndWall_pointA ) {
1219  proj1.push_back(firstEndWall_pointB);//Keep adding to line part
1220  } else {
1221  //Start new line.
1222  projections->insert(proj1); proj1.clear();
1223  proj1.push_back(firstEndWall_pointA); proj1.push_back(firstEndWall_pointB);
1224  }
1225  }
1226  if ( proj2.empty() ) {
1227  proj2.push_back(secondEndWall_pointA); proj2.push_back(secondEndWall_pointB);
1228  } else {
1229  // unsure about this change...coverity 16206, sroe
1230  // if ( proj2[proj2.size()-1] == firstEndWall_pointA ) {
1231  if ( proj2[proj2.size()-1] == secondEndWall_pointA ) {
1232  proj2.push_back(secondEndWall_pointB);//Keep adding to line part
1233  } else {
1234  //Start new line.
1235  projections->insert(proj2); proj2.clear();
1236  proj2.push_back(secondEndWall_pointA); proj2.push_back(secondEndWall_pointB);
1237  }
1238  }
1239  }
1240  //proj2 fixme
1241  }
1242  if ( !proj1.empty() ) {
1243  projections->insert(proj1);
1244  }
1245  if ( !proj2.empty() ) {
1246  projections->insert(proj2);
1247  }
1248  }
1249 }

◆ ensureInitPointsPropagated()

void TrackHandleBase::Imp::ensureInitPointsPropagated ( )

Definition at line 1045 of file TrackHandleBase.cxx.

1046 {
1047  if (points_propagated)
1048  return;
1049 
1051 
1052  if (pathInfo_TrkTrack) {
1053  points_propagated = new std::vector<Amg::Vector3D >();
1054  bool ok (false);
1055  if (theclass->hasCharge()&&theclass->charge()!=0.0)
1061  else
1063 
1064  if (!ok) {
1065  delete points_propagated;
1068  }
1069  } else {
1070  //We just use the raw points:
1073  }
1074 }

◆ ensureInitPointsRaw()

void TrackHandleBase::Imp::ensureInitPointsRaw ( )

Definition at line 967 of file TrackHandleBase.cxx.

968 {
969  // debug msg:
970  // theclass->collHandle()->systemBase()->message("ensureInitPointsRaw start" );
971 
972  if (points_raw)
973  return;
974  points_raw = new std::vector<Amg::Vector3D >;
975 
977  // Get information about this path //
979 
981 
982  if (pathInfo_TrkTrack) {
983  Amg::Vector3D * firstmomentum(nullptr);
985  points_raw->reserve(pathInfo_TrkTrack->trackParameters()->size());
986  bool unsafeparts(false);
989  const Trk::TrackParameters* trackParam;
990  for (; tsos_iter != tsos_end; ++tsos_iter) {
991  if (!VP1TrackSanity::isSafe(*tsos_iter)) {
992  unsafeparts = true;
993  continue;
994  }
995  if (theclass->collHandle()->ignoreMEOTinProp() && (*tsos_iter)->materialEffectsOnTrack())
996  continue;
997  trackParam = (*tsos_iter)->trackParameters();
998  if (trackParam) {
999  if (!VP1TrackSanity::isSafe(trackParam)) {
1000  unsafeparts = true;
1001  continue;
1002  }
1003  trackParam->position();//test
1004  points_raw->push_back( trackParam->position() );
1005  if (!firstmomentum) {
1006  firstmomentum = new Amg::Vector3D(trackParam->momentum());
1007  }
1008  }
1009  }
1010  if (unsafeparts)
1011  theclass->collHandle()->systemBase()->message("WARNING: Ignored unsafe parts of track!");
1012  if (points_raw->size()==1) {
1013  if (!firstmomentum) {
1014  theclass->collHandle()->systemBase()->message(" TrackHandleBase ERROR: Unexpected null firstmomentum!");
1015  firstmomentum = new Amg::Vector3D(0,0,0);
1016  }
1017  if (firstmomentum->mag()==0.0) {
1018  theclass->collHandle()->systemBase()->message("TrackHandleBase ERROR: Only point on track had zero momentum. Can't add second point.");
1019  points_raw->clear();
1020  } else {
1021  VP1Msg::messageVerbose("TrackHandleBase: Adding second point in direction of initial momentum.");
1022  points_raw->push_back(points_raw->front()+(*firstmomentum)*(100.0/firstmomentum->mag()));
1023  }
1024  } else if (points_raw->empty()) {
1025  theclass->collHandle()->systemBase()->message("TrackHandleBase ERROR: No points on track.");
1026  }
1027 
1028  delete firstmomentum;
1029  firstmomentum = nullptr;
1030  return;
1031  }
1032  if (pathInfo_Points)
1033  std::copy(pathInfo_Points->begin(), pathInfo_Points->end(), std::back_inserter(*points_raw));
1034  if (points_raw->size()<2) {
1035  theclass->collHandle()->systemBase()->message("TrackHandleBase ERROR: Less than two points on track provided.");
1036  points_raw->clear();
1037  } else {
1038  VP1Msg::messageVerbose( "TrackHandleBase: Created raw data "
1039  + QString::number(points_raw->size())
1040  + " points for track.");
1041  }
1042 }

◆ ensureInitTSOSs()

void TrackHandleBase::Imp::ensureInitTSOSs ( )

Definition at line 376 of file TrackHandleBase.cxx.

377 {
378  if (tsos_ascobjs)
379  return;
380  tsos_ascobjs = new std::vector<AscObj_TSOS*>;
383  return;
384 
385  tsos_ascobjs->reserve(pathInfo_TrkTrack->trackParameters()->size());
386 
387  unsigned parindex(0);
388 
389  AscObj_TSOS* ascObjNeedDistToNext(nullptr);
392  const Trk::TrackParameters* trackParam(nullptr);
393  for (; tsos_iter != tsos_end; ++tsos_iter) {
394  trackParam = (*tsos_iter)->trackParameters();
395  if (!VP1TrackSanity::isSafe(*tsos_iter)) {
396  parindex++;
397  continue;
398  }
399  if (trackParam&&!VP1TrackSanity::isSafe(trackParam)) {
400  parindex++;
401  continue;
402  }
403  //FIXME: likewise check that we don't have a bad measurement, material effect, ...
404  if (ascObjNeedDistToNext&&trackParam) {
405  ascObjNeedDistToNext->setDistToNextPar((trackParam->position()-ascObjNeedDistToNext->approxCenter()).mag());
406  ascObjNeedDistToNext = nullptr;
407  }
408  VP1Msg::messageVerbose("Adding TSOS at index:"+QString::number(parindex));
409  ascObjNeedDistToNext = addTSOS(*tsos_iter,parindex++);
410  }
411 
412 }

◆ ensureLoadPathInfo()

void TrackHandleBase::Imp::ensureLoadPathInfo ( )

Definition at line 189 of file TrackHandleBase.cxx.

190 {
191  if (pathInfoLoaded)
192  return;
193  pathInfoLoaded = true;
195  if (pathInfo_TrkTrack)
196  return;
198  if (!pathInfo_Points) {
199  theclass->collHandle()->systemBase()->message("ERROR: No path information for track in collection "+theclass->collHandle()->name());
200  }
201 }

◆ isSane()

static bool TrackHandleBase::Imp::isSane ( const Amg::Vector3D p)
inlinestatic

Definition at line 163 of file TrackHandleBase.cxx.

164  {
165  if (p.x()!=p.x()||fabs(p.x())>1.0*CLHEP::km)
166  return false;
167  if (p.y()!=p.y()||fabs(p.y())>1.0*CLHEP::km)
168  return false;
169  if (p.z()!=p.z()||fabs(p.z())>1.0*CLHEP::km)
170  return false;
171  return true;
172  }

◆ materialChanged()

void TrackHandleBase::Imp::materialChanged ( )

Definition at line 816 of file TrackHandleBase.cxx.

817 {
819  std::map<std::pair<int,double>,AssocObjAttachmentHandle *>::iterator it,itE(attachmentHandles.end());
820  for (it = attachmentHandles.begin();it!=itE;++it)
821  it->second->trackMaterialChanged();
822 }

◆ rebuild3DObjects()

void TrackHandleBase::Imp::rebuild3DObjects ( )

Definition at line 641 of file TrackHandleBase.cxx.

642 {
643  //Ensure we are always detached while updating.
644  if (theclass->m_visible)
645  detach3DObjects();
646 
647  // Make sure we're not going to redraw old surfaces, for this debug mode.
650 
651  Trk::IExtrapolator * propagator = theclass->collHandle()->propagator();
652 
653  if (propagator)
655  else
657 
659  if (id_proj)
661 
663  if (muon_proj)
665 
666  std::vector<Amg::Vector3D > * points;
667  Amg::SetVectorVector3D *proj_id, *proj_muon;
668  if (propagator) {
669  points = points_propagated;
672  } else {
673  points = points_raw;
674  proj_id = points_raw_id_projections;
675  proj_muon = points_raw_muon_projections;
676  }
677 
678  //Put points into an appropriate vertex property.
679  theclass->clearLine(); //FIXME: Since we are just changing shape - no need to delete line and take it
680  //out of the tree first. Just edit lineset properties instead.
681  line = new SoLineSet();
682  line->ref();
684 
685  SoVertexProperty * vertices = new SoVertexProperty();
686 
687  int iver(0), numlines(0);
688 
689  //Add various parts to these vertices as appropriate:
691  addPathToSoLineSetAndSoVertexProperty(*points,iver,numlines,line,vertices);
692  if (id_proj)
693  addPathsToSoLineSetAndSoVertexProperty( proj_id, iver, numlines, line, vertices );
694  if (muon_proj)
695  addPathsToSoLineSetAndSoVertexProperty( proj_muon, iver, numlines, line, vertices );
696 
697  line->vertexProperty = vertices;
698 
700 
701 
702 // Add debugging surfaces.
704  std::vector<Trk::PlaneSurface>& surfaces = theclass->common()->trackPropagationHelper()->getExtrapolationSurfaces();
705  std::vector<Trk::PlaneSurface>::const_iterator surfIt=surfaces.begin(), surfEnd=surfaces.end();
706  SurfaceToSoNode surfCnv;//fixme: check if need in common()
707  extrapSurfaces_sep=new SoSeparator;
708  for (;surfIt!=surfEnd;++surfIt){
709  SoNode* theSurfSep = surfCnv.translateSurface(*surfIt);
710  if (theSurfSep) {
711  SoNode * nodeToAdd = theSurfSep;
712  extrapSurfaces_sep->addChild(nodeToAdd);
713  }
714  }
715  }
716 
717 // Add labels
718  if (!points->empty() && theclass->common()->controller()->doTrackLabels() ){
719 
720  // should detach first? This is all fairly suboptimal I'm sure... EJWM.
721  if (!label_sep){
722  label_sep = new SoSeparator;
723  label_sep->ref();
724  }
725  label_sep->removeAllChildren ();
726 
727  SoText2 *labelText = new SoText2;
728  labelText->ref();
729  QStringList text;
730  TrackSystemController::TrackLabelModes labels=theclass->common()->controller()->trackLabels();
732  text << "P="+VP1Msg::str(theclass->momentum().mag())+" MeV";
733  }
734 
736  text << "|Pt|="+VP1Msg::str(theclass->momentum().perp())+" MeV";
737  }
738 
740  int pdg = theclass->pdgCode();
741  if (pdg) {
742  bool ok;
743  QString name = VP1ParticleData::particleName(pdg,ok);
744  if (ok)
745  text << "pdg: "+QString::number(pdg)+" ["+name+"]";
746  else
747  text << "pdg: "+QString::number(pdg);
748  }
749  }
750 
753  }
754 
758  }
759 
762  mom /= CLHEP::GeV;
763  if (mom.mag2()==0.0) {
764  text << "Momentum : 0 (undefined)";
765  } else {
766  // current SoCoin classes don't support Unincode here, apparently.
767  // text << VP1Msg::str("(")+QChar(0x03B7)+","+QChar(0x03D5)+VP1Msg::str(")=(")
768  // +VP1Msg::str(mom.pseudoRapidity())+VP1Msg::str(VP1LinAlgUtils::phiFromXY(mom.x(), mom.y() ))+VP1Msg::str(")");
769  double pseudoRapidity = mom.eta();
770  text << VP1Msg::str("(eta,phi)=(")
771  +VP1Msg::str(pseudoRapidity)+VP1Msg::str(",")+VP1Msg::str(VP1LinAlgUtils::phiFromXY(mom.x(), mom.y() ))+VP1Msg::str(")");
772  }
773  }
774 
775  unsigned int row=0;
776  for(QString str : text){
777  QByteArray array = str.toLatin1();
778  labelText->string.set1Value(row++,array.data());
779  }
780 
781  //Position
782  float labelTrackOffset = theclass->common()->controller()->trackLabelTrkOffset();
783  unsigned int point=(points->size()-1)*labelTrackOffset;
784  Amg::Vector3D labelPos = (*points)[point] ;
785 
786 // NOTE: those options can be used if we want different label positions:
787 // if (labels&TrackSystemController::PosEndOfTrack)
788 // labelPos= points->back();
789 // else if (labels&TrackSystemController::PosBeginOfTrack)
790 // labelPos= points->front ();
791 // else if (labels&TrackSystemController::PosMidOfTrack)
792 // labelPos= (*points)[points->size()/2];
793 
794  SoTranslation *labelTranslate = new SoTranslation;
795  float offScale=10.0;
796  int xOffset = theclass->common()->controller()->labelXOffset() ;
797  int yOffset = theclass->common()->controller()->labelYOffset() ;
798  int zOffset = theclass->common()->controller()->labelZOffset() ;
799  labelTranslate->translation.setValue(labelPos.x()+(xOffset*offScale),labelPos.y()+(yOffset*offScale),labelPos.z()+(zOffset*offScale));
800 
801  SoMaterial *sMat = new SoMaterial();
802  SoMFColor sColor;
803  sColor.setValue(SbColor(0, 0, 1));
804  sMat->diffuseColor = sColor;
805 
806  label_sep->addChild(labelTranslate);
807  label_sep->addChild(labelText);
808  }
809 
810  //Attach if visible:
811  if (theclass->m_visible)
812  attach3DObjects();
813 }

Member Data Documentation

◆ associatedObjects

QList<AssociatedObjectHandleBase*> TrackHandleBase::Imp::associatedObjects

Definition at line 153 of file TrackHandleBase.cxx.

◆ attachmentHandles

std::map<std::pair<int,double>,AssocObjAttachmentHandle *> TrackHandleBase::Imp::attachmentHandles

Definition at line 154 of file TrackHandleBase.cxx.

◆ charge

double TrackHandleBase::Imp::charge

Definition at line 111 of file TrackHandleBase.cxx.

◆ chargeinit

bool TrackHandleBase::Imp::chargeinit

Definition at line 110 of file TrackHandleBase.cxx.

◆ customColouredTSOSParts

TrackCommonFlags::TSOSPartsFlags TrackHandleBase::Imp::customColouredTSOSParts

Definition at line 176 of file TrackHandleBase.cxx.

◆ extrapSurfaces_sep

SoSeparator* TrackHandleBase::Imp::extrapSurfaces_sep

for debugging.

FIXME!

Definition at line 117 of file TrackHandleBase.cxx.

◆ extraRepAttached

bool TrackHandleBase::Imp::extraRepAttached

Definition at line 118 of file TrackHandleBase.cxx.

◆ extraRepresentation

SoSeparator* TrackHandleBase::Imp::extraRepresentation

Definition at line 116 of file TrackHandleBase.cxx.

◆ inittouchedchambers

bool TrackHandleBase::Imp::inittouchedchambers
mutable

Definition at line 143 of file TrackHandleBase.cxx.

◆ label_sep

SoSeparator* TrackHandleBase::Imp::label_sep

Definition at line 160 of file TrackHandleBase.cxx.

◆ line

SoLineSet* TrackHandleBase::Imp::line

Definition at line 115 of file TrackHandleBase.cxx.

◆ m_objBrowseTree

QTreeWidgetItem* TrackHandleBase::Imp::m_objBrowseTree

Definition at line 181 of file TrackHandleBase.cxx.

◆ mass

double TrackHandleBase::Imp::mass

Definition at line 113 of file TrackHandleBase.cxx.

◆ massinit

bool TrackHandleBase::Imp::massinit

Definition at line 112 of file TrackHandleBase.cxx.

◆ ntrackhandles

int TrackHandleBase::Imp::ntrackhandles = 0
static

Definition at line 80 of file TrackHandleBase.cxx.

◆ pathInfo_Points

const std::vector< Amg::Vector3D >* TrackHandleBase::Imp::pathInfo_Points

Definition at line 159 of file TrackHandleBase.cxx.

◆ pathInfo_TrkTrack

const Trk::Track* TrackHandleBase::Imp::pathInfo_TrkTrack

Definition at line 158 of file TrackHandleBase.cxx.

◆ pathInfoLoaded

bool TrackHandleBase::Imp::pathInfoLoaded

Definition at line 157 of file TrackHandleBase.cxx.

◆ points_propagated

std::vector<Amg::Vector3D >* TrackHandleBase::Imp::points_propagated

Definition at line 124 of file TrackHandleBase.cxx.

◆ points_propagated_id_projections

Amg::SetVectorVector3D* TrackHandleBase::Imp::points_propagated_id_projections

Definition at line 128 of file TrackHandleBase.cxx.

◆ points_propagated_muon_projections

Amg::SetVectorVector3D* TrackHandleBase::Imp::points_propagated_muon_projections

Definition at line 129 of file TrackHandleBase.cxx.

◆ points_raw

std::vector< Amg::Vector3D >* TrackHandleBase::Imp::points_raw

Definition at line 123 of file TrackHandleBase.cxx.

◆ points_raw_id_projections

Amg::SetVectorVector3D* TrackHandleBase::Imp::points_raw_id_projections

Definition at line 126 of file TrackHandleBase.cxx.

◆ points_raw_muon_projections

Amg::SetVectorVector3D* TrackHandleBase::Imp::points_raw_muon_projections

Definition at line 127 of file TrackHandleBase.cxx.

◆ randommaterial

SoMaterial* TrackHandleBase::Imp::randommaterial

Definition at line 151 of file TrackHandleBase.cxx.

◆ shownTSOSParts

TrackCommonFlags::TSOSPartsFlags TrackHandleBase::Imp::shownTSOSParts

Definition at line 175 of file TrackHandleBase.cxx.

◆ tempMaxPropRadius

float TrackHandleBase::Imp::tempMaxPropRadius

Definition at line 182 of file TrackHandleBase.cxx.

◆ theclass

TrackHandleBase* TrackHandleBase::Imp::theclass

Definition at line 108 of file TrackHandleBase.cxx.

◆ touchedmuonchambers

std::set<GeoPVConstLink> TrackHandleBase::Imp::touchedmuonchambers
mutable

Definition at line 142 of file TrackHandleBase.cxx.

◆ tsos_ascobjs

std::vector<AscObj_TSOS*>* TrackHandleBase::Imp::tsos_ascobjs

Definition at line 177 of file TrackHandleBase.cxx.


The documentation for this class was generated from the following file:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TrackSystemController::getMaterialForCharge
SoMaterial * getMaterialForCharge(const double &charge) const
Definition: TrackSystemController.cxx:1331
TrackHandleBase::Imp::dist
static double dist(const SbVec3f &p1, const SbVec3f &p2)
Definition: TrackHandleBase.cxx:825
query_example.row
row
Definition: query_example.py:24
TrackCommonFlags::InDetProjections
@ InDetProjections
Definition: TrackCommonFlags.h:27
beamspotman.r
def r
Definition: beamspotman.py:676
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TrackSysCommonData::muonChamberProjectionHelper
MuonChamberProjectionHelper * muonChamberProjectionHelper() const
Definition: TrackSysCommonData.h:117
TrackSysCommonData::trackPropagationHelper
TrackPropagationHelper * trackPropagationHelper() const
Definition: TrackSysCommonData.h:122
TrackHandleBase::touchedMuonChambers
const std::set< GeoPVConstLink > & touchedMuonChambers() const
Definition: TrackHandleBase.cxx:1258
TrackSystemController::labelZOffset
int labelZOffset()
Absolute z offset.
Definition: TrackSystemController.cxx:2212
TrackHandleBase::Imp::theclass
TrackHandleBase * theclass
Definition: TrackHandleBase.cxx:108
VP1StdCollection::collMaterialTransparency
double collMaterialTransparency() const
Definition: VP1StdCollection.cxx:336
TrackSystemController::doTrackLabels
bool doTrackLabels()
Definition: TrackSystemController.cxx:2183
MuonChamberProjectionHelper
Definition: MuonChamberProjectionHelper.h:32
TrackCollHandleBase::extendTracks
bool extendTracks() const
Definition: TrackCollHandleBase.h:135
TrackSystemController::labelXOffset
int labelXOffset()
Absolute x offset.
Definition: TrackSystemController.cxx:2202
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TrackHandleBase::Imp::addTSOS
AscObj_TSOS * addTSOS(const Trk::TrackStateOnSurface *tsos, unsigned index) const
Definition: TrackHandleBase.cxx:415
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
AscObj_TSOS::parts
TrackCommonFlags::TSOSPartsFlags parts() const
Definition: AscObj_TSOS.h:59
TrackSysCommonData::controller
TrackSystemController * controller() const
Definition: TrackSysCommonData.h:116
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TrackHandleBase::Imp::attachmentHandles
std::map< std::pair< int, double >, AssocObjAttachmentHandle * > attachmentHandles
Definition: TrackHandleBase.cxx:154
max
#define max(a, b)
Definition: cfImp.cxx:41
TrackHandleBase::clearLine
void clearLine()
Definition: TrackHandleBase.cxx:623
VP1StdCollection::material
SoMaterial * material() const
Definition: VP1StdCollection.cxx:220
TrackHandleBase::currentMaterialChanged
virtual void currentMaterialChanged()
Definition: TrackHandleBase.h:159
TrackHandleBase::charge
double charge() const
Definition: TrackHandleBase.cxx:1491
TrackCollHandleBase::parts
TrackCommonFlags::TrackPartsFlags parts() const
Definition: TrackCollHandleBase.h:136
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
TrackSystemController::trackLabelTrkOffset
float trackLabelTrkOffset()
Percentage of postion along track.
Definition: TrackSystemController.cxx:2188
index
Definition: index.py:1
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
TrackHandleBase::m_currentmaterial
SoMaterial * m_currentmaterial
Definition: TrackHandleBase.h:178
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
TrackHandleBase::Imp::detach3DObjects
void detach3DObjects()
Definition: TrackHandleBase.cxx:918
VP1TrackSanity::isSafe
static bool isSafe(const Trk::TrackStateOnSurface *)
Definition: VP1TrackSanity.cxx:46
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
SurfaceToSoNode
Definition: SurfaceToSoNode.h:30
VP1ExtraSepLayerHelper::addNodeUnderMaterial
void addNodeUnderMaterial(SoNode *, SoMaterial *)
Definition: VP1ExtraSepLayerHelper.cxx:190
TrackCollHandleBase::COLOUR_MOMENTUM
@ COLOUR_MOMENTUM
Definition: TrackCollHandleBase.h:138
TrackHandleBase::Imp::convertLineSetToCylinders
static void convertLineSetToCylinders(SoLineSet *line, SoSeparator *sep, const double &cylradius)
Definition: TrackHandleBase.cxx:834
TrackHandleBase::getNTGCHits
virtual unsigned getNTGCHits() const
Definition: TrackHandleBase.h:113
TrackHandleBase::collHandle
TrackCollHandleBase * collHandle() const
Definition: TrackHandleBase.h:68
TrackHandleBase::Imp::ensureInitPointsProjections_InDet
void ensureInitPointsProjections_InDet(bool raw)
Definition: TrackHandleBase.cxx:1077
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TrackCommonFlags::MuonProjections
@ MuonProjections
Definition: TrackCommonFlags.h:28
TrackHandleBase::Imp::massinit
bool massinit
Definition: TrackHandleBase.cxx:112
M_PI
#define M_PI
Definition: ActiveFraction.h:11
TrackSysCommonData::system
VP1TrackSystem * system() const
Definition: TrackSysCommonData.h:114
TrackHandleBase::Imp::isSane
static bool isSane(const Amg::Vector3D &p)
Definition: TrackHandleBase.cxx:163
VP1ExtraSepLayerHelper::removeNodeUnderMaterial
void removeNodeUnderMaterial(SoNode *, SoMaterial *)
Definition: VP1ExtraSepLayerHelper.cxx:216
TrackSystemController::FitQuality
@ FitQuality
Definition: TrackSystemController.h:173
TrackSystemController::vertexProjectionAngle
int vertexProjectionAngle() const
Definition: TrackSystemController.cxx:1488
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrackSysCommonData::registerTrack
void registerTrack(SoNode *, TrackHandleBase *)
Definition: TrackSysCommonData.cxx:125
TrackHandleBase::Imp::extraRepresentation
SoSeparator * extraRepresentation
Definition: TrackHandleBase.cxx:116
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
TrackHandleBase::getNSCTHits
virtual unsigned getNSCTHits() const
Definition: TrackHandleBase.h:107
VP1TrackSystem::materialFromVertex
SoMaterial * materialFromVertex(const TrackHandleBase *trk) const
Returns the material for the vertex which knows this trackhandle (if known)
Definition: VP1TrackSystem.cxx:1013
MCP::ScaleSmearParam::r2
@ r2
Amg::SetVectorVector3D
std::set< std::vector< Amg::Vector3D >, VectorVector3DComparer > SetVectorVector3D
Definition: GeoPrimitivesHelpers.h:36
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
TrackPropagationHelper::getExtrapolationSurfaces
std::vector< Trk::PlaneSurface > & getExtrapolationSurfaces() const
Definition: TrackPropagationHelper.cxx:96
TrackCollHandleBase::ignoreMEOTinProp
bool ignoreMEOTinProp() const
Definition: TrackCollHandleBase.h:134
TrackHandleBase::Imp::tsos_ascobjs
std::vector< AscObj_TSOS * > * tsos_ascobjs
Definition: TrackHandleBase.cxx:177
TrackHandleBase::Imp::points_propagated_muon_projections
Amg::SetVectorVector3D * points_propagated_muon_projections
Definition: TrackHandleBase.cxx:129
Amg::setPhi
Amg::RotationMatrix3D setPhi(Amg::RotationMatrix3D mat, double angle, int convention=0)
Definition: EulerAnglesHelpers.h:102
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
TrackSysCommonData::textSep
SoSeparator * textSep()
Definition: TrackSysCommonData.h:130
TruthTest.itE
itE
Definition: TruthTest.py:25
VP1LinAlgUtils::phiFromXY
static double phiFromXY(const double &x, const double &y)
Definition: VP1LinAlgUtils.cxx:374
TrackHandleBase::getNsTGCHits
virtual unsigned getNsTGCHits() const
Definition: TrackHandleBase.h:116
TrackHandleBase::Imp::determineMaterial
SoMaterial * determineMaterial()
Definition: TrackHandleBase.cxx:1269
TrackSystemController::labelYOffset
int labelYOffset()
Absolute y offset.
Definition: TrackSystemController.cxx:2207
TrackHandleBase::registerAssocObject
void registerAssocObject(AssociatedObjectHandleBase *)
Trackhandle assumes ownership.
Definition: TrackHandleBase.cxx:1432
TrackCollHandleBase::COLOUR_PERCOLLECTION
@ COLOUR_PERCOLLECTION
Definition: TrackCollHandleBase.h:138
TrackHandleBase::getNTRTHits
virtual unsigned getNTRTHits() const
Definition: TrackHandleBase.h:108
TrackSystemController::Direction
@ Direction
Definition: TrackSystemController.h:173
TrackHandleBase::getFitQuality
virtual const Trk::FitQuality * getFitQuality() const
Definition: TrackHandleBase.h:118
beamspotnt.labels
list labels
Definition: bin/beamspotnt.py:1447
TrackHandleBase::Imp::points_propagated_id_projections
Amg::SetVectorVector3D * points_propagated_id_projections
Definition: TrackHandleBase.cxx:128
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
TrackHandleBase::Imp::m_objBrowseTree
QTreeWidgetItem * m_objBrowseTree
Definition: TrackHandleBase.cxx:181
TrackHandleBase::Imp::randommaterial
SoMaterial * randommaterial
Definition: TrackHandleBase.cxx:151
InDetProjHelper::projectPath
void projectPath(const std::vector< Amg::Vector3D > &path, Amg::SetVectorVector3D &resulting_projections) const
Definition: InDetProjHelper.cxx:819
TrackHandleBase::Imp::pathInfo_TrkTrack
const Trk::Track * pathInfo_TrkTrack
Definition: TrackHandleBase.cxx:158
TrackHandleBase::momentum
virtual Amg::Vector3D momentum() const
Definition: TrackHandleBase.h:83
VP1MaterialButton::setMaterialParameters
static void setMaterialParameters(SoMaterial *m, const QColor &, const double &brightness=0.0, const double &transp=0.0)
Definition: VP1MaterialButton.cxx:802
SimBarCode::unknownPDG
static const int unknownPDG
Definition: SimBarCode.h:25
TrackHandleBase::Imp::materialChanged
void materialChanged()
Definition: TrackHandleBase.cxx:816
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
TrackHandleBase::getNRPCHits
virtual unsigned getNRPCHits() const
Definition: TrackHandleBase.h:112
extractSporadic.h
list h
Definition: extractSporadic.py:97
TrackCollHandleBase::colourBy
COLOURBY colourBy() const
Definition: TrackCollHandleBase.h:141
TrackCommonFlags::VertexProjections
@ VertexProjections
Definition: TrackCommonFlags.h:29
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
TrackHandleBase::rerandomiseRandomMaterial
void rerandomiseRandomMaterial()
Definition: TrackHandleBase.cxx:1378
TrackCommonFlags::ActualPath
@ ActualPath
Definition: TrackCommonFlags.h:26
AssocObjAttachmentHandle
Definition: TrackHandleBase.h:197
TrackHandleBase::provide_pathInfoPoints
virtual const std::vector< Amg::Vector3D > * provide_pathInfoPoints() const
Definition: TrackHandleBase.h:150
TrackCollHandleBase::name
QString name() const
Definition: TrackCollHandleBase.cxx:310
TrackSystemController::trackLabels
TrackLabelModes trackLabels()
Definition: TrackSystemController.cxx:2217
SurfaceToSoNode::translateSurface
SoNode * translateSurface(const Trk::Surface &sf, const bool &simple=false) const
Definition: SurfaceToSoNode.cxx:57
TrackHandleBase::Imp::extraRepAttached
bool extraRepAttached
Definition: TrackHandleBase.cxx:118
TrackSysCommonData::indetProjHelper_SCT
InDetProjHelper * indetProjHelper_SCT() const
Definition: TrackSysCommonData.h:119
TrackHandleBase::Imp::chargeinit
bool chargeinit
Definition: TrackHandleBase.cxx:110
TrackHandleBase::Imp::ensureInitPointsPropagated
void ensureInitPointsPropagated()
Definition: TrackHandleBase.cxx:1045
TrackSystemController::P
@ P
Definition: TrackSystemController.h:172
TrackCollHandleBase::COLOUR_VERTEX
@ COLOUR_VERTEX
Definition: TrackCollHandleBase.h:138
MuonChamberProjectionHelper::projectAndConstrainLineSegmentToMDTChamberEndWalls
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)
Definition: MuonChamberProjectionHelper.cxx:373
TrackPropagationHelper::showExtrapolationSurfaces
bool showExtrapolationSurfaces() const
Definition: TrackPropagationHelper.cxx:378
Trk::ParametersBase
Definition: ParametersBase.h:55
VP1StdCollection::collMaterialBrightness
double collMaterialBrightness() const
Definition: VP1StdCollection.cxx:342
TrackCollHandleBase::propagator
Trk::IExtrapolator * propagator() const
Definition: TrackCollHandleBase.h:131
TrackHandleBase::pdgCode
virtual int pdgCode() const
0 means unknown
Definition: TrackHandleBase.h:86
TrackHandleBase::getNMDTHits
virtual unsigned getNMDTHits() const
Definition: TrackHandleBase.h:111
TrackHandleBase::registerTrack
void registerTrack()
Definition: TrackHandleBase.cxx:633
TrackSystemController::Hits
@ Hits
Definition: TrackSystemController.h:172
TrackSystemController::Pid
@ Pid
Definition: TrackSystemController.h:172
TrackCollHandleBase::trackTubeRadius
double trackTubeRadius() const
Definition: TrackCollHandleBase.h:85
TrackHandleBase::Imp::pathInfoLoaded
bool pathInfoLoaded
Definition: TrackHandleBase.cxx:157
min
#define min(a, b)
Definition: cfImp.cxx:40
lumiFormat.array
array
Definition: lumiFormat.py:98
TrackHandleBase::getNMMHits
virtual unsigned getNMMHits() const
Definition: TrackHandleBase.h:115
TrackHandleBase::m_collhandle
TrackCollHandleBase * m_collhandle
Definition: TrackHandleBase.h:177
TrackHandleBase::common
TrackSysCommonData * common() const
Definition: TrackHandleBase.cxx:255
TrackHandleBase::extrapolationParticleHypothesis
virtual Trk::ParticleHypothesis extrapolationParticleHypothesis() const
Default implementation of this next method bases hypothesis on pdgCode() and charge():
Definition: TrackHandleBase.cxx:1517
Trk::Track::trackParameters
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:97
TrackHandleBase::getNPixelHits
virtual unsigned getNPixelHits() const
Definition: TrackHandleBase.h:106
grepfile.sep
sep
Definition: grepfile.py:38
TrackSystemController::getMaterialForPDGCode
SoMaterial * getMaterialForPDGCode(const int &pdgcode) const
Definition: TrackSystemController.cxx:1287
TrackHandleBase::Imp::addPathsToSoLineSetAndSoVertexProperty
void addPathsToSoLineSetAndSoVertexProperty(const Amg::SetVectorVector3D *paths, int &iver, int &numlines, SoLineSet *, SoVertexProperty *) const
Definition: TrackHandleBase.cxx:603
TrackCollHandleBase::COLOUR_DISTANCE
@ COLOUR_DISTANCE
Definition: TrackCollHandleBase.h:138
fitman.g2
g2
Definition: fitman.py:624
TrackHandleBase::Imp::attach3DObjects
void attach3DObjects()
Definition: TrackHandleBase.cxx:883
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
python.selection.number
number
Definition: selection.py:20
TrackHandleBase::Imp::shownTSOSParts
TrackCommonFlags::TSOSPartsFlags shownTSOSParts
Definition: TrackHandleBase.cxx:175
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrackSystemController::Pt
@ Pt
Definition: TrackSystemController.h:172
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrackHandleBase::Imp::extrapSurfaces_sep
SoSeparator * extrapSurfaces_sep
for debugging.
Definition: TrackHandleBase.cxx:117
TrackSysCommonData::lastSelectedTrackHandle
TrackHandleBase * lastSelectedTrackHandle()
pointer to base of last selected track (zero if nothing selected)
Definition: TrackSysCommonData.h:129
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
TrackHandleBase::Imp::pathInfo_Points
const std::vector< Amg::Vector3D > * pathInfo_Points
Definition: TrackHandleBase.cxx:159
TrackCollHandleBase::COLOUR_BYPID
@ COLOUR_BYPID
Definition: TrackCollHandleBase.h:138
TrackHandleBase::Imp::charge
double charge
Definition: TrackHandleBase.cxx:111
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::IExtrapolator
Definition: IExtrapolator.h:62
query_example.col
col
Definition: query_example.py:7
TrkObjToString::shortInfo
static QString shortInfo(const Trk::MeasurementBase &mb)
Definition: TrkObjToString.cxx:208
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
MuonChamberProjectionHelper::isKnownMDTChamber
bool isKnownMDTChamber(const GeoPVConstLink &mdtChamber)
Definition: MuonChamberProjectionHelper.cxx:268
python.PyAthena.v
v
Definition: PyAthena.py:157
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
TrackHandleBase::getNCSCHits
virtual unsigned getNCSCHits() const
Definition: TrackHandleBase.h:114
TrackHandleBase::Imp::ensureInitPointsProjections_Muon
void ensureInitPointsProjections_Muon(bool raw)
Definition: TrackHandleBase.cxx:1139
VP1Msg::messageDebug
static void messageDebug(const QString &)
Definition: VP1Msg.cxx:39
h
TrackPropagationHelper::makePointsCharged
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)
Definition: TrackPropagationHelper.cxx:239
TrackHandleBase::Imp::ensureLoadPathInfo
void ensureLoadPathInfo()
Definition: TrackHandleBase.cxx:189
TrackHandleBase::provide_pathInfoTrkTrack
virtual const Trk::Track * provide_pathInfoTrkTrack() const
Definition: TrackHandleBase.h:148
TrackSysCommonData::indetProjHelper_TRT
InDetProjHelper * indetProjHelper_TRT() const
Definition: TrackSysCommonData.h:120
TrackSysCommonData::indetProjHelper_Pixel
InDetProjHelper * indetProjHelper_Pixel() const
Definition: TrackSysCommonData.h:118
TrackHandleBase::Imp::points_raw_muon_projections
Amg::SetVectorVector3D * points_raw_muon_projections
Definition: TrackHandleBase.cxx:127
TrackSystemController::propMaxRadius
float propMaxRadius() const
Definition: TrackSystemController.cxx:1651
TrackCollHandleBase::COLOUR_RANDOM
@ COLOUR_RANDOM
Definition: TrackCollHandleBase.h:138
TrackCommonFlags::TSOS_NoObjects
@ TSOS_NoObjects
Definition: TrackCommonFlags.h:43
TrackHandleBase::Imp::points_raw_id_projections
Amg::SetVectorVector3D * points_raw_id_projections
Definition: TrackHandleBase.cxx:126
TrackHandleBase::Imp::ensureInitPointsRaw
void ensureInitPointsRaw()
Definition: TrackHandleBase.cxx:967
TrackHandleBase::Imp::addPathToSoLineSetAndSoVertexProperty
void addPathToSoLineSetAndSoVertexProperty(const std::vector< Amg::Vector3D > &points, int &iver, int &numlines, SoLineSet *, SoVertexProperty *) const
Definition: TrackHandleBase.cxx:539
TrackHandleBase::Imp::tempMaxPropRadius
float tempMaxPropRadius
Definition: TrackHandleBase.cxx:182
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
TrackHandleBase::Imp::customColouredTSOSParts
TrackCommonFlags::TSOSPartsFlags customColouredTSOSParts
Definition: TrackHandleBase.cxx:176
AscObj_TSOS::setVisible
virtual void setVisible(bool)
Definition: AscObj_TSOS.cxx:1167
TrackHandleBase::Imp::points_propagated
std::vector< Amg::Vector3D > * points_propagated
Definition: TrackHandleBase.cxx:124
TrackHandleBase::Imp::line
SoLineSet * line
Definition: TrackHandleBase.cxx:115
TrackHandleBase::hasCharge
bool hasCharge() const
Definition: TrackHandleBase.h:99
str
Definition: BTagTrackIpAccessor.cxx:11
calibdata.copy
bool copy
Definition: calibdata.py:27
TrackSystemController::getMaterialForMomentum
SoMaterial * getMaterialForMomentum(const double &absmom) const
Definition: TrackSystemController.cxx:1341
TrackHandleBase::m_visible
bool m_visible
Definition: TrackHandleBase.h:176
TrackHandleBase::Imp::label_sep
SoSeparator * label_sep
Definition: TrackHandleBase.cxx:160
TrackHandleBase
Definition: TrackHandleBase.h:56
VP1JobConfigInfo::hasMuonGeometry
static bool hasMuonGeometry()
Definition: VP1JobConfigInfo.cxx:134
TrackHandleBase::Imp::inittouchedchambers
bool inittouchedchambers
Definition: TrackHandleBase.cxx:143
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
TrackHandleBase::unknown
static double unknown()
Definition: TrackHandleBase.h:102
TrackCollHandleBase::sephelper
VP1ExtraSepLayerHelper * sephelper() const
Definition: TrackCollHandleBase.h:81
python.SystemOfUnits.km
int km
Definition: SystemOfUnits.py:95
AscObj_TSOS
Definition: AscObj_TSOS.h:45
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
python.SystemOfUnits.m3
int m3
Definition: SystemOfUnits.py:93
TrackHandleBase::Imp::mass
double mass
Definition: TrackHandleBase.cxx:113
IVP1System::messageVerbose
void messageVerbose(const QString &) const
Definition: IVP1System.cxx:354
TrackCollHandleBase::COLOUR_CHARGE
@ COLOUR_CHARGE
Definition: TrackCollHandleBase.h:138
VP1ParticleData::particleName
static QString particleName(const int &pdgcode, bool &ok)
Definition: VP1ParticleData.cxx:128
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TrackSystemController::extrapolateToThisVolume
const Trk::Volume * extrapolateToThisVolume() const
Returns the volume to which we extrapolate ID tracks, or zero if no VolumesSvc found.
Definition: TrackSystemController.cxx:1689
TrackHandleBase::Imp::points_raw
std::vector< Amg::Vector3D > * points_raw
Definition: TrackHandleBase.cxx:123
test_athena_ntuple_dumper.paths
paths
Definition: test_athena_ntuple_dumper.py:7
TrackPropagationHelper::makePointsNeutral
bool makePointsNeutral(std::vector< Amg::Vector3D > &points, const Trk::Track *)
Definition: TrackPropagationHelper.cxx:151