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
FWPFLegoCandidate Class Reference

#include <FWPFLegoCandidate.h>

Inheritance diagram for FWPFLegoCandidate:

Public Member Functions

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

Private Member Functions

 FWPFLegoCandidate (const FWPFLegoCandidate &)
 
const FWPFLegoCandidateoperator= (const FWPFLegoCandidate &)
 

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 FWPFLegoCandidate.h.

Constructor & Destructor Documentation

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

Definition at line 8 of file FWPFLegoCandidate.cc.

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

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_et : m_energy;
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]
Log< T >::type log(const T &t)
Definition: Log.h:22
double twoPi()
Definition: Pi.h:32
bool getPlotEt() const
Definition: DDAxes.h:10
FWPFLegoCandidate::FWPFLegoCandidate ( )
inline

Definition at line 34 of file FWPFLegoCandidate.h.

34 {}
virtual FWPFLegoCandidate::~FWPFLegoCandidate ( )
inlinevirtual

Definition at line 35 of file FWPFLegoCandidate.h.

35 {}
FWPFLegoCandidate::FWPFLegoCandidate ( const FWPFLegoCandidate )
private

Member Function Documentation

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

Definition at line 45 of file FWPFLegoCandidate.cc.

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

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

46 {
47  FWViewEnergyScale *caloScale = vc->getEnergyScale();
48  float val = caloScale->getPlotEt() ? m_et : m_energy;
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 FWPFLegoCandidate::m_energy
private

Definition at line 45 of file FWPFLegoCandidate.h.

Referenced by FWPFLegoCandidate(), and updateScale().

float FWPFLegoCandidate::m_et
private

Definition at line 46 of file FWPFLegoCandidate.h.

Referenced by FWPFLegoCandidate(), and updateScale().

float FWPFLegoCandidate::m_eta
private

Definition at line 48 of file FWPFLegoCandidate.h.

Referenced by FWPFLegoCandidate().

float FWPFLegoCandidate::m_phi
private

Definition at line 49 of file FWPFLegoCandidate.h.

Referenced by FWPFLegoCandidate().

float FWPFLegoCandidate::m_pt
private

Definition at line 47 of file FWPFLegoCandidate.h.

Referenced by FWPFLegoCandidate().