CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWPhotonProxyBuilder Class Reference

Inheritance diagram for FWPhotonProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::Photon > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

 FWPhotonProxyBuilder (void)
virtual bool haveSingleProduct (void) const
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWPhotonProxyBuilder (void)

Private Member Functions

virtual void buildViewType (const reco::Photon &photon, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *)
 FWPhotonProxyBuilder (const FWPhotonProxyBuilder &)
const FWPhotonProxyBuilderoperator= (const FWPhotonProxyBuilder &)

Detailed Description

Definition at line 26 of file FWPhotonProxyBuilder.cc.


Constructor & Destructor Documentation

FWPhotonProxyBuilder::FWPhotonProxyBuilder ( void  ) [inline]

Definition at line 29 of file FWPhotonProxyBuilder.cc.

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

Definition at line 31 of file FWPhotonProxyBuilder.cc.

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

Member Function Documentation

void FWPhotonProxyBuilder::buildViewType ( const reco::Photon photon,
unsigned int  iIndex,
TEveElement &  oItemHolder,
FWViewType::EType  type,
const FWViewContext  
) [private, virtual]

Reimplemented from FWSimpleProxyBuilderTemplate< reco::Photon >.

Definition at line 45 of file FWPhotonProxyBuilder.cc.

References fwLog, relativeConstraints::geom, FWGeometry::getCorners(), FWEventItem::getGeom(), FWProxyBuilderBase::item(), FWViewType::kISpy, FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, FWViewType::kRhoZ, fwlog::kWarning, fireworks::makeRhoPhiSuperCluster(), fireworks::makeRhoZSuperCluster(), reco::LeafCandidate::phi(), FWProxyBuilderBase::setupAddElement(), and reco::Photon::superCluster().

{  
   const FWGeometry *geom = item()->getGeom();
 
   if( type == FWViewType::kRhoPhi || type == FWViewType::kRhoPhiPF )
   {
      fireworks::makeRhoPhiSuperCluster( this,
                                         photon.superCluster(),
                                         photon.phi(),
                                         oItemHolder );
   }
  
   else if( type == FWViewType::kRhoZ )
      fireworks::makeRhoZSuperCluster( this,
                                       photon.superCluster(),
                                       photon.phi(),
                                       oItemHolder );

   else if( type == FWViewType::kISpy )
   {
      std::vector<std::pair<DetId, float> > detIds = photon.superCluster()->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 id = detIds.begin(), ide = detIds.end();
           id != ide; ++id )      
      {
         const float* corners = geom->getCorners( id->first.rawId() );
      
         if( corners == 0 )
         {
            fwLog( fwlog::kWarning )
               << "No corners available for supercluster constituent" << std::endl;
            continue;
         }
         boxset->AddBox( &corners[0]);
      }

      boxset->RefitPlex();
      setupAddElement(boxset, &oItemHolder);
   }
}
virtual bool FWPhotonProxyBuilder::haveSingleProduct ( void  ) const [inline, virtual]

Reimplemented from FWProxyBuilderBase.

Definition at line 33 of file FWPhotonProxyBuilder.cc.

{ return false; }
const FWPhotonProxyBuilder& FWPhotonProxyBuilder::operator= ( const FWPhotonProxyBuilder ) [private]
FWPhotonProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )