CMS 3D CMS Logo

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

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

Inheritance diagram for FWRPZViewGeometry:
FWViewGeometryList

Public Member Functions

 FWRPZViewGeometry (const fireworks::Context &context)
 
void initStdGeoElements (const FWViewType::EType id)
 
void showGEM (bool)
 
void showME0 (bool)
 
void showPixelBarrel (bool)
 
void showPixelEndcap (bool)
 
void showRpcEndcap (bool)
 
void showTrackerBarrel (bool)
 
void showTrackerEndcap (bool)
 
 ~FWRPZViewGeometry () 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

void estimateProjectionSize (const float *, float &, float &, float &, float &)
 
void estimateProjectionSizeCSC (const FWGeometry::GeomDetInfo &info, float &, float &, float &, float &)
 
void estimateProjectionSizeDT (const FWGeometry::GeomDetInfo &info, float &, float &, float &, float &)
 
 FWRPZViewGeometry (const FWRPZViewGeometry &)
 
void importNew (TEveElementList *x)
 
TEveElement * makeCaloOutlineRhoPhi ()
 
TEveElement * makeCaloOutlineRhoZ ()
 
TEveElement * makeMuonGeometryRhoPhi ()
 
TEveElement * makeMuonGeometryRhoZ ()
 
TEveGeoShape * makeShape (double, double, double, double)
 
const FWRPZViewGeometryoperator= (const FWRPZViewGeometry &)
 

Private Attributes

TEveElementList * m_GEMElements
 
TEveElementList * m_ME0Elements
 
TEveElementList * m_pixelBarrelElements
 
TEveElementList * m_pixelEndcapElements
 
TEveElementList * m_rhoPhiGeo
 
TEveElementList * m_rhoZGeo
 
TEveElementList * m_rpcEndcapElements
 
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 32 of file FWRPZViewGeometry.h.

Constructor & Destructor Documentation

◆ FWRPZViewGeometry() [1/2]

FWRPZViewGeometry::FWRPZViewGeometry ( const fireworks::Context context)

Definition at line 55 of file FWRPZViewGeometry.cc.

57 
58  m_rhoPhiGeo(nullptr),
59  m_rhoZGeo(nullptr),
60 
61  m_pixelBarrelElements(nullptr),
62  m_pixelEndcapElements(nullptr),
63  m_trackerBarrelElements(nullptr),
64  m_trackerEndcapElements(nullptr),
65  m_rpcEndcapElements(nullptr),
66  m_GEMElements(nullptr),
67  m_ME0Elements(nullptr) {
68  SetElementName("RPZGeomShared");
69 }

◆ ~FWRPZViewGeometry()

FWRPZViewGeometry::~FWRPZViewGeometry ( )
override

Definition at line 76 of file FWRPZViewGeometry.cc.

76  {
77  m_rhoPhiGeo->DecDenyDestroy();
78  m_rhoZGeo->DecDenyDestroy();
79 }

References m_rhoPhiGeo, and m_rhoZGeo.

◆ FWRPZViewGeometry() [2/2]

FWRPZViewGeometry::FWRPZViewGeometry ( const FWRPZViewGeometry )
private

Member Function Documentation

◆ estimateProjectionSize()

void FWRPZViewGeometry::estimateProjectionSize ( const float *  global,
float &  min_rho,
float &  max_rho,
float &  min_z,
float &  max_z 
)
private

Definition at line 343 of file FWRPZViewGeometry.cc.

344  {
345  double rho = sqrt(global[0] * global[0] + global[1] * global[1]);
346  if (min_rho > rho)
347  min_rho = rho;
348  if (max_rho < rho)
349  max_rho = rho;
350  if (min_z > global[2])
351  min_z = global[2];
352  if (max_z < global[2])
353  max_z = global[2];
354 }

References rho, and mathSSE::sqrt().

Referenced by estimateProjectionSizeDT().

◆ estimateProjectionSizeCSC()

void FWRPZViewGeometry::estimateProjectionSizeCSC ( const FWGeometry::GeomDetInfo info,
float &  ,
float &  ,
float &  ,
float &   
)
private

◆ estimateProjectionSizeDT()

void FWRPZViewGeometry::estimateProjectionSizeDT ( const FWGeometry::GeomDetInfo info,
float &  min_rho,
float &  max_rho,
float &  min_z,
float &  max_z 
)
private

Definition at line 273 of file FWRPZViewGeometry.cc.

