1 #ifndef Fireworks_Core_FWHeatmapProxyBuilderTemplate_h 2 #define Fireworks_Core_FWHeatmapProxyBuilderTemplate_h 50 std::map<DetId, const HGCRecHit*>
hitmap;
54 {
static_cast<uint8_t
>(0.2082*255), static_cast<uint8_t>(0.0592*255),
static_cast<uint8_t
>(0.0780*255),
55 static_cast<uint8_t>(0.0232*255),
static_cast<uint8_t
>(0.1802*255), static_cast<uint8_t>(0.5301*255),
56 static_cast<uint8_t
>(0.8186*255), static_cast<uint8_t>(0.9956*255),
static_cast<uint8_t
>(0.9764*255)},
58 {
static_cast<uint8_t
>(0.1664*255), static_cast<uint8_t>(0.3599*255),
static_cast<uint8_t
>(0.5041*255),
59 static_cast<uint8_t>(0.6419*255),
static_cast<uint8_t
>(0.7178*255), static_cast<uint8_t>(0.7492*255),
60 static_cast<uint8_t
>(0.7328*255), static_cast<uint8_t>(0.7862*255),
static_cast<uint8_t
>(0.9832*255)},
62 {
static_cast<uint8_t
>(0.5293*255), static_cast<uint8_t>(0.8684*255),
static_cast<uint8_t
>(0.8385*255),
63 static_cast<uint8_t>(0.7914*255),
static_cast<uint8_t
>(0.6425*255), static_cast<uint8_t>(0.4662*255),
64 static_cast<uint8_t
>(0.3499*255), static_cast<uint8_t>(0.1968*255),
static_cast<uint8_t
>(0.0539*255)}
85 if (
item()->getConfig()->
template value<bool>(
"Heatmap"))
95 event->getByLabel(
edm::InputTag(
"HGCalRecHit",
"HGCEERecHits" ), recHitHandleEE );
96 event->getByLabel(
edm::InputTag(
"HGCalRecHit",
"HGCHEFRecHits" ), recHitHandleFH );
97 event->getByLabel(
edm::InputTag(
"HGCalRecHit",
"HGCHEBRecHits" ), recHitHandleBH );
99 const auto& rechitsEE = *recHitHandleEE;
100 const auto& rechitsFH = *recHitHandleFH;
101 const auto& rechitsBH = *recHitHandleBH;
103 for (
unsigned int i = 0;
i < rechitsEE.size(); ++
i) {
104 hitmap[rechitsEE[
i].detid().rawId()] = &rechitsEE[
i];
106 for (
unsigned int i = 0;
i < rechitsFH.size(); ++
i) {
107 hitmap[rechitsFH[
i].detid().rawId()] = &rechitsFH[
i];
109 for (
unsigned int i = 0;
i < rechitsBH.size(); ++
i) {
110 hitmap[rechitsBH[
i].detid().rawId()] = &rechitsBH[
i];
121 build(*reinterpret_cast<const T*> (iData), iIndex, oItemHolder, context);
129 buildViewType(*reinterpret_cast<const T*> (iData), iIndex, oItemHolder, viewType, context);
137 throw std::runtime_error(
"virtual build(const T&, unsigned int, TEveElement&, const FWViewContext*) not implemented by inherited class.");
142 throw std::runtime_error(
"virtual buildViewType(const T&, unsigned int, TEveElement&, FWViewType::EType, const FWViewContext*) not implemented by inherited class");
const fireworks::Context & context() const
FWProxyBuilderConfiguration * getConfig() const
std::map< DetId, const HGCRecHit * > hitmap
void setItem(const FWEventItem *iItem) override
static uint8_t gradient[3][gradient_steps]
void build(const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
void build(const FWEventItem *iItem, TEveElementList *product, const FWViewContext *vc) override
virtual void buildViewType(const T &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
const void * offsetObject(const void *iObj) const
const FWEventItem * item() const
const FWHeatmapProxyBuilderTemplate & operator=(const FWHeatmapProxyBuilderTemplate &)=delete
void buildViewType(const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
virtual void setItem(const FWEventItem *iItem)
FWHeatmapProxyBuilderTemplate()
FWGenericParameter< T > * assertParam(const std::string &name, T def)
const edm::EventBase * getEvent() const
FWSimpleProxyHelper m_helper
void buildViewType(const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
const T & modelData(int index)
static uint8_t gradient_steps
virtual void build(const T &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)