CMS 3D CMS Logo

FWEcalRecHitProxyBuilder.cc
Go to the documentation of this file.
1 /*
2  * FWEcalRecHitProxyBuilder.cc
3  * FWorks
4  *
5  * Created by Ianna Osborne on 5/28/10.
6  *
7  */
11 
13 public:
16 
18  const float* corners, float scale, bool plotEt, std::vector<float>& scaledCorners, const CaloRecHit*) override;
19 
21 
24 };
25 
27  const float* corners, float scale, bool plotEt, std::vector<float>& scaledCorners, const CaloRecHit* hit) {
28  invertBox((EcalSubdetector(hit->detid().subdetId()) == EcalPreshower) && (corners[2] < 0));
29  FWCaloRecHitDigitSetProxyBuilder::viewContextBoxScale(corners, scale, plotEt, scaledCorners, hit);
30 }
31 
33 
34 // AMT: Scale box round cener. Prviousy used fireworks::energyTower3DCorners().
35 // Why differnt scale factor in EcalPreShower ???
36 
37 /*
38 void FWEcalRecHitProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext* vc)
39 {
40  m_plotEt = vc->getEnergyScale()->getPlotEt();
41 
42  const EcalRecHitCollection* collection = 0;
43  iItem->get( collection );
44  if (! collection)
45  return;
46 
47  TEveBoxSet* boxSet = addBoxSetToProduct(product);
48  std::vector<float> scaledCorners(24);
49  int index = 0;
50  for (std::vector<EcalRecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it)
51  {
52  const float* corners = item()->getGeom()->getCorners((*it).detid());
53  if (corners == 0)
54  continue;
55 
56  Float_t scale = 10.0;
57  bool reflect = false;
58  if (EcalSubdetector( (*it).detid().subdetId() ) == EcalPreshower)
59  {
60  scale = 1000.0; // FIXME: The scale should be taken form somewhere else
61  reflect = corners[2] < 0;
62  }
63 
64  if (m_plotEt)
65  fireworks::energyTower3DCorners(corners, (*it).energy() * scale, scaledCorners, reflect);
66  else
67  fireworks::energyTower3DCorners(corners, (*it).energy() * scale, scaledCorners, reflect);
68 
69  addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties());
70  }
71 }
72 */
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
virtual void viewContextBoxScale(const float *corners, float scale, bool plotEt, std::vector< float > &scaledCorners, const CaloRecHit *)
void viewContextBoxScale(const float *corners, float scale, bool plotEt, std::vector< float > &scaledCorners, const CaloRecHit *) override
const FWEcalRecHitProxyBuilder & operator=(const FWEcalRecHitProxyBuilder &)=delete
EcalSubdetector