274  {
275  // we will test 5 points on both sides ( +/- z)
276  float local[3], global[3];
277 
278  float dX = info.shape[1];
279  float dY = info.shape[2];
280  float dZ = info.shape[3];
281 
282  local[0] = 0;
283  local[1] = 0;
284  local[2] = dZ;
285  m_geom->localToGlobal(info, local, global);
286  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
287 
288  local[0] = dX;
289  local[1] = dY;
290  local[2] = dZ;
291  m_geom->localToGlobal(info, local, global);
292  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
293 
294  local[0] = -dX;
295  local[1] = dY;
296  local[2] = dZ;
297  m_geom->localToGlobal(info, local, global);
298  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
299 
300  local[0] = dX;
301  local[1] = -dY;
302  local[2] = dZ;
303  m_geom->localToGlobal(info, local, global);
304  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
305 
306  local[0] = -dX;
307  local[1] = -dY;
308  local[2] = dZ;
309  m_geom->localToGlobal(info, local, global);
310  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
311 
312  local[0] = 0;
313  local[1] = 0;
314  local[2] = -dZ;
315  m_geom->localToGlobal(info, local, global);
316  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
317 
318  local[0] = dX;
319  local[1] = dY;
320  local[2] = -dZ;
321  m_geom->localToGlobal(info, local, global);
322  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
323 
324  local[0] = -dX;
325  local[1] = dY;
326  local[2] = -dZ;
327  m_geom->localToGlobal(info, local, global);
328  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
329 
330  local[0] = dX;
331  local[1] = -dY;
332  local[2] = -dZ;
333  m_geom->localToGlobal(info, local, global);
334  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
335 
336  local[0] = -dX;
337  local[1] = -dY;
338  local[2] = -dZ;
339  m_geom->localToGlobal(info, local, global);
340  estimateProjectionSize(global, min_rho, max_rho, min_z, max_z);
341 }

References estimateProjectionSize(), info(), DTRecHitClients_cfi::local, FWGeometry::localToGlobal(), and FWViewGeometryList::m_geom.

Referenced by makeMuonGeometryRhoZ().

◆ importNew()

void FWRPZViewGeometry::importNew ( TEveElementList *  x)
private

Definition at line 602 of file FWRPZViewGeometry.cc.

602  {
603  TEveProjected* proj = *BeginProjecteds();
604  proj->GetManager()->SubImportElements(x, proj->GetProjectedAsElement());
605 }

References amptDefault_cfi::proj, and x.

Referenced by showGEM(), showME0(), showPixelBarrel(), showPixelEndcap(), showRpcEndcap(), showTrackerBarrel(), and showTrackerEndcap().

◆ initStdGeoElements()

void FWRPZViewGeometry::initStdGeoElements ( const FWViewType::EType  id)

Definition at line 83 of file FWRPZViewGeometry.cc.

83  {
84  if (m_geom->isEmpty())
85  return;
86 
87  if (type == FWViewType::kRhoZ) {
88  AddElement(makeMuonGeometryRhoZ());
89  AddElement(makeCaloOutlineRhoZ());
90  } else {
91  AddElement(makeMuonGeometryRhoPhi());
92  AddElement(makeCaloOutlineRhoPhi());
93  }
94 }

References FWGeometry::isEmpty(), FWViewType::kRhoZ, FWViewGeometryList::m_geom, makeCaloOutlineRhoPhi(), makeCaloOutlineRhoZ(), makeMuonGeometryRhoPhi(), and makeMuonGeometryRhoZ().

Referenced by FWRPZView::setContext().

◆ makeCaloOutlineRhoPhi()

TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoPhi ( )
private

Definition at line 119 of file FWRPZViewGeometry.cc.

119  {
120  TEveStraightLineSet* el = new TEveStraightLineSet("TrackerRhoPhi");
122 
124  const unsigned int nSegments = 100;
125  const double r = m_context.caloR1();
126  for (unsigned int i = 1; i <= nSegments; ++i)
127  el->AddLine(r * sin(TMath::TwoPi() / nSegments * (i - 1)),
128  r * cos(TMath::TwoPi() / nSegments * (i - 1)),
129  0,
130  r * sin(TMath::TwoPi() / nSegments * i),
131  r * cos(TMath::TwoPi() / nSegments * i),
132  0);
133 
134  TEvePointSet* ref = new TEvePointSet("reference");
135  ref->SetTitle("(0,0,0)");
136  ref->SetMarkerStyle(4);
137  ref->SetMarkerColor(kWhite);
138  ref->SetNextPoint(0., 0., 0.);
139  el->AddElement(ref);
140 
141  return el;
142 }

