CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWSiPixelDigiProxyBuilder Class Reference

Inheritance diagram for FWSiPixelDigiProxyBuilder:
FWProxyBuilderBase

List of all members.

Public Member Functions

 FWSiPixelDigiProxyBuilder (void)
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWSiPixelDigiProxyBuilder (void)

Private Member Functions

virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 FWSiPixelDigiProxyBuilder (const FWSiPixelDigiProxyBuilder &)
const FWSiPixelDigiProxyBuilderoperator= (const FWSiPixelDigiProxyBuilder &)

Detailed Description

Definition at line 24 of file FWSiPixelDigiProxyBuilder.cc.


Constructor & Destructor Documentation

FWSiPixelDigiProxyBuilder::FWSiPixelDigiProxyBuilder ( void  ) [inline]

Definition at line 27 of file FWSiPixelDigiProxyBuilder.cc.

{}
virtual FWSiPixelDigiProxyBuilder::~FWSiPixelDigiProxyBuilder ( void  ) [inline, virtual]

Definition at line 28 of file FWSiPixelDigiProxyBuilder.cc.

{}
FWSiPixelDigiProxyBuilder::FWSiPixelDigiProxyBuilder ( const FWSiPixelDigiProxyBuilder ) [private]

Member Function Documentation

void FWSiPixelDigiProxyBuilder::build ( const FWEventItem iItem,
TEveElementList *  product,
const FWViewContext  
) [private, virtual]

Reimplemented from FWProxyBuilderBase.

Definition at line 41 of file FWSiPixelDigiProxyBuilder.cc.

References edm::DetSetVector< T >::begin(), FWGeometry::contains(), edm::DetSet< T >::data, end, edm::DetSetVector< T >::end(), fwLog, relativeConstraints::geom, FWEventItem::get(), FWEventItem::getGeom(), FWGeometry::getParameters(), edm::DetSet< T >::id, FWViewType::kAll3DBits, FWViewType::kAllRPZBits, fwlog::kWarning, FWGeometry::localToGlobal(), fireworks::pixelLocalX(), fireworks::pixelLocalY(), REGISTER_FWPROXYBUILDER, and FWProxyBuilderBase::setupAddElement().

{
  const edm::DetSetVector<PixelDigi>* digis = 0;
  iItem->get( digis );

  if( ! digis )
  {
    return;
  }
  const FWGeometry *geom = iItem->getGeom();
  
  for( edm::DetSetVector<PixelDigi>::const_iterator it = digis->begin(), end = digis->end();
        it != end; ++it )
  {
    edm::DetSet<PixelDigi> ds = *it;
    unsigned int id = ds.id;

    const float* pars = geom->getParameters( id );
         
    for( edm::DetSet<PixelDigi>::const_iterator idigi = ds.data.begin(), idigiEnd = ds.data.end();
         idigi != idigiEnd; ++idigi )
    {
      TEvePointSet* pointSet = new TEvePointSet;
      pointSet->SetMarkerSize( 2 );
      pointSet->SetMarkerStyle( 2 );
      setupAddElement( pointSet, product );

      if( ! geom->contains( id ))
      {
        fwLog( fwlog::kWarning ) 
          << "failed get geometry of SiPixelDigi with detid: "
          << id << std::endl;
      }
      else
      { 
        float localPoint[3] = {     
          fireworks::pixelLocalX(( *idigi ).row(), pars[0] ),
          fireworks::pixelLocalY(( *idigi ).column(), pars[1] ),
          0.0 };
        
        float globalPoint[3];
        geom->localToGlobal( id, localPoint, globalPoint );
      
        pointSet->SetNextPoint( globalPoint[0], globalPoint[1], globalPoint[2] );
      }
    } // end of iteration over digis in range   
  } // end of iteration over the DetSetVector
}
const FWSiPixelDigiProxyBuilder& FWSiPixelDigiProxyBuilder::operator= ( const FWSiPixelDigiProxyBuilder ) [private]
FWSiPixelDigiProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )