CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 showPixelBarrel (bool)
 
void showPixelEndcap (bool)
 
void showTrackerBarrel (bool)
 
void showTrackerEndcap (bool)
 
virtual ~FWRPZViewGeometry ()
 
- Public Member Functions inherited from FWViewGeometryList
 FWViewGeometryList (const fireworks::Context &context, bool projected=true)
 
void updateColors ()
 
void updateTransparency (bool projectedType)
 
virtual ~FWViewGeometryList ()
 

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_pixelBarrelElements
 
TEveElementList * m_pixelEndcapElements
 
TEveElementList * m_rhoPhiGeo
 
TEveElementList * m_rhoZGeo
 
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 51 of file FWRPZViewGeometry.cc.

51  :
52  FWViewGeometryList(context),
53 
54  m_rhoPhiGeo(0),
55  m_rhoZGeo(0),
56 
61 {
62  SetElementName("RPZGeomShared");
63 }
TEveElementList * m_pixelBarrelElements
TEveElementList * m_rhoPhiGeo
FWViewGeometryList(const fireworks::Context &context, bool projected=true)
TEveElementList * m_trackerBarrelElements
TEveElementList * m_pixelEndcapElements
TEveElementList * m_rhoZGeo
TEveElementList * m_trackerEndcapElements
FWRPZViewGeometry::~FWRPZViewGeometry ( )
virtual

Definition at line 70 of file FWRPZViewGeometry.cc.

References m_rhoPhiGeo, and m_rhoZGeo.

71 {
72  m_rhoPhiGeo->DecDenyDestroy();
73  m_rhoZGeo->DecDenyDestroy();
74 }
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 368 of file FWRPZViewGeometry.cc.

References rho, and mathSSE::sqrt().

Referenced by estimateProjectionSizeCSC(), and estimateProjectionSizeDT().

370 {
371  double rho = sqrt(global[0] *global[0]+global[1] *global[1]);
372  if ( min_rho > rho ) min_rho = rho;
373  if ( max_rho < rho ) max_rho = rho;
374  if ( min_z > global[2] ) min_z = global[2];
375  if ( max_z < global[2] ) max_z = global[2];
376 }
Definition: DDAxes.h:10
T sqrt(T t)
Definition: SSEVec.h:48
void FWRPZViewGeometry::estimateProjectionSizeCSC ( const FWGeometry::GeomDetInfo info,
float &  min_rho,
float &  max_rho,
float &  min_z,
float &  max_z 
)
private

Definition at line 340 of file FWRPZViewGeometry.cc.

References estimateProjectionSize(), FWGeometry::localToGlobal(), FWViewGeometryList::m_geom, FWGeometry::GeomDetInfo::shape, and mathSSE::sqrt().

Referenced by makeMuonGeometryRhoZ().

342 {
343  float local[3], global[3];
344 
345  float dX = info.shape[2] - info.shape[1];
346  float dY = info.shape[4];
347  float ddY = sqrt( 4 * dY * dY + dX * dX ) * 0.5;
348  float dZ = info.shape[3];
349 
350  local[0] = info.shape[2]; local[1] = ddY; local[2] = -dZ;
351  m_geom->localToGlobal( info, local, global );
352  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
353 
354  local[0] = info.shape[1]; local[1] = -ddY; local[2] = -dZ;
355  m_geom->localToGlobal( info, local, global );
356  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
357 
358  local[0] = info.shape[1]; local[1] = -ddY; local[2] = dZ;
359  m_geom->localToGlobal( info, local, global );
360  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
361 
362  local[0] = info.shape[2]; local[1] = ddY; local[2] = dZ;
363  m_geom->localToGlobal( info, local, global );
364  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
365 }
void estimateProjectionSize(const float *, float &, float &, float &, float &)
T sqrt(T t)
Definition: SSEVec.h:48
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:325
const FWGeometry * m_geom
void FWRPZViewGeometry::estimateProjectionSizeDT ( const FWGeometry::GeomDetInfo info,
float &  min_rho,
float &  max_rho,
float &  min_z,
float &  max_z 
)
private

