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 showGEM (bool)
 
void showPixelBarrel (bool)
 
void showPixelEndcap (bool)
 
void showRpcEndcap (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_GEMElements
 
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 53 of file FWRPZViewGeometry.cc.

53  :
54  FWViewGeometryList(context),
55 
56  m_rhoPhiGeo(0),
57  m_rhoZGeo(0),
58 
64  m_GEMElements(0)
65 {
66  SetElementName("RPZGeomShared");
67 }
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_trackerEndcapElements
FWRPZViewGeometry::~FWRPZViewGeometry ( )
virtual

Definition at line 74 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 333 of file FWRPZViewGeometry.cc.

References rho, and mathSSE::sqrt().

Referenced by estimateProjectionSizeDT().

335 {
336  double rho = sqrt(global[0] *global[0]+global[1] *global[1]);
337  if ( min_rho > rho ) min_rho = rho;
338  if ( max_rho < rho ) max_rho = rho;
339  if ( min_z > global[2] ) min_z = global[2];
340  if ( max_z < global[2] ) max_z = global[2];
341 }
Definition: DDAxes.h:10
T sqrt(T t)
Definition: SSEVec.h:48
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 280 of file FWRPZViewGeometry.cc.

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

Referenced by makeMuonGeometryRhoZ().

282 {
283  // we will test 5 points on both sides ( +/- z)
284  float local[3], global[3];
285 
286  float dX = info.shape[1];
287  float dY = info.shape[2];
288  float dZ = info.shape[3];
289 
290  local[0] = 0; local[1] = 0; 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; local[1] = dY; local[2] = dZ;
295  m_geom->localToGlobal( info, local, global );
296  estimateProjectionSize( global, min_rho, max_rho, min_z, max_z );
297 
298  local[0] = -dX; local[1] = dY; 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] = 0; local[1] = 0; 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] = -dX; local[1] = dY; 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 }
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:328
const FWGeometry * m_geom
void FWRPZViewGeometry::importNew ( TEveElementList *  x)
private

Definition at line 588 of file FWRPZViewGeometry.cc.

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

589 {
590  TEveProjected* proj = *BeginProjecteds();
591  proj->GetManager()->SubImportElements(x, proj->GetProjectedAsElement());
592 
593 }
Definition: DDAxes.h:10
void FWRPZViewGeometry::initStdGeoElements ( const FWViewType::EType  id)

Definition at line 83 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

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

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

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

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

104 {
105  using namespace fireworks;
106 
107  float ri = m_context.caloZ2()*tan(2*atan(exp(-m_context.caloMaxEta())));
108 
109  TEveStraightLineSet* el = new TEveStraightLineSet( "TrackerRhoZoutline" );
110  el->SetPickable(kFALSE);
112 
113  el->AddLine(0, m_context.caloR1(), -m_context.caloZ1(), 0, m_context.caloR1(), m_context.caloZ1());
114  el->AddLine(0, -m_context.caloR1(), m_context.caloZ1(), 0, -m_context.caloR1(), -m_context.caloZ1());
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  el->AddLine(0, -m_context.caloR2(), -m_context.caloZ2(), 0, -ri, -m_context.caloZ2());
120  el->AddLine(0, ri, -m_context.caloZ2(), 0, m_context.caloR2(), -m_context.caloZ2());
121 
122  return el;
123 }
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 151 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

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

Definition at line 184 of file FWRPZViewGeometry.cc.

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

Referenced by initStdGeoElements().

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

Definition at line 258 of file FWRPZViewGeometry.cc.

References edmStreamStallGrapher::t.

Referenced by makeMuonGeometryRhoZ().

259 {
260  TEveTrans t;
261  t(1,1) = 1; t(1,2) = 0; t(1,3) = 0;
262  t(2,1) = 0; t(2,2) = 1; t(2,3) = 0;
263  t(3,1) = 0; t(3,2) = 0; t(3,3) = 1;
264  t(1,4) = 0; t(2,4) = (min_rho+max_rho)/2; t(3,4) = (min_z+max_z)/2;
265 
266  TEveGeoShape* shape = new TEveGeoShape;
267  shape->SetTransMatrix(t.Array());
268 
269  shape->SetRnrSelf(kTRUE);
270  shape->SetRnrChildren(kTRUE);
271  TGeoBBox* box = new TGeoBBox( 0, (max_rho-min_rho)/2, (max_z-min_z)/2 );
272  shape->SetShape( box );
273 
274  return shape;
275 }
const FWRPZViewGeometry& FWRPZViewGeometry::operator= ( const FWRPZViewGeometry )
private
void FWRPZViewGeometry::showGEM ( bool  show)

