CMS 3D CMS Logo

List of all members | Public Member Functions | Private 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)
 
TEveElementList const *const getHGCalEE ()
 
TEveElementList const *const getHGCalHSc ()
 
TEveElementList const *const getHGCalHSi ()
 
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)
 
void updateColors ()
 
void updateTransparency (bool projectedType)
 
 ~FWViewGeometryList () override
 

Private Member Functions

 FW3DViewGeometry (const FW3DViewGeometry &)=delete
 
const FW3DViewGeometryoperator= (const FW3DViewGeometry &)=delete
 

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::FW3DViewGeometry ( const fireworks::Context context)

Definition at line 44 of file FW3DViewGeometry.cc.

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

Definition at line 65 of file FW3DViewGeometry.cc.

65 {}
FW3DViewGeometry::FW3DViewGeometry ( const FW3DViewGeometry )
privatedelete

Member Function Documentation

TEveElementList const* const FW3DViewGeometry::getHGCalEE ( )
inline

Definition at line 48 of file FW3DViewGeometry.h.

Referenced by FW3DViewBase::updateHGCalVisibility().

48 { return m_HGCalEEElements; }
TEveElementList * m_HGCalEEElements
TEveElementList const* const FW3DViewGeometry::getHGCalHSc ( )
inline

Definition at line 52 of file FW3DViewGeometry.h.

Referenced by FW3DViewBase::updateHGCalVisibility().

52 { return m_HGCalHScElements; }
TEveElementList * m_HGCalHScElements
TEveElementList const* const FW3DViewGeometry::getHGCalHSi ( )
inline

Definition at line 50 of file FW3DViewGeometry.h.

Referenced by FW3DViewBase::updateHGCalVisibility().

50 { return m_HGCalHSiElements; }
TEveElementList * m_HGCalHSiElements
const FW3DViewGeometry& FW3DViewGeometry::operator= ( const FW3DViewGeometry )
privatedelete
void FW3DViewGeometry::showHGCalEE ( bool  showHGCalEE)

Definition at line 377 of file FW3DViewGeometry.cc.

References f, FWGeometry::getHGCSiliconEveShape(), FWGeometry::getMatchedIds(), FWGeometry::HGCalEE, kFwHGCalEEColorIndex, FWViewGeometryList::m_colorComp, FWViewGeometryList::m_geom, m_HGCalEEElements, and mitigatedMETSequence_cff::U.

Referenced by FW3DViewBase::setContext().

