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

Definition at line 54 of file FWRPZViewGeometry.cc.

55  : FWViewGeometryList(context),
56 
57  m_rhoPhiGeo(nullptr),
58  m_rhoZGeo(nullptr),
59 
60  m_pixelBarrelElements(nullptr),
61  m_pixelEndcapElements(nullptr),
62  m_trackerBarrelElements(nullptr),
63  m_trackerEndcapElements(nullptr),
64  m_rpcEndcapElements(nullptr),
65  m_GEMElements(nullptr),
66  m_ME0Elements(nullptr) {
67  SetElementName("RPZGeomShared");
68 }
TEveElementList * m_pixelBarrelElements
TEveElementList * m_GEMElements
TEveElementList * m_rhoPhiGeo
FWViewGeometryList(const fireworks::Context &context, bool projected=true)
TEveElementList * m_rpcEndcapElements
TEveElementList * m_trackerBarrelElements
TEveElementList * m_pixelEndcapElements
TEveElementList * m_rhoZGeo
TEveElementList * m_ME0Elements
TEveElementList * m_trackerEndcapElements
FWRPZViewGeometry::~FWRPZViewGeometry ( )
override

Definition at line 75 of file FWRPZViewGeometry.cc.

References m_rhoPhiGeo, and m_rhoZGeo.

75  {
76  m_rhoPhiGeo->DecDenyDestroy();
77  m_rhoZGeo->DecDenyDestroy();
78 }
TEveElementList * m_rhoPhiGeo
TEveElementList * m_rhoZGeo
FWRPZViewGeometry::FWRPZViewGeometry ( const FWRPZViewGeometry )
private

Member Function Documentation

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

Definition at line 342 of file FWRPZViewGeometry.cc.

References rho, and mathSSE::sqrt().

Referenced by estimateProjectionSizeDT().

343  {
344  double rho = sqrt(global[0] * global[0] + global[1] * global[1]);
345  if (min_rho > rho)
346  min_rho = rho;
347  if (max_rho < rho)
348  max_rho = rho;
349  if (min_z > global[2])
350  min_z = global[2];
351  if (max_z < global[2])
352  max_z = global[2];
353 }
T sqrt(T t)
Definition: SSEVec.h:19
void FWRPZViewGeometry::estimateProjectionSizeCSC ( const FWGeometry::GeomDetInfo info,
float &  ,
float &  ,
float &  ,
float &   
)
private
void FWRPZViewGeometry::estimateProjectionSizeDT ( const FWGeometry::GeomDetInfo info,
float &  min_rho,
float &  max_rho,
float &  min_z,
float &  max_z 
)
private

Definition at line 272 of file FWRPZViewGeometry.cc.

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

Referenced by makeMuonGeometryRhoZ().

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

Definition at line 608 of file FWRPZViewGeometry.cc.

References amptDefault_cfi::proj.

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

608  {
609  TEveProjected* proj = *BeginProjecteds();
610  proj->GetManager()->SubImportElements(x, proj->GetProjectedAsElement());
611 }
void FWRPZViewGeometry::initStdGeoElements ( const FWViewType::EType  id)

Definition at line 82 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

82  {
83  if (m_geom->isEmpty())
84  return;
85 
86  if (type == FWViewType::kRhoZ) {
87  AddElement(makeMuonGeometryRhoZ());
88  AddElement(makeCaloOutlineRhoZ());
89  } else {
90  AddElement(makeMuonGeometryRhoPhi());
91  AddElement(makeCaloOutlineRhoPhi());
92  }
93 }
type
Definition: HCALResponse.h:21
TEveElement * makeCaloOutlineRhoPhi()
TEveElement * makeMuonGeometryRhoPhi()
const FWGeometry * m_geom
TEveElement * makeCaloOutlineRhoZ()
TEveElement * makeMuonGeometryRhoZ()
bool isEmpty() const
Definition: FWGeometry.cc:27
TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoPhi ( )
private

Definition at line 118 of file FWRPZViewGeometry.cc.

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().

118  {
119  TEveStraightLineSet* el = new TEveStraightLineSet("TrackerRhoPhi");
121 
123  const unsigned int nSegments = 100;
124  const double r = m_context.caloR1();
125  for (unsigned int i = 1; i <= nSegments; ++i)
126  el->AddLine(r * sin(TMath::TwoPi() / nSegments * (i - 1)),
127  r * cos(TMath::TwoPi() / nSegments * (i - 1)),
128  0,
129  r * sin(TMath::TwoPi() / nSegments * i),
130  r * cos(TMath::TwoPi() / nSegments * i),
131  0);
132 
133  TEvePointSet* ref = new TEvePointSet("reference");
134  ref->SetTitle("(0,0,0)");
135  ref->SetMarkerStyle(4);
136  ref->SetMarkerColor(kWhite);
137  ref->SetNextPoint(0., 0., 0.);
138  el->AddElement(ref);
139 
140  return el;
141 }
const double TwoPi
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
FWColorManager * colorManager() const
Definition: Context.h:58
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static float caloR1(bool offset=true)
Definition: Context.cc:180
Color_t geomColor(FWGeomColorIndex) const
const fireworks::Context & m_context
TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoZ ( )
private