Definition at line 550 of file FWRPZViewGeometry.cc.

References FWViewGeometryList::addToCompound(), FWGeometry::getEveShape(), importNew(), kFWMuonEndcapLineColorIndex, m_GEMElements, and FWViewGeometryList::m_geom.

Referenced by FWRPZView::setContext().

551 {
552  if( !m_GEMElements && show )
553  {
554  m_GEMElements = new TEveElementList("GEM");
555 
556 
557  std::vector<GEMDetId> ids;
558  int rArr [] = { -1, 1}; // front back region
559  int cArr [] = { 9, 10, 29, 30}; // top bottom chamber
560 
561  for (int ri = 0; ri < 2; ++ri )
562  for (int ci= 0; ci < 4; ++ci) {
563  int minRoll = 2;
564  //if (ci == 1 || ci == 3) minRoll = 2;
565  for (int roll = minRoll; roll <=10; ++roll)
566  for (int layer = 1; layer <=2; ++layer)
567  {
568  GEMDetId id(rArr[ri], 1, 1, layer, cArr[ci], roll);
569  TEveGeoShape* shape = m_geom->getEveShape(id.rawId());
571  m_GEMElements->AddElement( shape );
572  }
573  }
574 
575 
576 
577  AddElement(m_GEMElements);
579  }
580  if (m_GEMElements)
581  {
582  m_GEMElements->SetRnrState(show);
583  gEve->Redraw3D();
584  }
585 }
TEveElementList * m_GEMElements
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:253
const FWGeometry * m_geom
void FWRPZViewGeometry::showPixelBarrel ( bool  show)

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

361 {
362  if( !m_pixelBarrelElements && show )
363  {
364  m_pixelBarrelElements = new TEveElementList("PixelBarrel");
365  AddElement(m_pixelBarrelElements);
366  std::vector<unsigned int> ids = m_geom->getMatchedIds( FWGeometry::Tracker, FWGeometry::PixelBarrel );
367  for( std::vector<unsigned int>::const_iterator id = ids.begin();
368  id != ids.end(); ++id )
369  {
370  TEveGeoShape* shape = m_geom->getEveShape( *id );
371  shape->SetTitle(Form("PixelBarrel %d",*id));
373  m_pixelBarrelElements->AddElement( shape );
374  }
376  }
377 
379  {
380  m_pixelBarrelElements->SetRnrState(show);
381  gEve->Redraw3D();
382  }
383 }
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:253
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:197
void FWRPZViewGeometry::showPixelEndcap ( bool  show)

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

387 {
388  if( !m_pixelEndcapElements && show )
389  {
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();
394  id != ids.end(); ++id )
395  {
396  TEveGeoShape* shape = m_geom->getEveShape( *id );
397 
398  shape->SetTitle(Form("PixelEndCap %d",*id));
400  m_pixelEndcapElements->AddElement( shape );
401  }
402 
403  AddElement(m_pixelEndcapElements);
405  }
406 
408  {
409  m_pixelEndcapElements->SetRnrState(show);
410  gEve->Redraw3D();
411  }
412 }
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:253
TEveElementList * m_pixelEndcapElements
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:197
void FWRPZViewGeometry::showRpcEndcap ( bool  show)

Definition at line 491 of file FWRPZViewGeometry.cc.

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

Referenced by FWRPZView::setContext().