References FWViewGeometryList::addToCompound(), fireworks::Context::caloR1(), fireworks::Context::colorManager(), funct::cos(), FWColorManager::geomColor(), mps_fire::i, kFWTrackerBarrelColorIndex, FWViewGeometryList::m_context, alignCSCRings::r, funct::sin(), and TwoPi.

Referenced by initStdGeoElements().

◆ makeCaloOutlineRhoZ()

TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoZ ( )
private

Definition at line 98 of file FWRPZViewGeometry.cc.

98  {
99  using namespace fireworks;
100 
101  float ri = m_context.caloZ2() * tan(2 * atan(exp(-m_context.caloMaxEta())));
102 
103  TEveStraightLineSet* el = new TEveStraightLineSet("TrackerRhoZoutline");
104  el->SetPickable(kFALSE);
106 
107  el->AddLine(0, m_context.caloR1(), -m_context.caloZ1(), 0, m_context.caloR1(), m_context.caloZ1());
108  el->AddLine(0, -m_context.caloR1(), m_context.caloZ1(), 0, -m_context.caloR1(), -m_context.caloZ1());
109 
110  el->AddLine(0, -m_context.caloR2(), m_context.caloZ2(), 0, -ri, m_context.caloZ2());
111  el->AddLine(0, ri, m_context.caloZ2(), 0, m_context.caloR2(), m_context.caloZ2());
112 
113  el->AddLine(0, -m_context.caloR2(), -m_context.caloZ2(), 0, -ri, -m_context.caloZ2());
114  el->AddLine(0, ri, -m_context.caloZ2(), 0, m_context.caloR2(), -m_context.caloZ2());
115 
116  return el;
117 }

References FWViewGeometryList::addToCompound(), fireworks::Context::caloMaxEta(), fireworks::Context::caloR1(), fireworks::Context::caloR2(), fireworks::Context::caloZ1(), fireworks::Context::caloZ2(), JetChargeProducer_cfi::exp, kFWTrackerBarrelColorIndex, FWViewGeometryList::m_context, and funct::tan().

Referenced by initStdGeoElements().

◆ makeMuonGeometryRhoPhi()

TEveElement * FWRPZViewGeometry::makeMuonGeometryRhoPhi ( void  )
private

Definition at line 146 of file FWRPZViewGeometry.cc.

146  {
147  Int_t iWheel = 0;
148 
149  // rho-phi view
150  TEveCompound* container = new TEveCompound("MuonRhoPhi");
151 
152  for (Int_t iStation = 1; iStation <= 4; ++iStation) {
153  for (Int_t iSector = 1; iSector <= 14; ++iSector) {
154  if (iStation < 4 && iSector > 12)
155  continue;
156  DTChamberId id(iWheel, iStation, iSector);
157  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
158  if (shape) {
159  shape->SetMainColor(m_colorComp[kFWMuonBarrelLineColorIndex]->GetMainColor());
161  container->AddElement(shape);
162  }
163  }
164  }
165  return container;
166 }

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

Referenced by initStdGeoElements().

◆ makeMuonGeometryRhoZ()

TEveElement * FWRPZViewGeometry::makeMuonGeometryRhoZ ( void  )
private

Definition at line 174 of file FWRPZViewGeometry.cc.

