Public Member Functions | |
FWTrackTrackingRecHitProxyBuilder (void) | |
REGISTER_PROXYBUILDER_METHODS () | |
virtual | ~FWTrackTrackingRecHitProxyBuilder (void) |
Private Member Functions | |
void | build (const reco::Track &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *) |
FWTrackTrackingRecHitProxyBuilder (const FWTrackTrackingRecHitProxyBuilder &) | |
const FWTrackTrackingRecHitProxyBuilder & | operator= (const FWTrackTrackingRecHitProxyBuilder &) |
Definition at line 13 of file FWTrackTrackingRecHitProxyBuilder.cc.
FWTrackTrackingRecHitProxyBuilder::FWTrackTrackingRecHitProxyBuilder | ( | void | ) | [inline] |
Definition at line 16 of file FWTrackTrackingRecHitProxyBuilder.cc.
{}
virtual FWTrackTrackingRecHitProxyBuilder::~FWTrackTrackingRecHitProxyBuilder | ( | void | ) | [inline, virtual] |
Definition at line 17 of file FWTrackTrackingRecHitProxyBuilder.cc.
{}
FWTrackTrackingRecHitProxyBuilder::FWTrackTrackingRecHitProxyBuilder | ( | const FWTrackTrackingRecHitProxyBuilder & | ) | [private] |
void FWTrackTrackingRecHitProxyBuilder::build | ( | const reco::Track & | 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::Track >.
Definition at line 29 of file FWTrackTrackingRecHitProxyBuilder.cc.
References FWGeometry::contains(), fwLog, TrackingRecHit::geographicalId(), relativeConstraints::geom, FWEventItem::getGeom(), TrackingRecHit::isValid(), FWProxyBuilderBase::item(), fwlog::kError, TrackingRecHit::localPosition(), FWGeometry::localToGlobal(), pos, DetId::rawId(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), FWProxyBuilderBase::setupAddElement(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ const FWGeometry *geom = item()->getGeom(); for( trackingRecHit_iterator it = iData.recHitsBegin(), itEnd = iData.recHitsEnd(); it != itEnd; ++it ) { TEvePointSet* pointSet = new TEvePointSet; setupAddElement( pointSet, &oItemHolder ); TrackingRecHitRef rechitRef = *it; const TrackingRecHit *rechit = &( *rechitRef ); if( rechit->isValid()) { unsigned int rawid = rechit->geographicalId().rawId(); if(! geom->contains( rawid )) { fwLog( fwlog::kError ) << "failed get geometry for detid: " << rawid << std::endl; } LocalPoint pos( 0.0, 0.0, 0.0 ); if( const SiStripRecHit2D* hit = dynamic_cast<const SiStripRecHit2D*>( rechit )) { if( hit->hasPositionAndError()) { pos = rechit->localPosition(); } } else if( const SiStripRecHit1D* hit = dynamic_cast<const SiStripRecHit1D*>( rechit )) { if( hit->hasPositionAndError()) { pos = rechit->localPosition(); } } float localPos[3] = { pos.x(), pos.y(), pos.z() }; float globalPos[3]; geom->localToGlobal( rawid, localPos, globalPos ); pointSet->SetNextPoint( globalPos[0], globalPos[1], globalPos[2] ); } } }
const FWTrackTrackingRecHitProxyBuilder& FWTrackTrackingRecHitProxyBuilder::operator= | ( | const FWTrackTrackingRecHitProxyBuilder & | ) | [private] |
FWTrackTrackingRecHitProxyBuilder::REGISTER_PROXYBUILDER_METHODS | ( | ) |