00001 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" 00002 #include "Fireworks/Calo/plugins/FWCaloRecHitDigitSetProxyBuilder.h" 00003 00004 class FWHFRecHitProxyBuilder : public FWCaloRecHitDigitSetProxyBuilder 00005 { 00006 public: 00007 FWHFRecHitProxyBuilder( void ) {invertBox(true); } 00008 virtual ~FWHFRecHitProxyBuilder( void ) {} 00009 00010 REGISTER_PROXYBUILDER_METHODS(); 00011 00012 private: 00013 FWHFRecHitProxyBuilder( const FWHFRecHitProxyBuilder& ); 00014 const FWHFRecHitProxyBuilder& operator=( const FWHFRecHitProxyBuilder& ); 00015 }; 00016 00017 00018 REGISTER_FWPROXYBUILDER( FWHFRecHitProxyBuilder, HFRecHitCollection, "HF RecHit", FWViewType::kISpyBit ); 00019 00020 // AMT: Reflect box. Previously used energyScaledBox3DCorners(). Scaling and e/et mode added now. 00021 00022 /* 00023 void 00024 FWHFRecHitProxyBuilder::build( const FWEventItem* iItem, TEveElementList* product, const FWViewContext* ) 00025 { 00026 const HFRecHitCollection* collection = 0; 00027 iItem->get( collection ); 00028 00029 if( 0 == collection ) 00030 { 00031 return; 00032 } 00033 00034 std::vector<HFRecHit>::const_iterator it = collection->begin(); 00035 std::vector<HFRecHit>::const_iterator itEnd = collection->end(); 00036 for( ; it != itEnd; ++it ) 00037 { 00038 if(( *it ).energy() > m_maxEnergy ) 00039 m_maxEnergy = ( *it ).energy(); 00040 } 00041 00042 TEveBoxSet* boxSet = addBoxSetToProduct(product); 00043 int index = 0; 00044 for (std::vector<HFRecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it) 00045 { 00046 unsigned int rawid = ( *it ).detid().rawId(); 00047 if( ! context().getGeom()->contains( rawid )) 00048 { 00049 fwLog( fwlog::kInfo ) << "FWHFRecHitProxyBuilder cannot get geometry for DetId: " 00050 << rawid << ". Ignored.\n"; 00051 } 00052 const float* corners = context().getGeom()->getCorners( rawid ); 00053 00054 std::vector<float> scaledCorners(24); 00055 if (corners) 00056 fireworks::energyScaledBox3DCorners(corners, (*it).energy() / m_maxEnergy, scaledCorners, true); 00057 00058 addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties()); 00059 } 00060 } 00061 */