test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
const FWPFClusterRPZUtilsoperator= (const FWPFClusterRPZUtils &)
 

Detailed Description

Definition at line 39 of file FWPFClusterRPZUtils.h.

Constructor & Destructor Documentation

FWPFClusterRPZUtils::FWPFClusterRPZUtils ( )
inline

Definition at line 43 of file FWPFClusterRPZUtils.h.

43 {}
virtual FWPFClusterRPZUtils::~FWPFClusterRPZUtils ( )
inlinevirtual

Definition at line 44 of file FWPFClusterRPZUtils.h.

44 {}
FWPFClusterRPZUtils::FWPFClusterRPZUtils ( const FWPFClusterRPZUtils )
private

Member Function Documentation

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

Definition at line 5 of file FWPFClusterRPZUtils.cc.

References FWPFMaths::calculateEt(), relval_parameters_module::energy, reco::PFCluster::energy(), 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:158
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:152
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
double energy() const
cluster energy
Definition: PFCluster.h:79
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:155
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoPhiClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  e,
float  et,
float  r 
)

Definition at line 18 of file FWPFClusterRPZUtils.cc.

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

20 {
21  TEveScalableStraightLineSet *ls = new TEveScalableStraightLineSet( "rhophiCluster" );
22  TEveVector vec;
23  float size = 1.f; // Stored in scale
24  double phi;
25 
26  vec = TEveVector( cluster.x(), cluster.y(), cluster.z() );
27  phi = vec.Phi();
28 
29  FWViewEnergyScale *energyScale = vc->getEnergyScale();
30  ls->SetLineWidth( 4 );
31 
32  ls->SetScaleCenter( r * cos( phi ), r * sin( phi ), 0 );
33  ls->AddLine( r * cos( phi ), r * sin( phi ), 0, ( r + size ) * cos( phi ), ( r + size ) * sin( phi ), 0 );
34  ls->SetScale( energyScale->getScaleFactor3D() * ( energyScale->getPlotEt() ? et : e ) );
35 
36  return ls;
37 }
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:158
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:152
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:155
tuple size
Write out results.
bool getPlotEt() const
Definition: DDAxes.h:10
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoZClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  caloTransAngle,
float  r,
float  z 
)

Definition at line 41 of file FWPFClusterRPZUtils.cc.

References buildRhoZClusterLineSet(), FWPFMaths::calculateEt(), relval_parameters_module::energy, reco::PFCluster::energy(), reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

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

43 {
44  float energy, et;
45  TEveVector centre = TEveVector( cluster.x(), cluster.y(), cluster.z() );
46 
47  energy = cluster.energy();
48  et = FWPFMaths::calculateEt( centre, energy );
49 
50  return buildRhoZClusterLineSet( cluster, vc, caloTransAngle, energy, et, r, z );
51 }
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:158
float float float z
TEveScalableStraightLineSet * buildRhoZClusterLineSet(const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:152
float calculateEt(const TEveVector &centre, float e)
Definition: FWPFMaths.cc:115
double energy() const
cluster energy
Definition: PFCluster.h:79
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:155
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoZClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  caloTransAngle,
float  e,
float  et,
float  r,
float  z 
)

Definition at line 55 of file FWPFClusterRPZUtils.cc.

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

57 {
58  float size = 1.f; // Stored in scale
59  float offr = 4;
60  float ecalZ = z + offr / tan( caloTransAngle );
61  double theta, phi;
62  double rad(0);
63  TEveVector vec;
64  TEveScalableStraightLineSet *ls = new TEveScalableStraightLineSet( "rhoZCluster" );
65 
66  vec = TEveVector( cluster.x(), cluster.y(), cluster.z() );
67  phi = vec.Phi();
68  theta = vec.Theta();
69 
70  FWViewEnergyScale *caloScale = vc->getEnergyScale();
71  ls->SetLineWidth( 4 );
72 
73  if ( theta < caloTransAngle || TMath::Pi() - theta < caloTransAngle )
74  rad = ecalZ / fabs( cos( theta ) );
75  else
76  rad = r / sin( theta );
77 
78  ls->SetScaleCenter( 0., ( phi > 0 ? rad * fabs( sin( theta ) ) : -rad * fabs( sin( theta ) ) ), rad * cos( theta ) );
79  ls->AddLine( 0., ( phi > 0 ? rad * fabs( sin( theta ) ) : -rad * fabs( sin( theta ) ) ), rad * cos( theta ),
80  0., ( phi > 0 ? ( rad + size ) * fabs( sin ( theta ) ) : -( rad + size ) * fabs( sin( theta) ) ),
81  ( rad + size ) * cos( theta ) );
82  ls->SetScale( caloScale->getScaleFactor3D() * ( caloScale->getPlotEt() ? et : e ) );
83 
84  return ls;
85 }
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:158
float float float z
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:152
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:155
tuple size
Write out results.
bool getPlotEt() const
Definition: DDAxes.h:10
const FWPFClusterRPZUtils& FWPFClusterRPZUtils::operator= ( const FWPFClusterRPZUtils )
private