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 
22 private:
25 };
26 
28  const float* corners, float scale, bool plotEt, std::vector<float>& scaledCorners, const CaloRecHit* hit) {
29  invertBox((EcalSubdetector(hit->detid().subdetId()) == EcalPreshower) && (corners[2] < 0));
30  FWCaloRecHitDigitSetProxyBuilder::viewContextBoxScale(corners, scale, plotEt, scaledCorners, hit);
31 }
32 
34 
35 // AMT: Scale box round cener. Prviousy used fireworks::energyTower3DCorners().
36 // Why differnt scale factor in EcalPreShower ???
37 
38 /*
39 void FWEcalRecHitProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext* vc)
40 {
41  m_plotEt = vc->getEnergyScale()->getPlotEt();
42 
43  const EcalRecHitCollection* collection = 0;
44  iItem->get( collection );
45  if (! collection)
46  return;
47 
48  TEveBoxSet* boxSet = addBoxSetToProduct(product);
49  std::vector<float> scaledCorners(24);
50  int index = 0;
51  for (std::vector<EcalRecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it)
52  {
53  const float* corners = item()->getGeom()->getCorners((*it).detid());
54  if (corners == 0)
55  continue;
56 
57  Float_t scale = 10.0;
58  bool reflect = false;
59  if (EcalSubdetector( (*it).detid().subdetId() ) == EcalPreshower)
60  {
61  scale = 1000.0; // FIXME: The scale should be taken form somewhere else
62  reflect = corners[2] < 0;
63  }
64 
65  if (m_plotEt)
66  fireworks::energyTower3DCorners(corners, (*it).energy() * scale, scaledCorners, reflect);
67  else
68  fireworks::energyTower3DCorners(corners, (*it).energy() * scale, scaledCorners, reflect);
69 
70  addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties());
71  }
72 }
73 */
FWEcalRecHitProxyBuilder::FWEcalRecHitProxyBuilder
FWEcalRecHitProxyBuilder()
Definition: FWEcalRecHitProxyBuilder.cc:14
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition: register_dataproxybuilder_macro.h:27
edm::SortedCollection< EcalRecHit >
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
CaloRecHit
Definition: CaloRecHit.h:23
EcalRecHitCollections.h
EcalSubdetector.h
FWEcalRecHitProxyBuilder
Definition: FWEcalRecHitProxyBuilder.cc:12
FWEcalRecHitProxyBuilder::~FWEcalRecHitProxyBuilder
~FWEcalRecHitProxyBuilder() override
Definition: FWEcalRecHitProxyBuilder.cc:15
FWCaloRecHitDigitSetProxyBuilder.h
EcalPreshower
Definition: EcalSubdetector.h:10
FWViewType::kISpyBit
Definition: FWViewType.h:54
FWCaloRecHitDigitSetProxyBuilder::viewContextBoxScale
virtual void viewContextBoxScale(const float *corners, float scale, bool plotEt, std::vector< float > &scaledCorners, const CaloRecHit *)
Definition: FWCaloRecHitDigitSetProxyBuilder.cc:27
FWCaloRecHitDigitSetProxyBuilder::invertBox
virtual void invertBox(bool x)
Definition: FWCaloRecHitDigitSetProxyBuilder.h:21
FWEcalRecHitProxyBuilder::operator=
const FWEcalRecHitProxyBuilder & operator=(const FWEcalRecHitProxyBuilder &)=delete
FWEcalRecHitProxyBuilder::viewContextBoxScale
void viewContextBoxScale(const float *corners, float scale, bool plotEt, std::vector< float > &scaledCorners, const CaloRecHit *) override
Definition: FWEcalRecHitProxyBuilder.cc:27
FWCaloRecHitDigitSetProxyBuilder
Definition: FWCaloRecHitDigitSetProxyBuilder.h:9
hit
Definition: SiStripHitEffFromCalibTree.cc:88