Definition at line 288 of file FWRPZViewGeometry.cc.

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

Referenced by makeMuonGeometryRhoZ().

290 {
291  // we will test 5 points on both sides ( +/- z)
292  float local[3], global[3];
293 
294  float dX = info.shape[1];
295  float dY = info.shape[2];
296  float dZ = info.shape[3];
297 
298  local[0] = 0; local[1] = 0; local[2] = dZ;
299  m_geom->localToGlobal( info, local, global );
300  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
301 
302  local[0] = dX; local[1] = dY; 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; local[1] = dY; local[2] = dZ;
307  m_geom->localToGlobal( info, local, global );
308  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
309 
310  local[0] = dX; local[1] = -dY; local[2] = dZ;
311  m_geom->localToGlobal( info, local, global );
312  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
313 
314  local[0] = -dX; local[1] = -dY; 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] = 0; local[1] = 0; local[2] = -dZ;
319  m_geom->localToGlobal( info, local, global );
320  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
321 
322  local[0] = dX; local[1] = dY; local[2] = -dZ;
323  m_geom->localToGlobal( info, local, global );
324  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
325 
326  local[0] = -dX; local[1] = dY; 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; local[1] = -dY; local[2] = -dZ;
331  m_geom->localToGlobal( info, local, global );
332  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
333 
334  local[0] = -dX; local[1] = -dY; local[2] = -dZ;
335  m_geom->localToGlobal( info, local, global );
336  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
337 }
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:325
const FWGeometry * m_geom
void FWRPZViewGeometry::importNew ( TEveElementList *  x)
private

Definition at line 525 of file FWRPZViewGeometry.cc.

References trackerHitRTTI::proj.

Referenced by showPixelBarrel(), showPixelEndcap(), showTrackerBarrel(), and showTrackerEndcap().

526 {
527  TEveProjected* proj = *BeginProjecteds();
528  proj->GetManager()->SubImportElements(x, proj->GetProjectedAsElement());
529 
530 }
Definition: DDAxes.h:10
void FWRPZViewGeometry::initStdGeoElements ( const FWViewType::EType  id)

Definition at line 79 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

