Reimplemented from FWSimpleProxyBuilderTemplate< reco::Photon >.
Definition at line 45 of file FWPhotonProxyBuilder.cc.
References fwLog, relativeConstraints::geom, FWGeometry::getCorners(), FWEventItem::getGeom(), errorMatrix2Lands_multiChannel::id, 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);
}
}