CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWCaloClusterProxyBuilder Class Reference

Inheritance diagram for FWCaloClusterProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::CaloCluster > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

 FWCaloClusterProxyBuilder (void)
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWCaloClusterProxyBuilder (void)

Private Member Functions

void build (const reco::CaloCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 FWCaloClusterProxyBuilder (const FWCaloClusterProxyBuilder &)
const FWCaloClusterProxyBuilderoperator= (const FWCaloClusterProxyBuilder &)

Detailed Description

Definition at line 8 of file FWCaloClusterProxyBuilder.cc.


Constructor & Destructor Documentation

FWCaloClusterProxyBuilder::FWCaloClusterProxyBuilder ( void  ) [inline]

Definition at line 11 of file FWCaloClusterProxyBuilder.cc.

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

Definition at line 12 of file FWCaloClusterProxyBuilder.cc.

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

Member Function Documentation

void FWCaloClusterProxyBuilder::build ( const reco::CaloCluster iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
) [private, virtual]

iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement

Reimplemented from FWSimpleProxyBuilderTemplate< reco::CaloCluster >.

Definition at line 24 of file FWCaloClusterProxyBuilder.cc.

References fireworks::energyTower3DCorners(), FWGeometry::getCorners(), FWEventItem::getGeom(), reco::CaloCluster::hitsAndFractions(), FWProxyBuilderBase::item(), and FWProxyBuilderBase::setupAddElement().

{
   std::vector<std::pair<DetId, float> > clusterDetIds = iData.hitsAndFractions();
   
   TEveBoxSet* boxset = new TEveBoxSet();
   boxset->Reset(TEveBoxSet::kBT_FreeBox, true, 64);
   boxset->UseSingleColor();
   boxset->SetPickable(1);

   for( std::vector<std::pair<DetId, float> >::iterator it = clusterDetIds.begin(), itEnd = clusterDetIds.end();
        it != itEnd; ++it )
   {
      const float* corners = item()->getGeom()->getCorners( (*it).first );
      if( corners == 0 ) {
         continue;
      }
      std::vector<float> pnts(24);    
      fireworks::energyTower3DCorners(corners, (*it).second, pnts);
      boxset->AddBox( &pnts[0]);
   }

   boxset->RefitPlex();
   setupAddElement(boxset, &oItemHolder);
}
const FWCaloClusterProxyBuilder& FWCaloClusterProxyBuilder::operator= ( const FWCaloClusterProxyBuilder ) [private]
FWCaloClusterProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )