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 | Private Attributes
FWLegoCandidate Class Reference

#include <FWLegoCandidate.h>

Inheritance diagram for FWLegoCandidate:

Public Member Functions

 FWLegoCandidate (const FWViewContext *vc, const fireworks::Context &context, float et, float energy, float pt, float eta, float phi)
 
 FWLegoCandidate ()
 
void updateScale (const FWViewContext *vc, const fireworks::Context &)
 
virtual ~FWLegoCandidate ()
 

Private Member Functions

 FWLegoCandidate (const FWLegoCandidate &)
 
const FWLegoCandidateoperator= (const FWLegoCandidate &)
 

Private Attributes

float m_energy
 
float m_et
 
float m_eta
 
float m_phi
 
float m_pt
 

Detailed Description

Definition at line 29 of file FWLegoCandidate.h.

Constructor & Destructor Documentation

FWLegoCandidate::FWLegoCandidate ( const FWViewContext vc,
const fireworks::Context context,
float  et,
float  energy,
float  pt,
float  eta,
float  phi 
)

Definition at line 8 of file FWLegoCandidate.cc.

References newFWLiteAna::base, funct::cos(), f, FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactorLego(), create_public_lumi_plots::log, m_energy, m_eta, m_phi, m_pt, Pi, CosmicsPD_Skims::radius, funct::sin(), and Geom::twoPi().

10 : m_energy(energy), m_et(et), m_pt(pt), m_eta(eta), m_phi(phi)
11 {
12  float base = 0.001; // Floor offset 1%
13 
14  // First vertical line
15  FWViewEnergyScale *caloScale = vc->getEnergyScale();
16  float val = caloScale->getPlotEt() ? m_pt : m_energy; // Use pt instead of et
17 
18  AddLine( m_eta, m_phi, base,
19  m_eta, m_phi, base + val * caloScale->getScaleFactorLego() );
20 
21  AddMarker( 0, 1.f );
22  SetMarkerStyle( 3 );
23  SetMarkerSize( 0.01 );
24  SetDepthTest( false );
25 
26  // Circle pt
27  const unsigned int nLineSegments = 20;
28  const double radius = log( 1 + m_pt ) / log(10) / 30.f;
29  //const double radius = m_pt / 100.f;
30  const double twoPi = 2 * TMath::Pi();
31 
32  for( unsigned int iPhi = 0; iPhi < nLineSegments; ++iPhi )
33  {
34  AddLine( m_eta + radius * cos( twoPi / nLineSegments * iPhi ),
35  m_phi + radius * sin( twoPi / nLineSegments * iPhi ),
36  base,
37  m_eta + radius * cos( twoPi / nLineSegments * ( iPhi + 1 ) ),
38  m_phi + radius * sin( twoPi / nLineSegments * ( iPhi + 1 ) ),
39  base );
40  }
41 }
tuple base
Main Program
Definition: newFWLiteAna.py:92
const double Pi
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
FWViewEnergyScale * getEnergyScale() const
T eta() const
float getScaleFactorLego() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double f[11][100]
double twoPi()
Definition: Pi.h:32
bool getPlotEt() const
Definition: DDAxes.h:10
FWLegoCandidate::FWLegoCandidate ( )
inline

Definition at line 35 of file FWLegoCandidate.h.

35 {}
virtual FWLegoCandidate::~FWLegoCandidate ( )
inlinevirtual

Definition at line 36 of file FWLegoCandidate.h.

36 {}
FWLegoCandidate::FWLegoCandidate ( const FWLegoCandidate )
private

Member Function Documentation

const FWLegoCandidate& FWLegoCandidate::operator= ( const FWLegoCandidate )
private
void FWLegoCandidate::updateScale ( const FWViewContext vc,
const fireworks::Context context 
)

Definition at line 45 of file FWLegoCandidate.cc.

References FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactorLego(), prof2calltree::l, m, m_energy, and m_pt.

Referenced by FWPFCandidatesLegoProxyBuilder::scaleProduct(), FWCandidateLegoProxyBuilder::scaleProduct(), FWPFPatJetLegoProxyBuilder< T >::scaleProduct(), FWPFClusterLegoProxyBuilder::scaleProduct(), and FWPFBlockProxyBuilder::scaleProduct().

46 {
47  FWViewEnergyScale *caloScale = vc->getEnergyScale();
48  float val = caloScale->getPlotEt() ? m_pt : m_energy; // Use pt instead of et
49  float scaleFac = caloScale->getScaleFactorLego();
50 
51  // Resize first line
52  TEveChunkManager::iterator li( GetLinePlex() );
53  li.next();
54  TEveStraightLineSet::Line_t &l = * ( TEveStraightLineSet::Line_t* ) li();
55  l.fV2[2] = l.fV1[2] + val * scaleFac;
56 
57  // Move end point (marker)
58  TEveChunkManager::iterator mi( GetMarkerPlex() );
59  mi.next();
60  TEveStraightLineSet::Marker_t &m = * ( TEveStraightLineSet::Marker_t* ) mi();
61  m.fV[2] = l.fV2[2]; // Set to new top of line
62 }
FWViewEnergyScale * getEnergyScale() const
float getScaleFactorLego() const
bool getPlotEt() const

Member Data Documentation

float FWLegoCandidate::m_energy
private

Definition at line 46 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate(), and updateScale().

float FWLegoCandidate::m_et
private

Definition at line 47 of file FWLegoCandidate.h.

float FWLegoCandidate::m_eta
private

Definition at line 49 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate().

float FWLegoCandidate::m_phi
private

Definition at line 50 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate().

float FWLegoCandidate::m_pt
private

Definition at line 48 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate(), and updateScale().