CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
FWPFClusterRPZUtils Class Reference

#include <FWPFClusterRPZUtils.h>

Public Member Functions

TEveScalableStraightLineSet * buildRhoPhiClusterLineSet (const reco::PFCluster &, const FWViewContext *, float r)
 
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet (const reco::PFCluster &, const FWViewContext *, float e, float et, float r)
 
TEveScalableStraightLineSet * buildRhoZClusterLineSet (const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
 
TEveScalableStraightLineSet * buildRhoZClusterLineSet (const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float e, float et, float r, float z)
 
 FWPFClusterRPZUtils ()
 
virtual ~FWPFClusterRPZUtils ()
 

Private Member Functions

 FWPFClusterRPZUtils (const FWPFClusterRPZUtils &)=delete
 
const FWPFClusterRPZUtilsoperator= (const FWPFClusterRPZUtils &)=delete
 

Detailed Description

Definition at line 38 of file FWPFClusterRPZUtils.h.

Constructor & Destructor Documentation

FWPFClusterRPZUtils::FWPFClusterRPZUtils ( )
inline

Definition at line 41 of file FWPFClusterRPZUtils.h.

41 {}
virtual FWPFClusterRPZUtils::~FWPFClusterRPZUtils ( )
inlinevirtual
FWPFClusterRPZUtils::FWPFClusterRPZUtils ( const FWPFClusterRPZUtils )
privatedelete

Member Function Documentation

TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoPhiClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  r 
)

Definition at line 4 of file FWPFClusterRPZUtils.cc.

References FWPFMaths::calculateEt(), HCALHighEnergyHPDFilter_cfi::energy, reco::PFCluster::energy(), EgHLTOffHistBins_cfi::et, reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

Referenced by FWPFBlockProxyBuilder::setupClusterElement(), and FWPFClusterRPZProxyBuilder::sharedBuild().

6  {
7  float energy, et;
8  TEveVector centre = TEveVector(cluster.x(), cluster.y(), cluster.z());
9 
10  energy = cluster.energy();
11  et = FWPFMaths::calculateEt(centre, energy);
12 
13  return buildRhoPhiClusterLineSet(cluster, vc, energy, et, r);
14 }
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet(const reco::PFCluster &, const FWViewContext *, float r)
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:177
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:171
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
double energy() const
cluster energy
Definition: PFCluster.h:78
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:174
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoPhiClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  e,
float  et,
float  r 
)

Definition at line 17 of file FWPFClusterRPZUtils.cc.

References funct::cos(), MillePedeFileConverter_cfg::e, FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), eostools::ls(), phi, funct::sin(), findQualityFiles::size, reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

18  {
19  TEveScalableStraightLineSet *ls = new TEveScalableStraightLineSet("rhophiCluster");
20  TEveVector vec;
21  float size = 1.f; // Stored in scale
22  double phi;
23 
24  vec = TEveVector(cluster.x(), cluster.y(), cluster.z());
25  phi = vec.Phi();
26 
27  FWViewEnergyScale *energyScale = vc->getEnergyScale();
28  ls->SetLineWidth(4);
29 
30  ls->SetScaleCenter(r * cos(phi), r * sin(phi), 0);
31  ls->AddLine(r * cos(phi), r * sin(phi), 0, (r + size) * cos(phi), (r + size) * sin(phi), 0);
32  ls->SetScale(energyScale->getScaleFactor3D() * (energyScale->getPlotEt() ? et : e));
33 
34  return ls;
35 }
size
Write out results.
float getScaleFactor3D() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
FWViewEnergyScale * getEnergyScale() const
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:177
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:171
def ls(path, rec=False)
Definition: eostools.py:349
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:174
bool getPlotEt() const
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoZClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  caloTransAngle,
float  r,
float  z 
)

Definition at line 38 of file FWPFClusterRPZUtils.cc.

References FWPFMaths::calculateEt(), HCALHighEnergyHPDFilter_cfi::energy, reco::PFCluster::energy(), EgHLTOffHistBins_cfi::et, reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

Referenced by FWPFClusterRPZProxyBuilder::build(), and FWPFBlockProxyBuilder::setupClusterElement().

39  {
40  float energy, et;
41  TEveVector centre = TEveVector(cluster.x(), cluster.y(), cluster.z());
42 
43  energy = cluster.energy();
44  et = FWPFMaths::calculateEt(centre, energy);
45 
46  return buildRhoZClusterLineSet(cluster, vc, caloTransAngle, energy, et, r, z);
47 }
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:177
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:171
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
double energy() const
cluster energy
Definition: PFCluster.h:78
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:174
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoZClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  caloTransAngle,
float  e,
float  et,
float  r,
float  z 
)

Definition at line 50 of file FWPFClusterRPZUtils.cc.

References funct::cos(), MillePedeFileConverter_cfg::e, FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), eostools::ls(), phi, Pi, funct::sin(), findQualityFiles::size, funct::tan(), theta(), reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

51  {
52  float size = 1.f; // Stored in scale
53  float offr = 4;
54  float ecalZ = z + offr / tan(caloTransAngle);
55  double theta, phi;
56  double rad(0);
57  TEveVector vec;
58  TEveScalableStraightLineSet *ls = new TEveScalableStraightLineSet("rhoZCluster");
59 
60  vec = TEveVector(cluster.x(), cluster.y(), cluster.z());
61  phi = vec.Phi();
62  theta = vec.Theta();
63 
64  FWViewEnergyScale *caloScale = vc->getEnergyScale();
65  ls->SetLineWidth(4);
66 
67  if (theta < caloTransAngle || TMath::Pi() - theta < caloTransAngle)
68  rad = ecalZ / fabs(cos(theta));
69  else
70  rad = r / sin(theta);
71 
72  ls->SetScaleCenter(0., (phi > 0 ? rad * fabs(sin(theta)) : -rad * fabs(sin(theta))), rad * cos(theta));
73  ls->AddLine(0.,
74  (phi > 0 ? rad * fabs(sin(theta)) : -rad * fabs(sin(theta))),
75  rad * cos(theta),
76  0.,
77  (phi > 0 ? (rad + size) * fabs(sin(theta)) : -(rad + size) * fabs(sin(theta))),
78  (rad + size) * cos(theta));
79  ls->SetScale(caloScale->getScaleFactor3D() * (caloScale->getPlotEt() ? et : e));
80 
81  return ls;
82 }
size
Write out results.
const double Pi
float getScaleFactor3D() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
FWViewEnergyScale * getEnergyScale() const
Geom::Theta< T > theta() const
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:177
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:171
def ls(path, rec=False)
Definition: eostools.py:349
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:174
bool getPlotEt() const
const FWPFClusterRPZUtils& FWPFClusterRPZUtils::operator= ( const FWPFClusterRPZUtils )
privatedelete