CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FW3DViewGeometry Class Reference

#include <Fireworks/Core/interface/FW3DViewGeometry.h>

Inheritance diagram for FW3DViewGeometry:
FWViewGeometryList

Public Member Functions

 FW3DViewGeometry (const fireworks::Context &context)
 
 FW3DViewGeometry (const FW3DViewGeometry &)=delete
 
TEveElementList const *const getHGCalEE ()
 
TEveElementList const *const getHGCalHSc ()
 
TEveElementList const *const getHGCalHSi ()
 
const FW3DViewGeometryoperator= (const FW3DViewGeometry &)=delete
 
void showHGCalEE (bool)
 
void showHGCalHSc (bool)
 
void showHGCalHSi (bool)
 
void showMtdBarrel (bool)
 
void showMtdEndcap (bool)
 
void showMuonBarrel (bool)
 
void showMuonBarrelFull (bool)
 
void showMuonEndcap (bool)
 
void showPixelBarrel (bool)
 
void showPixelEndcap (bool)
 
void showTrackerBarrel (bool)
 
void showTrackerEndcap (bool)
 
 ~FW3DViewGeometry () override
 
- Public Member Functions inherited from FWViewGeometryList
 FWViewGeometryList (const fireworks::Context &context, bool projected=true)
 
 FWViewGeometryList (const FWViewGeometryList &)=delete
 
const FWViewGeometryListoperator= (const FWViewGeometryList &)=delete
 
void updateColors ()
 
void updateTransparency (bool projectedType)
 
 ~FWViewGeometryList () override
 

Private Attributes

TEveElementList * m_HGCalEEElements
 
TEveElementList * m_HGCalHScElements
 
TEveElementList * m_HGCalHSiElements
 
TEveElementList * m_mtdBarrelElements
 
TEveElementList * m_mtdEndcapElements
 
TEveElementList * m_muonBarrelElements
 
TEveElementList * m_muonBarrelFullElements
 
TEveElementList * m_muonEndcapElements
 
TEveElementList * m_muonEndcapFullElements
 
TEveElementList * m_pixelBarrelElements
 
TEveElementList * m_pixelEndcapElements
 
TEveElementList * m_trackerBarrelElements
 
TEveElementList * m_trackerEndcapElements
 

Additional Inherited Members