377  {
378  if (showHGCalEE && !m_HGCalEEElements) {
379  m_HGCalEEElements = new TEveElementList("HGCalEE");
380  for (const auto& id : m_geom->getMatchedIds(FWGeometry::HGCalEE)) {
381  TEveGeoShape* shape = m_geom->getHGCSiliconEveShape(id);
382  const unsigned int layer = (id >> 20) & 0x1F;
383  shape->SetTitle(Form("HGCalEE %d", layer));
384  {
385  float color[3];
386  color[0] = color[1] = color[2] = 0.3f + 0.7f * (1.0f - layer / 28.0f);
387  color[1] = 0.5f * (layer & 2U) + 0.5f * color[1];
388  const bool isFine = ((id >> 26) & 0x3) == 0;
389  color[0] *= isFine ? 1.0f : 1.0f;
390  color[1] *= isFine ? 1.0f : 0.4f;
391  color[2] *= isFine ? 0.0f : 0.0f;
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 }
TEveGeoShape * getHGCSiliconEveShape(unsigned int id) const
Definition: FWGeometry.cc:295
TEveCompound * m_colorComp[kFWGeomColorSize]
TEveElementList * m_HGCalEEElements
double f[11][100]
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:192
void FW3DViewGeometry::showHGCalHSc ( bool  showHGCalHSc)

Definition at line 435 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getHGCScintillatorEveShape(), FWGeometry::getMatchedIds(), FWGeometry::HGCalHSc, photons_cff::ids, kFwHGCalHScColorIndex, FWViewGeometryList::m_geom, and m_HGCalHScElements.

Referenced by FW3DViewBase::setContext().

435  {
437  m_HGCalHScElements = new TEveElementList("HGCalHSc");
438  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::HGCalHSc);
439  for (const auto& id : m_geom->getMatchedIds(FWGeometry::HGCalHSc)) {
440  TEveGeoShape* shape = m_geom->getHGCScintillatorEveShape(id);
441  const unsigned int layer = (id >> 17) & 0x1F;
442  shape->SetTitle(Form("HGCalHSc %d", layer));
444  m_HGCalHScElements->AddElement(shape);
445  }
446  AddElement(m_HGCalHScElements);
447  }
448  if (m_HGCalHScElements) {
449  m_HGCalHScElements->SetRnrState(showHGCalHSc);
450  gEve->Redraw3D();
451  }
452 }
TEveElementList * m_HGCalHScElements
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:192
TEveGeoShape * getHGCScintillatorEveShape(unsigned int id) const
Definition: FWGeometry.cc:361
void FW3DViewGeometry::showHGCalHSi ( bool  showHGCalHSi)

Definition at line 406 of file FW3DViewGeometry.cc.

References f, FWGeometry::getHGCSiliconEveShape(), FWGeometry::getMatchedIds(), FWGeometry::HGCalHSi, kFwHGCalHSiColorIndex, FWViewGeometryList::m_colorComp, FWViewGeometryList::m_geom, m_HGCalHSiElements, and mitigatedMETSequence_cff::U.

Referenced by FW3DViewBase::setContext().

406  {
408  m_HGCalHSiElements = new TEveElementList("HGCalHSi");
409  for (const auto& id : m_geom->getMatchedIds(FWGeometry::HGCalHSi)) {
410  TEveGeoShape* shape = m_geom->getHGCSiliconEveShape(id);
411  const unsigned int layer = (id >> 20) & 0x1F;
412  shape->SetTitle(Form("HGCalHSi %d", layer));
413  {
414  float color[3];
415  color[0] = color[1] = color[2] = 0.3f + 0.7f * (1.0f - layer / 28.0f);
416  color[0] = 0.5f * (layer & 2U) + 0.5f * color[0];
417  const bool isFine = ((id >> 26) & 0x3) == 0;
418  color[0] *= isFine ? 1.0f : 0.4f;
419  color[1] *= isFine ? 0.7f : 0.7f;
420  color[2] *= isFine ? 0.2f : 0.2f;
421  shape->SetMainColorRGB(color[0], color[1], color[2]);
422  shape->SetPickable(false);
423  m_colorComp[kFwHGCalHSiColorIndex]->AddElement(shape);
424  }
425  m_HGCalHSiElements->AddElement(shape);
426  }
427  AddElement(m_HGCalHSiElements);
428  }
429  if (m_HGCalHSiElements) {
430  m_HGCalHSiElements->SetRnrState(showHGCalHSi);
431  gEve->Redraw3D();
432  }
433 }
TEveGeoShape * getHGCSiliconEveShape(unsigned int id) const
Definition: FWGeometry.cc:295
TEveCompound * m_colorComp[kFWGeomColorSize]
TEveElementList * m_HGCalHSiElements
double f[11][100]
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:192
void FW3DViewGeometry::showMuonBarrel ( bool  showMuonBarrel)

Definition at line 79 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().

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

Definition at line 111 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::showMuonBarrel().

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

Definition at line 141 of file FW3DViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::VersionInfo::haveExtraDet(), triggerObjects_cff::id, kFWMuonEndcapLineColorIndex, FWViewGeometryList::m_geom, m_muonEndcapElements, GEMDetId::maxLayerId, GEMDetId::maxRegionId, ME0DetId::maxRegionId, GEMDetId::maxStationId, GEMDetId::minLayerId, GEMDetId::minRegionId, ME0DetId::minRegionId, GEMDetId::minRollId, GEMDetId::minStationId, alignCSCRings::s, and FWGeometry::versionInfo().

