CMS 3D CMS Logo

FWSiPixelClusterDetProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Tracks
4 // Class : FWSiPixelClusterDetProxyBuilder
5 //
6 //
7 // Original Author:
8 // Created: Thu Dec 6 18:01:21 PST 2007
9 //
10 
11 #include "TEveGeoNode.h"
12 
16 
19 
21 {
22 public:
25 
27 
28 private:
30  virtual void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
33 };
34 
35 void FWSiPixelClusterDetProxyBuilder::build( const FWEventItem* iItem, TEveElementList* product , const FWViewContext*)
36 {
37  const SiPixelClusterCollectionNew* pixels = 0;
38 
39  iItem->get(pixels);
40 
41  if( ! pixels )
42  return;
43 
44  const FWGeometry* geom = iItem->getGeom();
45 
46  for( SiPixelClusterCollectionNew::const_iterator set = pixels->begin(), setEnd = pixels->end();
47  set != setEnd; ++set)
48  {
49  unsigned int id = set->detId();
50  DetId detid(id);
51 
52  if( geom->contains( detid ))
53  {
55 
56  for( edmNew::DetSet<SiPixelCluster>::const_iterator itc = clusters.begin(), edc = clusters.end();
57  itc != edc; ++itc )
58  {
59  TEveGeoShape* shape = geom->getEveShape(detid);
60 
61  if ( shape )
62  {
63  shape->SetMainTransparency(50);
64  setupAddElement(shape, product);
65  }
66  }
67  }
68  }
69 }
70 
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
#define REGISTER_PROXYBUILDER_METHODS()
const_iterator end(bool update=false) const
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:58
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
Definition: FWEventItem.h:85
data_type const * const_iterator
Definition: DetSetNew.h:30
static const int kAll3DBits
Definition: FWViewType.h:59
const FWSiPixelClusterDetProxyBuilder & operator=(const FWSiPixelClusterDetProxyBuilder &)
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:259
bool contains(unsigned int id) const
Definition: FWGeometry.h:110
Definition: DetId.h:18
iterator end()
Definition: DetSetNew.h:70
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:683
const_iterator begin(bool update=false) const
iterator begin()
Definition: DetSetNew.h:67