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 //______________________________________________________________________________
void localModelChanges(const FWModelId &iId, TEveElement *el, FWViewType::EType viewType, const FWViewContext *vc) override
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
int index() const
Definition: FWModelId.h:41
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:56
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
const fireworks::Context & context() const
void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:169
double energy() const
cluster energy
Definition: PFCluster.h:74
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:175
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
Layer
layer definition
Definition: PFLayer.h:29
void sharedBuild(const reco::PFCluster &, TEveElement &, const FWViewContext *)
void updateScale(const FWViewContext *vc, const fireworks::Context &)
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
const FWEventItem * item() const