80 {
81  assert(m_geom != 0);
82 
83  if (type == FWViewType::kRhoZ)
84  {
85  AddElement(makeMuonGeometryRhoZ());
86  AddElement(makeCaloOutlineRhoZ());
87  }
88  else
89  {
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()
TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoPhi ( )
private

Definition at line 122 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

123 {
124  TEveStraightLineSet* el = new TEveStraightLineSet( "TrackerRhoPhi" );
126 
128  const unsigned int nSegments = 100;
129  const double r = m_context.caloR1();
130  for ( unsigned int i = 1; i <= nSegments; ++i )
131  el->AddLine(r*sin(TMath::TwoPi()/nSegments*(i-1)), r*cos(TMath::TwoPi()/nSegments*(i-1)), 0,
132  r*sin(TMath::TwoPi()/nSegments*i), r*cos(TMath::TwoPi()/nSegments*i), 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 }
const double TwoPi
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
FWColorManager * colorManager() const
Definition: Context.h:65
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:209
Color_t geomColor(FWGeomColorIndex) const
const fireworks::Context & m_context
TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoZ ( )
private

Definition at line 99 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

100 {
101  using namespace fireworks;
102 
103  float ri = m_context.caloZ2()*tan(2*atan(exp(-m_context.caloMaxEta())));
104 
105  TEveStraightLineSet* el = new TEveStraightLineSet( "TrackerRhoZoutline" );
106  el->SetPickable(kFALSE);
108 
109  el->AddLine(0, m_context.caloR1(), -m_context.caloZ1(), 0, m_context.caloR1(), m_context.caloZ1());
110  el->AddLine(0, -m_context.caloR1(), m_context.caloZ1(), 0, -m_context.caloR1(), -m_context.caloZ1());
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  el->AddLine(0, -m_context.caloR2(), -m_context.caloZ2(), 0, -ri, -m_context.caloZ2());
116  el->AddLine(0, ri, -m_context.caloZ2(), 0, m_context.caloR2(), -m_context.caloZ2());
117 
118  return el;
119 }
static float caloZ2(bool offset=true)
Definition: Context.cc:224
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
static float caloR2(bool offset=true)
Definition: Context.cc:214
static float caloR1(bool offset=true)
Definition: Context.cc:209
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static double caloMaxEta()
Definition: Context.cc:239
static float caloZ1(bool offset=true)
Definition: Context.cc:219
const fireworks::Context & m_context
TEveElement * FWRPZViewGeometry::makeMuonGeometryRhoPhi ( void  )
private

Definition at line 147 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

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

Definition at line 176 of file FWRPZViewGeometry.cc.

References FWViewGeometryList::addToCompound(), estimateProjectionSizeCSC(), estimateProjectionSizeDT(), FWGeometry::find(), kFWMuonBarrelLineColorIndex, kFWMuonEndcapLineColorIndex, FWViewGeometryList::m_geom, makeShape(), DetId::rawId(), and relval_parameters_module::step.

Referenced by initStdGeoElements().

177 {
178  TEveElementList* container = new TEveElementList( "MuonRhoZ" );
179 
180  {
181  TEveCompound* dtContainer = new TEveCompound( "DT" );
182  for( Int_t iWheel = -2; iWheel <= 2; ++iWheel )
183  {
184  for( Int_t iStation = 1; iStation <= 4; ++iStation )
185  {
186  float min_rho(1000), max_rho(0), min_z(2000), max_z(-2000);
187 
188  // This will give us a quarter of DTs
189  // which is enough for our projection
190  for( Int_t iSector = 1; iSector <= 4; ++iSector )
191  {
192  DTChamberId id( iWheel, iStation, iSector );
193  unsigned int rawid = id.rawId();
194  FWGeometry::IdToInfoItr det = m_geom->find( rawid );
195  estimateProjectionSizeDT( *det, min_rho, max_rho, min_z, max_z );
196  }
197  if ( min_rho > max_rho || min_z > max_z ) continue;
198  TEveElement* se = makeShape( min_rho, max_rho, min_z, max_z );
200  dtContainer->AddElement(se);
201  se = makeShape( -max_rho, -min_rho, min_z, max_z );
203  dtContainer->AddElement(se);
204  }
205  }
206 
207  container->AddElement( dtContainer );
208  }
209  {
210  TEveCompound* cscContainer = new TEveCompound( "CSC" );
211 
212  Int_t maxChambers = 36;
213  Int_t step = 9;
214  Int_t iLayer = 0; // chamber
215  for( Int_t iEndcap = 1; iEndcap <= 2; ++iEndcap ) // 1=forward (+Z), 2=backward(-Z)
216  {
217  // Actual CSC geometry:
218  // Station 1 has 4 rings with 36 chambers in each
219  // Station 2: ring 1 has 18 chambers, ring 2 has 36 chambers
220  // Station 3: ring 1 has 18 chambers, ring 2 has 36 chambers
221  // Station 4: ring 1 has 18 chambers
222  for( Int_t iStation = 1; iStation <= 4; ++iStation )
223  {
224  for( Int_t iRing = 1; iRing <= 4; ++iRing )
225  {
226  if( iStation > 1 && iRing > 2 ) continue;
227  if( iStation > 3 && iRing > 1 ) continue;
228  float min_rho(1000), max_rho(0), min_z(2000), max_z(-2000);
229  ( iRing == 1 && iStation > 1 ) ? ( maxChambers = 18 ) : ( maxChambers = 36 );
230  ( iRing == 1 && iStation > 1 ) ? ( step = 5 ) : ( step = 18 );
231 
232  // Skip most of the chambers since they will project
233  // the same way as the two top ones and the two bottom ones
234  for( Int_t iChamber = step; iChamber <= maxChambers; iChamber += step )
235  {
236  CSCDetId id( iEndcap, iStation, iRing, iChamber, iLayer );
237  FWGeometry::IdToInfoItr det = m_geom->find( id.rawId() );
238  estimateProjectionSizeCSC( *det, min_rho, max_rho, min_z, max_z );
239 
240  // and a chamber next to it
241  ++iChamber;
242  CSCDetId nextid( iEndcap, iStation, iRing, iChamber, iLayer );
243  det = m_geom->find( nextid.rawId() );
244  estimateProjectionSizeCSC( *det, min_rho, max_rho, min_z, max_z );
245  }
246  if ( min_rho > max_rho || min_z > max_z ) continue;
247 
248  TEveElement* se = makeShape( min_rho, max_rho, min_z, max_z);
250  cscContainer->AddElement(se);
251 
252  se = makeShape( -max_rho, -min_rho, min_z, max_z );
254  cscContainer->AddElement(se);
255  }
256  }
257  }
258  container->AddElement( cscContainer );
259  }
260  return container;
261 }
void estimateProjectionSizeDT(const FWGeometry::GeomDetInfo &info, float &, float &, float &, float &)
IdToInfoItr find(unsigned int) const
Definition: FWGeometry.cc:355
void estimateProjectionSizeCSC(const FWGeometry::GeomDetInfo &info, float &, float &, float &, float &)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
TEveGeoShape * makeShape(double, double, double, double)
const FWGeometry * m_geom
std::vector< FWGeometry::GeomDetInfo >::const_iterator IdToInfoItr
Definition: FWGeometry.h:96
TEveGeoShape * FWRPZViewGeometry::makeShape ( double  min_rho,
double  max_rho,
double  min_z,
double  max_z 
)
private

Definition at line 266 of file FWRPZViewGeometry.cc.

References lumiQTWidget::t.

Referenced by makeMuonGeometryRhoZ().

267 {
268  TEveTrans t;
269  t(1,1) = 1; t(1,2) = 0; t(1,3) = 0;
270  t(2,1) = 0; t(2,2) = 1; t(2,3) = 0;
271  t(3,1) = 0; t(3,2) = 0; t(3,3) = 1;
272  t(1,4) = 0; t(2,4) = (min_rho+max_rho)/2; t(3,4) = (min_z+max_z)/2;
273 
274  TEveGeoShape* shape = new TEveGeoShape;
275  shape->SetTransMatrix(t.Array());
276 
277  shape->SetRnrSelf(kTRUE);
278  shape->SetRnrChildren(kTRUE);
279  TGeoBBox* box = new TGeoBBox( 0, (max_rho-min_rho)/2, (max_z-min_z)/2 );
280  shape->SetShape( box );
281 
282  return shape;
283 }
const FWRPZViewGeometry& FWRPZViewGeometry::operator= ( const FWRPZViewGeometry )
private
void FWRPZViewGeometry::showPixelBarrel ( bool  show)

Definition at line 395 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

396 {
397  if( !m_pixelBarrelElements && show )
398  {
399  m_pixelBarrelElements = new TEveElementList("PixelBarrel");
400  AddElement(m_pixelBarrelElements);
401  std::vector<unsigned int> ids = m_geom->getMatchedIds( FWGeometry::Tracker, FWGeometry::PixelBarrel );
402  for( std::vector<unsigned int>::const_iterator id = ids.begin();
403  id != ids.end(); ++id )
404  {
405  TEveGeoShape* shape = m_geom->getEveShape( *id );
406  shape->SetTitle(Form("PixelBarrel %d",*id));
408  m_pixelBarrelElements->AddElement( shape );
409  }
411  }
412 
414  {
415  m_pixelBarrelElements->SetRnrState(show);
416  gEve->Redraw3D();
417  }
418 }
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:250
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:194
void FWRPZViewGeometry::showPixelEndcap ( bool  show)

Definition at line 421 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

422 {
423  if( !m_pixelEndcapElements && show )
424  {
425  m_pixelEndcapElements = new TEveElementList("PixelEndcap");
426 
427  std::vector<unsigned int> ids = m_geom->getMatchedIds( FWGeometry::Tracker, FWGeometry::PixelEndcap );
428  for( std::vector<unsigned int>::const_iterator id = ids.begin();
429  id != ids.end(); ++id )
430  {
431  TEveGeoShape* shape = m_geom->getEveShape( *id );
432 
433  shape->SetTitle(Form("PixelEndCap %d",*id));
435  m_pixelEndcapElements->AddElement( shape );
436  }
437 
438  AddElement(m_pixelEndcapElements);
440  }
441 
443  {
444  m_pixelEndcapElements->SetRnrState(show);
445  gEve->Redraw3D();
446  }
447 }
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:250
TEveElementList * m_pixelEndcapElements
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:194
void FWRPZViewGeometry::showTrackerBarrel ( bool  show)

Definition at line 451 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

452 {
453  if( !m_trackerBarrelElements && show )
454  {
455  m_trackerBarrelElements = new TEveElementList("TrackerBarrel");
456 
457  std::vector<unsigned int> ids = m_geom->getMatchedIds( FWGeometry::Tracker, FWGeometry::TIB );
458  for( std::vector<unsigned int>::const_iterator id = ids.begin();
459  id != ids.end(); ++id )
460  {
461  TEveGeoShape* shape = m_geom->getEveShape( *id );
463  m_trackerBarrelElements->AddElement( shape );
464  }
466  for( std::vector<unsigned int>::const_iterator id = ids.begin();
467  id != ids.end(); ++id )
468  {
469  TEveGeoShape* shape = m_geom->getEveShape( *id );
470 
471  shape->SetTitle(Form("TrackerBarrel %d",*id));
473  m_trackerBarrelElements->AddElement( shape );
474  }
475 
476  AddElement(m_trackerBarrelElements);
478  }
479 
481  {
482  m_trackerBarrelElements->SetRnrState(show);
483  gEve->Redraw3D();
484  }
485 }
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:250
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:194
void FWRPZViewGeometry::showTrackerEndcap ( bool  show)

Definition at line 488 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

489 {
490  if( !m_trackerEndcapElements && show )
491  {
492  m_trackerEndcapElements = new TEveElementList("TrackerEndcap");
493 
494  std::vector<unsigned int> ids = m_geom->getMatchedIds( FWGeometry::Tracker, FWGeometry::TID );
495  for( std::vector<unsigned int>::const_iterator id = ids.begin();
496  id != ids.end(); ++id )
497  {
498  TEveGeoShape* shape = m_geom->getEveShape( *id );
500  m_trackerEndcapElements->AddElement( shape );
501  }
503  for( std::vector<unsigned int>::const_iterator id = ids.begin();
504  id != ids.end(); ++id )
505  {
506  TEveGeoShape* shape = m_geom->getEveShape( *id );
507 
508  shape->SetTitle(Form("TrackerEndcap %d",*id));
510  m_trackerEndcapElements->AddElement( shape );
511  }
512 
513  AddElement(m_trackerEndcapElements);
515  }
516 
518  {
519  m_trackerEndcapElements->SetRnrState(show);
520  gEve->Redraw3D();
521  }
522 }
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:250
const FWGeometry * m_geom
TEveElementList * m_trackerEndcapElements
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:194

Member Data Documentation

TEveElementList* FWRPZViewGeometry::m_pixelBarrelElements
private

Definition at line 72 of file FWRPZViewGeometry.h.

Referenced by showPixelBarrel().

TEveElementList* FWRPZViewGeometry::m_pixelEndcapElements
private

Definition at line 73 of file FWRPZViewGeometry.h.

Referenced by showPixelEndcap().

TEveElementList* FWRPZViewGeometry::m_rhoPhiGeo
private

Definition at line 68 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

TEveElementList* FWRPZViewGeometry::m_rhoZGeo
private

Definition at line 69 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

TEveElementList* FWRPZViewGeometry::m_trackerBarrelElements
private

Definition at line 74 of file FWRPZViewGeometry.h.

Referenced by showTrackerBarrel().

TEveElementList* FWRPZViewGeometry::m_trackerEndcapElements
private

Definition at line 75 of file FWRPZViewGeometry.h.

Referenced by showTrackerEndcap().