Reimplemented from FWProxyBuilderBase.
Definition at line 47 of file FWPFTauProxyBuilder.cc.
References fireworks::addCircle(), FWTauProxyBuilderBase::buildBaseTau(), FWProxyBuilderBase::createCompound(), FWEventItem::get(), reco::Jet::getJetConstituentsQuick(), metsig::jet, FWViewType::kLego, FWTauProxyBuilderBase::m_maxTheta, FWTauProxyBuilderBase::m_minTheta, FWTauProxyBuilderBase::m_phis, reco::PFTauTagInfo::pfjetRef(), python::pfTaus_cff::pfTaus, and FWProxyBuilderBase::setupAddElement().
{
reco::PFTauCollection const * pfTaus = 0;
iItem->get( pfTaus );
if( pfTaus == 0 ) return;
for( reco::PFTauCollection::const_iterator it = pfTaus->begin(), itEnd = pfTaus->end(); it != itEnd; ++it)
{
TEveCompound* comp = createCompound();
if (viewType == FWViewType::kLego)
{
fireworks::addCircle( (*it).eta(), (*it).phi(), 0.5, 20, comp, this );
}
else
{
const reco::PFTauTagInfo *tauTagInfo = dynamic_cast<const reco::PFTauTagInfo*>( (*it).pfTauTagInfoRef().get() );
const reco::PFJet *jet = dynamic_cast<const reco::PFJet*>( tauTagInfo->pfjetRef().get() );
m_minTheta = 100;
m_maxTheta = -100;
std::vector<double> phis;
std::vector <const reco::Candidate*> candidates = jet->getJetConstituentsQuick();
for( std::vector<const reco::Candidate*>::const_iterator candidate = candidates.begin(), candidateEnd = candidates.end();
candidate != candidateEnd; ++candidate )
{
double itheta = (*candidate)->theta();
if( itheta > m_maxTheta ) m_maxTheta = itheta;
if( itheta < m_minTheta ) m_minTheta = itheta;
m_phis.push_back( (*candidate)->phi() );
}
if( m_minTheta > m_maxTheta ) {
m_minTheta = 0;
m_maxTheta = 0;
}
buildBaseTau(*it, *jet, comp, viewType, vc);
m_phis.clear();
}
setupAddElement( comp, product );
}
}