CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWPFClusterRPZUtils Class Reference

#include <FWPFClusterRPZUtils.h>

List of all members.

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 e, float et, float r, float z)
TEveScalableStraightLineSet * buildRhoZClusterLineSet (const reco::PFCluster &, const FWViewContext *, float caloTransAngle, float r, float z)
float calculateEt (const reco::PFCluster &, float e)
 FWPFClusterRPZUtils ()
virtual ~FWPFClusterRPZUtils ()

Private Member Functions

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

Detailed Description

Definition at line 38 of file FWPFClusterRPZUtils.h.


Constructor & Destructor Documentation

FWPFClusterRPZUtils::FWPFClusterRPZUtils ( ) [inline]

Definition at line 42 of file FWPFClusterRPZUtils.h.

{}
virtual FWPFClusterRPZUtils::~FWPFClusterRPZUtils ( ) [inline, virtual]

Definition at line 43 of file FWPFClusterRPZUtils.h.

{}
FWPFClusterRPZUtils::FWPFClusterRPZUtils ( const FWPFClusterRPZUtils ) [private]

Member Function Documentation

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

Definition at line 35 of file FWPFClusterRPZUtils.cc.

References funct::cos(), ExpressReco_HICollisions_FallBack::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().

{
   TEveScalableStraightLineSet *ls = new TEveScalableStraightLineSet( "rhophiCluster" );
   TEveVector vec;
   float size = 1.f; // Stored in scale
   double phi;

   vec = TEveVector( cluster.x(), cluster.y(), cluster.z() );
   phi = vec.Phi();

   FWViewEnergyScale *energyScale = vc->getEnergyScale();
   ls->SetLineWidth( 4 );

   ls->SetScaleCenter( r * cos( phi ), r * sin( phi ), 0 );
   ls->AddLine( r * cos( phi ), r * sin( phi ), 0, ( r + size ) * cos( phi ), ( r + size ) * sin( phi ), 0 );
   ls->SetScale( energyScale->getScaleFactor3D() * ( energyScale->getPlotEt() ? et : e ) );

   return ls;
}
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoZClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  caloTransAngle,
float  e,
float  et,
float  r,
float  z 
)

Definition at line 71 of file FWPFClusterRPZUtils.cc.

References funct::cos(), ExpressReco_HICollisions_FallBack::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().

{
      float size = 1.f;       // Stored in scale
      float offr = 4;
      float ecalZ = z + offr / tan( caloTransAngle );
      double theta, phi;
      double rad(0);
      TEveVector vec;
      TEveScalableStraightLineSet *ls = new TEveScalableStraightLineSet( "rhoZCluster" );

      vec = TEveVector( cluster.x(), cluster.y(), cluster.z() ); 
      phi = vec.Phi();
      theta =  vec.Theta();

      FWViewEnergyScale *caloScale = vc->getEnergyScale();
      ls->SetLineWidth( 4 );

      if ( theta < caloTransAngle || TMath::Pi() - theta < caloTransAngle )
         rad = ecalZ / fabs( cos( theta ) );
      else
         rad = r / sin( theta );

      ls->SetScaleCenter( 0., ( phi > 0 ? rad * fabs( sin( theta ) ) : -rad * fabs( sin( theta ) ) ), rad * cos( theta ) );
      ls->AddLine( 0., ( phi > 0 ? rad * fabs( sin( theta ) ) : -rad * fabs( sin( theta ) ) ), rad * cos( theta ),
                   0., ( phi > 0 ? ( rad + size ) * fabs( sin ( theta ) ) : -( rad + size ) * fabs( sin( theta) ) ), 
                   ( rad + size ) * cos( theta ) );
      ls->SetScale( caloScale->getScaleFactor3D() * ( caloScale->getPlotEt() ? et : e ) );

      return ls;
}
TEveScalableStraightLineSet * FWPFClusterRPZUtils::buildRhoZClusterLineSet ( const reco::PFCluster cluster,
const FWViewContext vc,
float  caloTransAngle,
float  r,
float  z 
)

Definition at line 58 of file FWPFClusterRPZUtils.cc.

References calculateEt(), reco::PFCluster::energy(), relval_parameters_module::energy, and ExpressReco_HICollisions_FallBack::et.

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

{
   float energy, et;

   energy = cluster.energy();
   et = calculateEt( cluster, energy );

   return buildRhoZClusterLineSet( cluster, vc, caloTransAngle, energy, et, r, z );
}
float FWPFClusterRPZUtils::calculateEt ( const reco::PFCluster cluster,
float  e 
)

Definition at line 5 of file FWPFClusterRPZUtils.cc.

References ExpressReco_HICollisions_FallBack::e, ExpressReco_HICollisions_FallBack::et, reco::CaloCluster::x(), reco::CaloCluster::y(), and reco::CaloCluster::z().

Referenced by FWPFClusterRPZProxyBuilder::build(), buildRhoPhiClusterLineSet(), buildRhoZClusterLineSet(), and FWPFClusterRPZProxyBuilder::sharedBuild().

{
   float et = 0.f;
   TEveVector vec;

   vec.fX = cluster.x();
   vec.fY = cluster.y();
   vec.fZ = cluster.z();

   vec.Normalize();
   vec *= e;
   et = vec.Perp();

   return et;
}
const FWPFClusterRPZUtils& FWPFClusterRPZUtils::operator= ( const FWPFClusterRPZUtils ) [private]