CMS 3D CMS Logo

FWPFClusterLegoProxyBuilder.cc
Go to the documentation of this file.
3 
4 //______________________________________________________________________________
6  TEveElement *parent,
7  FWViewType::EType viewType,
8  const FWViewContext *vc) {
9  // Line set marker is not the same colour as line, fixed here
10  if ((parent)->HasChildren()) {
11  for (TEveElement::List_i j = parent->BeginChildren(); j != parent->EndChildren(); j++) {
12  FWLegoCandidate *cluster = dynamic_cast<FWLegoCandidate *>(*j);
13  cluster->SetMarkerColor(FWProxyBuilderBase::item()->modelInfo(iId.index()).displayProperties().color());
14  cluster->ElementChanged();
15  }
16  }
17 }
18 
19 //______________________________________________________________________________
22  const FWViewContext *vc) {
23  for (TEveElement::List_i i = parent->BeginChildren(); i != parent->EndChildren(); ++i) {
24  if ((*i)->HasChildren()) {
25  TEveElement *el = (*i)->FirstChild(); // there is only one child added in this proxy builder
26  FWLegoCandidate *cluster = dynamic_cast<FWLegoCandidate *>(el);
27  cluster->updateScale(vc, context());
28  }
29  }
30 }
31 
32 //______________________________________________________________________________
34  TEveElement &oItemHolder,
35  const FWViewContext *vc) {
36  TEveVector centre = TEveVector(iData.x(), iData.y(), iData.z());
37  float energy = iData.energy();
38  float et = FWPFMaths::calculateEt(centre, energy);
39  float pt = et;
40  float eta = iData.eta();
41  float phi = iData.phi();
42 
44 
46  cluster->SetMarkerColor(FWProxyBuilderBase::item()->defaultDisplayProperties().color());
47  setupAddElement(cluster, &oItemHolder);
48 }
49 
50 //______________________________ECAL____________________________________________
52  unsigned int iIndex,
53  TEveElement &oItemHolder,
54  const FWViewContext *vc) {
55  PFLayer::Layer layer = iData.layer();
56  if (layer < 0)
57  sharedBuild(iData, oItemHolder, vc);
58 }
59 
60 //______________________________HCAL____________________________________________
62  unsigned int iIndex,
63  TEveElement &oItemHolder,
64  const FWViewContext *vc) {
65  PFLayer::Layer layer = iData.layer();
66  if (layer > 0)
67  sharedBuild(iData, oItemHolder, vc);
68 }
69 
70 //______________________________________________________________________________
reco::CaloCluster::phi
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
reco::CaloCluster::y
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:175
mps_fire.i
i
Definition: mps_fire.py:355
FWViewType::kLegoBit
Definition: FWViewType.h:55
FWViewType::EType
EType
Definition: FWViewType.h:31
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
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
FWModelId
Definition: FWModelId.h:28
FWViewType::kLegoPFECALBit
Definition: FWViewType.h:57
FWPFClusterLegoProxyBuilder::sharedBuild
void sharedBuild(const reco::PFCluster &, TEveElement &, const FWViewContext *)
Definition: FWPFClusterLegoProxyBuilder.cc:33
reco::CaloCluster::z
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
FWLegoCandidate
Definition: FWLegoCandidate.h:28
FWPFEcalClusterLegoProxyBuilder
Definition: FWPFClusterLegoProxyBuilder.h:69
FWPFHcalClusterLegoProxyBuilder
Definition: FWPFClusterLegoProxyBuilder.h:91
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
fireworks::Context::voteMaxEtAndEnergy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
PVValHelper::eta
Definition: PVValidationHelpers.h:69
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
FWModelId::index
int index() const
Definition: FWModelId.h:41
FWPFClusterLegoProxyBuilder.h
FWPFClusterLegoProxyBuilder::localModelChanges
void localModelChanges(const FWModelId &iId, TEveElement *el, FWViewType::EType viewType, const FWViewContext *vc) override
Definition: FWPFClusterLegoProxyBuilder.cc:5
PFLayer::Layer
Layer
layer definition
Definition: PFLayer.h:29
reco::CaloCluster::eta
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWViewContext
Definition: FWViewContext.h:32
DDAxes::phi
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
type
type
Definition: HCALResponse.h:21
reco::PFCluster
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:46
FWLegoCandidate.h
FWLegoCandidate::updateScale
void updateScale(const FWViewContext *vc, const fireworks::Context &)
Definition: FWLegoCandidate.cc:41
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition: FWProxyBuilderBase.cc:412
FWPFClusterLegoProxyBuilder::scaleProduct
void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
Definition: FWPFClusterLegoProxyBuilder.cc:20
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
class-composition.parent
parent
Definition: class-composition.py:88
reco::CaloCluster::x
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172