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 e, float et, float r)
 
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet (const reco::PFCluster &, const FWViewContext *, float r)
 
TEveScalableStraightLineSet * buildRhoZClusterLineSet (const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float e, float et, float r, float z)
 
TEveScalableStraightLineSet * buildRhoZClusterLineSet (const reco::PFCluster &, const FWViewContext *, float caloTransAngle, 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() [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 )
privatedelete

Member Function Documentation

◆ buildRhoPhiClusterLineSet() [1/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.

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 }

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().

◆ buildRhoPhiClusterLineSet() [2/2]

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

Definition at line 4 of file FWPFClusterRPZUtils.cc.

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 }

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().

◆ buildRhoZClusterLineSet() [1/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.

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 }

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().

◆ buildRhoZClusterLineSet() [2/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.

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 }

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().

◆ operator=()

const FWPFClusterRPZUtils& FWPFClusterRPZUtils::operator= ( const FWPFClusterRPZUtils )
privatedelete
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
FWPFClusterRPZUtils::buildRhoPhiClusterLineSet
TEveScalableStraightLineSet * buildRhoPhiClusterLineSet(const reco::PFCluster &, const FWViewContext *, float r)
Definition: FWPFClusterRPZUtils.cc:4
reco::CaloCluster::z
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
FWViewEnergyScale::getPlotEt
bool getPlotEt() const
Definition: FWViewEnergyScale.h:47
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:74
FWPFMaths::calculateEt
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDAxes::z
FWPFClusterRPZUtils::buildRhoZClusterLineSet
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
Definition: FWPFClusterRPZUtils.cc:38
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DDAxes::phi
FWViewEnergyScale::getScaleFactor3D
float getScaleFactor3D() const
Definition: FWViewEnergyScale.h:44
FWViewEnergyScale
Definition: FWViewEnergyScale.h:34
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
FWViewContext::getEnergyScale
FWViewEnergyScale * getEnergyScale() const
Definition: FWViewContext.cc:25
reco::CaloCluster::x
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37