Referenced by FW3DViewBase::setContext().

141  {
143  m_muonEndcapElements = new TEveElementList("EndCap");
144 
145  for (Int_t iEndcap = 1; iEndcap <= 2; ++iEndcap) // 1=forward (+Z), 2=backward(-Z)
146  {
147  TEveElementList* cEndcap = nullptr;
148  if (iEndcap == 1)
149  cEndcap = new TEveElementList("CSC Forward");
150  else
151  cEndcap = new TEveElementList("CSC Backward");
152  m_muonEndcapElements->AddElement(cEndcap);
153  // Actual CSC geometry:
154  // Station 1 has 4 rings with 36 chambers in each
155  // Station 2: ring 1 has 18 chambers, ring 2 has 36 chambers
156  // Station 3: ring 1 has 18 chambers, ring 2 has 36 chambers
157  // Station 4: ring 1 has 18 chambers
158  Int_t maxChambers = 36;
159  for (Int_t iStation = 1; iStation <= 4; ++iStation) {
160  std::ostringstream s;
161  s << "Station" << iStation;
162  TEveElementList* cStation = new TEveElementList(s.str().c_str());
163  cEndcap->AddElement(cStation);
164  for (Int_t iRing = 1; iRing <= 4; ++iRing) {
165  if (iStation > 1 && iRing > 2)
166  continue;
167  // if( iStation > 3 && iRing > 1 ) continue;
168  std::ostringstream s;
169  s << "Ring" << iRing;
170  TEveElementList* cRing = new TEveElementList(s.str().c_str());
171  cStation->AddElement(cRing);
172  (iRing == 1 && iStation > 1) ? (maxChambers = 18) : (maxChambers = 36);
173  for (Int_t iChamber = 1; iChamber <= maxChambers; ++iChamber) {
174  Int_t iLayer = 0; // chamber
175  CSCDetId id(iEndcap, iStation, iRing, iChamber, iLayer);
176  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
177  shape->SetTitle(TString::Format(
178  "CSC: %s, S=%d, R=%d, C=%d\ndet-id=%u", cEndcap->GetName(), iStation, iRing, iChamber, id.rawId()));
179 
181  cRing->AddElement(shape);
182  }
183  }
184  }
185  }
186  // hardcoded gem and me0; need to find better way for different gem geometries
187  for (Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion = iRegion + 2) {
188  TEveElementList* teEndcap = nullptr;
189  if (iRegion == 1)
190  teEndcap = new TEveElementList("GEM Forward");
191  else
192  teEndcap = new TEveElementList("GEM Backward");
193  m_muonEndcapElements->AddElement(teEndcap);
194 
195  int mxSt = m_geom->versionInfo().haveExtraDet("GE2") ? GEMDetId::maxStationId : 1;
196 
197  for (Int_t iStation = GEMDetId::minStationId; iStation <= mxSt; ++iStation) {
198  std::ostringstream s;
199  s << "Station" << iStation;
200  TEveElementList* cStation = new TEveElementList(s.str().c_str());
201  teEndcap->AddElement(cStation);
202 
203  Int_t iRing = 1;
204  for (Int_t iLayer = GEMDetId::minLayerId; iLayer <= GEMDetId::maxLayerId; ++iLayer) {
205  int maxChamber = 36;
206  if (iStation >= 2)
207  maxChamber = 18;
208 
209  for (Int_t iChamber = 1; iChamber <= maxChamber; ++iChamber) {
210  int maxRoll = iChamber % 2 ? 9 : 10;
211  if (iStation == 2)
212  maxRoll = 8;
213  if (iStation == 3)
214  maxRoll = 12;
215 
216  for (Int_t iRoll = GEMDetId::minRollId; iRoll <= maxRoll; ++iRoll) {
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  cStation->AddElement(shape);
225  }
226  }
227  }
228  }
229  }
230  }
231 
232  // adding me0
233  if (m_geom->versionInfo().haveExtraDet("ME0")) {
234  for (Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion = iRegion + 2) {
235  TEveElementList* teEndcap = nullptr;
236  if (iRegion == 1)
237  teEndcap = new TEveElementList("ME0 Forward");
238  else
239  teEndcap = new TEveElementList("ME0 Backward");
240  m_muonEndcapElements->AddElement(teEndcap);
241 
242  for (Int_t iLayer = 1; iLayer <= 6; ++iLayer) {
243  std::ostringstream s;
244  s << "Layer" << iLayer;
245  TEveElementList* cLayer = new TEveElementList(s.str().c_str());
246  teEndcap->AddElement(cLayer);
247 
248  for (Int_t iChamber = 1; iChamber <= 18; ++iChamber) {
249  Int_t iRoll = 1;
250  // for (Int_t iRoll = ME0DetId::minRollId; iRoll <= ME0DetId::maxRollId ; ++iRoll ){
251  ME0DetId id(iRegion, iLayer, iChamber, iRoll);
252  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
253  if (shape) {
254  shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", iChamber, iRoll, id.rawId()));
255 
257  cLayer->AddElement(shape);
258  }
259  }
260  }
261  }
262  }
263 
264  AddElement(m_muonEndcapElements);
265  }
266 
267  if (m_muonEndcapElements) {
268  m_muonEndcapElements->SetRnrState(showMuonEndcap);
269  gEve->Redraw3D();
270  }
271 }
static int32_t maxStationId
Definition: GEMDetId.h:26
static int32_t minRegionId
Definition: GEMDetId.h:19
static const int maxRegionId
Definition: ME0DetId.h:64
const VersionInfo & versionInfo() const
Definition: FWGeometry.h:150
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
static const int minRegionId
Definition: ME0DetId.h:63
bool haveExtraDet(const char *) const
Definition: FWGeometry.cc:473
void showMuonEndcap(bool)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:262
TEveElementList * m_muonEndcapElements
const FWGeometry * m_geom
static int32_t maxLayerId
Definition: GEMDetId.h:31
static int32_t minRollId
Definition: GEMDetId.h:32
static int32_t maxRegionId
Definition: GEMDetId.h:20
static int32_t minStationId
Definition: GEMDetId.h:24
static int32_t minLayerId
Definition: GEMDetId.h:29
void FW3DViewGeometry::showPixelBarrel ( bool  showPixelBarrel)

