Fireworks
Calo
plugins
FWHORecHitProxyBuilder.cc
Go to the documentation of this file.
1
#include "
Fireworks/Calo/plugins/FWCaloRecHitDigitSetProxyBuilder.h
"
2
#include "
DataFormats/HcalRecHit/interface/HcalRecHitCollections.h
"
3
4
class
FWHORecHitProxyBuilder
:
public
FWCaloRecHitDigitSetProxyBuilder
{
5
public
:
6
FWHORecHitProxyBuilder
(
void
) {
invertBox
(
true
); }
7
~FWHORecHitProxyBuilder
(
void
)
override
{}
8
9
REGISTER_PROXYBUILDER_METHODS
();
10
11
FWHORecHitProxyBuilder
(
const
FWHORecHitProxyBuilder
&) =
delete
;
12
const
FWHORecHitProxyBuilder
&
operator=
(
const
FWHORecHitProxyBuilder
&) =
delete
;
13
};
14
15
REGISTER_FWPROXYBUILDER
(
FWHORecHitProxyBuilder
,
HORecHitCollection
,
"HO RecHit"
,
FWViewType::kISpyBit
);
16
17
// AMT scale around center, box is inverted. Scaling and e/et mode added now. Previously used fireworks::energyScaledBox3DCorners().
18
19
/*
20
void
21
FWHORecHitProxyBuilder::build( const FWEventItem* iItem, TEveElementList* product, const FWViewContext* )
22
{
23
const HORecHitCollection* collection = 0;
24
iItem->get( collection );
25
26
if( 0 == collection )
27
{
28
return;
29
}
30
std::vector<HORecHit>::const_iterator it = collection->begin();
31
std::vector<HORecHit>::const_iterator itEnd = collection->end();
32
for( ; it != itEnd; ++it )
33
{
34
if(( *it ).energy() > m_maxEnergy)
35
m_maxEnergy = ( *it ).energy();
36
}
37
38
TEveBoxSet* boxSet = addBoxSetToProduct(product);
39
int index = 0;
40
for (std::vector<HORecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it)
41
{
42
const float* corners = item()->getGeom()->getCorners((*it).detid());
43
std::vector<float> scaledCorners(24);
44
if (corners)
45
fireworks::energyScaledBox3DCorners(corners, (*it).energy() / m_maxEnergy, scaledCorners, true);
46
47
addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties());
48
}
49
}
50
*/
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition:
register_dataproxybuilder_macro.h:31
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition:
FWProxyBuilderFactory.h:33
FWViewType::kISpyBit
Definition:
FWViewType.h:54
edm::SortedCollection
Definition:
SortedCollection.h:49
FWCaloRecHitDigitSetProxyBuilder::invertBox
virtual void invertBox(bool x)
Definition:
FWCaloRecHitDigitSetProxyBuilder.h:21
FWCaloRecHitDigitSetProxyBuilder
Definition:
FWCaloRecHitDigitSetProxyBuilder.h:9
FWCaloRecHitDigitSetProxyBuilder.h
FWHORecHitProxyBuilder::operator=
const FWHORecHitProxyBuilder & operator=(const FWHORecHitProxyBuilder &)=delete
FWHORecHitProxyBuilder::~FWHORecHitProxyBuilder
~FWHORecHitProxyBuilder(void) override
Definition:
FWHORecHitProxyBuilder.cc:7
FWHORecHitProxyBuilder::FWHORecHitProxyBuilder
FWHORecHitProxyBuilder(void)
Definition:
FWHORecHitProxyBuilder.cc:6
HcalRecHitCollections.h
FWHORecHitProxyBuilder
Definition:
FWHORecHitProxyBuilder.cc:4
Generated for CMSSW Reference Manual by
1.8.14