CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
14 public:
17 
18  virtual void viewContextBoxScale( const float* corners, float scale, bool plotEt, std::vector<float>& scaledCorners, const CaloRecHit*);
19 
21 
22 private:
25 };
26 
27 
28 void FWEcalRecHitProxyBuilder::viewContextBoxScale( const float* corners, float scale, bool plotEt, std::vector<float>& scaledCorners, const CaloRecHit* hit)
29 {
30  invertBox((EcalSubdetector( hit->detid().subdetId() ) == EcalPreshower) && (corners[2] < 0));
31  FWCaloRecHitDigitSetProxyBuilder::viewContextBoxScale(corners, scale, plotEt, scaledCorners, hit );
32 }
33 
34 
36 
37 // AMT: Scale box round cener. Prviousy used fireworks::energyTower3DCorners().
38 // Why differnt scale factor in EcalPreShower ???
39 
40 
41 /*
42 void FWEcalRecHitProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext* vc)
43 {
44  m_plotEt = vc->getEnergyScale()->getPlotEt();
45 
46  const EcalRecHitCollection* collection = 0;
47  iItem->get( collection );
48  if (! collection)
49  return;
50 
51  TEveBoxSet* boxSet = addBoxSetToProduct(product);
52  std::vector<float> scaledCorners(24);
53  int index = 0;
54  for (std::vector<EcalRecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it)
55  {
56  const float* corners = item()->getGeom()->getCorners((*it).detid());
57  if (corners == 0)
58  continue;
59 
60  Float_t scale = 10.0;
61  bool reflect = false;
62  if (EcalSubdetector( (*it).detid().subdetId() ) == EcalPreshower)
63  {
64  scale = 1000.0; // FIXME: The scale should be taken form somewhere else
65  reflect = corners[2] < 0;
66  }
67 
68  if (m_plotEt)
69  fireworks::energyTower3DCorners(corners, (*it).energy() * scale, scaledCorners, reflect);
70  else
71  fireworks::energyTower3DCorners(corners, (*it).energy() * scale, scaledCorners, reflect);
72 
73  addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties());
74  }
75 }
76 */
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
const DetId & detid() const
Definition: CaloRecHit.h:20
virtual void viewContextBoxScale(const float *corners, float scale, bool plotEt, std::vector< float > &scaledCorners, const CaloRecHit *)
virtual void viewContextBoxScale(const float *corners, float scale, bool plotEt, std::vector< float > &scaledCorners, const CaloRecHit *)
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
const FWEcalRecHitProxyBuilder & operator=(const FWEcalRecHitProxyBuilder &)
EcalSubdetector