ATLAS Offline Software
VP1BPhysSystem.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Implementation of class VP1BPhysSystem //
8 // //
9 // Author: Daniel Scheirich //
10 // //
11 // Initial version: September 2009 //
12 // //
14 
16 #include "ui_bphyscontrollerform.h"
17 
20 #include "VP1Base/VP1QtUtils.h"
22 
23 
24 #include <Inventor/nodes/SoBaseColor.h>
25 #include <Inventor/nodes/SoDrawStyle.h>
26 #include <Inventor/nodes/SoLineSet.h>
27 #include <Inventor/nodes/SoMatrixTransform.h>
28 #include <Inventor/nodes/SoSeparator.h>
29 #include <Inventor/nodes/SoSphere.h>
30 #include <Inventor/nodes/SoSwitch.h>
31 #include <Inventor/nodes/SoTranslation.h>
32 #include <Inventor/nodes/SoVertexProperty.h>
33 #include <QFileDialog>
34 #include <utility>
35 
36 
37 
38 #include "StoreGate/StoreGateSvc.h"
39 
40 #include "TrkTrack/Track.h"
44 
45 #include "Particle/TrackParticle.h"
47 
49 
50 #include "TFile.h"
51 #include "TTree.h"
52 
53 
54 
55 const unsigned int darknes = 50;
56 const unsigned long darkGray = darknes*65536 + darknes*256 + darknes;
57 
58 bool Br::init(TTree* tree) {
59  vp1Filter = tree;
60  if(tree==nullptr) return false;
61 
62  vp1Filter->SetBranchAddress("evtNum", &evtNum);
63  vp1Filter->SetBranchAddress("runNum", &runNum);
64 
65  vp1Filter->SetBranchAddress("vtx_x", &vtx_x);
66  vp1Filter->SetBranchAddress("vtx_y", &vtx_y);
67  vp1Filter->SetBranchAddress("vtx_z", &vtx_z);
68 
69  vp1Filter->SetBranchAddress("vtx_xx", &vtx_xx);
70  vp1Filter->SetBranchAddress("vtx_yy", &vtx_yy);
71  vp1Filter->SetBranchAddress("vtx_zz", &vtx_zz);
72  vp1Filter->SetBranchAddress("vtx_xy", &vtx_xy);
73  vp1Filter->SetBranchAddress("vtx_xz", &vtx_xz);
74  vp1Filter->SetBranchAddress("vtx_yz", &vtx_yz);
75 
76  vp1Filter->SetBranchAddress("vtx_mother", &vtx_mother);
77  vp1Filter->SetBranchAddress("vtx_color", &vtx_color);
78  vp1Filter->SetBranchAddress("vtx_daughters", &vtx_daughters);
79 
80  //tracks
81  vp1Filter->SetBranchAddress("track_pt", &track_pt );
82  vp1Filter->SetBranchAddress("track_eta", &track_eta );
83  vp1Filter->SetBranchAddress("track_phi", &track_phi );
84  vp1Filter->SetBranchAddress("track_d0", &track_d0 );
85  vp1Filter->SetBranchAddress("track_z0", &track_z0 );
86  vp1Filter->SetBranchAddress("track_charge", &track_charge );
87  vp1Filter->SetBranchAddress("track_refitted_px", &track_refitted_px );
88  vp1Filter->SetBranchAddress("track_refitted_py", &track_refitted_py );
89  vp1Filter->SetBranchAddress("track_refitted_pz", &track_refitted_pz );
90  vp1Filter->SetBranchAddress("track_color", &track_color );
91  vp1Filter->SetBranchAddress("track_refitted_color", &track_refitted_color);
92 
93  //neutral tracks
94  vp1Filter->SetBranchAddress("neutral_refitted_px", &neutral_refitted_px);
95  vp1Filter->SetBranchAddress("neutral_refitted_py", &neutral_refitted_py);
96  vp1Filter->SetBranchAddress("neutral_refitted_pz", &neutral_refitted_pz);
97  vp1Filter->SetBranchAddress("neutral_length", &neutral_length );
98  vp1Filter->SetBranchAddress("neutral_decay", &neutral_decay );
99  vp1Filter->SetBranchAddress("neutral_color", &neutral_color );
100 
101  return true;
102 
103 }
104 
105 int Br::GetEntry(int i) {
106  return vp1Filter->GetEntry(i);
107 }
108 
110  public:
111  Ui::BPhysControllerForm ui;
112 };
113 //_____________________________________________________________________________________
114 
116  : IVP13DSystemSimple("BPhys",
117  "VP1BPhysSystem",
118  "daniel.scheirich@cern.ch") ,
119  m_vertexStyle{},
120  m_showVertices{},
121  m_vertexSwitches{},
122 
123  m_showAll{},
124  m_showSignal{},
125  m_showNeutral{},
126  m_showRefitted{},
127 
128  m_trackSwitches{},
129  m_overlapSwitches{},
130  m_signalSwitches{},
131  m_neutralSwitches{},
132  m_refittedSwitches{},
133  m_br{},
134  m_c(new Clockwork)
135 {
136  messageDebug("in BPhysSystem");
137 
138  m_rootFile = nullptr;
139  m_tree = nullptr;
140  m_sg = nullptr;
141  m_root = nullptr;
142 
143 
144 // messageDebug("Creating propagationHelper...");
145 // propagationHelper = new TrackPropagationHelper(this);
146 // messageDebug("...done");
147 
148  messageDebug("leaving VP1BPhysSystem");
149 }
150 
151 //_____________________________________________________________________________________
153 {
154  messageDebug("in buildController");
155 
156  QWidget * controller = new QWidget(nullptr);
157  m_c->ui.setupUi(controller);
158 
159  //connect slots
160  connect(m_c->ui.bLoad,SIGNAL(released()),this,SLOT(loadFile()));
161 
162  connect(m_c->ui.chDisplayVertices,SIGNAL(stateChanged(int)),this,SLOT(displayVerticesChanged(int)));
163  connect(m_c->ui.rbSphere,SIGNAL(toggled(bool)),this,SLOT(sphereToggled(bool)));
164  connect(m_c->ui.rbCross,SIGNAL(toggled(bool)),this,SLOT(crossToggled(bool)));
165  connect(m_c->ui.rbEllipsoid,SIGNAL(toggled(bool)),this,SLOT(ellipsoidToggled(bool)));
166 
167  connect(m_c->ui.chDisplayAllTracks ,SIGNAL(stateChanged(int)),this,SLOT(displayAllTracksChanged(int)));
168  connect(m_c->ui.chDisplayOrigSignal,SIGNAL(stateChanged(int)),this,SLOT(displayOrigSignalChanged(int)));
169  connect(m_c->ui.chDisplayRefTracks ,SIGNAL(stateChanged(int)),this,SLOT(displayRefTracksChanged(int)));
170  connect(m_c->ui.chDisplayNeutral ,SIGNAL(stateChanged(int)),this,SLOT(displayNeutralChanged(int)));
171 
172  if(m_c->ui.rbSphere->isChecked()) m_vertexStyle = 0;
173  if(m_c->ui.rbCross->isChecked()) m_vertexStyle = 1;
174  if(m_c->ui.rbEllipsoid->isChecked()) m_vertexStyle = 2;
175  m_showVertices = m_c->ui.chDisplayVertices->isChecked();
176 
177  m_showAll = m_c->ui.chDisplayAllTracks->isChecked();
178  m_showSignal = m_c->ui.chDisplayOrigSignal->isChecked();
179  m_showRefitted = m_c->ui.chDisplayRefTracks->isChecked();
180  m_showNeutral = m_c->ui.chDisplayNeutral->isChecked();
181 
182 
183  messageDebug("leaving buildController");
184 
185  return controller;
186 }
187 
188 
189 //_____________________________________________________________________________________
191 
192  //delete all objects from the scene
193  m_root->removeAllChildren();
194 
195  //Sanity check:
196  if (!m_sg) {
197  message("Error: Got null storegate pointer");
198  return;
199  }
200 
201  //check that file was open
202  if(m_tree==nullptr) return;
203 
204  //retrieving event info
205  const EventContext& ctx = Gaudi::Hive::currentContext();
206  int evtNum = ctx.eventID().event_number();
207  int runNum = ctx.eventID().run_number();
208 
209  //retrieve TrackParticle candidates
210  const Rec::TrackParticleContainer* partCont;
211  StatusCode status = m_sg->retrieve(partCont, "TrackParticleCandidate");
212  if (status != StatusCode::SUCCESS || !partCont) {
213  message("Error: Could not retrieve track particle container (used key=TrackParticleCandidate)");
214  return;
215  }
216 
218  //cleanup
219  m_vertexSwitches.clear();
220  m_trackSwitches.clear();
221  m_overlapSwitches.clear();
222  m_signalSwitches.clear();
223  m_neutralSwitches.clear();
224  m_refittedSwitches.clear();
225 
227 
228  std::vector<const Rec::TrackParticle*>* selectedParticles = new std::vector<const Rec::TrackParticle*>();
229 
230 
231  //find event
232  //int e = m_tree->GetEntryNumberWithIndex(runNum, evtNum); //for some reason this doesn't work 100% reliable
233 
234  int e=-1;
235  for(int i=0; i<m_tree->GetEntries(); ++i) {
236  m_br->GetEntry(i);
237  if(m_br->runNum == runNum && m_br->evtNum == evtNum) {
238  e=i;
239  break;
240  }
241  }
242 
243  if(e==-1) {
244  m_c->ui.lStatus->setText("No event to display");
245  message("Event is not in the VP1BPhys Display File. Skipping.");
246  }else{
247  m_c->ui.lStatus->setText("");
248 
249  m_br->GetEntry(e);
250  for(; m_br->runNum == runNum && m_br->evtNum == evtNum && e<m_tree->GetEntries(); m_br->GetEntry(++e)) {
251 
252 
253  //filter tracks
254  //sanity check
255  if(m_br->track_pt->size() != m_br->track_eta->size() ||
256  m_br->track_pt->size() != m_br->track_eta->size() ||
257  m_br->track_pt->size() != m_br->track_phi->size() ||
258  m_br->track_pt->size() != m_br->track_d0->size() ||
259  m_br->track_pt->size() != m_br->track_z0->size() ||
260  m_br->track_pt->size() != m_br->track_charge->size() ||
261  m_br->track_pt->size() != m_br->track_color->size() ||
262  m_br->track_pt->size() != m_br->track_refitted_px->size() ||
263  m_br->track_pt->size() != m_br->track_refitted_py->size() ||
264  m_br->track_pt->size() != m_br->track_refitted_pz->size() ||
265  m_br->track_pt->size() != m_br->track_refitted_color->size() ||
266  m_br->neutral_refitted_px->size() != m_br->neutral_refitted_py->size() ||
267  m_br->neutral_refitted_px->size() != m_br->neutral_refitted_py->size() ||
268  m_br->neutral_refitted_px->size() != m_br->neutral_refitted_pz->size() ||
269  m_br->neutral_refitted_px->size() != m_br->neutral_length->size() ||
270  m_br->neutral_refitted_px->size() != m_br->neutral_color->size())
271  {
272  message("Different lengths of some filter track collections");
273  continue;
274  }
275 
276  //draw selected particles
277  for(uint i=0; i<m_br->track_pt->size(); ++i) {
278  //TrackParticles
279  filterTrack(m_root, partCont,
280  m_br->track_pt->at(i),
281  m_br->track_eta->at(i),
282  m_br->track_phi->at(i),
283  m_br->track_d0->at(i),
284  m_br->track_z0->at(i),
285  m_br->vtx_x, m_br->vtx_y, m_br->vtx_z,
286  m_br->track_color->at(i),
287  selectedParticles);
288 
289  //refitted tracks
291  m_br->vtx_x, m_br->vtx_y, m_br->vtx_z,
292  m_br->track_refitted_px->at(i),
293  m_br->track_refitted_py->at(i),
294  m_br->track_refitted_pz->at(i),
295  m_br->track_charge->at(i),
296  m_br->track_refitted_color->at(i));
297 
298  }
299 
300 
301  //draw neutral tracks
302  std::vector<double>::iterator neutralPxItr = m_br->neutral_refitted_px->begin();
303  std::vector<double>::iterator neutralPyItr = m_br->neutral_refitted_py->begin();
304  std::vector<double>::iterator neutralPzItr = m_br->neutral_refitted_pz->begin();
305  std::vector<double>::iterator neutralLengthItr = m_br->neutral_length->begin();
306  std::vector<unsigned long>::iterator neutralColorItr = m_br->neutral_color->begin();
307 
308  for(; neutralPxItr!=m_br->neutral_refitted_px->end(); ++neutralPxItr, ++neutralPyItr, ++neutralPzItr, ++neutralLengthItr, ++neutralColorItr) {
310  *neutralPxItr, *neutralPyItr, *neutralPzItr, *neutralLengthItr, *neutralColorItr);
311  }
312 
313  //draw vertices
314  drawVertex(m_root, m_br->vtx_x, m_br->vtx_y, m_br->vtx_z, 3/*sigma*/,
315  m_br->vtx_xx,
316  m_br->vtx_xy,
317  m_br->vtx_xz,
318  m_br->vtx_yy,
319  m_br->vtx_yz,
320  m_br->vtx_zz,
321  m_br->vtx_color,
323 
324  }
325  }
326 
327  //draw all remaining tracks
328  drawAllTrackParticles(m_sg,m_root,selectedParticles);
329 
330  //cleaning up
331  delete selectedParticles;
332 
333 
334 }
335 //_____________________________________________________________________________________
337 {
338  messageDebug("in buildEventSceneGraph");
339 
340  m_sg = sg;
341  m_root = root;
342 
343  actualBuild();
344 
345  messageDebug("Leaving buildEventSceneGraph");
346 
347 }
350  double pt, double eta, double /*phi*/, double /*d0*/, double /*z0*/,
351  double x, double y, double z, unsigned long color,
352  std::vector<const Rec::TrackParticle*>* selectedParticles)
353 {
354  messageDebug("in filterTrack");
355  //loop over TrackParticles
356  Rec::TrackParticleContainer::const_iterator partItr, partItrEnd = partCont->end();
357  for ( partItr = partCont->begin() ; partItr != partItrEnd; ++partItr) {
358 
359  double trk_qOverP = (*partItr)->measuredPerigee()->parameters()[Trk::qOverP];
360  double trk_theta = (*partItr)->measuredPerigee()->parameters()[Trk::theta];
361 // double trk_phi = (*partItr)->measuredPerigee()->parameters()[Trk::phi];
362 
363  double trk_pt = fabs(1./trk_qOverP)*sin(trk_theta);
364  double trk_eta = -log(tan(trk_theta/2));
365 
366  //identify selected track
367  if(fabs(trk_pt - pt)<0.1 && fabs(trk_eta - eta)<0.01) {
368  drawCutoffTrackParticle(root, *partItr, x, y, z, color);
369  if(selectedParticles!=nullptr) {
370  selectedParticles->push_back(*partItr);
371  }
372  }
373  }
374  messageDebug("leaving filterTrack");
375 
376 }
377 //___________________________________________________________
378 void VP1BPhysSystem::drawAllTrackParticles(StoreGateSvc* sg, SoSeparator *root, std::vector<const Rec::TrackParticle*>* selectedParticles) {
379  messageDebug("in drawAllTrackParticles");
380 
381  //retrieve TrackParticle candidates
382  const Rec::TrackParticleContainer* partCont;
383  StatusCode status = sg->retrieve(partCont, "TrackParticleCandidate");
384  if (status != StatusCode::SUCCESS || !partCont) {
385  message("Error: Could not retrieve track particle container (used key=TrackParticleCandidate)");
386  return;
387  }
388 
389  Rec::TrackParticleContainer::const_iterator partItr, partItrEnd = partCont->end();
390  for ( partItr = partCont->begin() ; partItr != partItrEnd; ++partItr) {
391  bool found = false;
392  if(selectedParticles!=nullptr) {
393  std::vector<const Rec::TrackParticle*>::const_iterator selItr = selectedParticles->begin();
394  for(; selItr!=selectedParticles->end(); ++selItr) {
395  if(*partItr == *selItr) {
396  found = true;
397  break;
398  }
399  }
400  }
401  if(!found) {
402  SoSwitch* trackSwitch = new SoSwitch();
403  root->addChild(trackSwitch);
404  trackSwitch->whichChild = m_showAll ? SO_SWITCH_ALL : SO_SWITCH_NONE;
405  drawTrackParticle(trackSwitch, *partItr, darkGray);
406  m_trackSwitches.push_back(trackSwitch);
407  }else{
408  SoSwitch* trackSwitch = new SoSwitch();
409  root->addChild(trackSwitch);
410  trackSwitch->whichChild = m_showAll && !m_showSignal && !m_showRefitted ? SO_SWITCH_ALL : SO_SWITCH_NONE;
411  drawTrackParticle(trackSwitch, *partItr, darkGray);
412  m_overlapSwitches.push_back(trackSwitch);
413  }
414  }
415  messageDebug("leaving drawAllTrackParticles");
416 
417 }
418 //___________________________________________________________
419 void VP1BPhysSystem::drawTrackParticle(SoSwitch* trackSwitch, const Rec::TrackParticle* part, unsigned long color) {
420 
421  messageDebug("in drawTrackParticle");
422 
423  //getting track space-points
424  std::vector<Amg::Vector3D >* points = getPoints(part);
425 
426  //drawing line
427  drawPoints(trackSwitch,points,color, 0.0f, false);
428 
429  //cleaning up
430  delete points;
431 
432  messageDebug("leaving drawTrackParticle");
433 
434 }
435 //___________________________________________________________
436 void VP1BPhysSystem::drawCutoffTrackParticle(SoSeparator *root, const Rec::TrackParticle* part, double x, double y, double z, unsigned long color) {
437  messageDebug("in drawCutoffTrackParticle");
438 
439  //getting track space-points
440  std::vector<Amg::Vector3D >* points = getPoints(part);
441 
442  //getting cut-off point collection
443  std::vector<Amg::Vector3D >* cutoffPoints = findClosestApproach(points, x, y, z);
444 
445  //drawing
446  SoSwitch* trackSwitch = new SoSwitch();
447  root->addChild(trackSwitch);
448  trackSwitch->whichChild = m_showSignal ? SO_SWITCH_ALL : SO_SWITCH_NONE;
449  drawPoints(trackSwitch,cutoffPoints,color,2,false);
450  m_signalSwitches.push_back(trackSwitch);
451 
452  //cleaning up
453  delete points;
454  delete cutoffPoints;
455 
456  messageDebug("leaving drawCutoffTrackParticle");
457 
458 }
459 //___________________________________________________________
460 void VP1BPhysSystem::drawNeutralTrack(SoSeparator* root, double x, double y, double z, double px, double py, double pz, double length, unsigned long color) {
461  messageDebug("in drawNeutralTrack");
462 
463  std::vector<Amg::Vector3D >* points = new std::vector<Amg::Vector3D >();
464 
465  //create neutral track vector
466  CLHEP::Hep3Vector p(px,py,pz);
467  CLHEP::Hep3Vector track = p.unit();
468  track *= length;
469 
470  //create points
471  points->push_back(Amg::Vector3D(x-track.x(), y-track.y(), z-track.z()));
472  points->push_back(Amg::Vector3D(x,y,z));
473 
474  SoSwitch* trackSwitch = new SoSwitch();
475  root->addChild(trackSwitch);
476  trackSwitch->whichChild = m_showNeutral ? SO_SWITCH_ALL : SO_SWITCH_NONE;
477  drawPoints(trackSwitch, points, color, 2, true);
478  m_neutralSwitches.push_back(trackSwitch);
479 
480  //cleaning up
481  messageDebug("leaving drawNeutralTrack");
482  delete points;
483 
484 }
485 
486 //___________________________________________________________
487 void VP1BPhysSystem::drawRefittedTrack(SoSeparator* root, double x, double y, double z,
488  double px, double py, double pz, double charge, unsigned long color)
489 {
490  messageDebug("in drawRefittedTrack");
491 
493  Amg::Vector3D pos(x,y,z);
494 
496 
497  //getting track space-points
498  std::vector<Amg::Vector3D >* points = getPoints(track);
499 
500  //drawing
501  SoSwitch* trackSwitch = new SoSwitch();
502  root->addChild(trackSwitch);
503  trackSwitch->whichChild = m_showRefitted ? SO_SWITCH_ALL : SO_SWITCH_NONE;
504  drawPoints(trackSwitch,points,color,2,false);
505  m_refittedSwitches.push_back(trackSwitch);
506 
507  //cleaning up
508  delete points;
509  delete track;
510 
511  messageDebug("leaving drawCutoffTrackParticle");
512 
513 }
514 //___________________________________________________________
515 void VP1BPhysSystem::drawPoints(SoSwitch* trackSwitch, std::vector<Amg::Vector3D >* points,
516  unsigned long color, double width, bool isNeutral)
517 {
518  messageDebug("in drawPoints");
519  if(points == nullptr) return;
520 
521  SoSeparator* sep = new SoSeparator();
522 
523  //setting up draw style
524  SoDrawStyle* drawStyle = new SoDrawStyle();
525  drawStyle->lineWidth = width;
526  if(isNeutral) {
527  drawStyle->linePattern = 0x00ff;
528  }
529  sep->addChild(drawStyle);
530 
531  //setting up color
532  SoBaseColor* baseColor = new SoBaseColor();
533  double r,g,b;
534  getColor(color,r,g,b);
535  baseColor->rgb.setValue(r,g,b);
536  sep->addChild(baseColor);
537 
538  int iver(0);
539  SoVertexProperty *vertices = new SoVertexProperty();
540 
542  for(it = points->begin(); it != itE; ++it) {
543  vertices->vertex.set1Value(iver++,(*it).x(),(*it).y(),(*it).z());
544  }
545 
546  //Create a set of lines from these vertices:
547  SoLineSet * line = new SoLineSet();
548  line->numVertices = iver;
549  line->vertexProperty = vertices;
550 
551  //Add to the tree:
552  sep->addChild(line);
553 
554  //add to the root
555  trackSwitch->addChild(sep);
556 
557  //To avoid GUI freeze-ups:
558  updateGUI();
559 
560  messageDebug("leaving drawPoints");
561 
562 }
563 //___________________________________________________________
564 
565 std::vector<Amg::Vector3D >* VP1BPhysSystem::getPoints(const Trk::Track* track) {
566 
567  messageDebug("in getPoints(Trk::Track)");
568 
569  //retrieve/create VP1Extrapolator
570 
571  messageDebug("Retrieving propagator...");
572  Trk::IExtrapolator* propagator = nullptr;
573  VP1ToolAccessHelper toolaccess(this);
574  propagator = toolaccess.getToolPointer<Trk::IExtrapolator>("Trk::Extrapolator/VP1Extrapolator",false/*silent*/,true/*create if not exists*/);
575  if(propagator == nullptr) {
576  message("Error: propagator Trk::Extrapolator/VP1Extrapolator couldn't be created");
577  }
578  messageDebug("...done");
579 
580  messageDebug("Creating propagationHelper...");
581  TrackPropagationHelper* propagationHelper = new TrackPropagationHelper(this);
582  messageDebug("...done");
583 
584  std::vector< Amg::Vector3D >* points = new std::vector<Amg::Vector3D >();
585 
586 // propagator = NULL;
587  //propagate track in magnetic field
588  if(propagator!=nullptr && propagationHelper!=nullptr) {
589  messageDebug("Starting propagator...");
590  propagationHelper->makePointsCharged(*points,track,propagator);
591  messageDebug("..done");
592  } else {
593  //if no propagator is initialized we use straight segments instead
594 
595  const DataVector<const Trk::TrackParameters> *params = track->trackParameters();
596  //Just a sanity check:
597  if ( !params ) {
598  message("Error: no track parameters");
599  }else{
601  for (it = params->begin();it!=itE;++it) {
602  points->push_back(Amg::Vector3D((*it)->position().x(),(*it)->position().y(),(*it)->position().z()));
603  }
604  }
605  }
606 
607  //cleaning up
608  delete propagationHelper;
609 
610  //return
611  messageDebug("leaving getPoints(Trk::Track)");
612  return points;
613 
614 }
615 //___________________________________________________________
616 std::vector<Amg::Vector3D >* VP1BPhysSystem::getPoints(const Rec::TrackParticle* part) {
617  messageDebug("in getPoints(Rec::TrackParticle)");
618 
619  //creating Trk::Track from TrackParticle
620  const Trk::Track *track = getTrack(part);
621 
622  std::vector<Amg::Vector3D >* points = getPoints(track);
623 
624  //cleaning up
625  delete track;
626 
627  //return
628  messageDebug("leaving getPoints(Rec::TrackParticle)");
629  return points;
630 }
631 //___________________________________________________________
632 std::vector<Amg::Vector3D >* VP1BPhysSystem::findClosestApproach(std::vector<Amg::Vector3D >* points, double x, double y, double z) {
633  messageDebug("in findClosestApproach");
634 
635  std::vector<Amg::Vector3D >* pointsOut = new std::vector<Amg::Vector3D >();
636 
637  //check # of points
638  if(points->size()<2) return pointsOut;
639 
640  double lastDist = 1e10;
641  Amg::Vector3D point = points->at(0);
642  std::vector<Amg::Vector3D >::iterator startFrom = (points->begin())+1;
643 
644  //find the closest approach
646  for(it = points->begin(); (it+1) != itE; ++it) {
647  CLHEP::Hep3Vector p = CLHEP::Hep3Vector((*(it+1)).x()-(*it).x(), (*(it+1)).y()-(*it).y(), (*(it+1)).z()-(*it).z());
648  CLHEP::Hep3Vector v = CLHEP::Hep3Vector(x - (*it).x(), y - (*it).y(), z - (*it).z());
649 
650  //projection of v into the direction of p
651  double proj = v.dot(p.unit());
652  CLHEP::Hep3Vector vect = p.unit();
653  vect *= proj;
654 
655  //check that projection lies inside the track segment
656  if(proj<0 || proj > p.mag()) continue;
657 
658  //check distance to the segment (Pythagorean theroem)
659  double dist = sqrt(p.mag2() - proj*proj);
660  if(dist<lastDist) {
661  lastDist = dist;
662  point = Amg::Vector3D((*it).x() + vect.x(), (*it).y() + vect.y(), (*it).z() + vect.z());
663  startFrom = it+1;
664  }
665  }
666 
667  //create new cut-off track
668  pointsOut->push_back(point);
669  for(it = startFrom; it!=itE; ++it) {
670  pointsOut->push_back(*it);
671  }
672 
673  messageDebug("leaving findClosestApproach");
674  return pointsOut;
675 
676 }
677 //___________________________________________________________
678 
679 void VP1BPhysSystem::drawVertex(SoSeparator *root, double x, double y, double z, double /*radius*/,
680  double xx, double xy, double xz, double yy, double yz, double zz, unsigned long color,
681  std::vector<SoSwitch*>& vertexSwitches)
682 {
683  messageDebug("in drawVertex");
684 
685  SoSeparator* sep = new SoSeparator();
686 
687  //move sphere to position
688  SoTranslation * translation = new SoTranslation;
689  translation->translation.setValue ( x, y, z );
690  sep->addChild ( translation );
691 
692  //color
693  SoBaseColor* baseColor = new SoBaseColor();
694  double rr,gg,bb;
695  getColor(color,rr,gg,bb);
696  baseColor->rgb.setValue(rr,gg,bb);
697  sep->addChild(baseColor);
698 
699  //switch
700  SoSwitch* vtxSwitch = new SoSwitch();
701  if(!m_showVertices)
702  vtxSwitch->whichChild = SO_SWITCH_NONE;
703  else
704  vtxSwitch->whichChild = m_vertexStyle;
705 
706  sep->addChild(vtxSwitch);
707 
709  SoSphere * sphere = new SoSphere;
710  sphere->radius = 2*CLHEP::mm;
711  vtxSwitch->addChild ( sphere );
712 
714  SoLineSet* cross = createCross(3*CLHEP::mm);
715  vtxSwitch->addChild ( cross );
716 
718  SoSeparator* sepEllipsoid = new SoSeparator();
719  vtxSwitch->addChild ( sepEllipsoid );
720 
721  //transorm sphere to elipsoid
722  double a=xx*CLHEP::mm;
723  double b=xy*CLHEP::mm;
724  double c=xz*CLHEP::mm;
725  double d=yy*CLHEP::mm;
726  double e=yz*CLHEP::mm;
727  double f=zz*CLHEP::mm;
728 
729  double det = a*(d*f-e*e) + 2*b*c*e - d*c*c-f*b*b;
730  if (det>0) {
731  double sixthrootofdet = exp(log(det)/6.0);
732  double invdet = 1.0/sixthrootofdet;
733  a *= invdet;
734  b *= invdet;
735  c *= invdet;
736  d *= invdet;
737  e *= invdet;
738  f *= invdet;
739  SbMatrix sbMat(a,b,c,0,
740  b,d,e,0,
741  c,e,f,0,
742  0,0,0,1);
743  SoMatrixTransform * matTrans = new SoMatrixTransform();
744  matTrans->matrix.setValue(sbMat);
745  sepEllipsoid->addChild (matTrans);
746  } else {
747  //FIXME: warn
748  }
749  SoSphere * ellipsoid = new SoSphere;
750  ellipsoid->radius = 3;
751  sepEllipsoid->addChild ( sphere );
752 
753 
754 
755  //vertexSwitches
756  vertexSwitches.push_back(vtxSwitch);
757 
758  //add to root
759  root->addChild(sep);
760 
761  //To avoid GUI freeze-ups:
762  updateGUI();
763 
764  messageDebug("leaving drawVertex");
765 
766 }
767 
768 //___________________________________________________________
771 
772  messageDebug("in loadFile");
773 
774  QString fileName = QFileDialog::getOpenFileName(nullptr, tr("Open File"),tr("."),tr("ROOT files (*.root)"));
775  if(fileName.isEmpty()) return;
776 
777  m_c->ui.leFileName->setText(fileName);
779 
780 
781  //close previous file
782  if(m_rootFile!=nullptr) {
783  m_rootFile->Close();
784 
785  if(m_br!=nullptr) {
786  delete m_br;
787  m_br = nullptr;
788  }
789 
790  m_rootFile = nullptr;
791  m_tree = nullptr;
792  }
793 
794  //try to open a new file
795  m_rootFile = TFile::Open(m_fileName.toStdString().c_str());
796  if(m_rootFile!=nullptr && !m_rootFile->IsZombie()) {
797  m_tree = (TTree*)m_rootFile->Get("vp1bphys");
798  if(m_tree!=nullptr) {
799  m_tree->BuildIndex("runNum","evtNum");
800  m_br = new Br();
801  m_br->init(m_tree);
802  m_c->ui.lStatus->setText("");
803  }else{
804  m_c->ui.lStatus->setText("File doesn't contain vp1bphys tree");
805  message("File doesn't contain vp1bphys tree");
806  }
807  }else{
808  m_c->ui.lStatus->setText("File doesn't exist");
809  message("File doesn't exist");
810  m_tree = nullptr;
811  }
812 
813  if(m_sg!=nullptr && m_root!=nullptr) actualBuild();
814  updateGUI();
815 
816  messageDebug("leaving loadFile");
817 }
818 //___________________________________________________________
820 
821  SoSFInt32 which;
822 
823  if(state==Qt::Unchecked) {
824  m_showVertices = false;
825  which = SO_SWITCH_NONE;
826  }else{
827  m_showVertices = true;
829  }
830 
831  //apply
833  for(; it!=m_vertexSwitches.end(); ++it) {
834  (*it)->whichChild = which;
835  }
836 
837 }
838 //___________________________________________________________
839 void VP1BPhysSystem::sphereToggled ( bool checked ) {
840 
841 
842  if(checked) {
843  messageDebug("show vertices as spheres");
844  m_vertexStyle=0;
845  }
846 
847  //apply
848  if(m_showVertices) {
850  for(; it!=m_vertexSwitches.end(); ++it) {
851  (*it)->whichChild = m_vertexStyle;
852  }
853  }
854 }
855 //___________________________________________________________
856 void VP1BPhysSystem::crossToggled ( bool checked ) {
857  if(checked) {
858  messageDebug("show vertices as crosses");
859  m_vertexStyle=1;
860  }
861 
862  //apply
863  if(m_showVertices) {
865  for(; it!=m_vertexSwitches.end(); ++it) {
866  (*it)->whichChild = m_vertexStyle;
867  }
868  }
869 
870 }
871 //___________________________________________________________
872 void VP1BPhysSystem::ellipsoidToggled ( bool checked ) {
873  if(checked) {
874  messageDebug("show vertices as error ellipsoids");
875  m_vertexStyle=2;
876  }
877 
878  //apply
879  if(m_showVertices) {
881  for(; it!=m_vertexSwitches.end(); ++it) {
882  (*it)->whichChild = m_vertexStyle;
883  }
884  }
885 
886 }
887 //___________________________________________________________
889  if(state==Qt::Unchecked)
890  m_showAll = false;
891  else
892  m_showAll = true;
893 
894  //loop over all tracks
896  for(; it!=m_trackSwitches.end(); ++it) {
897  (*it)->whichChild = m_showAll ? SO_SWITCH_ALL : SO_SWITCH_NONE;
898  }
899 
900  //loop over overlap
901  it=m_overlapSwitches.begin();
902  for(; it!=m_overlapSwitches.end(); ++it) {
903  (*it)->whichChild = m_showAll && !m_showSignal && !m_showRefitted ? SO_SWITCH_ALL : SO_SWITCH_NONE;
904  }
905 }
906 //___________________________________________________________
908  if(state==Qt::Unchecked)
909  m_showSignal = false;
910  else
911  m_showSignal = true;
912 
913  //loop over original signal tracks
915  for(; it!=m_signalSwitches.end(); ++it) {
916  (*it)->whichChild = m_showSignal ? SO_SWITCH_ALL : SO_SWITCH_NONE;
917  }
918 
919  //loop over overlap
920  it=m_overlapSwitches.begin();
921  for(; it!=m_overlapSwitches.end(); ++it) {
922  (*it)->whichChild = m_showAll && !m_showSignal && !m_showRefitted ? SO_SWITCH_ALL : SO_SWITCH_NONE;
923  }
924 }
925 //___________________________________________________________
927  if(state==Qt::Unchecked)
928  m_showRefitted = false;
929  else
930  m_showRefitted = true;
931 
932  //loop over refitted signal tracks
934  for(; it!=m_refittedSwitches.end(); ++it) {
935  (*it)->whichChild = m_showRefitted ? SO_SWITCH_ALL : SO_SWITCH_NONE;
936  }
937  //loop over overlap
938  it=m_overlapSwitches.begin();
939  for(; it!=m_overlapSwitches.end(); ++it) {
940  (*it)->whichChild = m_showAll && !m_showSignal && !m_showRefitted ? SO_SWITCH_ALL : SO_SWITCH_NONE;
941  }
942 
943 }
944 //___________________________________________________________
946  if(state==Qt::Unchecked)
947  m_showNeutral = false;
948  else
949  m_showNeutral = true;
950 
951  //loop over neutral tracks
953  for(; it!=m_neutralSwitches.end(); ++it) {
954  (*it)->whichChild = m_showNeutral ? SO_SWITCH_ALL : SO_SWITCH_NONE;
955  }
956 }
957 //___________________________________________________________
958 
961  messageDebug("in getTrack");
962 
963  messageDebug("Retrieving track parameters...");
964 
966  std::vector< const Trk::TrackParameters* > trackpars;
967  trackpars = trackparticle->trackParameters();
968 
969  auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
970  messageDebug("...done");
971 
972  if (!trackpars.empty()) {
973  bool needresorting = trackpars.at(0)!=trackparticle->perigee();//Needed since TrackParticles are (at the moment)
974  //created with the first parameter put last
975  messageDebug("resorting...");
976  if (needresorting) {
977  messageDebug("dynamic cast");
978 
979  //const Trk::ParametersT<Trk::Charged>* p = dynamic_cast<const Trk::ParametersT<Trk::Charged>* >(trackpars.at(trackpars.size()-1));
980  const Trk::TrackParameters* p = dynamic_cast<const Trk::TrackParameters* >(trackpars.at(trackpars.size()-1));
981 
982  messageDebug("new TrackStateOnSurface");
983 
984  if (p) trackStateOnSurfaces->push_back(new Trk::TrackStateOnSurface(nullptr,p->uniqueClone(),nullptr));
985  }
986  unsigned limit(needresorting?trackpars.size()-1:trackpars.size());
987  messageDebug("...done");
988 
989  //NB: We only ever created this handle if charge()!=0.0:
990  messageDebug("Filling the vector...");
991  for (unsigned i = 0; i < limit; ++i) {
992 // const Trk::ParametersT<Trk::Charged>* p = dynamic_cast<const Trk::ParametersT<Trk::Charged>* >(trackpars.at(i));
993  const Trk::TrackParameters* p = dynamic_cast<const Trk::TrackParameters* >(trackpars.at(i));
994  if (!p)
995  continue;
996 /* if (!common()->trackSanityHelper()->isSafe(p))
997  continue;*/
998  trackStateOnSurfaces->push_back(new Trk::TrackStateOnSurface(nullptr,p->uniqueClone(),nullptr));
999  }
1000  messageDebug("...done");
1001 
1002  }
1003 
1004  messageDebug("Creating the track...");
1005 
1006 #ifdef TRKTRACK_TRACKINFO_H
1008  const Trk::Track * trk = new Trk::Track(ti,std::move(trackStateOnSurfaces)/*track assumes ownership*/,nullptr/*fitquality*/);
1009 #else
1010  const Trk::Track * trk = new Trk::Track(Trk::Track::unknown, std::move(trackStateOnSurfaces)/*track assumes ownership*/,
1011  0/*fitquality*/,Trk::pion);
1012 #endif
1013 
1014  messageDebug("...done");
1015 
1016  messageDebug("leaving getTrack");
1017  return trk;
1018 
1019 }
1020 //___________________________________________________________
1022 
1023 
1024  const Amg::Vector3D& pos(std::move(position));
1025  const Amg::Vector3D& mom(std::move(momentum));
1026 
1027  // init the error matrix
1028  AmgSymMatrix(5) covMtxP;
1029  covMtxP.setIdentity();
1030 
1031  AmgSymMatrix(5) errMatr = covMtxP;
1032  Trk::Perigee * measuredPerigee = new Trk::Perigee( pos, mom, charge, pos, std::move(errMatr) );
1033 
1034  //creates parameter base for the new track
1035  const Trk::TrackParameters* p = dynamic_cast<const Trk::TrackParameters* >(measuredPerigee);
1036 
1037  //TODO: check parameters safety
1038 
1039  //creates a vector of TracksStates on surface
1040  auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
1041  trackStateOnSurfaces->push_back(new Trk::TrackStateOnSurface(nullptr,p->uniqueClone(),nullptr));
1042 
1043  //create track
1044 #ifdef TRKTRACK_TRACKINFO_H
1046  const Trk::Track * trk = new Trk::Track(ti,std::move(trackStateOnSurfaces)/*track assumes ownership*/,nullptr/*fitquality*/);
1047 #else
1048  const Trk::Track * trk = new Trk::Track(Trk::Track::unknown, std::move(trackStateOnSurfaces)/*track assumes ownership*/,
1049  0/*fitquality*/,Trk::pion);
1050 #endif
1051 
1052  return trk;
1053 
1054 
1055 }
1056 
1057 //___________________________________________________________
1058 
1059 void VP1BPhysSystem::getColor(unsigned long icolor, double& r, double& g, double& b) {
1060  messageDebug("in getColor");
1061 
1062  unsigned long red = icolor/65536;
1063  icolor -= red*65536;
1064 
1065  unsigned long green = icolor/256;
1066  icolor -= green*256;
1067 
1068  unsigned long blue = icolor;
1069 
1070  r=red/255.;
1071  g=green/255.;
1072  b=blue/255.;
1073 
1074  messageDebug("leaving getColor");
1075 
1076 }
1077 //___________________________________________________________
1078 SoLineSet* VP1BPhysSystem::createCross(double extent ) {
1079  messageDebug("in createCross");
1080 
1081  SoVertexProperty *vertices = new SoVertexProperty();
1082  vertices->vertex.set1Value ( 0,-extent, 0 , 0 );
1083  vertices->vertex.set1Value ( 1, extent, 0 , 0 );
1084  vertices->vertex.set1Value ( 2, 0 ,-extent , 0 );
1085  vertices->vertex.set1Value ( 3, 0 , extent , 0 );
1086  vertices->vertex.set1Value ( 4, 0 , 0 ,-extent );
1087  vertices->vertex.set1Value ( 5, 0 , 0 , extent );
1088  SoLineSet * line = new SoLineSet();
1089  line->numVertices.set1Value(0,2);
1090  line->numVertices.set1Value(1,2);
1091  line->numVertices.set1Value(2,2);
1092  line->vertexProperty = vertices;
1093 
1094  messageDebug("leving createCross");
1095  return line;
1096 }
1097 
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Br::vtx_x
double vtx_x
Definition: VP1BPhysConvertor.h:22
Br::neutral_refitted_pz
std::vector< double > * neutral_refitted_pz
Definition: VP1BPhysConvertor.h:50
VP1BPhysSystem::m_trackSwitches
std::vector< SoSwitch * > m_trackSwitches
Definition: VP1BPhysSystem.h:161
Br::vtx_xy
double vtx_xy
Definition: VP1BPhysConvertor.h:28
beamspotman.r
def r
Definition: beamspotman.py:676
VP1BPhysSystem::crossToggled
void crossToggled(bool checked)
Definition: VP1BPhysSystem.cxx:856
TrackPropagationHelper.h
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
VP1BPhysSystem::drawRefittedTrack
void drawRefittedTrack(SoSeparator *root, double x, double y, double z, double px, double py, double pz, double charge, unsigned long color)
Definition: VP1BPhysSystem.cxx:487
Br::track_refitted_py
std::vector< double > * track_refitted_py
Definition: VP1BPhysConvertor.h:42
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
checkFileSG.line
line
Definition: checkFileSG.py:75
color
Definition: jFexInputByteStreamTool.cxx:25
VP1AvailableToolsHelper.h
IVP13DSystemSimple
Definition: IVP13DSystemSimple.h:24
test_pyathena.px
px
Definition: test_pyathena.py:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TrackParameters.h
TrackParticle.h
Br::vtx_yz
double vtx_yz
Definition: VP1BPhysConvertor.h:30
PlotCalibFromCool.yy
yy
Definition: PlotCalibFromCool.py:714
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
VP1BPhysSystem::actualBuild
void actualBuild()
Definition: VP1BPhysSystem.cxx:190
VP1BPhysSystem::drawTrackParticle
void drawTrackParticle(SoSwitch *trackSwitch, const Rec::TrackParticle *part, unsigned long color)
Definition: VP1BPhysSystem.cxx:419
VP1BPhysSystem::m_showAll
bool m_showAll
Definition: VP1BPhysSystem.h:156
VP1BPhysSystem::m_showNeutral
bool m_showNeutral
Definition: VP1BPhysSystem.h:158
VP1BPhysSystem::m_fileName
QString m_fileName
Definition: VP1BPhysSystem.h:147
Br::track_charge
std::vector< double > * track_charge
Definition: VP1BPhysConvertor.h:40
VP1BPhysSystem::displayNeutralChanged
void displayNeutralChanged(int state)
Definition: VP1BPhysSystem.cxx:945
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Br::vtx_color
unsigned long vtx_color
Definition: VP1BPhysConvertor.h:32
Br::vtx_y
double vtx_y
Definition: VP1BPhysConvertor.h:23
hist_file_dump.d
d
Definition: hist_file_dump.py:137
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
darknes
const unsigned int darknes
Definition: VP1BPhysSystem.cxx:55
VP1BPhysSystem::drawAllTrackParticles
void drawAllTrackParticles(StoreGateSvc *sg, SoSeparator *root, std::vector< const Rec::TrackParticle * > *selectedParticles)
Definition: VP1BPhysSystem.cxx:378
VP1BPhysSystem::displayAllTracksChanged
void displayAllTracksChanged(int state)
Definition: VP1BPhysSystem.cxx:888
tree
TChain * tree
Definition: tile_monitor.h:30
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
xAOD::JetInput::Track
@ Track
Definition: JetContainerInfo.h:61
VP1BPhysSystem::m_rootFile
TFile * m_rootFile
Definition: VP1BPhysSystem.h:145
skel.it
it
Definition: skel.GENtoEVGEN.py:423
VP1QtUtils.h
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Br::track_z0
std::vector< double > * track_z0
Definition: VP1BPhysConvertor.h:39
Br::track_color
std::vector< unsigned long > * track_color
Definition: VP1BPhysConvertor.h:44
Trk::Perigee
ParametersT< 5, Charged, PerigeeSurface > Perigee
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:29
VP1BPhysSystem::m_refittedSwitches
std::vector< SoSwitch * > m_refittedSwitches
Definition: VP1BPhysSystem.h:165
VP1BPhysSystem::createCross
SoLineSet * createCross(double extent)
Definition: VP1BPhysSystem.cxx:1078
TrackPropagationHelper
Definition: TrackPropagationHelper.h:40
Br::track_refitted_pz
std::vector< double > * track_refitted_pz
Definition: VP1BPhysConvertor.h:43
IExtrapolator.h
VP1BPhysSystem::getRefittedTrack
const Trk::Track * getRefittedTrack(const Amg::Vector3D &pos, const Amg::Vector3D &mom, double charge)
Definition: VP1BPhysSystem.cxx:1021
VP1BPhysSystem::m_showVertices
bool m_showVertices
Definition: VP1BPhysSystem.h:153
VP1BPhysSystem::m_sg
StoreGateSvc * m_sg
Definition: VP1BPhysSystem.h:149
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
Br::evtNum
int evtNum
Definition: VP1BPhysSystem.h:53
Br::vtx_z
double vtx_z
Definition: VP1BPhysConvertor.h:24
VP1BPhysSystem::drawCutoffTrackParticle
void drawCutoffTrackParticle(SoSeparator *root, const Rec::TrackParticle *part, double x, double y, double z, unsigned long color)
Definition: VP1BPhysSystem.cxx:436
skel.runNum
runNum
Definition: skel.ABtoEVGEN.py:137
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
VP1BPhysSystem::loadFile
void loadFile()
slots *****************************************************************************
Definition: VP1BPhysSystem.cxx:770
x
#define x
Br::track_refitted_px
std::vector< double > * track_refitted_px
Definition: VP1BPhysConvertor.h:41
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
VP1BPhysSystem::buildController
QWidget * buildController()
Definition: VP1BPhysSystem.cxx:152
TruthTest.itE
itE
Definition: TruthTest.py:25
VP1BPhysSystem::m_showSignal
bool m_showSignal
Definition: VP1BPhysSystem.h:157
IVP1System::state
State state() const
Definition: IVP1System.cxx:129
StoreGateSvc::retrieve
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
Track.h
VP1BPhysSystem::m_vertexSwitches
std::vector< SoSwitch * > m_vertexSwitches
Definition: VP1BPhysSystem.h:154
VP1BPhysSystem::m_c
Clockwork * m_c
Definition: VP1BPhysSystem.h:169
Br
Definition: VP1BPhysConvertor.h:14
GeoPrimitives.h
VP1BPhysSystem::Clockwork
Definition: VP1BPhysSystem.cxx:109
VP1BPhysSystem::displayOrigSignalChanged
void displayOrigSignalChanged(int state)
Definition: VP1BPhysSystem.cxx:907
VP1BPhysSystem::buildEventSceneGraph
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
Definition: VP1BPhysSystem.cxx:336
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
Br::vtx_mother
int vtx_mother
Definition: VP1BPhysConvertor.h:31
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
Br::neutral_refitted_py
std::vector< double > * neutral_refitted_py
Definition: VP1BPhysConvertor.h:49
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
VP1BPhysSystem::drawPoints
void drawPoints(SoSwitch *trackSwitch, std::vector< Amg::Vector3D > *points, unsigned long color, double width, bool isNeutral)
Definition: VP1BPhysSystem.cxx:515
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
VP1BPhysSystem::sphereToggled
void sphereToggled(bool checked)
Definition: VP1BPhysSystem.cxx:839
lumiFormat.i
int i
Definition: lumiFormat.py:92
Br::vtx_xz
double vtx_xz
Definition: VP1BPhysConvertor.h:29
z
#define z
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
Trk::theta
@ theta
Definition: ParamDefs.h:72
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Br::track_refitted_color
std::vector< unsigned long > * track_refitted_color
Definition: VP1BPhysConvertor.h:45
VP1BPhysSystem::m_overlapSwitches
std::vector< SoSwitch * > m_overlapSwitches
Definition: VP1BPhysSystem.h:162
Br::neutral_decay
std::vector< int > * neutral_decay
Definition: VP1BPhysConvertor.h:52
WritePulseShapeToCool.det
det
Definition: WritePulseShapeToCool.py:204
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
Br::track_pt
std::vector< double > * track_pt
Definition: VP1BPhysConvertor.h:35
TrackCollection.h
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
VP1BPhysSystem::findClosestApproach
std::vector< Amg::Vector3D > * findClosestApproach(std::vector< Amg::Vector3D > *points, double x, double y, double z)
Definition: VP1BPhysSystem.cxx:632
Br::vtx_zz
double vtx_zz
Definition: VP1BPhysConvertor.h:27
isNeutral
bool isNeutral(const T &p)
Definition: AtlasPID.h:497
VP1BPhysSystem::getColor
void getColor(unsigned long icolor, double &r, double &g, double &b)
Definition: VP1BPhysSystem.cxx:1059
Br::vtx_daughters
std::vector< int > * vtx_daughters
Definition: VP1BPhysSystem.h:68
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
Trk::ParametersBase
Definition: ParametersBase.h:55
VP1BPhysSystem::drawVertex
void drawVertex(SoSeparator *root, double x, double y, double z, double radius, double xx, double xy, double xz, double yy, double yz, double zz, unsigned long color, std::vector< SoSwitch * > &vertexSwitches)
Definition: VP1BPhysSystem.cxx:679
python.Utils.unixtools.which
def which(filename, env=os.environ)
UNIX-style which ---------------------------------------------------------—.
Definition: unixtools.py:39
Br::init
bool init(TTree *tree)
Definition: VP1BPhysSystem.cxx:58
VP1BPhysSystem::VP1BPhysSystem
VP1BPhysSystem()
Definition: VP1BPhysSystem.cxx:115
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
VP1BPhysSystem::displayRefTracksChanged
void displayRefTracksChanged(int state)
Definition: VP1BPhysSystem.cxx:926
VP1BPhysSystem::m_neutralSwitches
std::vector< SoSwitch * > m_neutralSwitches
Definition: VP1BPhysSystem.h:164
make_coralServer_rep.proj
proj
Definition: make_coralServer_rep.py:48
Br::neutral_refitted_px
std::vector< double > * neutral_refitted_px
Definition: VP1BPhysConvertor.h:48
VP1BPhysSystem::m_vertexStyle
int m_vertexStyle
Definition: VP1BPhysSystem.h:152
grepfile.sep
sep
Definition: grepfile.py:38
Muon::nsw::unknown
@ unknown
Definition: NSWTriggerElink.h:36
Amg::py
@ py
Definition: GeoPrimitives.h:39
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
IVP1System::messageDebug
void messageDebug(const QString &) const
Definition: IVP1System.cxx:347
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Br::track_phi
std::vector< double > * track_phi
Definition: VP1BPhysConvertor.h:37
Br::track_eta
std::vector< double > * track_eta
Definition: VP1BPhysConvertor.h:36
Trk::TrackParticleBase::trackParameters
const std::vector< const TrackParameters * > & trackParameters() const
Returns the track parameters.
Definition: TrackParticleBase.h:243
charge
double charge(const T &p)
Definition: AtlasPID.h:494
VP1BPhysSystem::m_signalSwitches
std::vector< SoSwitch * > m_signalSwitches
Definition: VP1BPhysSystem.h:163
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
VP1BPhysSystem::m_br
Br * m_br
Definition: VP1BPhysSystem.h:167
Br::vtx_yy
double vtx_yy
Definition: VP1BPhysConvertor.h:26
green
@ green
Definition: BinsDiffFromStripMedian.h:18
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
VP1BPhysSystem::m_showRefitted
bool m_showRefitted
Definition: VP1BPhysSystem.h:159
Trk::IExtrapolator
Definition: IExtrapolator.h:62
Br::neutral_color
std::vector< unsigned long > * neutral_color
Definition: VP1BPhysConvertor.h:53
VP1BPhysSystem::ellipsoidToggled
void ellipsoidToggled(bool checked)
Definition: VP1BPhysSystem.cxx:872
Br::GetEntry
int GetEntry(int i)
Definition: VP1BPhysSystem.cxx:105
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
python.PyAthena.v
v
Definition: PyAthena.py:157
Br::track_d0
std::vector< double > * track_d0
Definition: VP1BPhysConvertor.h:38
Br::runNum
int runNum
Definition: VP1BPhysSystem.h:54
IVP13DSystemSimple::updateGUI
void updateGUI()
Definition: IVP13DSystemSimple.h:89
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
VP1BPhysSystem::m_root
SoSeparator * m_root
Definition: VP1BPhysSystem.h:150
y
#define y
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
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
VP1ToolAccessHelper.h
VP1BPhysSystem::Clockwork::ui
Ui::BPhysControllerForm ui
Definition: VP1BPhysSystem.cxx:111
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:73
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
VP1BPhysSystem.h
VP1ToolAccessHelper
Definition: VP1ToolAccessHelper.h:29
Br::vtx_xx
double vtx_xx
Definition: VP1BPhysConvertor.h:25
VP1BPhysSystem::displayVerticesChanged
void displayVerticesChanged(int state)
Definition: VP1BPhysSystem.cxx:819
VP1BPhysSystem::drawNeutralTrack
void drawNeutralTrack(SoSeparator *root, double x, double y, double z, double px, double py, double pz, double length, unsigned long color)
Definition: VP1BPhysSystem.cxx:460
VP1BPhysSystem::filterTrack
void filterTrack(SoSeparator *root, const Rec::TrackParticleContainer *partCont, double pt, double eta, double phi, double d0, double z0, double x, double y, double z, unsigned long color, std::vector< const Rec::TrackParticle * > *selectedParticles)
drawing methods *******************************************************************
Definition: VP1BPhysSystem.cxx:349
merge.status
status
Definition: merge.py:17
rr
const boost::regex rr(r_r)
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
darkGray
const unsigned long darkGray
Definition: VP1BPhysSystem.cxx:56
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
Trk::TrackParticleBase::perigee
const Perigee * perigee() const
Attempts to cast the definingParameters() to Perigee.
Definition: TrackParticleBase.h:263
VP1BPhysSystem::getPoints
std::vector< Amg::Vector3D > * getPoints(const Trk::Track *track)
Definition: VP1BPhysSystem.cxx:565
StoreGateSvc.h
python.compressB64.c
def c
Definition: compressB64.py:93
updateCoolNtuple.limit
int limit
Definition: updateCoolNtuple.py:45
red
@ red
Definition: BinsDiffFromStripMedian.h:18
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
VP1BPhysSystem::m_tree
TTree * m_tree
Definition: VP1BPhysSystem.h:146
Br::vp1Filter
TTree * vp1Filter
Definition: VP1BPhysSystem.h:51
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
TrackingGeometryValidation.blue
blue
Definition: TrackingGeometryValidation.py:33
Br::neutral_length
std::vector< double > * neutral_length
Definition: VP1BPhysConvertor.h:51
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
VP1BPhysSystem::getTrack
const Trk::Track * getTrack(const Rec::TrackParticle *trackparticle)
utils *****************************************************************************
Definition: VP1BPhysSystem.cxx:960
VP1ToolAccessHelper::getToolPointer
toolT * getToolPointer(const QString &toolname, bool silent=false, bool createIfNotExists=false)
TrackParticleContainer.h
Trk::TrackInfo::Unknown
@ Unknown
Track fitter not defined.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:41