Definition at line 97 of file FWRPZViewGeometry.cc.

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().

97  {
98  using namespace fireworks;
99 
100  float ri = m_context.caloZ2() * tan(2 * atan(exp(-m_context.caloMaxEta())));
101 
102  TEveStraightLineSet* el = new TEveStraightLineSet("TrackerRhoZoutline");
103  el->SetPickable(kFALSE);
105 
106  el->AddLine(0, m_context.caloR1(), -m_context.caloZ1(), 0, m_context.caloR1(), m_context.caloZ1());
107  el->AddLine(0, -m_context.caloR1(), m_context.caloZ1(), 0, -m_context.caloR1(), -m_context.caloZ1());
108 
109  el->AddLine(0, -m_context.caloR2(), m_context.caloZ2(), 0, -ri, m_context.caloZ2());
110  el->AddLine(0, ri, m_context.caloZ2(), 0, m_context.caloR2(), m_context.caloZ2());
111 
112  el->AddLine(0, -m_context.caloR2(), -m_context.caloZ2(), 0, -ri, -m_context.caloZ2());
113  el->AddLine(0, ri, -m_context.caloZ2(), 0, m_context.caloR2(), -m_context.caloZ2());
114 
115  return el;
116 }
static float caloZ2(bool offset=true)
Definition: Context.cc:185
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
static float caloR2(bool offset=true)
Definition: Context.cc:182
static float caloR1(bool offset=true)
Definition: Context.cc:180
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static double caloMaxEta()
Definition: Context.cc:191
static float caloZ1(bool offset=true)
Definition: Context.cc:183
const fireworks::Context & m_context
TEveElement * FWRPZViewGeometry::makeMuonGeometryRhoPhi ( void  )
private

Definition at line 145 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

145  {
146  Int_t iWheel = 0;
147 
148  // rho-phi view
149  TEveCompound* container = new TEveCompound("MuonRhoPhi");
150 
151  for (Int_t iStation = 1; iStation <= 4; ++iStation) {
152  for (Int_t iSector = 1; iSector <= 14; ++iSector) {
153  if (iStation < 4 && iSector > 12)
154  continue;
155  DTChamberId id(iWheel, iStation, iSector);
156  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
157  if (shape) {
158  shape->SetMainColor(m_colorComp[kFWMuonBarrelLineColorIndex]->GetMainColor());
160  container->AddElement(shape);
161  }
162  }
163  }
164  return container;
165 }
TEveCompound * m_colorComp[kFWGeomColorSize]
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
const FWGeometry * m_geom
TEveElement * FWRPZViewGeometry::makeMuonGeometryRhoZ ( void  )
private

Definition at line 173 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

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

Definition at line 244 of file FWRPZViewGeometry.cc.

References OrderedSet::t.

Referenced by makeMuonGeometryRhoZ().

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

Definition at line 533 of file FWRPZViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), FWGeometry::VersionInfo::haveExtraDet(), triggerObjects_cff::id, importNew(), kFWMuonEndcapLineColorIndex, m_GEMElements, FWViewGeometryList::m_geom, GEMDetId::maxLayerId, GEMDetId::maxRegionId, GEMDetId::minLayerId, GEMDetId::minRegionId, GEMDetId::minRollId, GEMDetId::minStationId, and FWGeometry::versionInfo().

Referenced by FWRPZView::setContext().

