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",
FWGeometry
Definition: FWGeometry.h:27
FWViewType::kAllRPZBits
static const int kAllRPZBits
Definition: FWViewType.h:67
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
FWEventItem::get
void get(const T *&oData) const
Definition: FWEventItem.h:78
FWProxyBuilderBase.h
SiPixelCluster.h
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition: register_dataproxybuilder_macro.h:28
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:231
FWSiPixelClusterDetProxyBuilder
Definition: FWSiPixelClusterDetProxyBuilder.cc:20
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition: DetSetVectorNew.h:572
FWViewType::kAll3DBits
static const int kAll3DBits
Definition: FWViewType.h:68
DetId
Definition: DetId.h:17
edmNew::DetSet
Definition: DetSetNew.h:22
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
FWGeometry.h
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWViewContext
Definition: FWViewContext.h:32
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
edmNew::DetSetVector
Definition: DetSetNew.h:13
FWEventItem
Definition: FWEventItem.h:56
FWSiPixelClusterDetProxyBuilder::~FWSiPixelClusterDetProxyBuilder
~FWSiPixelClusterDetProxyBuilder() override
Definition: FWSiPixelClusterDetProxyBuilder.cc:23
DetId.h
FWProxyBuilderBase
Definition: FWProxyBuilderBase.h:46
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:577
FWSiPixelClusterDetProxyBuilder::operator=
const FWSiPixelClusterDetProxyBuilder & operator=(const FWSiPixelClusterDetProxyBuilder &)=delete
FWSiPixelClusterDetProxyBuilder::FWSiPixelClusterDetProxyBuilder
FWSiPixelClusterDetProxyBuilder()
Definition: FWSiPixelClusterDetProxyBuilder.cc:22
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31