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 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_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 46 of file FW3DViewGeometry.cc.

47  : FWViewGeometryList(context, false),
48  m_muonBarrelElements(nullptr),
49  m_muonBarrelFullElements(nullptr),
50  m_muonEndcapElements(nullptr),
51  m_muonEndcapFullElements(nullptr),
52  m_pixelBarrelElements(nullptr),
53  m_pixelEndcapElements(nullptr),
54  m_trackerBarrelElements(nullptr),
55  m_trackerEndcapElements(nullptr),
56  m_HGCalEEElements(nullptr),
57  m_HGCalHSiElements(nullptr),
58  m_HGCalHScElements(nullptr) {
59  SetElementName("3D Geometry");
60 }
TEveElementList * m_pixelBarrelElements
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_trackerEndcapElements
TEveElementList * m_trackerBarrelElements
TEveElementList * m_muonBarrelFullElements

◆ ~FW3DViewGeometry()

FW3DViewGeometry::~FW3DViewGeometry ( )
override

Definition at line 67 of file FW3DViewGeometry.cc.

67 {}

◆ 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 379 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

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

◆ showHGCalHSc()

void FW3DViewGeometry::showHGCalHSc ( bool  showHGCalHSc)

Definition at line 433 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

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

◆ showHGCalHSi()

void FW3DViewGeometry::showHGCalHSi ( bool  showHGCalHSi)

Definition at line 406 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

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

◆ showMuonBarrel()

void FW3DViewGeometry::showMuonBarrel ( bool  showMuonBarrel)

Definition at line 81 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), triggerObjects_cff::id, kFWMuonBarrelLineColorIndex, FWViewGeometryList::m_geom, m_muonBarrelElements, and alignCSCRings::s.

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

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

◆ showMuonBarrelFull()

void FW3DViewGeometry::showMuonBarrelFull ( bool  showMuonBarrel)

Definition at line 113 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), triggerObjects_cff::id, kFWMuonBarrelLineColorIndex, FWViewGeometryList::m_geom, m_muonBarrelFullElements, and showMuonBarrel().

Referenced by FW3DViewBase::showMuonBarrel().

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

◆ showMuonEndcap()

void FW3DViewGeometry::showMuonEndcap ( bool  showMuonEndcap)

Definition at line 143 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

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

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

Referenced by FW3DViewBase::setContext().

276  {
278  m_pixelBarrelElements = new TEveElementList("PixelBarrel");
280  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelBarrel);
281  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
282  TEveGeoShape* shape = m_geom->getEveShape(*id);
283 
284  uint32_t rawId = *id;
285  DetId did = DetId(rawId);
287  shape->SetTitle(title.c_str());
288 
290  m_pixelBarrelElements->AddElement(shape);
291  }
292  AddElement(m_pixelBarrelElements);
293  }
294 
295  if (m_pixelBarrelElements) {
297  gEve->Redraw3D();
298  }
299 }
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:156
const FWGeometry * m_geom
Definition: DetId.h:17
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:318
void showPixelBarrel(bool)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showPixelEndcap()

void FW3DViewGeometry::showPixelEndcap ( bool  showPixelEndcap)

Definition at line 302 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

302  {
304  m_pixelEndcapElements = new TEveElementList("PixelEndcap");
305  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelEndcap);
306  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
307  TEveGeoShape* shape = m_geom->getEveShape(*id);
308  uint32_t rawId = *id;
309  DetId did = DetId(rawId);
311  shape->SetTitle(title.c_str());
313  m_pixelEndcapElements->AddElement(shape);
314  }
315  AddElement(m_pixelEndcapElements);
316  }
317 
318  if (m_pixelEndcapElements) {
320  gEve->Redraw3D();
321  }
322 }
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:156
const FWGeometry * m_geom
Definition: DetId.h:17
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:318
void showPixelEndcap(bool)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showTrackerBarrel()

void FW3DViewGeometry::showTrackerBarrel ( bool  showTrackerBarrel)