533  {
534  // hardcoded gem and me0; need to find better way for different gem geometries
535  if (!m_GEMElements && show) {
536  m_GEMElements = new TEveElementList("GEM");
537 
538  for (Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion = iRegion + 2) {
539  int mxSt = m_geom->versionInfo().haveExtraDet("GE2") ? 3 : 1;
540 
541  for (Int_t iStation = GEMDetId::minStationId; iStation <= mxSt; ++iStation) {
542  Int_t iRing = 1;
543  for (Int_t iLayer = GEMDetId::minLayerId; iLayer <= GEMDetId::maxLayerId; ++iLayer) {
544  int maxChamber = 36;
545  if (iStation >= 2)
546  maxChamber = 18;
547 
548  for (Int_t iChamber = 1; iChamber <= maxChamber; ++iChamber) {
549  int maxRoll = iChamber % 2 ? 9 : 10;
550  if (iStation == 2)
551  maxRoll = 8;
552  if (iStation == 3)
553  maxRoll = 12;
554 
555  for (Int_t iRoll = GEMDetId::minRollId; iRoll <= maxRoll; ++iRoll) {
556  GEMDetId id(iRegion, iRing, iStation, iLayer, iChamber, iRoll);
557  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
558  if (shape) {
560  m_GEMElements->AddElement(shape);
561  gEve->AddToListTree(shape, true);
562  }
563  }
564  }
565  }
566  }
567  }
568 
569  AddElement(m_GEMElements);
571  }
572  if (m_GEMElements) {
573  m_GEMElements->SetRnrState(show);
574  gEve->Redraw3D();
575  }
576 }
TEveElementList * m_GEMElements
static int32_t minRegionId
Definition: GEMDetId.h:19
const VersionInfo & versionInfo() const
Definition: FWGeometry.h:150
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
bool haveExtraDet(const char *) const
Definition: FWGeometry.cc:531
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
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 FWRPZViewGeometry::showME0 ( bool  show)

Definition at line 578 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

578  {
579  if (!m_ME0Elements && show) {
580  m_ME0Elements = new TEveElementList("ME0");
581 
582  for (Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion = iRegion + 2) {
583  for (Int_t iLayer = 1; iLayer <= 6; ++iLayer) {
584  for (Int_t iChamber = 1; iChamber <= 18; ++iChamber) {
585  Int_t iRoll = 1;
586  ME0DetId id(iRegion, iLayer, iChamber, iRoll);
587  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
588  if (shape) {
590  m_ME0Elements->AddElement(shape);
591  gEve->AddToListTree(shape, true);
592  }
593  }
594  }
595  }
596 
597  AddElement(m_ME0Elements);
599  }
600  if (m_ME0Elements) {
601  m_ME0Elements->SetRnrState(show);
602  gEve->Redraw3D();
603  }
604 }
static const int maxRegionId
Definition: ME0DetId.h:64
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
static const int minRegionId
Definition: ME0DetId.h:63
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
const FWGeometry * m_geom
TEveElementList * m_ME0Elements
void FWRPZViewGeometry::showPixelBarrel ( bool  show)

Definition at line 366 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

366  {
367  if (!m_pixelBarrelElements && show) {
368  m_pixelBarrelElements = new TEveElementList("PixelBarrel");
369  AddElement(m_pixelBarrelElements);
370  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelBarrel);
371  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
372  TEveGeoShape* shape = m_geom->getEveShape(*id);
373  if (!shape)
374  return;
375  shape->SetTitle(Form("PixelBarrel %d", *id));
377  m_pixelBarrelElements->AddElement(shape);
378  }
380  }
381 
382  if (m_pixelBarrelElements) {
383  m_pixelBarrelElements->SetRnrState(show);
384  gEve->Redraw3D();
385  }
386 }
TEveElementList * m_pixelBarrelElements
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:250
void FWRPZViewGeometry::showPixelEndcap ( bool  show)

Definition at line 388 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

388  {
389  if (!m_pixelEndcapElements && show) {
390  m_pixelEndcapElements = new TEveElementList("PixelEndcap");
391 
392  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::PixelEndcap);
393  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
394  TEveGeoShape* shape = m_geom->getEveShape(*id);
395  if (!shape)
396  return;
397  shape->SetTitle(Form("PixelEndCap %d", *id));
399  m_pixelEndcapElements->AddElement(shape);
400  }
401 
402  AddElement(m_pixelEndcapElements);
404  }
405 
406  if (m_pixelEndcapElements) {
407  m_pixelEndcapElements->SetRnrState(show);
408  gEve->Redraw3D();
409  }
410 }
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
TEveElementList * m_pixelEndcapElements
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:250
void FWRPZViewGeometry::showRpcEndcap ( bool  show)

Definition at line 478 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