- Protected Member Functions inherited from FWViewGeometryList
void addToCompound (TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
 
- Protected Attributes inherited from FWViewGeometryList
TEveCompound * m_colorComp [kFWGeomColorSize]
 
const fireworks::Contextm_context
 
const FWGeometrym_geom
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 29 of file FW3DViewGeometry.h.

Constructor & Destructor Documentation

◆ FW3DViewGeometry() [1/2]

FW3DViewGeometry::FW3DViewGeometry ( const fireworks::Context context)

Definition at line 48 of file FW3DViewGeometry.cc.

49  : FWViewGeometryList(context, false),
50  m_muonBarrelElements(nullptr),
51  m_muonBarrelFullElements(nullptr),
52  m_muonEndcapElements(nullptr),
53  m_muonEndcapFullElements(nullptr),
54  m_pixelBarrelElements(nullptr),
55  m_pixelEndcapElements(nullptr),
56  m_trackerBarrelElements(nullptr),
57  m_trackerEndcapElements(nullptr),
58  m_HGCalEEElements(nullptr),
59  m_HGCalHSiElements(nullptr),
60  m_HGCalHScElements(nullptr),
61  m_mtdBarrelElements(nullptr),
62  m_mtdEndcapElements(nullptr) {
63  SetElementName("3D Geometry");
64 }
TEveElementList * m_pixelBarrelElements
TEveElementList * m_mtdEndcapElements
TEveElementList * m_HGCalEEElements
FWViewGeometryList(const fireworks::Context &context, bool projected=true)
TEveElementList * m_HGCalHSiElements
TEveElementList * m_HGCalHScElements
TEveElementList * m_pixelEndcapElements
TEveElementList * m_muonEndcapFullElements
TEveElementList * m_muonEndcapElements
TEveElementList * m_muonBarrelElements
TEveElementList * m_mtdBarrelElements
TEveElementList * m_trackerEndcapElements
TEveElementList * m_trackerBarrelElements
TEveElementList * m_muonBarrelFullElements

◆ ~FW3DViewGeometry()

FW3DViewGeometry::~FW3DViewGeometry ( )
override

Definition at line 71 of file FW3DViewGeometry.cc.

71 {}

◆ FW3DViewGeometry() [2/2]

FW3DViewGeometry::FW3DViewGeometry ( const FW3DViewGeometry )
delete

Member Function Documentation

◆ getHGCalEE()

TEveElementList const* const FW3DViewGeometry::getHGCalEE ( )
inline

Definition at line 48 of file FW3DViewGeometry.h.

References m_HGCalEEElements.

Referenced by FW3DViewBase::updateHGCalVisibility().

48 { return m_HGCalEEElements; }
TEveElementList * m_HGCalEEElements

◆ getHGCalHSc()

TEveElementList const* const FW3DViewGeometry::getHGCalHSc ( )
inline

Definition at line 52 of file FW3DViewGeometry.h.

References m_HGCalHScElements.

Referenced by FW3DViewBase::updateHGCalVisibility().

52 { return m_HGCalHScElements; }
TEveElementList * m_HGCalHScElements

◆ getHGCalHSi()

TEveElementList const* const FW3DViewGeometry::getHGCalHSi ( )
inline

Definition at line 50 of file FW3DViewGeometry.h.

References m_HGCalHSiElements.

Referenced by FW3DViewBase::updateHGCalVisibility().

50 { return m_HGCalHSiElements; }
TEveElementList * m_HGCalHSiElements

◆ operator=()

const FW3DViewGeometry& FW3DViewGeometry::operator= ( const FW3DViewGeometry )
delete

◆ showHGCalEE()

void FW3DViewGeometry::showHGCalEE ( bool  showHGCalEE)

Definition at line 383 of file FW3DViewGeometry.cc.

References FWGeometry::getHGCSiliconEveShape(), FWGeometry::getMatchedIds(), FWGeometry::getParameters(), FWGeometry::HGCalEE, kFwHGCalEEColorIndex, nano_mu_digi_cff::layer, FWViewGeometryList::m_colorComp, FWViewGeometryList::m_geom, m_HGCalEEElements, and l1trig_cff::shape.

Referenced by FW3DViewBase::setContext().

383  {
384  if (showHGCalEE && !m_HGCalEEElements) {
385  m_HGCalEEElements = new TEveElementList("HGCalEE");
386  auto const ids = m_geom->getMatchedIds(FWGeometry::HGCalEE);
387  for (const auto& id : ids) {
388  TEveGeoShape* shape = m_geom->getHGCSiliconEveShape(id);
389  const unsigned int layer = m_geom->getParameters(id)[1];
390  const int siIndex = m_geom->getParameters(id)[4];
391  shape->SetTitle(Form("HGCalEE %d", layer));
392  {
393  float color[3] = {0., 0., 0.};
394  if (siIndex >= 0 && siIndex < 3)
395  color[siIndex] = 1.f;
396  shape->SetMainColorRGB(color[0], color[1], color[2]);
397  shape->SetPickable(false);
398  m_colorComp[kFwHGCalEEColorIndex]->AddElement(shape);
399  }
400  m_HGCalEEElements->AddElement(shape);
401  }
402  AddElement(m_HGCalEEElements);
403  }
404  if (m_HGCalEEElements) {
405  m_HGCalEEElements->SetRnrState(showHGCalEE);
406  gEve->Redraw3D();
407  }
408 }
TEveCompound * m_colorComp[kFWGeomColorSize]
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
TEveElementList * m_HGCalEEElements
TEveGeoShape * getHGCSiliconEveShape(unsigned int id) const
Definition: FWGeometry.cc:350
const FWGeometry * m_geom
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:450

◆ showHGCalHSc()

void FW3DViewGeometry::showHGCalHSc ( bool  showHGCalHSc)

Definition at line 437 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getHGCScintillatorEveShape(), FWGeometry::getMatchedIds(), FWGeometry::getParameters(), FWGeometry::HGCalHSc, kFwHGCalHScColorIndex, nano_mu_digi_cff::layer, FWViewGeometryList::m_geom, m_HGCalHScElements, and l1trig_cff::shape.

Referenced by FW3DViewBase::setContext().

437  {
439  m_HGCalHScElements = new TEveElementList("HGCalHSc");
440  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::HGCalHSc);
441  for (const auto& id : m_geom->getMatchedIds(FWGeometry::HGCalHSc)) {
442  TEveGeoShape* shape = m_geom->getHGCScintillatorEveShape(id);
443  const unsigned int layer = m_geom->getParameters(id)[1];
444  shape->SetTitle(Form("HGCalHSc %d", layer));
446  m_HGCalHScElements->AddElement(shape);
447  }
448  AddElement(m_HGCalHScElements);
449  }
450  if (m_HGCalHScElements) {
451  m_HGCalHScElements->SetRnrState(showHGCalHSc);
452  gEve->Redraw3D();
453  }
454 }
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
TEveElementList * m_HGCalHScElements
TEveGeoShape * getHGCScintillatorEveShape(unsigned int id) const
Definition: FWGeometry.cc:395
const FWGeometry * m_geom
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:450

