CMS 3D CMS Logo

List of all members | Public 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 ()
 
 FWPFClusterRPZUtils (const FWPFClusterRPZUtils &)=delete
 
const FWPFClusterRPZUtilsoperator= (const FWPFClusterRPZUtils &)=delete
 
virtual ~FWPFClusterRPZUtils ()
 

Detailed Description

Definition at line 38 of file FWPFClusterRPZUtils.h.

Constructor & Destructor Documentation

◆ FWPFClusterRPZUtils() [1/2]

FWPFClusterRPZUtils::FWPFClusterRPZUtils ( )
inline

Definition at line 41 of file FWPFClusterRPZUtils.h.

41 {}

◆ ~FWPFClusterRPZUtils()

virtual FWPFClusterRPZUtils::~FWPFClusterRPZUtils ( )
inlinevirtual

Definition at line 42 of file FWPFClusterRPZUtils.h.

42 {}

◆ FWPFClusterRPZUtils() [2/2]

FWPFClusterRPZUtils::FWPFClusterRPZUtils ( const FWPFClusterRPZUtils )
delete

Member Function Documentation

◆ buildRhoPhiClusterLineSet() [1/2]

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, alignCSCRings::r, 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 }
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet(const reco::PFCluster &, const FWViewContext *, float r)
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

◆ buildRhoPhiClusterLineSet() [2/2]

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, EgHLTOffHistBins_cfi::et, FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), eostools::ls(), phi, alignCSCRings::r, 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.
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
bool getPlotEt() const
FWViewEnergyScale * getEnergyScale() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
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 getScaleFactor3D() const
def ls(path, rec=False)
Definition: eostools.py:349

◆ buildRhoZClusterLineSet() [1/2]

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, alignCSCRings::r, reco::CaloCluster::x(), reco::CaloCluster::y(), z, 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 x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
double energy() const
cluster energy
Definition: PFCluster.h:74
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
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

◆ buildRhoZClusterLineSet() [2/2]

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, EgHLTOffHistBins_cfi::et, FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), eostools::ls(), phi, Pi, alignCSCRings::r, funct::sin(), findQualityFiles::size, funct::tan(), theta(), reco::CaloCluster::x(), reco::CaloCluster::y(), z, 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
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
bool getPlotEt() const
FWViewEnergyScale * getEnergyScale() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
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 getScaleFactor3D() const
def ls(path, rec=False)
Definition: eostools.py:349
Geom::Theta< T > theta() const

◆ operator=()

const FWPFClusterRPZUtils& FWPFClusterRPZUtils::operator= ( const FWPFClusterRPZUtils )
delete