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;
27 
28 public:
31 };
32 
34  TEveElementList* product,
35  const FWViewContext*) {
36  const Phase2TrackerCluster1DCollectionNew* pixels = nullptr;
37 
38  iItem->get(pixels);
39 
40  if (!pixels)
41  return;
42 
43  const FWGeometry* geom = iItem->getGeom();
44 
45  for (Phase2TrackerCluster1DCollectionNew::const_iterator set = pixels->begin(), setEnd = pixels->end(); set != setEnd;
46  ++set) {
47  unsigned int id = set->detId();
48  DetId detid(id);
49 
50  if (geom->contains(detid)) {
52 
54  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  "Phase2TrackerCluster1DDets",
const FWPhase2TrackerCluster1DDetProxyBuilder & operator=(const FWPhase2TrackerCluster1DDetProxyBuilder &)=delete
#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
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