125 addLine(TString::Format(
" %d items in selection", (
int) sted.size()));
127 addLine(
"--------------------------------------------------+--------------");
128 addLine(
" px py pz pT | Collection");
129 addLine(
"--------------------------------------------------+--------------");
136 double sum_len_xy = 0;
138 for (std::set<FWModelId>::const_iterator
i = sted.begin();
i != sted.end(); ++
i)
142 TClass *model_class =
const_cast<TClass*
>(
i->item()->modelType());
143 void *model_data =
const_cast<void*
> (
i->item()->modelData(
i->index()));
149 (model_class->DynamicCast(rc_class, model_data));
154 v.SetXYZ(rc->
px(), rc->
py(), rc->
pz());
159 (model_class->DynamicCast(rtb_class, model_data));
164 v.SetXYZ(rtb->
px(), rtb->
py(), rtb->
pz());
171 sum_len += TMath::Sqrt(v.mag2());
172 sum_len_xy += TMath::Sqrt(v.perp2());
174 line = TString::Format(
" %+10.3f %+10.3f %+10.3f %10.3f", v.x(), v.y(), v.z(), TMath::Sqrt(v.perp2()));
179 line = TString::Format(
" -------- not a Candidate or TrackBase --------");
181 line += TString::Format(
" | %s[%d]",
i->item()->name().c_str(),
i->index());
186 addLine(
"--------------------------------------------------+--------------");
187 addLine(TString::Format(
" %+10.3f %+10.3f %+10.3f %10.3f | Sum", sum.x(), sum.y(), sum.z(), TMath::Sqrt(sum.perp2())));
189 addLine(TString::Format(
"m = %10.3f", TMath::Sqrt(
TMath::Max(0.0, sum_len * sum_len - sum.mag2()))));
190 addLine(TString::Format(
"mT = %10.3f", TMath::Sqrt(
TMath::Max(0.0, sum_len_xy * sum_len_xy - sum.perp2()))));
const std::set< FWModelId > & selected() const
virtual double pz() const =0
z coordinate of momentum vector
double px() const
x coordinate of momentum vector
void addLine(const TString &line)
virtual double py() const =0
y coordinate of momentum vector
double pz() const
z coordinate of momentum vector
virtual double px() const =0
x coordinate of momentum vector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
FWSelectionManager * m_selectionMgr
double py() const
y coordinate of momentum vector