Definition at line 274 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

274  {
276  m_pixelBarrelElements = new TEveElementList("PixelBarrel");
278  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelBarrel);
279  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
280  TEveGeoShape* shape = m_geom->getEveShape(*id);
281 
282  uint32_t rawId = *id;
283  DetId did = DetId(rawId);
285  shape->SetTitle(title.c_str());
286 
288  m_pixelBarrelElements->AddElement(shape);
289  }
290  AddElement(m_pixelBarrelElements);
291  }
292 
293  if (m_pixelBarrelElements) {
295  gEve->Redraw3D();
296  }
297 }
TEveElementList * m_pixelBarrelElements
std::string print(DetId detid) const
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:262
const FWGeometry * m_geom
Definition: DetId.h:17
void showPixelBarrel(bool)
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:192
const TrackerTopology * getTrackerTopology() const
Definition: FWGeometry.h:156
void FW3DViewGeometry::showPixelEndcap ( bool  showPixelEndcap)

Definition at line 300 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

300  {
302  m_pixelEndcapElements = new TEveElementList("PixelEndcap");
303  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelEndcap);
304  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
305  TEveGeoShape* shape = m_geom->getEveShape(*id);
306  uint32_t rawId = *id;
307  DetId did = DetId(rawId);
309  shape->SetTitle(title.c_str());
311  m_pixelEndcapElements->AddElement(shape);
312  }
313  AddElement(m_pixelEndcapElements);
314  }
315 
316  if (m_pixelEndcapElements) {
318  gEve->Redraw3D();
319  }
320 }
std::string print(DetId detid) const
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
TEveElementList * m_pixelEndcapElements
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:262
const FWGeometry * m_geom
Definition: DetId.h:17
void showPixelEndcap(bool)
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:192
const TrackerTopology * getTrackerTopology() const
Definition: FWGeometry.h:156
void FW3DViewGeometry::showTrackerBarrel ( bool  showTrackerBarrel)

