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 
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 
51  for (edmNew::DetSet<Phase2TrackerCluster1D>::const_iterator itc = clusters.begin(), edc = clusters.end();
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",
const FWPhase2TrackerCluster1DDetProxyBuilder & operator=(const FWPhase2TrackerCluster1DDetProxyBuilder &)=delete
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
static const int kAll3DBits
Definition: FWViewType.h:68
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:320
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