Public Member Functions | |
FWHFRecHitProxyBuilder (void) | |
REGISTER_PROXYBUILDER_METHODS () | |
virtual | ~FWHFRecHitProxyBuilder (void) |
Private Member Functions | |
virtual void | build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) |
FWHFRecHitProxyBuilder (const FWHFRecHitProxyBuilder &) | |
const FWHFRecHitProxyBuilder & | operator= (const FWHFRecHitProxyBuilder &) |
Private Attributes | |
Float_t | m_maxEnergy |
Definition at line 10 of file FWHFRecHitProxyBuilder.cc.
FWHFRecHitProxyBuilder::FWHFRecHitProxyBuilder | ( | void | ) | [inline] |
Definition at line 13 of file FWHFRecHitProxyBuilder.cc.
: m_maxEnergy( 5.0 ) {}
virtual FWHFRecHitProxyBuilder::~FWHFRecHitProxyBuilder | ( | void | ) | [inline, virtual] |
Definition at line 17 of file FWHFRecHitProxyBuilder.cc.
{}
FWHFRecHitProxyBuilder::FWHFRecHitProxyBuilder | ( | const FWHFRecHitProxyBuilder & | ) | [private] |
void FWHFRecHitProxyBuilder::build | ( | const FWEventItem * | iItem, |
TEveElementList * | product, | ||
const FWViewContext * | |||
) | [private, virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 32 of file FWHFRecHitProxyBuilder.cc.
References FWDigitSetProxyBuilder::addBox(), FWDigitSetProxyBuilder::addBoxSetToProduct(), edm::SortedCollection< T, SORT >::begin(), runEdmFileComparison::collection, edm::contains(), FWProxyBuilderBase::context(), edm::SortedCollection< T, SORT >::end(), fireworks::energyScaledBox3DCorners(), fwLog, FWEventItem::get(), FWGeometry::getCorners(), fireworks::Context::getGeom(), getHLTprescales::index, fwlog::kInfo, m_maxEnergy, and FWEventItem::modelInfo().
{ const HFRecHitCollection* collection = 0; iItem->get( collection ); if( 0 == collection ) { return; } std::vector<HFRecHit>::const_iterator it = collection->begin(); std::vector<HFRecHit>::const_iterator itEnd = collection->end(); for( ; it != itEnd; ++it ) { if(( *it ).energy() > m_maxEnergy ) m_maxEnergy = ( *it ).energy(); } TEveBoxSet* boxSet = addBoxSetToProduct(product); int index = 0; for (std::vector<HFRecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it) { unsigned int rawid = ( *it ).detid().rawId(); if( ! context().getGeom()->contains( rawid )) { fwLog( fwlog::kInfo ) << "FWHFRecHitProxyBuilder cannot get geometry for DetId: " << rawid << ". Ignored.\n"; } const float* corners = context().getGeom()->getCorners( rawid ); std::vector<float> scaledCorners(24); if (corners) fireworks::energyScaledBox3DCorners(corners, (*it).energy() / m_maxEnergy, scaledCorners, true); addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties()); } }
const FWHFRecHitProxyBuilder& FWHFRecHitProxyBuilder::operator= | ( | const FWHFRecHitProxyBuilder & | ) | [private] |
FWHFRecHitProxyBuilder::REGISTER_PROXYBUILDER_METHODS | ( | ) |
Float_t FWHFRecHitProxyBuilder::m_maxEnergy [private] |
Definition at line 25 of file FWHFRecHitProxyBuilder.cc.
Referenced by build().