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 #include "TEveGeoShape.h"
16 
19 
21 public:
24 
26 
27 private:
29  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
30 
31 public:
34 };
35 
36 void FWSiPixelClusterDetProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) {
37  const SiPixelClusterCollectionNew* pixels = nullptr;
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(); set != setEnd;
47  ++set) {
48  unsigned int id = set->detId();
49  DetId detid(id);
50 
51  if (geom->contains(detid)) {
53 
54  for (edmNew::DetSet<SiPixelCluster>::const_iterator itc = clusters.begin(), edc = clusters.end(); itc != edc;
55  ++itc) {
56  TEveGeoShape* shape = geom->getEveShape(detid);
57 
58  if (shape) {
59  shape->SetMainTransparency(50);
60  setupAddElement(shape, product);
61  }
62  }
63  }
64  }
65 }
66 
69  "SiPixelClusterDets",
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:57
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
Definition: FWEventItem.h:78
data_type const * const_iterator
Definition: DetSetNew.h:31
const FWSiPixelClusterDetProxyBuilder & operator=(const FWSiPixelClusterDetProxyBuilder &)=delete
static const int kAll3DBits
Definition: FWViewType.h:58
const_iterator end(bool update=false) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
const_iterator begin(bool update=false) const
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548