Reimplemented from FWProxyBuilderBase.
Definition at line 39 of file FWSiStripDigiProxyBuilder.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, fwlog::kWarning, fireworks::localSiStrip(), FWGeometry::localToGlobal(), and FWProxyBuilderBase::setupAddElement().
{
const edm::DetSetVector<SiStripDigi>* digis = 0;
iItem->get( digis );
if( ! digis )
{
return;
}
const FWGeometry* geom = iItem->getGeom();
for( edm::DetSetVector<SiStripDigi>::const_iterator it = digis->begin(), end = digis->end();
it != end; ++it )
{
edm::DetSet<SiStripDigi> ds = *it;
const uint32_t& id = ds.id;
const float* pars = geom->getParameters( id );
for( edm::DetSet<SiStripDigi>::const_iterator idigi = ds.data.begin(), idigiEnd = ds.data.end();
idigi != idigiEnd; ++idigi )
{
TEveStraightLineSet *lineSet = new TEveStraightLineSet;
setupAddElement( lineSet, product );
if( ! geom->contains( id ))
{
fwLog( fwlog::kWarning )
<< "failed get geometry and topology of SiStripDigi with detid: "
<< id << std::endl;
continue;
}
float localTop[3] = { 0.0, 0.0, 0.0 };
float localBottom[3] = { 0.0, 0.0, 0.0 };
fireworks::localSiStrip(( *idigi ).strip(), localTop, localBottom, pars, id );
float globalTop[3];
float globalBottom[3];
geom->localToGlobal( id, localTop, globalTop, localBottom, globalBottom );
lineSet->AddLine( globalTop[0], globalTop[1], globalTop[2],
globalBottom[0], globalBottom[1], globalBottom[2] );
}
}
}