174  {
175  TEveElementList* container = new TEveElementList("MuonRhoZ");
176 
177  {
178  TEveCompound* dtContainer = new TEveCompound("DT");
179  for (Int_t iWheel = -2; iWheel <= 2; ++iWheel) {
180  for (Int_t iStation = 1; iStation <= 4; ++iStation) {
181  float min_rho(1000), max_rho(0), min_z(2000), max_z(-2000);
182 
183  // This will give us a quarter of DTs
184  // which is enough for our projection
185  for (Int_t iSector = 1; iSector <= 4; ++iSector) {
186  DTChamberId id(iWheel, iStation, iSector);
187  unsigned int rawid = id.rawId();
188  FWGeometry::IdToInfoItr det = m_geom->find(rawid);
189  if (det == m_geom->mapEnd())
190  return container;
191  estimateProjectionSizeDT(*det, min_rho, max_rho, min_z, max_z);
192  }
193  if (min_rho > max_rho || min_z > max_z)
194  continue;
195  TEveElement* se = makeShape(min_rho, max_rho, min_z, max_z);
197  dtContainer->AddElement(se);
198  se = makeShape(-max_rho, -min_rho, min_z, max_z);
200  dtContainer->AddElement(se);
201  }
202  }
203 
204  container->AddElement(dtContainer);
205  }
206  {
207  // addcsc
208  TEveCompound* cscContainer = new TEveCompound("CSC");
209  std::vector<CSCDetId> ids;
211  for (int station = 1; station <= 4; ++station) {
212  ids.push_back(CSCDetId(endcap, station, 2, 10, 0)); //outer ring up
213  ids.push_back(CSCDetId(endcap, station, 2, 11, 0)); //outer ring up
214 
215  ids.push_back(CSCDetId(endcap, station, 2, 28, 0)); //outer ring down
216  ids.push_back(CSCDetId(endcap, station, 2, 29, 0)); //outer ring down
217 
218  ids.push_back(CSCDetId(endcap, station, 1, 5, 0)); //inner ring up
219  ids.push_back(CSCDetId(endcap, station, 1, 6, 0)); //inner ring up
220 
221  int off = (station == 1) ? 10 : 0;
222  ids.push_back(CSCDetId(endcap, station, 1, 15 + off, 0)); //inner ring down
223  ids.push_back(CSCDetId(endcap, station, 1, 16 + off, 0)); //inner ring down
224  }
225  ids.push_back(CSCDetId(endcap, 1, 3, 10, 0)); // ring 3 down
226  ids.push_back(CSCDetId(endcap, 1, 3, 28, 0)); // ring 3 down
227  }
228  for (std::vector<CSCDetId>::iterator i = ids.begin(); i != ids.end(); ++i) {
229  unsigned int rawid = i->rawId();
230  TEveGeoShape* shape = m_geom->getEveShape(rawid);
231  if (!shape)
232  return cscContainer;
234  shape->SetName(Form(" e:%d r:%d s:%d chamber %d", i->endcap(), i->ring(), i->station(), i->chamber()));
235  cscContainer->AddElement(shape);
236  }
237  container->AddElement(cscContainer);
238  }
239 
240  return container;
241 }

References FWViewGeometryList::addToCompound(), makeMuonMisalignmentScenario::endcap, estimateProjectionSizeDT(), FWGeometry::find(), FWGeometry::getEveShape(), mps_fire::i, triggerObjects_cff::id, kFWMuonBarrelLineColorIndex, kFWMuonEndcapLineColorIndex, FWViewGeometryList::m_geom, makeShape(), FWGeometry::mapEnd(), CSCDetId::maxEndcapId(), CSCDetId::minEndcapId(), and relativeConstraints::station.

Referenced by initStdGeoElements().

◆ makeShape()

TEveGeoShape * FWRPZViewGeometry::makeShape ( double  min_rho,
double  max_rho,
double  min_z,
double  max_z 
)
private

Definition at line 245 of file FWRPZViewGeometry.cc.

245  {
246  TEveTrans t;
247  t(1, 1) = 1;
248  t(1, 2) = 0;
249  t(1, 3) = 0;
250  t(2, 1) = 0;
251  t(2, 2) = 1;
252  t(2, 3) = 0;
253  t(3, 1) = 0;
254  t(3, 2) = 0;
255  t(3, 3) = 1;
256  t(1, 4) = 0;
257  t(2, 4) = (min_rho + max_rho) / 2;
258  t(3, 4) = (min_z + max_z) / 2;
259 
260  TEveGeoShape* shape = new TEveGeoShape;
261  shape->SetTransMatrix(t.Array());
262 
263  shape->SetRnrSelf(kTRUE);
264  shape->SetRnrChildren(kTRUE);
265  TGeoBBox* box = new TGeoBBox(0, (max_rho - min_rho) / 2, (max_z - min_z) / 2);
266  shape->SetShape(box);
267 
268  return shape;
269 }

References submitPVValidationJobs::t.

Referenced by makeMuonGeometryRhoZ().

◆ operator=()

const FWRPZViewGeometry& FWRPZViewGeometry::operator= ( const FWRPZViewGeometry )
private

◆ showGEM()

void FWRPZViewGeometry::showGEM ( bool  show)

Definition at line 534 of file FWRPZViewGeometry.cc.

