CMS 3D CMS Logo

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 ()
 
 FWLegoCandidate (const FWViewContext *vc, const fireworks::Context &context, float et, float energy, float pt, float eta, float phi)
 
void updateScale (const FWViewContext *vc, const fireworks::Context &)
 
 ~FWLegoCandidate () override
 

Private Member Functions

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

Private Attributes

float m_energy
 
float m_et
 
float m_eta
 
float m_phi
 
float m_pt
 

Detailed Description

Definition at line 28 of file FWLegoCandidate.h.

Constructor & Destructor Documentation

◆ FWLegoCandidate() [1/3]

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.

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

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

◆ FWLegoCandidate() [2/3]

FWLegoCandidate::FWLegoCandidate ( )
inline

Definition at line 38 of file FWLegoCandidate.h.

38 {}

◆ ~FWLegoCandidate()

FWLegoCandidate::~FWLegoCandidate ( )
inlineoverride

Definition at line 39 of file FWLegoCandidate.h.

39 {}

◆ FWLegoCandidate() [3/3]

FWLegoCandidate::FWLegoCandidate ( const FWLegoCandidate )
privatedelete

Member Function Documentation

◆ operator=()

const FWLegoCandidate& FWLegoCandidate::operator= ( const FWLegoCandidate )
privatedelete

◆ updateScale()

void FWLegoCandidate::updateScale ( const FWViewContext vc,
const fireworks::Context context 
)

Definition at line 41 of file FWLegoCandidate.cc.

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

References FWViewContext::getEnergyScale(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactorLego(), cmsLHEtoEOSManager::l, visualization-live-secondInstance_cfg::m, m_energy, m_pt, and heppy_batch::val.

Referenced by FWCandidateHGCalLegoProxyBuilder::scaleProduct(), FWPFCandidatesLegoProxyBuilder::scaleProduct(), FWCandidateLegoProxyBuilder::scaleProduct(), FWPFClusterLegoProxyBuilder::scaleProduct(), and FWPFBlockProxyBuilder::scaleProduct().

Member Data Documentation

◆ m_energy

float FWLegoCandidate::m_energy
private

Definition at line 49 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate(), and updateScale().

◆ m_et

float FWLegoCandidate::m_et
private

Definition at line 50 of file FWLegoCandidate.h.

◆ m_eta

float FWLegoCandidate::m_eta
private

Definition at line 52 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate().

◆ m_phi

float FWLegoCandidate::m_phi
private

Definition at line 53 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate().

◆ m_pt

float FWLegoCandidate::m_pt
private

Definition at line 51 of file FWLegoCandidate.h.

Referenced by FWLegoCandidate(), and updateScale().

f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
FWViewEnergyScale::getPlotEt
bool getPlotEt() const
Definition: FWViewEnergyScale.h:47
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
PVValHelper::eta
Definition: PVValidationHelpers.h:70
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
Geom::twoPi
constexpr double twoPi()
Definition: Pi.h:32
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
FWLegoCandidate::m_pt
float m_pt
Definition: FWLegoCandidate.h:51
FWViewEnergyScale::getScaleFactorLego
float getScaleFactorLego() const
Definition: FWViewEnergyScale.h:45
FWLegoCandidate::m_phi
float m_phi
Definition: FWLegoCandidate.h:53
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
DDAxes::phi
heppy_batch.val
val
Definition: heppy_batch.py:351
FWLegoCandidate::m_et
float m_et
Definition: FWLegoCandidate.h:50
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
FWViewEnergyScale
Definition: FWViewEnergyScale.h:34
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
FWLegoCandidate::m_eta
float m_eta
Definition: FWLegoCandidate.h:52
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
newFWLiteAna.base
base
Definition: newFWLiteAna.py:92
FWViewContext::getEnergyScale
FWViewEnergyScale * getEnergyScale() const
Definition: FWViewContext.cc:25
FWLegoCandidate::m_energy
float m_energy
Definition: FWLegoCandidate.h:49