#include <Fireworks/Core/interface/FWInvMassDialog.h>
Description: [one line class summary]
Usage: <usage>
Definition at line 32 of file FWInvMassDialog.h.
◆ FWInvMassDialog() [1/2]
Definition at line 42 of file FWInvMassDialog.cc.
44 SetWindowName(
"Invariant Mass Dialog");
45 SetCleanup(kDeepCleanup);
47 m_text =
new TGTextView(
this);
48 AddFrame(
m_text,
new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY, 1, 1, 1, 1));
50 m_button =
new TGTextButton(
this,
"Calculate");
51 AddFrame(
m_button,
new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 1, 1, 1, 1));
53 m_button->Connect(
"Clicked()",
"FWInvMassDialog",
this,
"Calculate()");
References m_button, and m_text.
◆ ~FWInvMassDialog()
FWInvMassDialog::~FWInvMassDialog |
( |
| ) |
|
|
override |
◆ FWInvMassDialog() [2/2]
◆ addLine()
void FWInvMassDialog::addLine |
( |
const TString & |
line | ) |
|
|
protected |
◆ beginUpdate()
void FWInvMassDialog::beginUpdate |
( |
| ) |
|
|
protected |
◆ Calculate()
void FWInvMassDialog::Calculate |
( |
| ) |
|
Definition at line 102 of file FWInvMassDialog.cc.
107 addLine(TString::Format(
" %d items in selection", (
int)sted.size()));
109 addLine(
"--------------------------------------------------+--------------");
110 addLine(
" px py pz pT | Collection");
111 addLine(
"--------------------------------------------------+--------------");
118 double sum_len_xy = 0;
123 for (std::set<FWModelId>::const_iterator
i = sted.begin();
i != sted.end(); ++
i, ++
n) {
126 TClass *model_class = const_cast<TClass *>(
i->item()->modelType());
127 void *model_data = const_cast<void *>(
i->item()->modelData(
i->index()));
132 reco::Candidate *rc = reinterpret_cast<reco::Candidate *>(model_class->DynamicCast(rc_class, model_data));
136 v.SetXYZ(rc->
px(), rc->
py(), rc->
pz());
138 reco::TrackBase *rtb = reinterpret_cast<reco::TrackBase *>(model_class->DynamicCast(rtb_class, model_data));
140 if (rtb !=
nullptr) {
142 v.SetXYZ(rtb->
px(), rtb->
py(), rtb->
pz());
148 sum_len += TMath::Sqrt(
v.mag2());
149 sum_len_xy += TMath::Sqrt(
v.perp2());
151 line = TString::Format(
" %+10.3f %+10.3f %+10.3f %10.3f",
v.x(),
v.y(),
v.z(), TMath::Sqrt(
v.perp2()));
154 line = TString::Format(
" -------- not a Candidate or TrackBase --------");
156 line += TString::Format(
" | %s[%d]",
i->item()->name().c_str(),
i->index());
166 addLine(
"--------------------------------------------------+--------------");
168 " %+10.3f %+10.3f %+10.3f %10.3f | Sum", sum.x(), sum.y(), sum.z(), TMath::Sqrt(sum.perp2())));
170 addLine(TString::Format(
"m = %10.3f", TMath::Sqrt(
TMath::Max(0.0, sum_len * sum_len - sum.mag2()))));
171 addLine(TString::Format(
"mT = %10.3f", TMath::Sqrt(
TMath::Max(0.0, sum_len_xy * sum_len_xy - sum.perp2()))));
172 addLine(TString::Format(
"HT = %10.3f", sum_len_xy));
References addLine(), beginUpdate(), SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, endUpdate(), first, mps_fire::i, mps_splice::line, m_selectionMgr, Max(), dqmiodumpmetadata::n, reco::Candidate::px(), reco::TrackBase::px(), reco::Candidate::py(), reco::TrackBase::py(), reco::Candidate::pz(), reco::TrackBase::pz(), edm::second(), FWSelectionManager::selected(), and findQualityFiles::v.
◆ ClassDefOverride()
◆ CloseWindow()
void FWInvMassDialog::CloseWindow |
( |
| ) |
|
|
override |
◆ endUpdate()
void FWInvMassDialog::endUpdate |
( |
| ) |
|
|
protected |
◆ operator=()
◆ m_button
TGTextButton* FWInvMassDialog::m_button |
|
private |
◆ m_firstLine
bool FWInvMassDialog::m_firstLine |
|
private |
◆ m_selectionMgr
◆ m_text
TGTextView* FWInvMassDialog::m_text |
|
private |