26 #include "TEvePointSet.h" 27 #include "TMatrixDEigen.h" 28 #include "TMatrixDSym.h" 29 #include "TDecompSVD.h" 31 #include "TEveTrans.h" 32 #include "TEveTrack.h" 33 #include "TEveTrackPropagator.h" 34 #include "TEveStraightLineSet.h" 35 #include "TEveBoxSet.h" 36 #include "TGeoSphere.h" 37 #include "TEveGeoNode.h" 38 #include "TEveVSDStructs.h" 53 "Ellipse Color Index", 6
l, 0
l, (
long)
context().colorManager()->numberOfLimitedColors());
68 TEveElement* iCompound,
75 TEveElement& oItemHolder,
80 TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur());
81 TEvePointSet* pointSet =
new TEvePointSet();
82 pointSet->SetNextPoint(v.
x(), v.
y(), v.
z());
86 if (
item()->getConfig()->value<bool>(
"Draw Ellipse")) {
89 eveEllipsoid->
RefPos().Set(v.
x(), v.
y(), v.
z());
93 for (
int i = 0;
i < 3;
i++)
94 for (
int j = 0;
j < 3;
j++) {
100 double ellipseScale = 1.;
104 eveEllipsoid->
SetScale(ellipseScale);
107 TMatrixDEigen eig(m);
108 TVectorD vv(eig.GetEigenValuesRe());
109 eveEllipsoid->
RefExtent3D().Set(
sqrt(vv(0)) * ellipseScale,
sqrt(vv(1)) * ellipseScale,
sqrt(vv(2)) * ellipseScale);
111 eveEllipsoid->SetLineWidth(2);
113 eveEllipsoid->SetMainTransparency(
TMath::Min(100, 80 +
item()->defaultDisplayProperties().transparency() / 5));
118 eveEllipsoid->SetMainColor(color +
context().colorManager()->offsetOfLimitedColors());
122 if (
item()->getConfig()->value<bool>(
"Draw Tracks")) {
131 t.fV = TEveVector(track.
vx(), track.
vy(), track.
vz());
132 t.fP = TEveVector(track.
px(), track.
py(), track.
pz());
134 TEveTrack* trk =
new TEveTrack(&t,
context().getTrackPropagator());
135 trk->SetMainColor(
item()->defaultDisplayProperties().color());
140 if (
item()->getConfig()->value<bool>(
"Draw Pseudo Track")) {
143 t.fV = TEveVector(v.
x(), v.
y(), v.
z());
144 t.fP = TEveVector(-v.
p4().px(), -v.
p4().py(), -v.
p4().pz());
146 TEveTrack* trk =
new TEveTrack(&t,
context().getTrackPropagator());
147 trk->SetLineStyle(7);
157 if (cIdx >= 0 &&
int(iIndex) ==
int(cIdx)) {
159 << Form(
"idx [%d], (%f %f %f) \n", cIdx, v.
x(), v.
y(), v.
z());
165 TEveElement* iCompound,
169 TEveElement* el = iCompound->FindChild(
"Ellipsoid");
171 el->SetMainColor(
item()->getConfig()->value<long>(
"Ellipse Color Index") +
172 context().colorManager()->offsetOfLimitedColors());
const fireworks::Context & context() const
FWProxyBuilderConfiguration * getConfig() const
static const int kAllRPZBits
trackRef_iterator tracks_end() const
last iterator over tracks
double y() const
y coordinate
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
math::Error< dimension >::type Error
covariance error matrix (3x3)
void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
double px() const
x coordinate of momentum vector
const FWEventItem * item() const
const FWVertexProxyBuilder & operator=(const FWVertexProxyBuilder &)=delete
virtual void setItem(const FWEventItem *iItem)
double z() const
z coordinate
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
static Context * getInstance()
double pz() const
z coordinate of momentum vector
FWGenericParameter< T > * assertParam(const std::string &name, T def)
void setEventCenter(float, float, float)
void setItem(const FWEventItem *iItem) override
double vz() const
z coordinate of the reference point on track
double x() const
x coordinate
TEveVector & RefExtent3D()
math::XYZTLorentzVectorD p4(float mass=0.13957018, float minWeight=0.5) const
Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products...
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Error error() const
return SMatrix
CmsShowCommon * commonPrefs() const
double vy() const
y coordinate of the reference point on track
T value(const std::string &name)
int charge() const
track electric charge
trackRef_iterator tracks_begin() const
first iterator over tracks
void increaseComponentTransparency(unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
double py() const
y coordinate of momentum vector
double vx() const
x coordinate of the reference point on track
~FWVertexProxyBuilder() override