src
Fireworks
Calo
plugins
FWHFRecHitProxyBuilder.cc
Go to the documentation of this file.
1
#include "
DataFormats/HcalRecHit/interface/HcalRecHitCollections.h
"
2
#include "
Fireworks/Calo/plugins/FWCaloRecHitDigitSetProxyBuilder.h
"
3
4
class
FWHFRecHitProxyBuilder
:
public
FWCaloRecHitDigitSetProxyBuilder
{
5
public
:
6
FWHFRecHitProxyBuilder
(
void
) {
invertBox
(
true
); }
7
~FWHFRecHitProxyBuilder
(
void
)
override
{}
8
9
REGISTER_PROXYBUILDER_METHODS
();
10
11
FWHFRecHitProxyBuilder
(
const
FWHFRecHitProxyBuilder
&) =
delete
;
12
const
FWHFRecHitProxyBuilder
&
operator=
(
const
FWHFRecHitProxyBuilder
&) =
delete
;
13
};
14
15
REGISTER_FWPROXYBUILDER
(
FWHFRecHitProxyBuilder
,
HFRecHitCollection
,
"HF RecHit"
,
FWViewType::kISpyBit
);
16
17
// AMT: Reflect box. Previously used energyScaledBox3DCorners(). Scaling and e/et mode added now.
18
19
/*
20
void
21
FWHFRecHitProxyBuilder::build( const FWEventItem* iItem, TEveElementList* product, const FWViewContext* )
22
{
23
const HFRecHitCollection* collection = 0;
24
iItem->get( collection );
25
26
if( 0 == collection )
27
{
28
return;
29
}
30
31
std::vector<HFRecHit>::const_iterator it = collection->begin();
32
std::vector<HFRecHit>::const_iterator itEnd = collection->end();
33
for( ; it != itEnd; ++it )
34
{
35
if(( *it ).energy() > m_maxEnergy )
36
m_maxEnergy = ( *it ).energy();
37
}
38
39
TEveBoxSet* boxSet = addBoxSetToProduct(product);
40
int index = 0;
41
for (std::vector<HFRecHit>::const_iterator it = collection->begin() ; it != collection->end(); ++it)
42
{
43
unsigned int rawid = ( *it ).detid().rawId();
44
if( ! context().getGeom()->contains( rawid ))
45
{
46
fwLog( fwlog::kInfo ) << "FWHFRecHitProxyBuilder cannot get geometry for DetId: "
47
<< rawid << ". Ignored.\n";
48
}
49
const float* corners = context().getGeom()->getCorners( rawid );
50
51
std::vector<float> scaledCorners(24);
52
if (corners)
53
fireworks::energyScaledBox3DCorners(corners, (*it).energy() / m_maxEnergy, scaledCorners, true);
54
55
addBox(boxSet, &scaledCorners[0], iItem->modelInfo(index++).displayProperties());
56
}
57
}
58
*/
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
edm::SortedCollection
Definition:
SortedCollection.h:49
FWCaloRecHitDigitSetProxyBuilder::invertBox
virtual void invertBox(bool x)
Definition:
FWCaloRecHitDigitSetProxyBuilder.h:21
FWCaloRecHitDigitSetProxyBuilder
Definition:
FWCaloRecHitDigitSetProxyBuilder.h:9
FWCaloRecHitDigitSetProxyBuilder.h
FWHFRecHitProxyBuilder::FWHFRecHitProxyBuilder
FWHFRecHitProxyBuilder(void)
Definition:
FWHFRecHitProxyBuilder.cc:6
HcalRecHitCollections.h
FWHFRecHitProxyBuilder::operator=
const FWHFRecHitProxyBuilder & operator=(const FWHFRecHitProxyBuilder &)=delete
FWHFRecHitProxyBuilder::~FWHFRecHitProxyBuilder
~FWHFRecHitProxyBuilder(void) override
Definition:
FWHFRecHitProxyBuilder.cc:7
FWHFRecHitProxyBuilder
Definition:
FWHFRecHitProxyBuilder.cc:4
FWViewType::kISpyBit
static constexpr unsigned int kISpyBit
Definition:
FWViewType.h:50
Generated for CMSSW Reference Manual by
1.8.14