CMS 3D CMS Logo

FWPhase2TrackerCluster1DDetProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Tracks
4 // Class : FWPhase2TrackerCluster1DDetProxyBuilder
5 //
6 //
7 
8 #include "TEveGeoNode.h"
9 #include "TEveGeoShape.h"
13 
16 
18 public:
21 
23 
24 private:
26  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
29 };
30 
32  TEveElementList* product,
33  const FWViewContext*) {
34  const Phase2TrackerCluster1DCollectionNew* pixels = nullptr;
35 
36  iItem->get(pixels);
37 
38  if (!pixels)
39  return;
40 
41  const FWGeometry* geom = iItem->getGeom();
42 
43  for (Phase2TrackerCluster1DCollectionNew::const_iterator set = pixels->begin(), setEnd = pixels->end(); set != setEnd;
44  ++set) {
45  unsigned int id = set->detId();
46  DetId detid(id);
47 
48  if (geom->contains(detid)) {
50 
52  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  "Phase2TrackerCluster1DDets",
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
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:197
FWPhase2TrackerCluster1DDetProxyBuilder::operator=
const FWPhase2TrackerCluster1DDetProxyBuilder & operator=(const FWPhase2TrackerCluster1DDetProxyBuilder &)=delete
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition: DetSetVectorNew.h:530
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
FWPhase2TrackerCluster1DDetProxyBuilder::~FWPhase2TrackerCluster1DDetProxyBuilder
~FWPhase2TrackerCluster1DDetProxyBuilder() override
Definition: FWPhase2TrackerCluster1DDetProxyBuilder.cc:20
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
FWPhase2TrackerCluster1DDetProxyBuilder::FWPhase2TrackerCluster1DDetProxyBuilder
FWPhase2TrackerCluster1DDetProxyBuilder()
Definition: FWPhase2TrackerCluster1DDetProxyBuilder.cc:19
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
FWPhase2TrackerCluster1DDetProxyBuilder
Definition: FWPhase2TrackerCluster1DDetProxyBuilder.cc:17
DetId.h
Phase2TrackerCluster1D.h
FWProxyBuilderBase
Definition: FWProxyBuilderBase.h:46
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:535
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31