478  {
479  if (!m_rpcEndcapElements && show) {
480  m_rpcEndcapElements = new TEveElementList("RpcEndcap");
481 
482  std::vector<RPCDetId> ids;
483  int mxSt = m_geom->versionInfo().haveExtraDet("RE4") ? 4 : 3;
484  for (int region = -1; region <= 1; ++region) {
485  if (region == 0)
486  continue;
487  for (int ring = 2; ring <= 3; ++ring) {
488  for (int station = 1; station <= mxSt; ++station) {
489  int sector = 1;
490  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 1));
491  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 2));
492  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 3));
493  if (ring == 2 && station == 1) { // 2 layers in ring 2 station 1 up
494  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 1));
495  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 2));
496  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 3));
497  }
498  sector = 5;
499  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 1));
500  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 2));
501  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 3));
502 
503  if (ring == 2 && station == 1) { // 2 layers in ring 2 station 1 down
504  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 1));
505  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 2));
506  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 3));
507  }
508  }
509  }
510  }
511 
512  for (std::vector<RPCDetId>::iterator i = ids.begin(); i != ids.end(); ++i) {
513  TEveGeoShape* shape = m_geom->getEveShape(i->rawId());
514  if (!shape)
515  return;
517  m_rpcEndcapElements->AddElement(shape);
518  gEve->AddToListTree(shape, true);
519  }
520 
521  AddElement(m_rpcEndcapElements);
523  }
524 
525  if (m_rpcEndcapElements) {
526  m_rpcEndcapElements->SetRnrState(show);
527  gEve->Redraw3D();
528  }
529 }
const VersionInfo & versionInfo() const
Definition: FWGeometry.h:150
TEveElementList * m_rpcEndcapElements
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
bool haveExtraDet(const char *) const
Definition: FWGeometry.cc:531
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
const FWGeometry * m_geom
void FWRPZViewGeometry::showTrackerBarrel ( bool  show)

Definition at line 412 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

412  {
413  if (!m_trackerBarrelElements && show) {
414  m_trackerBarrelElements = new TEveElementList("TrackerBarrel");
415 
416  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TIB);
417  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
418  TEveGeoShape* shape = m_geom->getEveShape(*id);
419  if (!shape)
420  return;
422  m_trackerBarrelElements->AddElement(shape);
423  }
425  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
426  TEveGeoShape* shape = m_geom->getEveShape(*id);
427  if (!shape)
428  return;
429  shape->SetTitle(Form("TrackerBarrel %d", *id));
431  m_trackerBarrelElements->AddElement(shape);
432  }
433 
434  AddElement(m_trackerBarrelElements);
436  }
437 
439  m_trackerBarrelElements->SetRnrState(show);
440  gEve->Redraw3D();
441  }
442 }
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveElementList * m_trackerBarrelElements
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:250
void FWRPZViewGeometry::showTrackerEndcap ( bool  show)

Definition at line 444 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

444  {
445  if (!m_trackerEndcapElements && show) {
446  m_trackerEndcapElements = new TEveElementList("TrackerEndcap");
447 
448  std::vector<unsigned int> ids = m_geom->getMatchedIds(FWGeometry::Tracker, FWGeometry::TID);
449  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
450  TEveGeoShape* shape = m_geom->getEveShape(*id);
452 
453  if (!shape)
454  return;
455  m_trackerEndcapElements->AddElement(shape);
456  }
458  for (std::vector<unsigned int>::const_iterator id = ids.begin(); id != ids.end(); ++id) {
459  TEveGeoShape* shape = m_geom->getEveShape(*id);
460  shape->SetTitle(Form("TrackerEndcap %d", *id));
461  if (!shape)
462  return;
464  m_trackerEndcapElements->AddElement(shape);
465  }
466 
467  AddElement(m_trackerEndcapElements);
469  }
470 
472  m_trackerEndcapElements->SetRnrState(show);
473  gEve->Redraw3D();
474  }
475 }
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
const FWGeometry * m_geom
TEveElementList * m_trackerEndcapElements
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:250

Member Data Documentation

TEveElementList* FWRPZViewGeometry::m_GEMElements
private

Definition at line 78 of file FWRPZViewGeometry.h.

Referenced by showGEM().

TEveElementList* FWRPZViewGeometry::m_ME0Elements
private

Definition at line 79 of file FWRPZViewGeometry.h.

Referenced by showME0().

TEveElementList* FWRPZViewGeometry::m_pixelBarrelElements
private

Definition at line 73 of file FWRPZViewGeometry.h.

Referenced by showPixelBarrel().

TEveElementList* FWRPZViewGeometry::m_pixelEndcapElements
private

Definition at line 74 of file FWRPZViewGeometry.h.

Referenced by showPixelEndcap().

TEveElementList* FWRPZViewGeometry::m_rhoPhiGeo
private

Definition at line 70 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

TEveElementList* FWRPZViewGeometry::m_rhoZGeo
private

Definition at line 71 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

TEveElementList* FWRPZViewGeometry::m_rpcEndcapElements
private

Definition at line 77 of file FWRPZViewGeometry.h.

Referenced by showRpcEndcap().

TEveElementList* FWRPZViewGeometry::m_trackerBarrelElements
private

Definition at line 75 of file FWRPZViewGeometry.h.

Referenced by showTrackerBarrel().

TEveElementList* FWRPZViewGeometry::m_trackerEndcapElements
private

Definition at line 76 of file FWRPZViewGeometry.h.

Referenced by showTrackerEndcap().