CMS 3D CMS Logo

FWPRCaloTowerProxyBuilder.cc
Go to the documentation of this file.
6 
8 public:
10  ~FWPRCaloTowerProxyBuilder(void) override {}
11 
13 
14 private:
15  FWPRCaloTowerProxyBuilder(const FWPRCaloTowerProxyBuilder&) = delete; // stop default
16  const FWPRCaloTowerProxyBuilder& operator=(const FWPRCaloTowerProxyBuilder&) = delete; // stop default
17 
19  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
20 };
21 
22 void FWPRCaloTowerProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) {
23  const CaloTowerCollection* collection = nullptr;
24  iItem->get(collection);
25  if (!collection)
26  return;
27 
28  TEveBoxSet* boxSet = addBoxSetToProduct(product);
29  int index = 0;
30  for (std::vector<CaloTower>::const_iterator it = collection->begin(); it != collection->end(); ++it) {
31  const float* corners = item()->getGeom()->getCorners((*it).id().rawId());
32  if (corners == nullptr)
33  continue;
34 
35  std::vector<float> scaledCorners(24);
36  fireworks::energyTower3DCorners(corners, (*it).et(), scaledCorners);
37 
38  addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties());
39  }
40 }
41 
FWEventItem::modelInfo
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
FWDigitSetProxyBuilder::addBoxSetToProduct
TEveBoxSet * addBoxSetToProduct(TEveElementList *product)
Definition: FWDigitSetProxyBuilder.cc:73
FWGeometry::getCorners
const float * getCorners(unsigned int id) const
Definition: FWGeometry.cc:464
FWDigitSetProxyBuilder
Definition: FWDigitSetProxyBuilder.h:31
FWPRCaloTowerProxyBuilder::FWPRCaloTowerProxyBuilder
FWPRCaloTowerProxyBuilder(void)
Definition: FWPRCaloTowerProxyBuilder.cc:9
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
FWEventItem::get
void get(const T *&oData) const
Definition: FWEventItem.h:78
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition: register_dataproxybuilder_macro.h:28
edm::SortedCollection< CaloTower >
BuilderUtils.h
FWDigitSetProxyBuilder::addBox
void addBox(TEveBoxSet *set, const float *pnts, const FWDisplayProperties &dp)
Definition: FWDigitSetProxyBuilder.cc:94
fireworks::energyTower3DCorners
void energyTower3DCorners(const float *corners, float scale, std::vector< float > &, bool reflect=false)
Definition: BuilderUtils.cc:286
FWDigitSetProxyBuilder.h
FWGeometry.h
FWPRCaloTowerProxyBuilder::operator=
const FWPRCaloTowerProxyBuilder & operator=(const FWPRCaloTowerProxyBuilder &)=delete
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
FWPRCaloTowerProxyBuilder
Definition: FWPRCaloTowerProxyBuilder.cc:7
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWEventItem::ModelInfo::displayProperties
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:64
FWViewContext
Definition: FWViewContext.h:32
CaloTowerCollection.h
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWEventItem
Definition: FWEventItem.h:56
FWViewType::kISpyBit
Definition: FWViewType.h:54
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FWPRCaloTowerProxyBuilder::~FWPRCaloTowerProxyBuilder
~FWPRCaloTowerProxyBuilder(void) override
Definition: FWPRCaloTowerProxyBuilder.cc:10