◆ showHGCalHSi()

void FW3DViewGeometry::showHGCalHSi ( bool  showHGCalHSi)

Definition at line 410 of file FW3DViewGeometry.cc.

References FWGeometry::getHGCSiliconEveShape(), FWGeometry::getMatchedIds(), FWGeometry::getParameters(), FWGeometry::HGCalHSi, kFwHGCalHSiColorIndex, nano_mu_digi_cff::layer, FWViewGeometryList::m_colorComp, FWViewGeometryList::m_geom, m_HGCalHSiElements, and l1trig_cff::shape.

Referenced by FW3DViewBase::setContext().

410  {
412  m_HGCalHSiElements = new TEveElementList("HGCalHSi");
413  auto const ids = m_geom->getMatchedIds(FWGeometry::HGCalHSi);
414  for (const auto& id : ids) {
415  TEveGeoShape* shape = m_geom->getHGCSiliconEveShape(id);
416  const unsigned int layer = m_geom->getParameters(id)[1];
417  const int siIndex = m_geom->getParameters(id)[4];
418  shape->SetTitle(Form("HGCalHSi %d", layer));
419  {
420  float color[3] = {0., 0., 0.};
421  if (siIndex >= 0 && siIndex < 3)
422  color[siIndex] = 1.f;
423  shape->SetMainColorRGB(color[0], color[1], color[2]);
424  shape->SetPickable(false);
426  }
427  m_HGCalHSiElements->AddElement(shape);
428  }
429  AddElement(m_HGCalHSiElements);
430  }
431  if (m_HGCalHSiElements) {
432  m_HGCalHSiElements->SetRnrState(showHGCalHSi);
433  gEve->Redraw3D();
434  }
435 }
TEveCompound * m_colorComp[kFWGeomColorSize]
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
TEveElementList * m_HGCalHSiElements
TEveGeoShape * getHGCSiliconEveShape(unsigned int id) const
Definition: FWGeometry.cc:350
const FWGeometry * m_geom
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:450

◆ showMtdBarrel()

void FW3DViewGeometry::showMtdBarrel ( bool  showMtdBarrel)

Definition at line 457 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::Forward, FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), l1ctLayer2EG_cff::id, kFWMtdBarrelColorIndex, FWViewGeometryList::m_geom, m_mtdBarrelElements, FWGeometry::PixelBarrel, nano_mu_digi_cff::rawId, and l1trig_cff::shape.

Referenced by FW3DViewBase::setContext().

457  {
459  m_mtdBarrelElements = new TEveElementList("MtdBarrel");
460 
461  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Forward, FWGeometry::PixelBarrel);
462  for (std::vector<unsigned int>::const_iterator mtdId = ids.begin(); mtdId != ids.end(); ++mtdId) {
463  MTDDetId id(*mtdId);
464  if (id.mtdSubDetector() != MTDDetId::MTDType::BTL)
465  continue;
466 
467  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
468  shape->SetTitle(Form("MTD barrel %d", id.rawId()));
469 
471  m_mtdBarrelElements->AddElement(shape);
472  }
473  AddElement(m_mtdBarrelElements);
474  }
475 
476  if (m_mtdBarrelElements) {
477  m_mtdBarrelElements->SetRnrState(showMtdBarrel);
478  gEve->Redraw3D();
479  }
480 }
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
void showMtdBarrel(bool)
Detector identifier base class for the MIP Timing Layer.
Definition: MTDDetId.h:21
TEveElementList * m_mtdBarrelElements
const FWGeometry * m_geom
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showMtdEndcap()

