Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:27

0001 /*
0002  *  FWCastorRecHitProxyBuilder.cc
0003  *  cmsShow
0004  *
0005  *  Created by Ianna Osborne on 7/8/10.
0006  *
0007  */
0008 #include "Fireworks/Calo/plugins/FWCaloRecHitDigitSetProxyBuilder.h"
0009 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0010 
0011 class FWCastorRecHitProxyBuilder : public FWCaloRecHitDigitSetProxyBuilder {
0012 public:
0013   FWCastorRecHitProxyBuilder(void) {}
0014   ~FWCastorRecHitProxyBuilder(void) override {}
0015 
0016   float scaleFactor(const FWViewContext* vc) override { return 10 * FWCaloRecHitDigitSetProxyBuilder::scaleFactor(vc); }
0017 
0018   REGISTER_PROXYBUILDER_METHODS();
0019 
0020   FWCastorRecHitProxyBuilder(const FWCastorRecHitProxyBuilder&) = delete;
0021   const FWCastorRecHitProxyBuilder& operator=(const FWCastorRecHitProxyBuilder&) = delete;
0022 };
0023 
0024 REGISTER_FWPROXYBUILDER(FWCastorRecHitProxyBuilder, CastorRecHitCollection, "Castor RecHit", FWViewType::kISpyBit);
0025 
0026 // AMT:: scale box round center. Scaleing and e/et added now. Previously used fireworks::energyTower3DCorners();
0027 
0028 /*
0029 void FWCastorRecHitProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*)
0030 {
0031    const CastorRecHitCollection* collection = 0;
0032    iItem->get( collection );
0033    if (! collection)
0034       return;
0035 
0036 
0037    TEveBoxSet* boxSet = addBoxSetToProduct(product);
0038    int index = 0;
0039    for (std::vector<CastorRecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it)
0040    {  
0041       const float* corners = item()->getGeom()->getCorners((*it).detid());
0042       if (corners == 0) 
0043          continue;
0044 
0045       std::vector<float> scaledCorners(24);
0046       fireworks::energyTower3DCorners(corners, (*it).energy() * 10, scaledCorners);
0047 
0048       addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties());
0049    }
0050 }
0051 */