CMS 3D CMS Logo

FWConvTrackHitsDetailView.cc
Go to the documentation of this file.
1 
2 #include "TGLViewer.h" // access to over-all bounding box
3 #include "TEveCalo.h" // workaround for TEveCalo3D bounding box
4 #include "TGLFontManager.h"
5 #include "TEveScene.h"
6 #include "TEveManager.h"
7 #include "TEveStraightLineSet.h"
8 #include "TEveTrack.h"
9 #include "TEveTrackPropagator.h"
10 #include "TEveTrans.h"
11 #include "TEveText.h"
12 #include "TEveGeoShape.h"
13 #include "TGSlider.h"
14 #include "TGButton.h"
15 #include "TGLabel.h"
16 #include "TCanvas.h"
17 #include "TLatex.h"
18 #include "TLegend.h"
19 #include "TG3DLine.h"
20 #include "TEveCaloData.h"
21 
22 // CMSSW includes
27 
28 // Fireworks includes
38 
42 
43 namespace {
45 }
46 
48  : m_modules(nullptr), m_moduleLabels(nullptr), m_hits(nullptr), m_legend(nullptr), m_orthographic(false) {}
49 
51 
52 namespace {
53  void setCameraInit(
54  TGLViewer* v, TGLViewer::ECameraType type, const TEveVectorD b1, TEveVectorD b3, TEveVector center) {
55  TGLCamera& cam = v->RefCamera(type);
56  TGLMatrix& trans = cam.RefCamBase();
57 
58  trans.Set(trans.GetTranslation(), b3.Arr(), b1.Arr());
59  cam.Setup(v->RefOverallBoundingBox(), kTRUE);
60 
61  cam.SetExternalCenter(true);
62  cam.SetCenterVec(center.fX, center.fY, center.fZ);
63  }
64 
65  /*
66  // alternative to setCameraInit
67 void setCamera(TGLViewer* v, TGLViewer::ECameraType type, const TEveVectorD b1, TEveVectorD b2, TEveVectorD b3, TEveVector center )
68 {
69  // b1 = fwd, b2 = lft, b3 = up
70 
71  TGLCamera& cam = v->RefCamera(type);
72  TGLMatrix& trans = cam.RefCamBase();
73 
74  trans.SetBaseVec(1, b1.Arr());
75  trans.SetBaseVec(2, b2.Arr());
76  trans.SetBaseVec(3, b3.Arr());
77 
78  cam.SetExternalCenter(true);
79  cam.SetCenterVec(center.fX, center.fY, center.fZ);
80 }
81  */
82 } // namespace
84  if (conv->nTracks() < 2)
85  return;
86  const reco::Track* track0 = conv->tracks().at(0).get();
87  const reco::Track* track1 = conv->tracks().at(1).get();
88 
89  m_guiFrame->AddFrame(new TGLabel(m_guiFrame, "Camera Views:"), new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
90 
91  {
92  TGHorizontalFrame* f = new TGHorizontalFrame(m_guiFrame);
93  m_guiFrame->AddFrame(f, new TGLayoutHints(kLHintsExpandX, 2, 0, 0, 0));
94 
95  {
96  CSGAction* action = new CSGAction(this, "Top");
97  TGTextButton* b = new TGTextButton(f, action->getName().c_str());
98  f->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
99  TQObject::Connect(b, "Clicked()", "CSGAction", action, "activate()");
100  b->SetToolTipText("plane normal: track0 x track1");
101  action->activated.connect(sigc::mem_fun(this, &FWConvTrackHitsDetailView::camera1Callback));
102  }
103 
104  {
105  CSGAction* action = new CSGAction(this, "Side");
106  TGTextButton* b = new TGTextButton(f, action->getName().c_str());
107  f->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
108  TQObject::Connect(b, "Clicked()", "CSGAction", action, "activate()");
109  b->SetToolTipText("left fir: track1");
110  action->activated.connect(sigc::mem_fun(this, &FWConvTrackHitsDetailView::camera2Callback));
111  }
112  {
113  CSGAction* action = new CSGAction(this, "Front");
114  TGTextButton* b = new TGTextButton(f, action->getName().c_str());
115  f->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
116  TQObject::Connect(b, "Clicked()", "CSGAction", action, "activate()");
117  action->activated.connect(sigc::mem_fun(this, &FWConvTrackHitsDetailView::camera3Callback));
118  b->SetToolTipText("plane normal: track1 ");
119  }
120  }
121 
122  {
123  m_camTypeAction = new CSGAction(this, " Set Ortographic Projection ");
124  m_camTypeAction->createTextButton(m_guiFrame, new TGLayoutHints(kLHintsExpandX, 2, 0, 1, 4));
126  }
127 
128  {
129  CSGAction* action = new CSGAction(this, "Draw Module");
130  TGCheckButton* b = new TGCheckButton(m_guiFrame, action->getName().c_str());
131  b->SetState(kButtonDown, false);
132  m_guiFrame->AddFrame(b, new TGLayoutHints(kLHintsNormal, 2, 3, 1, 4));
133  TQObject::Connect(b, "Clicked()", "CSGAction", action, "activate()");
134  action->activated.connect(sigc::mem_fun(this, &FWConvTrackHitsDetailView::rnrModules));
135  }
136  {
137  CSGAction* action = new CSGAction(this, "Draw Hits");
138  TGCheckButton* b = new TGCheckButton(m_guiFrame, action->getName().c_str());
139  b->SetState(kButtonDown, false);
140  m_guiFrame->AddFrame(b, new TGLayoutHints(kLHintsNormal, 2, 3, 1, 4));
141  TQObject::Connect(b, "Clicked()", "CSGAction", action, "activate()");
142  action->activated.connect(sigc::mem_fun(this, &FWConvTrackHitsDetailView::rnrHits));
143  }
144 
145  TGCompositeFrame* p = (TGCompositeFrame*)m_guiFrame->GetParent();
146  p->MapSubwindows();
147  p->Layout();
148 
149  m_modules = new TEveElementList("Modules");
150  m_eveScene->AddElement(m_modules);
151  m_moduleLabels = new TEveElementList("Modules");
152  m_eveScene->AddElement(m_moduleLabels);
153  m_hits = new TEveElementList("Hits");
154  m_eveScene->AddElement(m_hits);
155  if (track1->extra().isAvailable()) {
156  addModules(*track1, id.item(), m_modules, true);
157  addHits(*track1, id.item(), m_hits, true);
158  }
159  if (track0->extra().isAvailable()) {
160  addModules(*track0, id.item(), m_modules, true);
161  addHits(*track0, id.item(), m_hits, true);
162  }
163  for (TEveElement::List_i i = m_modules->BeginChildren(), end = m_modules->EndChildren(); i != end; ++i) {
164  TEveGeoShape* gs = dynamic_cast<TEveGeoShape*>(*i);
165  const auto& rhs = *(*(i));
166  if (gs == nullptr && (*i != nullptr)) {
167  std::cerr << "Got a " << typeid(rhs).name() << ", expecting TEveGeoShape. ignoring (it must be the clusters)."
168  << std::endl;
169  continue;
170  }
171  // gs->SetMainTransparency(75);
172  // gs->SetPickable(kFALSE);
173 
174  TString name = gs->GetElementTitle();
175  if (!name.Contains("BAD") && !name.Contains("INACTIVE") && !name.Contains("LOST")) {
176  gs->SetMainColor(kBlue);
177  }
178  TEveText* text = new TEveText(name.Data());
179  text->PtrMainTrans()->SetFrom(gs->RefMainTrans().Array());
180  text->SetFontMode(TGLFont::kPixmap);
181  text->SetFontSize(12);
182  m_moduleLabels->AddElement(text);
183  }
184  m_moduleLabels->SetRnrChildren(false);
185 
186  TEveTrackPropagator* prop = new TEveTrackPropagator();
187  prop->SetMagFieldObj(item()->context().getField(), false);
188  prop->SetStepper(TEveTrackPropagator::kRungeKutta);
189  prop->SetMaxR(123);
190  prop->SetMaxZ(300);
191  prop->SetMaxStep(1);
192  prop->SetRnrDaughters(kTRUE);
193  prop->SetRnrReferences(kTRUE);
194  prop->SetRnrDecay(kTRUE);
195 
196  // first-vertex style
197  prop->SetRnrFV(kTRUE);
198  prop->RefFVAtt().SetMarkerColor(id.item()->defaultDisplayProperties().color());
199  prop->RefFVAtt().SetMarkerSize(0.8);
200 
201  // path-mark style
202  prop->RefPMAtt().SetMarkerSize(0.5);
203  prop->RefPMAtt().SetMarkerColor(id.item()->defaultDisplayProperties().color());
204 
205  TEveTrack* trk1 = fireworks::prepareTrack(*track1, prop);
206  trk1->MakeTrack();
207  trk1->SetLineWidth(2);
208  trk1->SetTitle("Track 1 and its ref states");
209  trk1->SetMainColor(id.item()->defaultDisplayProperties().color());
210  trk1->SetLineStyle(7);
211  m_eveScene->AddElement(trk1);
212 
213  TEveTrack* trk0 = fireworks::prepareTrack(*track0, prop);
214  trk0->MakeTrack();
215  trk0->SetLineWidth(2);
216  trk0->SetTitle("Track 0 and its ref states");
217  trk0->SetMainColor(id.item()->defaultDisplayProperties().color());
218  m_eveScene->AddElement(trk0);
219 
220  // create TEveCalo3D object, fix bounding box
221  {
222  float phi = conv->pairMomentum().phi();
223  float eta = conv->pairMomentum().eta();
224 
225  FWECALCaloDataDetailViewBuilder caloBld(id.item()->getEvent(), id.item()->getGeom(), eta, phi, 30);
226  TEveCaloData* data = caloBld.buildCaloData(false);
227  // AMT!!! this is memory leak, check why it needs to be added
228  TEveCalo3D* calo3d = new TEveCalo3D(data);
229  gEve->AddElement(data);
230  calo3d->SetBarrelRadius(129.00);
231  calo3d->SetEndCapPos(268.36);
232 
233  float theta = TEveCaloData::EtaToTheta(eta);
234  float ext = data->GetMaxVal(true) * calo3d->GetValToHeight();
235  if (TMath::Abs(eta) < calo3d->GetTransitionEta()) {
236  // printf("barrel\n");
237  float x = calo3d->GetBarrelRadius() * TMath::Cos(phi);
238  float y = calo3d->GetBarrelRadius() * TMath::Sin(phi);
239  float z = calo3d->GetBarrelRadius() / TMath::Tan(theta);
240 
241  calo3d->SetupBBoxCube(ext, x, y, z);
242  } else {
243  // printf("endcap\n");
244  float z = TMath::Sign(calo3d->GetEndCapPos(), eta);
245  float r = z * TMath::Tan(theta);
246  calo3d->SetupBBoxCube(ext, r * TMath::Cos(phi), r * TMath::Sin(phi), z);
247  }
248  m_eveScene->AddElement(calo3d);
249  }
250 
251  // base vectors
252  TEveVectorD fwd = trk1->GetMomentum().Cross(trk0->GetMomentum());
253  fwd.Normalize();
254  TEveVectorD lft = trk1->GetMomentum();
255  lft.Normalize();
256  TEveVectorD up = lft.Cross(fwd);
257 
258  TEveVectorD c = (trk1->GetVertex() + trk0->GetVertex()) * 0.5;
259  if (true) {
260  setCameraInit(viewerGL(), TGLViewer::kCameraPerspXOZ, fwd, up, c); //default
261  setCameraInit(viewerGL(), TGLViewer::kCameraPerspYOZ, up, lft, c);
262  setCameraInit(viewerGL(), TGLViewer::kCameraPerspXOY, lft, fwd, c);
263 
264  setCameraInit(viewerGL(), TGLViewer::kCameraOrthoXOY, fwd, up, c);
265  setCameraInit(viewerGL(), TGLViewer::kCameraOrthoXOZ, up, lft, c);
266  setCameraInit(viewerGL(), TGLViewer::kCameraOrthoZOY, lft, fwd, c);
267  }
268  {
269  Float_t sfac = 100;
270  fwd *= sfac;
271  lft *= sfac;
272  up *= sfac;
273  int transp = 90;
274  {
275  TEveStraightLineSet* bls = new TEveStraightLineSet("base1");
276  bls->AddLine(c, fwd + c);
277  bls->SetMainColor(kBlue);
278  bls->SetMainTransparency(transp);
279  bls->SetPickable(false);
280  m_eveScene->AddElement(bls);
281  }
282 
283  {
284  TEveStraightLineSet* bls = new TEveStraightLineSet("base2");
285  bls->AddLine(c, lft + c);
286  bls->SetMainColor(kBlue);
287  bls->SetMainTransparency(transp);
288  bls->SetPickable(false);
289  m_eveScene->AddElement(bls);
290  }
291 
292  {
293  TEveStraightLineSet* bls = new TEveStraightLineSet("base3");
294  bls->AddLine(c, up + c);
295  bls->SetMainColor(kBlue);
296  bls->SetMainTransparency(transp);
297  bls->SetPickable(false);
298  m_eveScene->AddElement(bls);
299  }
300  }
301  {
302  TEveStraightLineSet* bls = new TEveStraightLineSet("Photon", "Photon");
304  bls->AddLine(c.fX, c.fY, c.fZ, bs->x0(), bs->y0(), bs->z0());
305  bls->SetMainColor(id.item()->defaultDisplayProperties().color());
306  bls->SetLineStyle(3);
307  m_eveScene->AddElement(bls);
308  }
309 
310  viewerGL()->SetStyle(TGLRnrCtx::kOutline);
311  viewerGL()->ResetCamerasAfterNextUpdate();
312  viewerGL()->UpdateScene(kFALSE);
313  gEve->Redraw3D();
314 
315  setTextInfo(id, conv);
317 }
318 
320  m_infoCanvas->cd();
321 
322  float_t x = 0.02;
323  float y = 0.95;
324 
325  TLatex* latex = new TLatex(x, y, "");
326  const double textsize(0.07);
327  latex->SetTextSize(2 * textsize);
328 
329  latex->DrawLatex(x, y, id.item()->modelName(id.index()).c_str());
330  y -= latex->GetTextSize() * 0.6;
331 
332  latex->SetTextSize(textsize);
333  float lineH = latex->GetTextSize() * 0.6;
334 
335  latex->DrawLatex(x,
336  y,
337  Form("p_{T}=%.1f GeV, #eta=%0.2f, #varphi=%0.2f",
338  sqrt(conv->pairMomentum().Perp2()),
339  conv->pairMomentum().eta(),
340  conv->pairMomentum().phi()));
341  y -= lineH;
342  latex->DrawLatex(x,
343  y,
344  Form("vtx=(%.1f, %.1f, %.1f) r=%.1f [cm]",
345  conv->conversionVertex().x(),
346  conv->conversionVertex().y(),
347  conv->conversionVertex().z(),
348  conv->conversionVertex().position().rho()));
349  y -= lineH;
350  latex->DrawLatex(x, y, Form("#Deltactg#theta=%.3f", conv->pairCotThetaSeparation()));
351  y -= lineH;
352  latex->DrawLatex(x, y, Form("#Delta#phi_{vtx}=%.3f", conv->dPhiTracksAtVtx()));
353  y -= lineH;
354  latex->DrawLatex(x, y, Form("dist. min. app.=%.3f cm", conv->distOfMinimumApproach()));
355  y -= lineH;
356  y -= lineH;
357 
358  const reco::Track* track0 = conv->tracks().at(0).get();
359  latex->DrawLatex(x, y, Form("Trk0 q=%i", track0->charge()));
360  y -= lineH;
361  latex->DrawLatex(x, y, Form("p_{T}=%.1f GeV, #eta=%0.2f, #varphi=%0.2f", track0->pt(), track0->eta(), track0->phi()));
362  y -= lineH;
363  const reco::HitPattern& hp0 = track0->hitPattern();
364  int nvalid_tk0 = 0, ninvalid_tk0 = 0, npix_tk0 = 0, nstrip_tk0 = 0;
365  for (int i_tk0 = 0; i_tk0 < hp0.numberOfAllHits(reco::HitPattern::TRACK_HITS); i_tk0++) {
366  uint32_t hit = hp0.getHitPattern(reco::HitPattern::TRACK_HITS, i_tk0);
368  nvalid_tk0++;
370  npix_tk0++;
372  nstrip_tk0++;
373  } else
374  ninvalid_tk0++;
375  }
376  latex->DrawLatex(x, y, Form("valid hits: %i (pix. %i, str. %i)", nvalid_tk0, npix_tk0, nstrip_tk0));
377  y -= lineH;
378  latex->DrawLatex(x, y, Form("invalid: %i", ninvalid_tk0));
379  y -= lineH;
380 
381  int npix_mhi_tk0 = 0, nstrip_mhi_tk0 = 0;
382  for (int i_mhi_tk0 = 0; i_mhi_tk0 < hp0.numberOfAllHits(reco::HitPattern::MISSING_INNER_HITS); i_mhi_tk0++) {
383  uint32_t hit = hp0.getHitPattern(reco::HitPattern::MISSING_INNER_HITS, i_mhi_tk0);
385  npix_mhi_tk0++;
387  nstrip_mhi_tk0++;
388  }
389  latex->DrawLatex(x, y, Form("miss. inner hits: pix. %i, str. %i", npix_mhi_tk0, nstrip_mhi_tk0));
390 
391  y -= lineH;
392  y -= lineH;
393  const reco::Track* track1 = conv->tracks().at(1).get();
394  latex->DrawLatex(x, y, Form("Trk1 q=%i", track1->charge()));
395  y -= lineH;
396  latex->DrawLatex(x, y, Form("p_{T}=%.1f GeV, #eta=%0.2f, #varphi=%0.2f", track1->pt(), track1->eta(), track1->phi()));
397  y -= lineH;
398 
399  const reco::HitPattern& hp1 = track1->hitPattern();
400  int nvalid_tk1 = 0, ninvalid_tk1 = 0, npix_tk1 = 0, nstrip_tk1 = 0;
401  for (int i_tk1 = 0; i_tk1 < hp1.numberOfAllHits(reco::HitPattern::TRACK_HITS); i_tk1++) {
402  uint32_t hit = hp1.getHitPattern(reco::HitPattern::TRACK_HITS, i_tk1);
404  nvalid_tk1++;
406  npix_tk1++;
408  nstrip_tk1++;
409  } else
410  ninvalid_tk1++;
411  }
412  latex->DrawLatex(x, y, Form("valid hits: %i (pix. %i, str. %i)", nvalid_tk1, npix_tk1, nstrip_tk1));
413  y -= lineH;
414  latex->DrawLatex(x, y, Form("invalid: %i", ninvalid_tk1));
415  y -= lineH;
416 
417  int npix_mhi_tk1 = 0, nstrip_mhi_tk1 = 0;
418  for (int i_mhi_tk1 = 0; i_mhi_tk1 < hp1.numberOfAllHits(reco::HitPattern::MISSING_INNER_HITS); i_mhi_tk1++) {
419  uint32_t hit = hp1.getHitPattern(reco::HitPattern::MISSING_INNER_HITS, i_mhi_tk1);
421  npix_mhi_tk1++;
423  nstrip_mhi_tk1++;
424  }
425  latex->DrawLatex(x, y, Form("miss. inner hits: pix. %i, str. %i", npix_mhi_tk1, nstrip_mhi_tk1));
426  y -= lineH;
427  y -= lineH;
428 }
429 
431  class TEveElementList* tList,
432  Color_t color,
433  int size) {
434  // !AMT this is detail view specific, should move to track hits
435  // detail view
436 
437  TEvePointSet* pointSet = new TEvePointSet();
438  pointSet->SetMarkerSize(size);
439  pointSet->SetMarkerStyle(4);
440  pointSet->SetPickable(kTRUE);
441  pointSet->SetTitle("Pixel Hits");
442  pointSet->SetMarkerColor(color);
443 
444  for (std::vector<TVector3>::const_iterator it = points.begin(), itEnd = points.end(); it != itEnd; ++it) {
445  pointSet->SetNextPoint(it->x(), it->y(), it->z());
446  }
447  tList->AddElement(pointSet);
448 }
449 
451  const FWEventItem* iItem,
452  TEveElement* trkList,
453  bool addNearbyHits) {
454  std::vector<TVector3> pixelPoints;
455  fireworks::pushPixelHits(pixelPoints, *iItem, track);
456  TEveElementList* pixels = new TEveElementList("Pixels");
457  trkList->AddElement(pixels);
458  if (addNearbyHits) {
459  // get the extra hits
460  std::vector<TVector3> pixelExtraPoints;
461  fireworks::pushNearbyPixelHits(pixelExtraPoints, *iItem, track);
462  // draw first the others
463  addTrackerHits3D(pixelExtraPoints, pixels, kRed, 1);
464  // then the good ones, so they're on top
465  addTrackerHits3D(pixelPoints, pixels, kGreen, 1);
466  } else {
467  // just add those points with the default color
468  addTrackerHits3D(pixelPoints, pixels, iItem->defaultDisplayProperties().color(), 1);
469  }
470 
471  // strips
472  TEveElementList* strips = new TEveElementList("Strips");
473  trkList->AddElement(strips);
474  fireworks::addSiStripClusters(iItem, track, strips, addNearbyHits, false);
475 }
476 
477 //______________________________________________________________________________
478 
480  const FWEventItem* iItem,
481  TEveElement* trkList,
482  bool addLostHits) {
483  std::set<unsigned int> ids;
484  for (trackingRecHit_iterator recIt = track.recHitsBegin(), recItEnd = track.recHitsEnd(); recIt != recItEnd;
485  ++recIt) {
486  DetId detid = (*recIt)->geographicalId();
487  if (!addLostHits && !(*recIt)->isValid())
488  continue;
489  if (detid.rawId() != 0) {
490  TString name("");
491  switch (detid.det()) {
492  case DetId::Tracker:
493  switch (detid.subdetId()) {
494  case SiStripDetId::TIB:
495  name = "TIB ";
496  break;
497  case SiStripDetId::TOB:
498  name = "TOB ";
499  break;
500  case SiStripDetId::TID:
501  name = "TID ";
502  break;
503  case SiStripDetId::TEC:
504  name = "TEC ";
505  break;
507  name = "Pixel Barrel ";
508  break;
510  name = "Pixel Endcap ";
511  default:
512  break;
513  }
514  break;
515 
516  case DetId::Muon:
517  switch (detid.subdetId()) {
518  case MuonSubdetId::DT:
519  name = "DT";
520  detid = DetId(DTChamberId(detid)); // get rid of layer bits
521  break;
522  case MuonSubdetId::CSC:
523  name = "CSC";
524  break;
525  case MuonSubdetId::RPC:
526  name = "RPC";
527  break;
528  default:
529  break;
530  }
531  break;
532  default:
533  break;
534  }
535  if (!ids.insert(detid.rawId()).second)
536  continue;
537  if (iItem->getGeom()) {
538  TEveGeoShape* shape = iItem->getGeom()->getEveShape(detid);
539  if (nullptr != shape) {
540  shape->SetMainTransparency(65);
541  shape->SetPickable(kTRUE);
542  switch ((*recIt)->type()) {
544  shape->SetMainColor(iItem->defaultDisplayProperties().color());
545  break;
549  name += "LOST ";
550  shape->SetMainColor(kRed);
551  break;
555  name += "INACTIVE ";
556  shape->SetMainColor(28);
557  break;
558  case TrackingRecHit::bad:
559  name += "BAD ";
560  shape->SetMainColor(218);
561  break;
562  }
563  shape->SetTitle(name + ULong_t(detid.rawId()));
564  trkList->AddElement(shape);
565  } else {
566  fwLog(fwlog::kInfo) << "Failed to get shape extract for a tracking rec hit: "
567  << "\n"
568  << fireworks::info(detid) << std::endl;
569  }
570  }
571  }
572  }
573 }
574 
575 //______________________________________________________________________________
577  viewerGL()->PickCameraCenter();
578  viewerGL()->SetDrawCameraCenter(kTRUE);
579 }
580 
583  m_camTypeAction->setName(m_orthographic ? "Set Perspective Projection" : "Set Orthographic Projection");
584 
585  (this->*foo)();
586  //printf("current isOrthographic : %d \n", viewerGL()->CurrentCamera().IsOrthographic());
587 }
588 
590  m_moduleLabels->SetRnrChildren(!m_moduleLabels->GetRnrChildren());
591  gEve->Redraw3D();
592 }
593 
595  m_modules->SetRnrChildren(!m_modules->GetRnrChildren());
596  gEve->Redraw3D();
597 }
598 
600  m_hits->SetRnrChildren(!m_hits->GetRnrChildren());
601  gEve->Redraw3D();
602 }
603 
606 
607  viewerGL()->SetCurrentCamera(m_orthographic ? TGLViewer::kCameraOrthoXOY : TGLViewer::kCameraPerspXOZ);
608  viewerGL()->ResetCurrentCamera();
609  viewerGL()->RequestDraw();
610 }
611 
614 
615  viewerGL()->SetCurrentCamera(m_orthographic ? TGLViewer::kCameraOrthoXOZ : TGLViewer::kCameraPerspYOZ);
616  viewerGL()->ResetCurrentCamera();
617  viewerGL()->RequestDraw();
618 }
619 
622 
623  viewerGL()->SetCurrentCamera(m_orthographic ? TGLViewer::kCameraOrthoZOY : TGLViewer::kCameraPerspXOY);
624  viewerGL()->ResetCurrentCamera();
625  viewerGL()->RequestDraw();
626 }
627 
629 /*
630 REGISTER_FWDETAILVIEW(FWConvTrackHitsDetailView, Conversion, ecalRecHit);
631 REGISTER_FWDETAILVIEW(FWConvTrackHitsDetailView, Conversion, reducedEcalRecHitsEB);
632 REGISTER_FWDETAILVIEW(FWConvTrackHitsDetailView, Conversion, reducedEGamma);
633 */
FWConvTrackHitsDetailView
Definition: FWConvTrackHitsDetailView.h:23
reco::HitPattern::getHitPattern
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:530
ext
Definition: memstream.h:15
DDAxes::y
reco::Conversion
Definition: Conversion.h:23
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWConvTrackHitsDetailView::FWConvTrackHitsDetailView
FWConvTrackHitsDetailView()
Definition: FWConvTrackHitsDetailView.cc:47
FWConvTrackHitsDetailView::rnrLabels
void rnrLabels()
Definition: FWConvTrackHitsDetailView.cc:589
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
FWDetailViewGL< reco::Conversion >::m_eveScene
TEveScene * m_eveScene
Definition: FWDetailViewGL.h:29
TrackingRecHit::missing_inner
Definition: TrackingRecHit.h:50
funct::false
false
Definition: Factorize.h:29
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
FWConvTrackHitsDetailView::addModules
void addModules(const reco::Track &track, const FWEventItem *iItem, TEveElement *trkList, bool addLostHits)
Definition: FWConvTrackHitsDetailView.cc:479
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
FWConvTrackHitsDetailView::pickCameraCenter
void pickCameraCenter()
Definition: FWConvTrackHitsDetailView.cc:576
HLT_FULL_cff.points
points
Definition: HLT_FULL_cff.py:21521
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
FWConvTrackHitsDetailView::m_modules
TEveElementList * m_modules
Definition: FWConvTrackHitsDetailView.h:52
conv
static HepMC::IO_HEPEVT conv
Definition: BeamHaloProducer.cc:48
edm::Ref::isAvailable
bool isAvailable() const
Definition: Ref.h:537
FWECALCaloDataDetailViewBuilder
Definition: FWECALCaloDataDetailViewBuilder.h:20
FWModelId
Definition: FWModelId.h:28
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
reco::HitPattern::validHitFilter
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:765
fireworks::pushPixelHits
void pushPixelHits(std::vector< TVector3 > &pixelPoints, const FWEventItem &iItem, const reco::Track &t)
Definition: TrackUtils.cc:533
FWDetailViewGL< reco::Conversion >::viewerGL
TGLViewer * viewerGL() const
Definition: FWDetailViewGL.h:20
FWConvTrackHitsDetailView::camera1Callback
void camera1Callback()
Definition: FWConvTrackHitsDetailView.cc:604
FWModelId.h
Sign
T Sign(T A, T B)
Definition: MathUtil.h:54
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
SiStripDetId.h
fireworks::Context::getBeamSpot
FWBeamSpot * getBeamSpot() const
Definition: Context.h:67
REGISTER_FWDETAILVIEW
#define REGISTER_FWDETAILVIEW(_classname_, _name_,...)
Definition: FWDetailViewFactory.h:32
DDAxes::x
CSGAction
Definition: CSGAction.h:38
fireworks::info
std::string info(const DetId &)
Definition: TrackUtils.cc:599
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FWDisplayProperties::color
Color_t color() const
Definition: FWDisplayProperties.h:47
FWConvTrackHitsDetailView::rnrHits
void rnrHits()
Definition: FWConvTrackHitsDetailView.cc:599
reco::Track::extra
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
FWConvTrackHitsDetailView::rnrModules
void rnrModules()
Definition: FWConvTrackHitsDetailView.cc:594
gs
Definition: AbsArchive.cc:45
TrackUtils.h
FWEventItem::defaultDisplayProperties
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
FWConvTrackHitsDetailView::setTextInfo
void setTextInfo(const FWModelId &id, const reco::Conversion *) override
Definition: FWConvTrackHitsDetailView.cc:319
DetId
Definition: DetId.h:17
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
fireworks::addSiStripClusters
void addSiStripClusters(const FWEventItem *iItem, const reco::Track &t, class TEveElement *tList, bool addNearbyClusters, bool master)
Definition: TrackUtils.cc:336
cms::cuda::bs
bs
Definition: HistoContainer.h:127
HLTEgPhaseIITestSequence_cff.modelName
modelName
Definition: HLTEgPhaseIITestSequence_cff.py:16
reco::HitPattern
Definition: HitPattern.h:147
FWConvTrackHitsDetailView::camera3Callback
void camera3Callback()
Definition: FWConvTrackHitsDetailView.cc:620
Track.h
FWConvTrackHitsDetailView::~FWConvTrackHitsDetailView
~FWConvTrackHitsDetailView() override
Definition: FWConvTrackHitsDetailView.cc:50
Abs
T Abs(T a)
Definition: MathUtil.h:49
FWColorManager.h
FWConvTrackHitsDetailView::build
void build(const FWModelId &id, const reco::Conversion *) override
Definition: FWConvTrackHitsDetailView.cc:83
FWDetailViewGL< reco::Conversion >::m_infoCanvas
TCanvas * m_infoCanvas
Definition: FWDetailViewGL.h:25
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
mps_fire.end
end
Definition: mps_fire.py:242
DDAxes::z
reco::Track
Definition: Track.h:27
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
CSGAction::activated
sigc::signal< void > activated
Definition: CSGAction.h:100
CSGAction::setName
void setName(const std::string &name)
Definition: CSGAction.cc:85
FWECALCaloDataDetailViewBuilder.h
b
double b
Definition: hdecay.h:118
DTChamberId.h
SiStripDetId::TEC
static constexpr auto TEC
Definition: SiStripDetId.h:40
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
CaloRecHitAuxSetter::getField
constexpr unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
Definition: CaloRecHitAuxSetter.h:13
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
TrackingRecHit::inactive_inner
Definition: TrackingRecHit.h:52
TrackingRecHit::bad
Definition: TrackingRecHit.h:49
FWBeamSpot
Definition: FWBeamSpot.h:11
reco::HitPattern::pixelHitFilter
static bool pixelHitFilter(uint16_t pattern)
Definition: HitPattern.h:573
FWGeometry.h
FWConvTrackHitsDetailView::m_hits
TEveElementList * m_hits
Definition: FWConvTrackHitsDetailView.h:54
DetId::Tracker
Definition: DetId.h:25
FWConvTrackHitsDetailView::m_camTypeAction
CSGAction * m_camTypeAction
Definition: FWConvTrackHitsDetailView.h:59
FWDetailViewBase::item
const FWEventItem * item()
Definition: FWDetailViewBase.h:48
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
FWConvTrackHitsDetailView::camera2Callback
void camera2Callback()
Definition: FWConvTrackHitsDetailView.cc:612
fireworks::prepareTrack
TEveTrack * prepareTrack(const reco::Track &track, TEveTrackPropagator *propagator, const std::vector< TEveVector > &extraRefPoints=std::vector< TEveVector >())
Definition: TrackUtils.cc:62
TrackingRecHit::missing
Definition: TrackingRecHit.h:47
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
TrackingRecHit::inactive_outer
Definition: TrackingRecHit.h:53
CSGAction.h
FWConvTrackHitsDetailView.h
writedatasetfile.action
action
Definition: writedatasetfile.py:8
TrackingRecHit::missing_outer
Definition: TrackingRecHit.h:51
SiStripDetId::TOB
static constexpr auto TOB
Definition: SiStripDetId.h:39
fwLog.h
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
FWConvTrackHitsDetailView::addHits
void addHits(const reco::Track &track, const FWEventItem *iItem, TEveElement *trkList, bool addNearbyHits)
Definition: FWConvTrackHitsDetailView.cc:450
MuonSubdetId.h
FWEventItem.h
TrackingRecHit::valid
Definition: TrackingRecHit.h:46
reco::HitPattern::TRACK_HITS
Definition: HitPattern.h:155
alignCSCRings.r
r
Definition: alignCSCRings.py:93
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
FWMagField.h
fireworks::pushNearbyPixelHits
void pushNearbyPixelHits(std::vector< TVector3 > &pixelPoints, const FWEventItem &iItem, const reco::Track &t)
Definition: TrackUtils.cc:480
DDAxes::phi
SiStripDetId::TID
static constexpr auto TID
Definition: SiStripDetId.h:38
reco::TrackBase::hitPattern
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:504
fwlog::kInfo
Definition: fwLog.h:35
FWEventItem
Definition: FWEventItem.h:56
FWConvTrackHitsDetailView::m_orthographic
bool m_orthographic
Definition: FWConvTrackHitsDetailView.h:58
reco::HitPattern::numberOfAllHits
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:773
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
FWConvTrackHitsDetailView::m_moduleLabels
TEveElementList * m_moduleLabels
Definition: FWConvTrackHitsDetailView.h:53
FWDetailViewGL< reco::Conversion >::m_guiFrame
TGCompositeFrame * m_guiFrame
Definition: FWDetailViewGL.h:26
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
testProducerWithPsetDescEmpty_cfi.b3
b3
Definition: testProducerWithPsetDescEmpty_cfi.py:36
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
SiStripDetId::TIB
static constexpr auto TIB
Definition: SiStripDetId.h:37
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
FWBeamSpot.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
FWDetailViewBase::context
const fireworks::Context & context() const
Definition: FWDetailViewBase.cc:32
CSGAction::createTextButton
void createTextButton(TGCompositeFrame *p, TGLayoutHints *l=nullptr, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), FontStruct_t font=TGTextButton::GetDefaultFontStruct(), UInt_t option=kRaisedFrame|kDoubleBorder)
Definition: CSGAction.cc:113
TrackingRecHit::inactive
Definition: TrackingRecHit.h:48
DetId::Muon
Definition: DetId.h:26
DTChamberId
Definition: DTChamberId.h:14
runonSM.text
text
Definition: runonSM.py:43
FWConvTrackHitsDetailView::switchProjection
void switchProjection()
Definition: FWConvTrackHitsDetailView.cc:581
reco::HitPattern::stripHitFilter
static bool stripHitFilter(uint16_t pattern)
Definition: HitPattern.h:597
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
FWGeometry::getEveShape
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:324
FWECALCaloDataDetailViewBuilder::buildCaloData
TEveCaloData * buildCaloData(bool xyEE)
Definition: FWECALCaloDataDetailViewBuilder.cc:28
FWConvTrackHitsDetailView::addTrackerHits3D
void addTrackerHits3D(std::vector< TVector3 > &points, class TEveElementList *tList, Color_t color, int size)
Definition: FWConvTrackHitsDetailView.cc:430
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
up
Definition: BitonicSort.h:7
hit
Definition: SiStripHitEffFromCalibTree.cc:88
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
Conversion.h