void FW3DViewGeometry::showMtdEndcap ( bool  showMtdEndcap)

Definition at line 483 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::Forward, FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), l1ctLayer2EG_cff::id, kFWMtdEndcapColorIndex, FWViewGeometryList::m_geom, m_mtdEndcapElements, FWGeometry::PixelBarrel, nano_mu_digi_cff::rawId, and l1trig_cff::shape.

Referenced by FW3DViewBase::setContext().

483  {
485  m_mtdEndcapElements = new TEveElementList("MtdEndcap");
486 
487  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Forward, FWGeometry::PixelBarrel);
488  for (std::vector<unsigned int>::const_iterator mtdId = ids.begin(); mtdId != ids.end(); ++mtdId) {
489  MTDDetId id(*mtdId);
490  if (id.mtdSubDetector() != MTDDetId::MTDType::ETL)
491  continue;
492 
493  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
494  shape->SetTitle(Form("MTD endcap %d", id.rawId()));
495 
497  m_mtdEndcapElements->AddElement(shape);
498  }
499  AddElement(m_mtdEndcapElements);
500  }
501 
502  if (m_mtdEndcapElements) {
503  m_mtdEndcapElements->SetRnrState(showMtdEndcap);
504  gEve->Redraw3D();
505  }
506 }
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
TEveElementList * m_mtdEndcapElements
void showMtdEndcap(bool)
Detector identifier base class for the MIP Timing Layer.
Definition: MTDDetId.h:21
const FWGeometry * m_geom
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showMuonBarrel()

void FW3DViewGeometry::showMuonBarrel ( bool  showMuonBarrel)

Definition at line 85 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), l1ctLayer2EG_cff::id, kFWMuonBarrelLineColorIndex, FWViewGeometryList::m_geom, m_muonBarrelElements, nano_mu_digi_cff::rawId, alignCSCRings::s, and l1trig_cff::shape.

Referenced by FW3DViewBase::showMuonBarrel(), and showMuonBarrelFull().

85  {
87  m_muonBarrelElements = new TEveElementList("DT");
88  for (Int_t iWheel = -2; iWheel <= 2; ++iWheel) {
89  for (Int_t iStation = 1; iStation <= 4; ++iStation) {
90  // We display only the outer chambers to make the event look more
91  // prominent
92  if (iWheel == -2 || iWheel == 2 || iStation == 4) {
93  std::ostringstream s;
94  s << "Station" << iStation;
95  TEveElementList* cStation = new TEveElementList(s.str().c_str());
96  m_muonBarrelElements->AddElement(cStation);
97  for (Int_t iSector = 1; iSector <= 14; ++iSector) {
98  if (iStation < 4 && iSector > 12)
99  continue;
100  DTChamberId id(iWheel, iStation, iSector);
101  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
103  cStation->AddElement(shape);
104  }
105  }
106  }
107  }
108  AddElement(m_muonBarrelElements);
109  }
110 
111  if (m_muonBarrelElements) {
112  m_muonBarrelElements->SetRnrState(showMuonBarrel);
113  gEve->Redraw3D();
114  }
115 }
void showMuonBarrel(bool)
TEveElementList * m_muonBarrelElements
const FWGeometry * m_geom
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showMuonBarrelFull()

void FW3DViewGeometry::showMuonBarrelFull ( bool  showMuonBarrel)

Definition at line 117 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), l1ctLayer2EG_cff::id, kFWMuonBarrelLineColorIndex, FWViewGeometryList::m_geom, m_muonBarrelFullElements, nano_mu_digi_cff::rawId, l1trig_cff::shape, and showMuonBarrel().

Referenced by FW3DViewBase::showMuonBarrel().

