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 33 of file FWRPZViewGeometry.h.

Constructor & Destructor Documentation

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

Definition at line 52 of file FWRPZViewGeometry.cc.

52  :
53  FWViewGeometryList(context),
54 
55  m_rhoPhiGeo(0),
56  m_rhoZGeo(0),
57 
62 {
63  SetElementName("RPZGeomShared");
64 }
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 71 of file FWRPZViewGeometry.cc.

References m_rhoPhiGeo, and m_rhoZGeo.

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

References rho, and mathSSE::sqrt().

Referenced by estimateProjectionSizeCSC(), and estimateProjectionSizeDT().

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

Definition at line 341 of file FWRPZViewGeometry.cc.

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

Referenced by makeMuonGeometryRhoZ().

343 {
344  float local[3], global[3];
345 
346  float dX = info.shape[2] - info.shape[1];
347  float dY = info.shape[4];
348  float ddY = sqrt( 4 * dY * dY + dX * dX ) * 0.5;
349  float dZ = info.shape[3];
350 
351  local[0] = info.shape[2]; local[1] = ddY; local[2] = -dZ;
352  m_geom->localToGlobal( info, local, global );
353  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
354 
355  local[0] = info.shape[1]; local[1] = -ddY; local[2] = -dZ;
356  m_geom->localToGlobal( info, local, global );
357  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
358 
359  local[0] = info.shape[1]; local[1] = -ddY; local[2] = dZ;
360  m_geom->localToGlobal( info, local, global );
361  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
362 
363  local[0] = info.shape[2]; local[1] = ddY; local[2] = dZ;
364  m_geom->localToGlobal( info, local, global );
365  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
366 }
void localToGlobal(unsigned int id, const float *local, float *global) const
Definition: FWGeometry.cc:326
void estimateProjectionSize(const float *, float &, float &, float &, float &)
T sqrt(T t)
Definition: SSEVec.h:46
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 289 of file FWRPZViewGeometry.cc.

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

Referenced by makeMuonGeometryRhoZ().

291 {
292  // we will test 5 points on both sides ( +/- z)
293  float local[3], global[3];
294 
295  float dX = info.shape[1];
296  float dY = info.shape[2];
297  float dZ = info.shape[3];
298 
299  local[0] = 0; local[1] = 0; local[2] = dZ;
300  m_geom->localToGlobal( info, local, global );
301  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
302 
303  local[0] = dX; local[1] = dY; local[2] = dZ;
304  m_geom->localToGlobal( info, local, global );
305  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
306 
307  local[0] = -dX; local[1] = dY; 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] = dX; local[1] = -dY; local[2] = dZ;
312  m_geom->localToGlobal( info, local, global );
313  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
314 
315  local[0] = -dX; local[1] = -dY; local[2] = dZ;
316  m_geom->localToGlobal( info, local, global );
317  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
318 
319  local[0] = 0; local[1] = 0; 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; local[1] = dY; local[2] = -dZ;
324  m_geom->localToGlobal( info, local, global );
325  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
326 
327  local[0] = -dX; local[1] = dY; local[2] = -dZ;
328  m_geom->localToGlobal( info, local, global );
329  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
330 
331  local[0] = dX; local[1] = -dY; 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; local[1] = -dY; local[2] = -dZ;
336  m_geom->localToGlobal( info, local, global );
337  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
338 }
void localToGlobal(unsigned int id, const float *local, float *global) const
Definition: FWGeometry.cc:326
void estimateProjectionSize(const float *, float &, float &, float &, float &)
const FWGeometry * m_geom
void FWRPZViewGeometry::importNew ( TEveElementList *  x)
private

Definition at line 526 of file FWRPZViewGeometry.cc.

References trackerHitRTTI::proj.

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

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

Definition at line 80 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

81 {
82  assert(m_geom != 0);
83 
84  if (type == FWViewType::kRhoZ)
85  {
86  AddElement(makeMuonGeometryRhoZ());
87  AddElement(makeCaloOutlineRhoZ());
88  }
89  else
90  {
91  AddElement(makeMuonGeometryRhoPhi());
92  AddElement(makeCaloOutlineRhoPhi());
93  }
94 }
type
Definition: HCALResponse.h:22
TEveElement * makeCaloOutlineRhoPhi()
TEveElement * makeMuonGeometryRhoPhi()
const FWGeometry * m_geom
TEveElement * makeCaloOutlineRhoZ()
TEveElement * makeMuonGeometryRhoZ()
TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoPhi ( )
private

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

124 {
125  TEveStraightLineSet* el = new TEveStraightLineSet( "TrackerRhoPhi" );
127 
129  const unsigned int nSegments = 100;
130  const double r = m_context.caloR1();
131  for ( unsigned int i = 1; i <= nSegments; ++i )
132  el->AddLine(r*sin(TMath::TwoPi()/nSegments*(i-1)), r*cos(TMath::TwoPi()/nSegments*(i-1)), 0,
133  r*sin(TMath::TwoPi()/nSegments*i), r*cos(TMath::TwoPi()/nSegments*i), 0);
134 
135  TEvePointSet* ref = new TEvePointSet("reference");
136  ref->SetTitle("(0,0,0)");
137  ref->SetMarkerStyle(4);
138  ref->SetMarkerColor(kWhite);
139  ref->SetNextPoint(0.,0.,0.);
140  el->AddElement(ref);
141 
142  return el;
143 }
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:66
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:210
Color_t geomColor(FWGeomColorIndex) const
const fireworks::Context & m_context
TEveElement * FWRPZViewGeometry::makeCaloOutlineRhoZ ( )
private

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

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

Definition at line 148 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

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

Definition at line 177 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

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

References lumiQTWidget::t.

Referenced by makeMuonGeometryRhoZ().

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

Definition at line 396 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

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

Definition at line 422 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

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

Definition at line 452 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

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

Definition at line 489 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

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

Member Data Documentation

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 69 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

TEveElementList* FWRPZViewGeometry::m_rhoZGeo
private

Definition at line 70 of file FWRPZViewGeometry.h.

Referenced by ~FWRPZViewGeometry().

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