CMS 3D CMS Logo

FWPFClusterRPZProxyBuilder.cc
Go to the documentation of this file.
2 
3 //______________________________________________________________________________
5 
6 //______________________________________________________________________________
8 
9 //______________________________________________________________________________
11  FWViewType::EType viewType,
12  const FWViewContext *vc) {
13  typedef std::vector<ScalableLines> Lines_t;
14  FWViewEnergyScale *caloScale = vc->getEnergyScale();
15 
16  for (Lines_t::iterator i = m_clusters.begin(); i != m_clusters.end(); ++i) {
17  if (vc == (*i).m_vc) {
18  float value = caloScale->getPlotEt() ? (*i).m_et : (*i).m_energy;
19  (*i).m_ls->SetScale(caloScale->getScaleFactor3D() * value);
20  TEveProjected *proj = *(*i).m_ls->BeginProjecteds();
21  proj->UpdateProjection();
22  }
23  }
24 }
25 
26 //______________________________________________________________________________
28  const reco::PFCluster &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *vc, float r) {
29  /* Handles RhoPhi view */
30  TEveScalableStraightLineSet *ls;
31  TEveVector centre = TEveVector(iData.x(), iData.y(), iData.z());
33  float energy, et;
34 
35  energy = iData.energy();
36  et = FWPFMaths::calculateEt(centre, energy);
38 
40  ls->SetLineColor(dp.color());
41  m_clusters.push_back(ScalableLines(ls, et, energy, vc));
42  setupAddElement(ls, &oItemHolder);
43 }
44 
45 //______________________________________________________________________________
47  unsigned int iIndex,
48  TEveElement &oItemHolder,
49  const FWViewContext *vc) {
50  /* Handles RhoZ view */
51  float energy, et;
52  float ecalR = context().caloR1();
53  float ecalZ = context().caloZ1();
55  TEveScalableStraightLineSet *ls;
56  TEveVector centre = TEveVector(iData.x(), iData.y(), iData.z());
57 
58  energy = iData.energy();
59  et = FWPFMaths::calculateEt(centre, energy);
61 
62  ls = m_clusterUtils->buildRhoZClusterLineSet(iData, vc, context().caloTransAngle(), energy, et, ecalR, ecalZ);
63  ls->SetLineColor(dp.color());
64 
65  m_clusters.push_back(ScalableLines(ls, et, energy, vc));
66  setupAddElement(ls, &oItemHolder);
67 }
68 
69 //______________________________________________________________________________
71  unsigned int iIndex,
72  TEveElement &oItemHolder,
73  const FWViewContext *vc) {
74  PFLayer::Layer layer = iData.layer();
75  const FWEventItem::ModelInfo &info = item()->modelInfo(iIndex);
76  if (info.displayProperties().isVisible()) {
77  if (layer < 0)
78  sharedBuild(iData, iIndex, oItemHolder, vc, FWPFGeom::caloR1());
79  else
80  sharedBuild(iData, iIndex, oItemHolder, vc, FWPFGeom::caloR2());
81  }
82 }
83 
84 //______________________________________________________________________________
86  unsigned int iIndex,
87  TEveElement &oItemHolder,
88  const FWViewContext *vc) {
89  const FWEventItem::ModelInfo &info = item()->modelInfo(iIndex);
90  if (info.displayProperties().isVisible())
91  sharedBuild(iData, iIndex, oItemHolder, vc, FWPFGeom::caloR1());
92 }
93 
94 //______________________________________________________________________________
FWViewType::kRhoPhiPFBit
Definition: FWViewType.h:53
FWViewType::kRhoPhiBit
Definition: FWViewType.h:51
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
reco::CaloCluster::y
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:175
FWEventItem::modelInfo
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
mps_fire.i
i
Definition: mps_fire.py:355
FWViewType::EType
EType
Definition: FWViewType.h:31
FWPFClusterRPZUtils
Definition: FWPFClusterRPZUtils.h:38
reco::PFCluster::layer
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:100
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
FWPFClusterRPZUtils::buildRhoPhiClusterLineSet
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet(const reco::PFCluster &, const FWViewContext *, float r)
Definition: FWPFClusterRPZUtils.cc:4
FWPFClusterRPZProxyBuilder::~FWPFClusterRPZProxyBuilder
~FWPFClusterRPZProxyBuilder() override
Definition: FWPFClusterRPZProxyBuilder.cc:7
reco::CaloCluster::z
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
FWViewEnergyScale::getPlotEt
bool getPlotEt() const
Definition: FWViewEnergyScale.h:47
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
FWPFClusterRPZProxyBuilder::FWPFClusterRPZProxyBuilder
FWPFClusterRPZProxyBuilder()
Definition: FWPFClusterRPZProxyBuilder.cc:4
ScalableLines
Definition: FWPFClusterRPZUtils.h:26
FWPFClusterRPZProxyBuilder::m_clusters
std::vector< ScalableLines > m_clusters
Definition: FWPFClusterRPZProxyBuilder.h:48
FWEventItem::defaultDisplayProperties
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
FWEventItem::ModelInfo
Definition: FWEventItem.h:58
FWProxyBuilderBase::layer
int layer() const
Definition: FWProxyBuilderBase.cc:414
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:78
FWPFMaths::calculateEt
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:157
fireworks::Context::voteMaxEtAndEnergy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
FWPFHcalClusterRPZProxyBuilder
Definition: FWPFClusterRPZProxyBuilder.h:93
FWPFClusterRPZUtils::buildRhoZClusterLineSet
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
Definition: FWPFClusterRPZUtils.cc:38
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
FWPFClusterRPZProxyBuilder::m_clusterUtils
FWPFClusterRPZUtils * m_clusterUtils
Definition: FWPFClusterRPZProxyBuilder.h:49
PFLayer::Layer
Layer
layer definition
Definition: PFLayer.h:29
FWPFGeom::caloR1
float caloR1()
Definition: FWPFGeom.h:20
FWPFClusterRPZProxyBuilder::sharedBuild
virtual void sharedBuild(const reco::PFCluster &cluster, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *vc, float radius)
Definition: FWPFClusterRPZProxyBuilder.cc:27
amptDefault_cfi.proj
proj
Definition: amptDefault_cfi.py:13
FWViewType::kRhoZBit
Definition: FWViewType.h:52
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
value
Definition: value.py:1
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWViewContext
Definition: FWViewContext.h:32
FWDisplayProperties
Definition: FWDisplayProperties.h:28
alignCSCRings.r
r
Definition: alignCSCRings.py:93
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWViewEnergyScale::getScaleFactor3D
float getScaleFactor3D() const
Definition: FWViewEnergyScale.h:44
FWPFClusterRPZProxyBuilder
Definition: FWPFClusterRPZProxyBuilder.h:25
fireworks::Context::caloZ1
static float caloZ1(bool offset=true)
Definition: Context.cc:183
FWPFEcalClusterRPZProxyBuilder
Definition: FWPFClusterRPZProxyBuilder.h:68
relativeConstraints.value
value
Definition: relativeConstraints.py:53
reco::PFCluster
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:46
FWViewEnergyScale
Definition: FWViewEnergyScale.h:34
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition: FWProxyBuilderBase.cc:412
FWPFClusterRPZProxyBuilder::scaleProduct
void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
Definition: FWPFClusterRPZProxyBuilder.cc:10
FWViewContext::getEnergyScale
FWViewEnergyScale * getEnergyScale() const
Definition: FWViewContext.cc:25
class-composition.parent
parent
Definition: class-composition.py:88
fireworks::Context::caloR1
static float caloR1(bool offset=true)
Definition: Context.cc:180
reco::CaloCluster::x
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
FWPFClusterRPZProxyBuilder.h
FWPFGeom::caloR2
float caloR2()
Definition: FWPFGeom.h:26