117  {
119  m_muonBarrelFullElements = new TEveElementList("DT Full");
120  for (Int_t iWheel = -2; iWheel <= 2; ++iWheel) {
121  TEveElementList* cWheel = new TEveElementList(TString::Format("Wheel %d", iWheel));
122  m_muonBarrelFullElements->AddElement(cWheel);
123  for (Int_t iStation = 1; iStation <= 4; ++iStation) {
124  TEveElementList* cStation = new TEveElementList(TString::Format("Station %d", iStation));
125  cWheel->AddElement(cStation);
126  for (Int_t iSector = 1; iSector <= 14; ++iSector) {
127  if (iStation < 4 && iSector > 12)
128  continue;
129  DTChamberId id(iWheel, iStation, iSector);
130  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
131  shape->SetTitle(TString::Format("DT: W=%d, S=%d, Sec=%d\ndet-id=%u", iWheel, iStation, iSector, id.rawId()));
133  cStation->AddElement(shape);
134  }
135  }
136  }
137  AddElement(m_muonBarrelFullElements);
138  }
139 
142  gEve->Redraw3D();
143  }
144 }
void showMuonBarrel(bool)
const FWGeometry * m_geom
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
TEveElementList * m_muonBarrelFullElements
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showMuonEndcap()

void FW3DViewGeometry::showMuonEndcap ( bool  showMuonEndcap)

Definition at line 147 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), haddnano::cl, MillePedeFileConverter_cfg::e, fwLog, FWGeometry::getEveShape(), FWGeometry::VersionInfo::haveExtraDet(), l1ctLayer2EG_cff::id, fwlog::kError, kFWMuonEndcapLineColorIndex, FWViewGeometryList::m_geom, m_muonEndcapElements, GEMDetId::maxChamberId, GEMDetId::maxLayerId, GEMDetId::maxRegionId, ME0DetId::maxRegionId, GEMDetId::minLayerId, GEMDetId::minRegionId, ME0DetId::minRegionId, nano_mu_digi_cff::rawId, alignCSCRings::s, l1trig_cff::shape, and FWGeometry::versionInfo().

Referenced by FW3DViewBase::setContext().