534  {
535  // hardcoded gem and me0; need to find better way for different gem geometries
536  if (!m_GEMElements && show) {
537  m_GEMElements = new TEveElementList("GEM");
538 
539  for (Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion = iRegion + 2) {
540  int iStation = 1;
541  int iRing = 1;
542  int iLayer = 1;
543 
544  int carr[4] = {10, 11, 29, 30};
545  for (int i = 0; i < 4; ++i) {
546  int iChamber = carr[i];
547  int iRoll = 0;
548  try {
549  GEMDetId id(iRegion, iRing, iStation, iLayer, iChamber, iRoll);
550  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
551  if (shape) {
553  m_GEMElements->AddElement(shape);
554  gEve->AddToListTree(shape, true);
555  }
556  } catch (cms::Exception& e) {
557  fwLog(fwlog::kError) << "FWRPZViewGeomtery " << e << std::endl;
558  }
559  }
560  }
561 
562  AddElement(m_GEMElements);
564  }
565 
566  if (m_GEMElements) {
567  m_GEMElements->SetRnrState(show);
568  gEve->Redraw3D();
569  }
570 }

References FWViewGeometryList::addToCompound(), MillePedeFileConverter_cfg::e, fwLog, FWGeometry::getEveShape(), mps_fire::i, triggerObjects_cff::id, importNew(), fwlog::kError, kFWMuonEndcapLineColorIndex, m_GEMElements, FWViewGeometryList::m_geom, GEMDetId::maxRegionId, and GEMDetId::minRegionId.

Referenced by FWRPZView::setContext().

◆ showME0()

void FWRPZViewGeometry::showME0 ( bool  show)

Definition at line 572 of file FWRPZViewGeometry.cc.

572  {
573  if (!m_ME0Elements && show) {
574  m_ME0Elements = new TEveElementList("ME0");
575 
576  for (Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion = iRegion + 2) {
577  for (Int_t iLayer = 1; iLayer <= 6; ++iLayer) {
578  for (Int_t iChamber = 1; iChamber <= 18; ++iChamber) {
579  Int_t iRoll = 1;
580  ME0DetId id(iRegion, iLayer, iChamber, iRoll);
581  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
582  if (shape) {
584  m_ME0Elements->AddElement(shape);
585  gEve->AddToListTree(shape, true);
586  }
587  }
588  }
589  }
590 
591  AddElement(m_ME0Elements);
593  }
594  if (m_ME0Elements) {
595  m_ME0Elements->SetRnrState(show);
596  gEve->Redraw3D();
597  }
598 }

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), triggerObjects_cff::id, importNew(), kFWMuonEndcapLineColorIndex, FWViewGeometryList::m_geom, m_ME0Elements, ME0DetId::maxRegionId, and ME0DetId::minRegionId.

Referenced by FWRPZView::setContext().

◆ showPixelBarrel()

void FWRPZViewGeometry::showPixelBarrel ( bool  show)

Definition at line 367 of file FWRPZViewGeometry.cc.

367  {
368  if (!m_pixelBarrelElements && show) {
369  m_pixelBarrelElements = new TEveElementList("PixelBarrel");
370  AddElement(m_pixelBarrelElements);
371  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelBarrel);
372  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
373  TEveGeoShape* shape = m_geom->getEveShape(*id);
374  if (!shape)
375  return;
376  shape->SetTitle(Form("PixelBarrel %d", *id));
378  m_pixelBarrelElements->AddElement(shape);
379  }
381  }
382 
383  if (m_pixelBarrelElements) {
384  m_pixelBarrelElements->SetRnrState(show);
385  gEve->Redraw3D();
386  }
387 }

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), triggerObjects_cff::id, importNew(), kFWPixelBarrelColorIndex, FWViewGeometryList::m_geom, m_pixelBarrelElements, FWGeometry::PixelBarrel, and FWGeometry::Tracker.

Referenced by FWRPZView::setContext().

◆ showPixelEndcap()

void FWRPZViewGeometry::showPixelEndcap ( bool  show)

Definition at line 389 of file FWRPZViewGeometry.cc.

389  {
390  if (!m_pixelEndcapElements && show) {
391  m_pixelEndcapElements = new TEveElementList("PixelEndcap");
392 
393  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelEndcap);
394  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
395  TEveGeoShape* shape = m_geom->getEveShape(*id);
396  if (!shape)
397  return;
398  shape->SetTitle(Form("PixelEndCap %d", *id));
400  m_pixelEndcapElements->AddElement(shape);
401  }
402 
403  AddElement(m_pixelEndcapElements);
405  }
406 
407  if (m_pixelEndcapElements) {
408  m_pixelEndcapElements->SetRnrState(show);
409  gEve->Redraw3D();
410  }
411 }

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::getMatchedIds(), triggerObjects_cff::id, importNew(), kFWPixelEndcapColorIndex, FWViewGeometryList::m_geom, m_pixelEndcapElements, FWGeometry::PixelEndcap, and FWGeometry::Tracker.

Referenced by FWRPZView::setContext().

◆ showRpcEndcap()

