Fireworks
Calo
plugins
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
*/
8
#include "
DataFormats/EcalDetId/interface/EcalSubdetector.h
"
9
#include "
Fireworks/Calo/plugins/FWCaloRecHitDigitSetProxyBuilder.h
"
10
#include "
DataFormats/EcalRecHit/interface/EcalRecHitCollections.h
"
11
12
class
FWEcalRecHitProxyBuilder
:
public
FWCaloRecHitDigitSetProxyBuilder
{
13
public
:
14
FWEcalRecHitProxyBuilder
() {}
15
~FWEcalRecHitProxyBuilder
()
override
{}
16
17
void
viewContextBoxScale
(
18
const
float
* corners,
float
scale
,
bool
plotEt, std::vector<float>& scaledCorners,
const
CaloRecHit
*)
override
;
19
20
REGISTER_PROXYBUILDER_METHODS
();
21
22
private
:
23
FWEcalRecHitProxyBuilder
(
const
FWEcalRecHitProxyBuilder
&) =
delete
;
24
const
FWEcalRecHitProxyBuilder
&
operator=
(
const
FWEcalRecHitProxyBuilder
&) =
delete
;
25
};
26
27
void
FWEcalRecHitProxyBuilder::viewContextBoxScale
(
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
33
REGISTER_FWPROXYBUILDER
(
FWEcalRecHitProxyBuilder
,
EcalRecHitCollection
,
"Ecal RecHit"
,
FWViewType::kISpyBit
);
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:28
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
Generated for CMSSW Reference Manual by
1.8.16