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