Definition at line 325 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

325  {
327  m_trackerBarrelElements = new TEveElementList("TrackerBarrel");
329  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TIB);
330  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
331  TEveGeoShape* shape = m_geom->getEveShape(*id);
333  m_trackerBarrelElements->AddElement(shape);
334  }
336  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
337  TEveGeoShape* shape = m_geom->getEveShape(*id);
338  shape->SetTitle(Form("TrackerBarrel %d", *id));
340  m_trackerBarrelElements->AddElement(shape);
341  }
342  AddElement(m_trackerBarrelElements);
343  }
344 
347  gEve->Redraw3D();
348  }
349 }
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:318
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

◆ showTrackerEndcap()

void FW3DViewGeometry::showTrackerEndcap ( bool  showTrackerEndcap)

Definition at line 352 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

352  {
354  m_trackerEndcapElements = new TEveElementList("TrackerEndcap");
355  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TID);
356  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
357  TEveGeoShape* shape = m_geom->getEveShape(*id);
359  m_trackerEndcapElements->AddElement(shape);
360  }
362  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
363  TEveGeoShape* shape = m_geom->getEveShape(*id);
364 
365  shape->SetTitle(Form("TrackerEndcap %d", *id));
367  m_trackerEndcapElements->AddElement(shape);
368  }
369  AddElement(m_trackerEndcapElements);
370  }
371 
374  gEve->Redraw3D();
375  }
376 }
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:318
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const

Member Data Documentation

◆ m_HGCalEEElements

TEveElementList* FW3DViewGeometry::m_HGCalEEElements
private

Definition at line 69 of file FW3DViewGeometry.h.

Referenced by getHGCalEE(), and showHGCalEE().

◆ m_HGCalHScElements

TEveElementList* FW3DViewGeometry::m_HGCalHScElements
private

Definition at line 71 of file FW3DViewGeometry.h.

Referenced by getHGCalHSc(), and showHGCalHSc().

◆ m_HGCalHSiElements

TEveElementList* FW3DViewGeometry::m_HGCalHSiElements
private

Definition at line 70 of file FW3DViewGeometry.h.

Referenced by getHGCalHSi(), and showHGCalHSi().

◆ m_muonBarrelElements

TEveElementList* FW3DViewGeometry::m_muonBarrelElements
private

Definition at line 61 of file FW3DViewGeometry.h.

Referenced by showMuonBarrel().

◆ m_muonBarrelFullElements

TEveElementList* FW3DViewGeometry::m_muonBarrelFullElements
private

Definition at line 62 of file FW3DViewGeometry.h.

Referenced by showMuonBarrelFull().

◆ m_muonEndcapElements

TEveElementList* FW3DViewGeometry::m_muonEndcapElements
private

Definition at line 63 of file FW3DViewGeometry.h.

Referenced by showMuonEndcap().

◆ m_muonEndcapFullElements

TEveElementList* FW3DViewGeometry::m_muonEndcapFullElements
private

Definition at line 64 of file FW3DViewGeometry.h.

◆ m_pixelBarrelElements

TEveElementList* FW3DViewGeometry::m_pixelBarrelElements
private

Definition at line 65 of file FW3DViewGeometry.h.

Referenced by showPixelBarrel().

◆ m_pixelEndcapElements

TEveElementList* FW3DViewGeometry::m_pixelEndcapElements
private

Definition at line 66 of file FW3DViewGeometry.h.

Referenced by showPixelEndcap().

◆ m_trackerBarrelElements

TEveElementList* FW3DViewGeometry::m_trackerBarrelElements
private

Definition at line 67 of file FW3DViewGeometry.h.

Referenced by showTrackerBarrel().

◆ m_trackerEndcapElements

TEveElementList* FW3DViewGeometry::m_trackerEndcapElements
private

Definition at line 68 of file FW3DViewGeometry.h.

Referenced by showTrackerEndcap().