147  {
149  m_muonEndcapElements = new TEveElementList("EndCap");
150 
151  for (Int_t iEndcap = 1; iEndcap <= 2; ++iEndcap) // 1=forward (+Z), 2=backward(-Z)
152  {
153  TEveElementList* cEndcap = nullptr;
154  if (iEndcap == 1)
155  cEndcap = new TEveElementList("CSC Forward");
156  else
157  cEndcap = new TEveElementList("CSC Backward");
158  m_muonEndcapElements->AddElement(cEndcap);
159  // Actual CSC geometry:
160  // Station 1 has 4 rings with 36 chambers in each
161  // Station 2: ring 1 has 18 chambers, ring 2 has 36 chambers
162  // Station 3: ring 1 has 18 chambers, ring 2 has 36 chambers
163  // Station 4: ring 1 has 18 chambers
164  Int_t maxChambers = 36;
165  for (Int_t iStation = 1; iStation <= 4; ++iStation) {
166  std::ostringstream s;
167  s << "Station" << iStation;
168  TEveElementList* cStation = new TEveElementList(s.str().c_str());
169  cEndcap->AddElement(cStation);
170  for (Int_t iRing = 1; iRing <= 4; ++iRing) {
171  if (iStation > 1 && iRing > 2)
172  continue;
173  // if( iStation > 3 && iRing > 1 ) continue;
174  std::ostringstream s;
175  s << "Ring" << iRing;
176  TEveElementList* cRing = new TEveElementList(s.str().c_str());
177  cStation->AddElement(cRing);
178  (iRing == 1 && iStation > 1) ? (maxChambers = 18) : (maxChambers = 36);
179  for (Int_t iChamber = 1; iChamber <= maxChambers; ++iChamber) {
180  Int_t iLayer = 0; // chamber
181  CSCDetId id(iEndcap, iStation, iRing, iChamber, iLayer);
182  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
183  shape->SetTitle(TString::Format(
184  "CSC: %s, S=%d, R=%d, C=%d\ndet-id=%u", cEndcap->GetName(), iStation, iRing, iChamber, id.rawId()));
185 
187  cRing->AddElement(shape);
188  }
189  }
190  }
191  }
192 
193  // hardcoded gem and me0; need to find better way for different gem geometries
194  for (Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion += 2) {
195  TEveElementList* teEndcap = nullptr;
196  teEndcap = new TEveElementList(Form("GEM Reg=%d", iRegion));
197  m_muonEndcapElements->AddElement(teEndcap);
198  int iStation = 1;
199  {
200  std::ostringstream s;
201  s << "Station" << iStation;
202  TEveElementList* cStation = new TEveElementList(s.str().c_str());
203  teEndcap->AddElement(cStation);
204 
205  for (Int_t iLayer = GEMDetId::minLayerId; iLayer <= GEMDetId::maxLayerId; ++iLayer) {
206  int maxChamber = GEMDetId::maxChamberId;
207  std::ostringstream sl;
208  sl << "Layer" << iLayer;
209  TEveElementList* elayer = new TEveElementList(sl.str().c_str());
210  cStation->AddElement(elayer);
211 
212  for (Int_t iChamber = 1; iChamber <= maxChamber; ++iChamber) {
213  std::ostringstream cl;
214  cl << "Chamber" << iChamber;
215  TEveElementList* cha = new TEveElementList(cl.str().c_str());
216  elayer->AddElement(cha);
217 
218  Int_t iRing = 1;
219  Int_t iRoll = 0;
220  try {
221  GEMDetId id(iRegion, iRing, iStation, iLayer, iChamber, iRoll);
222  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
223  if (shape) {
224  shape->SetTitle(TString::Format(
225  "GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", iRing, iStation, iChamber, iRoll, id.rawId()));
226 
227  cha->AddElement(shape);
229  }
230  } catch (cms::Exception& e) {
231  fwLog(fwlog::kError) << "FW3DViewGeomtery " << e << std::endl;
232  }
233  }
234  }
235  }
236  }
237 
238  // adding me0
239  if (m_geom->versionInfo().haveExtraDet("ME0")) {
240  for (Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion = iRegion + 2) {
241  TEveElementList* teEndcap = nullptr;
242  if (iRegion == 1)
243  teEndcap = new TEveElementList("ME0 Forward");
244  else
245  teEndcap = new TEveElementList("ME0 Backward");
246  m_muonEndcapElements->AddElement(teEndcap);
247 
248  for (Int_t iLayer = 1; iLayer <= 6; ++iLayer) {
249  std::ostringstream s;
250  s << "Layer" << iLayer;
251  TEveElementList* cLayer = new TEveElementList(s.str().c_str());
252  teEndcap->AddElement(cLayer);
253 
254  for (Int_t iChamber = 1; iChamber <= 18; ++iChamber) {
255  Int_t iRoll = 1;
256  // for (Int_t iRoll = ME0DetId::minRollId; iRoll <= ME0DetId::maxRollId ; ++iRoll ){
257  ME0DetId id(iRegion, iLayer, iChamber, iRoll);
258  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
259  if (shape) {
260  shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", iChamber, iRoll, id.rawId()));
261 
263  cLayer->AddElement(shape);
264  }
265  }
266  }
267  }
268  }
269 
270  AddElement(m_muonEndcapElements);
271  }
272 
273  if (m_muonEndcapElements) {
274  m_muonEndcapElements->SetRnrState(showMuonEndcap);
275  gEve->Redraw3D();
276  }
277 }
static constexpr int minRegionId
Definition: ME0DetId.h:63
static constexpr int32_t maxRegionId
Definition: GEMDetId.h:21
bool haveExtraDet(const char *) const
Definition: FWGeometry.cc:507
const VersionInfo & versionInfo() const
Definition: FWGeometry.h:151
void showMuonEndcap(bool)
TEveElementList * m_muonEndcapElements
const FWGeometry * m_geom
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
#define fwLog(_level_)
Definition: fwLog.h:45
static constexpr int32_t maxLayerId
Definition: GEMDetId.h:32
static constexpr int32_t maxChamberId
Definition: GEMDetId.h:29
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
static constexpr int maxRegionId
Definition: ME0DetId.h:64
static constexpr int32_t minLayerId
Definition: GEMDetId.h:30
static constexpr int32_t minRegionId
Definition: GEMDetId.h:20

