|
||||
File indexing completed on 2024-04-06 12:11:27
0001 #include "Fireworks/Calo/plugins/FWCaloRecHitDigitSetProxyBuilder.h" 0002 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" 0003 0004 class FWHBHERecHitProxyBuilder : public FWCaloRecHitDigitSetProxyBuilder { 0005 public: 0006 FWHBHERecHitProxyBuilder(void) { invertBox(true); } 0007 ~FWHBHERecHitProxyBuilder(void) override {} 0008 0009 REGISTER_PROXYBUILDER_METHODS(); 0010 0011 FWHBHERecHitProxyBuilder(const FWHBHERecHitProxyBuilder&) = delete; 0012 const FWHBHERecHitProxyBuilder& operator=(const FWHBHERecHitProxyBuilder&) = delete; 0013 }; 0014 0015 REGISTER_FWPROXYBUILDER(FWHBHERecHitProxyBuilder, HBHERecHitCollection, "HBHE RecHit", FWViewType::kISpyBit); 0016 0017 // AMT: Refelct box. Previously used energyScaledBox3DCorners() 0018 0019 /* 0020 void 0021 FWHBHERecHitProxyBuilder::build( const FWEventItem* iItem, TEveElementList* product, const FWViewContext* vc) 0022 { 0023 m_plotEt = vc->getEnergyScale()->getPlotEt(); 0024 0025 const HBHERecHitCollection* collection = 0; 0026 iItem->get( collection ); 0027 0028 if( 0 == collection ) 0029 { 0030 return; 0031 } 0032 std::vector<HBHERecHit>::const_iterator it = collection->begin(); 0033 std::vector<HBHERecHit>::const_iterator itEnd = collection->end(); 0034 std::vector<float> scaledCorners(24); 0035 0036 for( ; it != itEnd; ++it ) 0037 { 0038 if(( *it ).energy() > m_maxEnergy ) 0039 m_maxEnergy = ( *it ).energy(); 0040 } 0041 0042 TEveBoxSet* boxSet = addBoxSetToProduct(product); 0043 int index = 0; 0044 for (std::vector<HBHERecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it) 0045 { 0046 const float* corners = context().getGeom()->getCorners((*it).detid()); 0047 if (corners) 0048 { 0049 if (m_plotEt) 0050 fireworks::etScaledBox3DCorners(corners, (*it).energy(), m_maxEnergy, scaledCorners, true); 0051 else 0052 fireworks::energyScaledBox3DCorners(corners, (*it).energy() / m_maxEnergy, scaledCorners, true); 0053 } 0054 addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties()); 0055 } 0056 } 0057 */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |