CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
19 public:
22 
24 
25 private:
27  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
30 };
31 
32 void FWPhase2TrackerCluster1DDetProxyBuilder::build( const FWEventItem* iItem, TEveElementList* product , const FWViewContext*)
33 {
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();
44  set != setEnd; ++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; ++itc ) {
53  TEveGeoShape* shape = geom->getEveShape(detid);
54 
55  if ( shape ) {
56  shape->SetMainTransparency(50);
57  setupAddElement(shape, product);
58  }
59  }
60  }
61  }
62 }
63 
const FWPhase2TrackerCluster1DDetProxyBuilder & operator=(const FWPhase2TrackerCluster1DDetProxyBuilder &)=delete
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
#define REGISTER_PROXYBUILDER_METHODS()
const_iterator end(bool update=false) const
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:58
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
Definition: FWEventItem.h:85
data_type const * const_iterator
Definition: DetSetNew.h:30
static const int kAll3DBits
Definition: FWViewType.h:59
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:298
bool contains(unsigned int id) const
Definition: FWGeometry.h:117
Definition: DetId.h:18
iterator end()
Definition: DetSetNew.h:70
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:686
const_iterator begin(bool update=false) const
iterator begin()
Definition: DetSetNew.h:67