void FWRPZViewGeometry::showRpcEndcap ( bool  show)

Definition at line 479 of file FWRPZViewGeometry.cc.

479  {
480  if (!m_rpcEndcapElements && show) {
481  m_rpcEndcapElements = new TEveElementList("RpcEndcap");
482 
483  std::vector<RPCDetId> ids;
484  int mxSt = m_geom->versionInfo().haveExtraDet("RE4") ? 4 : 3;
485  for (int region = -1; region <= 1; ++region) {
486  if (region == 0)
487  continue;
488  for (int ring = 2; ring <= 3; ++ring) {
489  for (int station = 1; station <= mxSt; ++station) {
490  int sector = 1;
491  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 1));
492  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 2));
493  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 3));
494  if (ring == 2 && station == 1) { // 2 layers in ring 2 station 1 up
495  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 1));
496  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 2));
497  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 3));
498  }
499  sector = 5;
500  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 1));
501  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 2));
502  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 3));
503 
504  if (ring == 2 && station == 1) { // 2 layers in ring 2 station 1 down
505  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 1));
506  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 2));
507  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 3));
508  }
509  }
510  }
511  }
512 
513  for (std::vector<RPCDetId>::iterator i = ids.begin(); i != ids.end(); ++i) {
514  TEveGeoShape* shape = m_geom->getEveShape(i->rawId());
515  if (!shape)
516  return;
518  m_rpcEndcapElements->AddElement(shape);
519  gEve->AddToListTree(shape, true);
520  }
521 
522  AddElement(m_rpcEndcapElements);
524  }
525 
526  if (m_rpcEndcapElements) {
527  m_rpcEndcapElements->SetRnrState(show);
528  gEve->Redraw3D();
529  }
530 }

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::VersionInfo::haveExtraDet(), mps_fire::i, importNew(), kFWMuonEndcapLineColorIndex, FWViewGeometryList::m_geom, m_rpcEndcapElements, HLT_FULL_cff::region, relativeConstraints::ring, relativeConstraints::station, and FWGeometry::versionInfo().

Referenced by FWRPZView::setContext().

◆ showTrackerBarrel()

void FWRPZViewGeometry::showTrackerBarrel ( bool  show)

Definition at line 413 of file FWRPZViewGeometry.cc.

413  {
414  if (!m_trackerBarrelElements && show) {
415  m_trackerBarrelElements = new TEveElementList("TrackerBarrel");
416 
417  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TIB);
418  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
419  TEveGeoShape* shape = m_geom->getEveShape(*id);
420  if (!shape)
421  return;
423  m_trackerBarrelElements->AddElement(shape);
424  }
426  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
427  TEveGeoShape* shape = m_geom->getEveShape(*id);
428  if (!shape)
429  return;
430  shape->SetTitle(Form("TrackerBarrel %d", *id));
432  m_trackerBarrelElements->AddElement(shape);
433  }
434 
435  AddElement(m_trackerBarrelElements);
437  }
438 
440  m_trackerBarrelElements->SetRnrState(show);
441  gEve->Redraw3D();
442  }
443 }

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

Referenced by FWRPZView::setContext().

◆ showTrackerEndcap()

void FWRPZViewGeometry::showTrackerEndcap ( bool  show)

Definition at line 445 of file FWRPZViewGeometry.cc.

445  {
446  if (!m_trackerEndcapElements && show) {
447  m_trackerEndcapElements = new TEveElementList("TrackerEndcap");
448 
449  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TID);
450  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
451  TEveGeoShape* shape = m_geom->getEveShape(*id);
453 
454  if (!shape)
455  return;
456  m_trackerEndcapElements->AddElement(shape);
457  }
459  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
460  TEveGeoShape* shape = m_geom->getEveShape(*id);
461  shape->SetTitle(Form("TrackerEndcap %d", *id));
462  if (!shape)
463  return;
465  m_trackerEndcapElements->AddElement(shape);
466  }
467 
468  AddElement(m_trackerEndcapElements);
470  }
471 
473  m_trackerEndcapElements->SetRnrState(show);
474  gEve->Redraw3D();
475  }
476 }

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

Referenced by FWRPZView::setContext().

Member Data Documentation

◆ m_GEMElements

TEveElementList* FWRPZViewGeometry::m_GEMElements
private

Definition at line 78 of file FWRPZViewGeometry.h.

Referenced by showGEM().

◆ m_ME0Elements

TEveElementList* FWRPZViewGeometry::m_ME0Elements
private

Definition at line 79 of file FWRPZViewGeometry.h.

Referenced by showME0().

