CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWSiPixelClusterProxyBuilder Class Reference
Inheritance diagram for FWSiPixelClusterProxyBuilder:
FWProxyBuilderBase

Public Member Functions

 FWSiPixelClusterProxyBuilder (void)
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
virtual ~FWSiPixelClusterProxyBuilder (void)
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual bool haveSingleProduct () const
 
const FWEventItemitem () const
 
virtual void itemBeingDestroyed (const FWEventItem *)
 
void itemChanged (const FWEventItem *)
 
int layer () const
 
void modelChanges (const FWModelIds &)
 
void removePerViewProduct (FWViewType::EType, const FWViewContext *vc)
 
void scaleChanged (const FWViewContext *)
 
void setHaveWindow (bool iFlag)
 
virtual void setInteractionList (FWInteractionList *, const std::string &)
 
virtual void setItem (const FWEventItem *iItem)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual bool willHandleInteraction () const
 
virtual ~FWProxyBuilderBase ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 
static const std::string & classView ()
 
- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 

Private Member Functions

virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
 FWSiPixelClusterProxyBuilder (const FWSiPixelClusterProxyBuilder &)
 
const
FWSiPixelClusterProxyBuilder
operator= (const FWSiPixelClusterProxyBuilder &)
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
virtual void clean ()
 
virtual void cleanLocal ()
 
TEveCompound * createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const
 
 FWProxyBuilderBase (const FWProxyBuilderBase &)
 
void increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 22 of file FWSiPixelClusterProxyBuilder.cc.

Constructor & Destructor Documentation

FWSiPixelClusterProxyBuilder::FWSiPixelClusterProxyBuilder ( void  )
inline

Definition at line 25 of file FWSiPixelClusterProxyBuilder.cc.

25 {}
virtual FWSiPixelClusterProxyBuilder::~FWSiPixelClusterProxyBuilder ( void  )
inlinevirtual

Definition at line 26 of file FWSiPixelClusterProxyBuilder.cc.

26 {}
FWSiPixelClusterProxyBuilder::FWSiPixelClusterProxyBuilder ( const FWSiPixelClusterProxyBuilder )
private

Member Function Documentation

void FWSiPixelClusterProxyBuilder::build ( const FWEventItem iItem,
TEveElementList *  product,
const FWViewContext  
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 41 of file FWSiPixelClusterProxyBuilder.cc.

References edmNew::DetSet< T >::begin(), edmNew::DetSetVector< T >::begin(), HLT_25ns14e33_v1_cff::clusters, FWGeometry::contains(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), fwLog, relativeConstraints::geom, FWEventItem::get(), FWEventItem::getGeom(), FWGeometry::getParameters(), fwlog::kWarning, FWGeometry::localToGlobal(), fireworks::pixelLocalX(), fireworks::pixelLocalY(), and FWProxyBuilderBase::setupAddElement().

42 {
43  const SiPixelClusterCollectionNew* pixels = 0;
44 
45  iItem->get( pixels );
46 
47  if( ! pixels )
48  {
49  fwLog( fwlog::kWarning ) << "failed get SiPixelDigis" << std::endl;
50  return;
51  }
52 
53  for( SiPixelClusterCollectionNew::const_iterator set = pixels->begin(), setEnd = pixels->end();
54  set != setEnd; ++set )
55  {
56  unsigned int id = set->detId();
57 
58  const FWGeometry *geom = iItem->getGeom();
59  const float* pars = geom->getParameters( id );
60 
62 
63  for( edmNew::DetSet<SiPixelCluster>::const_iterator itc = clusters.begin(), edc = clusters.end();
64  itc != edc; ++itc )
65  {
66  TEvePointSet* pointSet = new TEvePointSet;
67  setupAddElement( pointSet, product );
68 
69  if( ! geom->contains( id ))
70  {
72  << "failed get geometry of SiPixelCluster with detid: "
73  << id << std::endl;
74  continue;
75  }
76 
77  float localPoint[3] =
78  {
79  fireworks::pixelLocalX(( *itc ).minPixelRow(), ( int )pars[0] ),
80  fireworks::pixelLocalY(( *itc ).minPixelCol(), ( int )pars[1] ),
81  0.0
82  };
83 
84  float globalPoint[3];
85  geom->localToGlobal( id, localPoint, globalPoint );
86 
87  pointSet->SetNextPoint( globalPoint[0], globalPoint[1], globalPoint[2] );
88  }
89  }
90 }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
float pixelLocalY(const double mpy, const int m_ncols)
Definition: TrackUtils.cc:201
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:296
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
Definition: FWEventItem.h:84
data_type const * const_iterator
Definition: DetSetNew.h:30
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:328
bool contains(unsigned int id) const
Definition: FWGeometry.h:109
#define fwLog(_level_)
Definition: fwLog.h:50
iterator end()
Definition: DetSetNew.h:70
float pixelLocalX(const double mpx, const int m_nrows)
Definition: TrackUtils.cc:168
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:681
const_iterator begin(bool update=false) const
iterator begin()
Definition: DetSetNew.h:67
const std::string & FWSiPixelClusterProxyBuilder::classPurpose ( )
static

Definition at line 92 of file FWSiPixelClusterProxyBuilder.cc.

const std::string & FWSiPixelClusterProxyBuilder::classRegisterTypeName ( )
static

Definition at line 92 of file FWSiPixelClusterProxyBuilder.cc.

const std::string & FWSiPixelClusterProxyBuilder::classTypeName ( )
static

Definition at line 92 of file FWSiPixelClusterProxyBuilder.cc.

const std::string & FWSiPixelClusterProxyBuilder::classView ( )
static

Definition at line 92 of file FWSiPixelClusterProxyBuilder.cc.

const FWSiPixelClusterProxyBuilder& FWSiPixelClusterProxyBuilder::operator= ( const FWSiPixelClusterProxyBuilder )
private
const std::string& FWSiPixelClusterProxyBuilder::purpose ( ) const
inline

Definition at line 28 of file FWSiPixelClusterProxyBuilder.cc.

30 :
31  // Disable default copy constructor
const std::string& FWSiPixelClusterProxyBuilder::typeName ( ) const
inline

Definition at line 28 of file FWSiPixelClusterProxyBuilder.cc.

30 :
31  // Disable default copy constructor
const std::string& FWSiPixelClusterProxyBuilder::view ( ) const
inline

Definition at line 28 of file FWSiPixelClusterProxyBuilder.cc.

30 :
31  // Disable default copy constructor