◆ showPixelBarrel()

void FW3DViewGeometry::showPixelBarrel ( bool  showPixelBarrel)

Definition at line 280 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), FWGeometry::getTrackerTopology(), l1ctLayer2EG_cff::id, kFWPixelBarrelColorIndex, FWViewGeometryList::m_geom, m_pixelBarrelElements, FWGeometry::PixelBarrel, TrackerTopology::print(), nano_mu_digi_cff::rawId, l1trig_cff::shape, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, and FWGeometry::Tracker.

Referenced by FW3DViewBase::setContext().

280  {
282  m_pixelBarrelElements = new TEveElementList("PixelBarrel");
284  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelBarrel);
285  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
286  TEveGeoShape* shape = m_geom->getEveShape(*id);
287 
288  uint32_t rawId = *id;
289  DetId did = DetId(rawId);
291  shape->SetTitle(title.c_str());
292 
294  m_pixelBarrelElements->AddElement(shape);
295  }
296  AddElement(m_pixelBarrelElements);
297  }
298 
299  if (m_pixelBarrelElements) {
301  gEve->Redraw3D();
302  }
303 }
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
TEveElementList * m_pixelBarrelElements
std::string print(DetId detid) const
const TrackerTopology * getTrackerTopology() const
Definition: FWGeometry.h:157
const FWGeometry * m_geom
Definition: DetId.h:17
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
void showPixelBarrel(bool)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showPixelEndcap()

void FW3DViewGeometry::showPixelEndcap ( bool  showPixelEndcap)

Definition at line 306 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), FWGeometry::getTrackerTopology(), l1ctLayer2EG_cff::id, kFWPixelEndcapColorIndex, FWViewGeometryList::m_geom, m_pixelEndcapElements, FWGeometry::PixelEndcap, TrackerTopology::print(), nano_mu_digi_cff::rawId, l1trig_cff::shape, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, and FWGeometry::Tracker.

Referenced by FW3DViewBase::setContext().

306  {
308  m_pixelEndcapElements = new TEveElementList("PixelEndcap");
309  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelEndcap);
310  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
311  TEveGeoShape* shape = m_geom->getEveShape(*id);
312  uint32_t rawId = *id;
313  DetId did = DetId(rawId);
315  shape->SetTitle(title.c_str());
317  m_pixelEndcapElements->AddElement(shape);
318  }
319  AddElement(m_pixelEndcapElements);
320  }
321 
322  if (m_pixelEndcapElements) {
324  gEve->Redraw3D();
325  }
326 }
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
std::string print(DetId detid) const
TEveElementList * m_pixelEndcapElements
const TrackerTopology * getTrackerTopology() const
Definition: FWGeometry.h:157
const FWGeometry * m_geom
Definition: DetId.h:17
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
void showPixelEndcap(bool)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showTrackerBarrel()

void FW3DViewGeometry::showTrackerBarrel ( bool  showTrackerBarrel)

Definition at line 329 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), l1ctLayer2EG_cff::id, kFWTrackerBarrelColorIndex, FWViewGeometryList::m_geom, m_trackerBarrelElements, l1trig_cff::shape, FWGeometry::TIB, FWGeometry::TOB, and FWGeometry::Tracker.

Referenced by FW3DViewBase::setContext().

329  {
331  m_trackerBarrelElements = new TEveElementList("TrackerBarrel");
333  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TIB);
334  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
335  TEveGeoShape* shape = m_geom->getEveShape(*id);
337  m_trackerBarrelElements->AddElement(shape);
338  }
340  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
341  TEveGeoShape* shape = m_geom->getEveShape(*id);
342  shape->SetTitle(Form("TrackerBarrel %d", *id));
344  m_trackerBarrelElements->AddElement(shape);
345  }
346  AddElement(m_trackerBarrelElements);
347  }
348 
351  gEve->Redraw3D();
352  }
353 }
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
void showTrackerBarrel(bool)
const FWGeometry * m_geom
TEveElementList * m_trackerBarrelElements
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showTrackerEndcap()