◆ m_pixelBarrelElements

TEveElementList* FWRPZViewGeometry::m_pixelBarrelElements
private

Definition at line 73 of file FWRPZViewGeometry.h.

Referenced by showPixelBarrel().

◆ m_pixelEndcapElements

TEveElementList* FWRPZViewGeometry::m_pixelEndcapElements
private

Definition at line 74 of file FWRPZViewGeometry.h.

Referenced by showPixelEndcap().

◆ m_rhoPhiGeo

TEveElementList* FWRPZViewGeometry::m_rhoPhiGeo
private

Definition at line 70 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

◆ m_rhoZGeo

TEveElementList* FWRPZViewGeometry::m_rhoZGeo
private

Definition at line 71 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

◆ m_rpcEndcapElements

TEveElementList* FWRPZViewGeometry::m_rpcEndcapElements
private

Definition at line 77 of file FWRPZViewGeometry.h.

Referenced by showRpcEndcap().

◆ m_trackerBarrelElements

TEveElementList* FWRPZViewGeometry::m_trackerBarrelElements
private

Definition at line 75 of file FWRPZViewGeometry.h.

Referenced by showTrackerBarrel().

◆ m_trackerEndcapElements

TEveElementList* FWRPZViewGeometry::m_trackerEndcapElements
private

Definition at line 76 of file FWRPZViewGeometry.h.

Referenced by showTrackerEndcap().