492 {
493  if( !m_rpcEndcapElements && show )
494  {
495  m_rpcEndcapElements = new TEveElementList("RpcEndcap");
496 
497 
498  std::vector<RPCDetId> ids;
499  int mxSt = m_geom->versionInfo().haveExtraDet("RE4") ? 4:3;
500  for (int region = -1; region <=1; ++ region )
501  {
502  if (region == 0 ) continue;
503  for (int ring = 2; ring <= 3; ++ring) {
504  for (int station = 1; station <= mxSt; ++station ) {
505  int sector = 1;
506  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 1));
507  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 2));
508  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 3));
509  if (ring == 2 && station == 1) { // 2 layers in ring 2 station 1 up
510  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 1));
511  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 2));
512  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 3));
513  }
514  sector = 5;
515  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 1));
516  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 2));
517  ids.push_back(RPCDetId(region, ring, station, sector, 1, 1, 3));
518 
519  if (ring == 2 && station == 1) { // 2 layers in ring 2 station 1 down
520  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 1));
521  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 2));
522  ids.push_back(RPCDetId(region, ring, station, sector, 1, 2, 3));
523  }
524  }
525  }
526  }
527 
528  for (std::vector<RPCDetId>::iterator i = ids.begin(); i != ids.end(); ++i)
529  {
530  TEveGeoShape* shape = m_geom->getEveShape(i->rawId());
532  m_rpcEndcapElements->AddElement(shape);
533  gEve->AddToListTree(shape, true);
534  }
535 
536  AddElement(m_rpcEndcapElements);
538  }
539 
541  {
542  m_rpcEndcapElements->SetRnrState(show);
543  gEve->Redraw3D();
544  }
545 }
int i
Definition: DBlmapReader.cc:9
const VersionInfo & versionInfo() const
Definition: FWGeometry.h:117
TEveElementList * m_rpcEndcapElements
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
bool haveExtraDet(const char *) const
Definition: FWGeometry.cc:379
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:253
const FWGeometry * m_geom
void FWRPZViewGeometry::showTrackerBarrel ( bool  show)

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

417 {
418  if( !m_trackerBarrelElements && show )
419  {
420  m_trackerBarrelElements = new TEveElementList("TrackerBarrel");
421 
422  std::vector<unsigned int> ids = m_geom->getMatchedIds( FWGeometry::Tracker, FWGeometry::TIB );
423  for( std::vector<unsigned int>::const_iterator id = ids.begin();
424  id != ids.end(); ++id )
425  {
426  TEveGeoShape* shape = m_geom->getEveShape( *id );
428  m_trackerBarrelElements->AddElement( shape );
429  }
431  for( std::vector<unsigned int>::const_iterator id = ids.begin();
432  id != ids.end(); ++id )
433  {
434  TEveGeoShape* shape = m_geom->getEveShape( *id );
435 
436  shape->SetTitle(Form("TrackerBarrel %d",*id));
438  m_trackerBarrelElements->AddElement( shape );
439  }
440 
441  AddElement(m_trackerBarrelElements);
443  }
444 
446  {
447  m_trackerBarrelElements->SetRnrState(show);
448  gEve->Redraw3D();
449  }
450 }
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:253
const FWGeometry * m_geom
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:197
void FWRPZViewGeometry::showTrackerEndcap ( bool  show)

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

454 {
455  if( !m_trackerEndcapElements && show )
456  {
457  m_trackerEndcapElements = new TEveElementList("TrackerEndcap");
458 
459  std::vector<unsigned int> ids = m_geom->getMatchedIds( FWGeometry::Tracker, FWGeometry::TID );
460  for( std::vector<unsigned int>::const_iterator id = ids.begin();
461  id != ids.end(); ++id )
462  {
463  TEveGeoShape* shape = m_geom->getEveShape( *id );
465  m_trackerEndcapElements->AddElement( shape );
466  }
468  for( std::vector<unsigned int>::const_iterator id = ids.begin();
469  id != ids.end(); ++id )
470  {
471  TEveGeoShape* shape = m_geom->getEveShape( *id );
472 
473  shape->SetTitle(Form("TrackerEndcap %d",*id));
475  m_trackerEndcapElements->AddElement( shape );
476  }
477 
478  AddElement(m_trackerEndcapElements);
480  }
481 
483  {
484  m_trackerEndcapElements->SetRnrState(show);
485  gEve->Redraw3D();
486  }
487 }
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void importNew(TEveElementList *x)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:253
const FWGeometry * m_geom
TEveElementList * m_trackerEndcapElements
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
Definition: FWGeometry.cc:197

Member Data Documentation

TEveElementList* FWRPZViewGeometry::m_GEMElements
private

Definition at line 79 of file FWRPZViewGeometry.h.

Referenced by showGEM().

TEveElementList* FWRPZViewGeometry::m_pixelBarrelElements
private

Definition at line 74 of file FWRPZViewGeometry.h.

Referenced by showPixelBarrel().

TEveElementList* FWRPZViewGeometry::m_pixelEndcapElements
private

Definition at line 75 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 78 of file FWRPZViewGeometry.h.

Referenced by showRpcEndcap().

TEveElementList* FWRPZViewGeometry::m_trackerBarrelElements
private

Definition at line 76 of file FWRPZViewGeometry.h.

Referenced by showTrackerBarrel().

TEveElementList* FWRPZViewGeometry::m_trackerEndcapElements
private

Definition at line 77 of file FWRPZViewGeometry.h.

Referenced by showTrackerEndcap().