void FW3DViewGeometry::showTrackerEndcap ( bool  showTrackerEndcap)

Definition at line 356 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), l1ctLayer2EG_cff::id, kFWTrackerEndcapColorIndex, FWViewGeometryList::m_geom, m_trackerEndcapElements, l1trig_cff::shape, FWGeometry::TEC, FWGeometry::TID, and FWGeometry::Tracker.

Referenced by FW3DViewBase::setContext().

356  {
358  m_trackerEndcapElements = new TEveElementList("TrackerEndcap");
359  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TID);
360  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
361  TEveGeoShape* shape = m_geom->getEveShape(*id);
363  m_trackerEndcapElements->AddElement(shape);
364  }
366  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
367  TEveGeoShape* shape = m_geom->getEveShape(*id);
368 
369  shape->SetTitle(Form("TrackerEndcap %d", *id));
371  m_trackerEndcapElements->AddElement(shape);
372  }
373  AddElement(m_trackerEndcapElements);
374  }
375 
378  gEve->Redraw3D();
379  }
380 }
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
void showTrackerEndcap(bool)
const FWGeometry * m_geom
TEveElementList * m_trackerEndcapElements
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:317
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

Member Data Documentation

◆ m_HGCalEEElements

TEveElementList* FW3DViewGeometry::m_HGCalEEElements
private

Definition at line 71 of file FW3DViewGeometry.h.

Referenced by getHGCalEE(), and showHGCalEE().

◆ m_HGCalHScElements

TEveElementList* FW3DViewGeometry::m_HGCalHScElements
private

Definition at line 73 of file FW3DViewGeometry.h.

Referenced by getHGCalHSc(), and showHGCalHSc().

◆ m_HGCalHSiElements

TEveElementList* FW3DViewGeometry::m_HGCalHSiElements
private

Definition at line 72 of file FW3DViewGeometry.h.

Referenced by getHGCalHSi(), and showHGCalHSi().

◆ m_mtdBarrelElements

TEveElementList* FW3DViewGeometry::m_mtdBarrelElements
private

Definition at line 74 of file FW3DViewGeometry.h.

Referenced by showMtdBarrel().

◆ m_mtdEndcapElements

TEveElementList* FW3DViewGeometry::m_mtdEndcapElements
private

Definition at line 75 of file FW3DViewGeometry.h.

Referenced by showMtdEndcap().

◆ m_muonBarrelElements

TEveElementList* FW3DViewGeometry::m_muonBarrelElements
private

Definition at line 63 of file FW3DViewGeometry.h.

Referenced by showMuonBarrel().

◆ m_muonBarrelFullElements

TEveElementList* FW3DViewGeometry::m_muonBarrelFullElements
private

Definition at line 64 of file FW3DViewGeometry.h.

Referenced by showMuonBarrelFull().

◆ m_muonEndcapElements

TEveElementList* FW3DViewGeometry::m_muonEndcapElements
private

Definition at line 65 of file FW3DViewGeometry.h.

Referenced by showMuonEndcap().

◆ m_muonEndcapFullElements

TEveElementList* FW3DViewGeometry::m_muonEndcapFullElements
private

Definition at line 66 of file FW3DViewGeometry.h.

◆ m_pixelBarrelElements

TEveElementList* FW3DViewGeometry::m_pixelBarrelElements
private

Definition at line 67 of file FW3DViewGeometry.h.

Referenced by showPixelBarrel().

◆ m_pixelEndcapElements

TEveElementList* FW3DViewGeometry::m_pixelEndcapElements
private

Definition at line 68 of file FW3DViewGeometry.h.

Referenced by showPixelEndcap().

◆ m_trackerBarrelElements

TEveElementList* FW3DViewGeometry::m_trackerBarrelElements
private

Definition at line 69 of file FW3DViewGeometry.h.

Referenced by showTrackerBarrel().

◆ m_trackerEndcapElements

TEveElementList* FW3DViewGeometry::m_trackerEndcapElements
private

Definition at line 70 of file FW3DViewGeometry.h.

Referenced by showTrackerEndcap().