FWRPZViewGeometry::m_rhoPhiGeo
TEveElementList * m_rhoPhiGeo
Definition: FWRPZViewGeometry.h:70
FWViewGeometryList::m_geom
const FWGeometry * m_geom
Definition: FWViewGeometryList.h:44
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
mps_fire.i
i
Definition: mps_fire.py:428
TwoPi
const double TwoPi
Definition: CosmicMuonParameters.h:19
FWGeometry::versionInfo
const VersionInfo & versionInfo() const
Definition: FWGeometry.h:150
FWGeometry::TID
Definition: FWGeometry.h:47
fireworks::Context::colorManager
FWColorManager * colorManager() const
Definition: Context.h:58
FWViewGeometryList::m_context
const fireworks::Context & m_context
Definition: FWViewGeometryList.h:43
kFWMuonBarrelLineColorIndex
Definition: FWColorManager.h:37
relativeConstraints.station
station
Definition: relativeConstraints.py:67
RPCDetId
Definition: RPCDetId.h:16
FWViewType::kRhoZ
Definition: FWViewType.h:33
FWGeometry::localToGlobal
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:500
FWRPZViewGeometry::estimateProjectionSizeDT
void estimateProjectionSizeDT(const FWGeometry::GeomDetInfo &info, float &, float &, float &, float &)
Definition: FWRPZViewGeometry.cc:273
FWGeometry::IdToInfoItr
std::vector< FWGeometry::GeomDetInfo >::const_iterator IdToInfoItr
Definition: FWGeometry.h:137
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
FWRPZViewGeometry::makeCaloOutlineRhoPhi
TEveElement * makeCaloOutlineRhoPhi()
Definition: FWRPZViewGeometry.cc:119
FWColorManager::geomColor
Color_t geomColor(FWGeomColorIndex) const
Definition: FWColorManager.cc:271
DDAxes::x
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
FWRPZViewGeometry::m_trackerBarrelElements
TEveElementList * m_trackerBarrelElements
Definition: FWRPZViewGeometry.h:75
FWRPZViewGeometry::estimateProjectionSize
void estimateProjectionSize(const float *, float &, float &, float &, float &)
Definition: FWRPZViewGeometry.cc:343
FWRPZViewGeometry::m_pixelEndcapElements
TEveElementList * m_pixelEndcapElements
Definition: FWRPZViewGeometry.h:74
FWRPZViewGeometry::m_GEMElements
TEveElementList * m_GEMElements
Definition: FWRPZViewGeometry.h:78
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
visDQMUpload.context
context
Definition: visDQMUpload.py:37
FWRPZViewGeometry::makeShape
TEveGeoShape * makeShape(double, double, double, double)
Definition: FWRPZViewGeometry.cc:245
FWRPZViewGeometry::makeMuonGeometryRhoPhi
TEveElement * makeMuonGeometryRhoPhi()
Definition: FWRPZViewGeometry.cc:146
fireworks::Context::caloZ2
static float caloZ2(bool offset=true)
Definition: Context.cc:185
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CSCDetId::minEndcapId
static int minEndcapId()
Definition: CSCDetId.h:234
FWGeometry::Tracker
Definition: FWGeometry.h:33
kFWPixelBarrelColorIndex
Definition: FWColorManager.h:33
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
FWGeometry::VersionInfo::haveExtraDet
bool haveExtraDet(const char *) const
Definition: FWGeometry.cc:535
FWRPZViewGeometry::m_rpcEndcapElements
TEveElementList * m_rpcEndcapElements
Definition: FWRPZViewGeometry.h:77
fireworks::Context::caloMaxEta
static double caloMaxEta()
Definition: Context.cc:191
FWGeometry::mapEnd
IdToInfoItr mapEnd() const
Definition: FWGeometry.h:141
DDAxes::rho
FWViewGeometryList::FWViewGeometryList
FWViewGeometryList(const fireworks::Context &context, bool projected=true)
Definition: FWViewGeometryList.cc:22
amptDefault_cfi.proj
proj
Definition: amptDefault_cfi.py:13
FWGeometry::isEmpty
bool isEmpty() const
Definition: FWGeometry.cc:31
kFWMuonEndcapLineColorIndex
Definition: FWColorManager.h:38
FWGeometry::TOB
Definition: FWGeometry.h:48
kFWTrackerEndcapColorIndex
Definition: FWColorManager.h:36
fireworks::Context::caloR2
static float caloR2(bool offset=true)
Definition: Context.cc:182
FWRPZViewGeometry::m_ME0Elements
TEveElementList * m_ME0Elements
Definition: FWRPZViewGeometry.h:79
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
FWRPZViewGeometry::importNew
void importNew(TEveElementList *x)
Definition: FWRPZViewGeometry.cc:602
GEMDetId
Definition: GEMDetId.h:18
CSCDetId
Definition: CSCDetId.h:26
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
FWRPZViewGeometry::m_rhoZGeo
TEveElementList * m_rhoZGeo
Definition: FWRPZViewGeometry.h:71
GEMDetId::minRegionId
static constexpr int32_t minRegionId
Definition: GEMDetId.h:20
ME0DetId
Definition: ME0DetId.h:16
CSCDetId::maxEndcapId
static int maxEndcapId()
Definition: CSCDetId.h:235
FWGeometry::TIB
Definition: FWGeometry.h:46
FWRPZViewGeometry::makeCaloOutlineRhoZ
TEveElement * makeCaloOutlineRhoZ()
Definition: FWRPZViewGeometry.cc:98
kFWPixelEndcapColorIndex
Definition: FWColorManager.h:34
GEMDetId::maxRegionId
static constexpr int32_t maxRegionId
Definition: GEMDetId.h:21
FWGeometry::TEC
Definition: FWGeometry.h:49
FWGeometry::PixelBarrel
Definition: FWGeometry.h:44
alignCSCRings.r
r
Definition: alignCSCRings.py:93
FWRPZViewGeometry::makeMuonGeometryRhoZ
TEveElement * makeMuonGeometryRhoZ()
Definition: FWRPZViewGeometry.cc:174
fireworks::Context::caloZ1
static float caloZ1(bool offset=true)
Definition: Context.cc:183
FWGeometry::getMatchedIds
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:254
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
FWRPZViewGeometry::m_trackerEndcapElements
TEveElementList * m_trackerEndcapElements
Definition: FWRPZViewGeometry.h:76
ME0DetId::minRegionId
static constexpr int minRegionId
Definition: ME0DetId.h:63
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
kFWTrackerBarrelColorIndex
Definition: FWColorManager.h:35
fwlog::kError
Definition: fwLog.h:35
FWRPZViewGeometry::m_pixelBarrelElements
TEveElementList * m_pixelBarrelElements
Definition: FWRPZViewGeometry.h:73
cms::Exception
Definition: Exception.h:70
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
DTChamberId
Definition: DTChamberId.h:14
fireworks
Definition: FWTauProxyBuilderBase.h:35
FWGeometry::PixelEndcap
Definition: FWGeometry.h:45
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
FWGeometry::getEveShape
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:324
fireworks::Context::caloR1
static float caloR1(bool offset=true)
Definition: Context.cc:180
FWViewGeometryList::m_colorComp
TEveCompound * m_colorComp[kFWGeomColorSize]
Definition: FWViewGeometryList.h:46
ME0DetId::maxRegionId
static constexpr int maxRegionId
Definition: ME0DetId.h:64
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
FWViewGeometryList::addToCompound
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
Definition: FWViewGeometryList.cc:48
FWGeometry::find
IdToInfoItr find(unsigned int) const
Definition: FWGeometry.cc:520