Definition at line 323 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

323  {
325  m_trackerBarrelElements = new TEveElementList("TrackerBarrel");
327  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TIB);
328  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
329  TEveGeoShape* shape = m_geom->getEveShape(*id);
331  m_trackerBarrelElements->AddElement(shape);
332  }
334  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
335  TEveGeoShape* shape = m_geom->getEveShape(*id);
336  shape->SetTitle(Form("TrackerBarrel %d", *id));
338  m_trackerBarrelElements->AddElement(shape);
339  }
340  AddElement(m_trackerBarrelElements);
341  }
342 
345  gEve->Redraw3D();
346  }
347 }
void showTrackerBarrel(bool)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:262
const FWGeometry * m_geom
TEveElementList * m_trackerBarrelElements
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:192
void FW3DViewGeometry::showTrackerEndcap ( bool  showTrackerEndcap)

Definition at line 350 of file FW3DViewGeometry.cc.

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

Referenced by FW3DViewBase::setContext().

350  {
352  m_trackerEndcapElements = new TEveElementList("TrackerEndcap");
353  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TID);
354  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
355  TEveGeoShape* shape = m_geom->getEveShape(*id);
357  m_trackerEndcapElements->AddElement(shape);
358  }
360  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
361  TEveGeoShape* shape = m_geom->getEveShape(*id);
362 
363  shape->SetTitle(Form("TrackerEndcap %d", *id));
365  m_trackerEndcapElements->AddElement(shape);
366  }
367  AddElement(m_trackerEndcapElements);
368  }
369 
372  gEve->Redraw3D();
373  }
374 }
void showTrackerEndcap(bool)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:262
const FWGeometry * m_geom
TEveElementList * m_trackerEndcapElements
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:192

Member Data Documentation

TEveElementList* FW3DViewGeometry::m_HGCalEEElements
private

Definition at line 69 of file FW3DViewGeometry.h.

Referenced by showHGCalEE().

TEveElementList* FW3DViewGeometry::m_HGCalHScElements
private

Definition at line 71 of file FW3DViewGeometry.h.

Referenced by showHGCalHSc().

TEveElementList* FW3DViewGeometry::m_HGCalHSiElements
private

Definition at line 70 of file FW3DViewGeometry.h.

Referenced by showHGCalHSi().

TEveElementList* FW3DViewGeometry::m_muonBarrelElements
private

Definition at line 61 of file FW3DViewGeometry.h.

Referenced by showMuonBarrel().

TEveElementList* FW3DViewGeometry::m_muonBarrelFullElements
private

Definition at line 62 of file FW3DViewGeometry.h.

Referenced by showMuonBarrelFull().

TEveElementList* FW3DViewGeometry::m_muonEndcapElements
private

Definition at line 63 of file FW3DViewGeometry.h.

Referenced by showMuonEndcap().

TEveElementList* FW3DViewGeometry::m_muonEndcapFullElements
private

Definition at line 64 of file FW3DViewGeometry.h.

TEveElementList* FW3DViewGeometry::m_pixelBarrelElements
private

Definition at line 65 of file FW3DViewGeometry.h.

Referenced by showPixelBarrel().

TEveElementList* FW3DViewGeometry::m_pixelEndcapElements
private

Definition at line 66 of file FW3DViewGeometry.h.

Referenced by showPixelEndcap().

TEveElementList* FW3DViewGeometry::m_trackerBarrelElements
private

Definition at line 67 of file FW3DViewGeometry.h.

Referenced by showTrackerBarrel().

TEveElementList* FW3DViewGeometry::m_trackerEndcapElements
private

Definition at line 68 of file FW3DViewGeometry.h.

Referenced by showTrackerEndcap().