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 public:
24 
26 
27 private:
29  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
32 };
33 
34 void FWSiPixelClusterDetProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) {
35  const SiPixelClusterCollectionNew* pixels = nullptr;
36 
37  iItem->get(pixels);
38 
39  if (!pixels)
40  return;
41 
42  const FWGeometry* geom = iItem->getGeom();
43 
44  for (SiPixelClusterCollectionNew::const_iterator set = pixels->begin(), setEnd = pixels->end(); set != setEnd;
45  ++set) {
46  unsigned int id = set->detId();
47  DetId detid(id);
48 
49  if (geom->contains(detid)) {
51 
52  for (edmNew::DetSet<SiPixelCluster>::const_iterator itc = clusters.begin(), edc = clusters.end(); itc != edc;
53  ++itc) {
54  TEveGeoShape* shape = geom->getEveShape(detid);
55 
56  if (shape) {
57  shape->SetMainTransparency(50);
58  setupAddElement(shape, product);
59  }
60  }
61  }
62  }
63 }
64 
67  "SiPixelClusterDets",
const_iterator end(bool update=false) const
static const int kAllRPZBits
Definition: FWViewType.h:67
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:68
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:262
bool contains(unsigned int id) const
Definition: FWGeometry.h:139
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
iterator end()
Definition: DetSetNew.h:56
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
const_iterator begin(bool update=false) const
iterator begin()
Definition: DetSetNew.h:54