Public Member Functions | |
FWSecVertexProxyBuilder () | |
REGISTER_PROXYBUILDER_METHODS () | |
virtual | ~FWSecVertexProxyBuilder () |
Private Member Functions | |
void | build (const reco::SecondaryVertexTagInfo &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *) |
FWSecVertexProxyBuilder (const FWSecVertexProxyBuilder &) | |
const FWSecVertexProxyBuilder & | operator= (const FWSecVertexProxyBuilder &) |
Definition at line 22 of file FWSecVertexProxyBuilder.cc.
FWSecVertexProxyBuilder::FWSecVertexProxyBuilder | ( | ) | [inline] |
Definition at line 25 of file FWSecVertexProxyBuilder.cc.
{}
virtual FWSecVertexProxyBuilder::~FWSecVertexProxyBuilder | ( | ) | [inline, virtual] |
Definition at line 26 of file FWSecVertexProxyBuilder.cc.
{}
FWSecVertexProxyBuilder::FWSecVertexProxyBuilder | ( | const FWSecVertexProxyBuilder & | ) | [private] |
void FWSecVertexProxyBuilder::build | ( | const reco::SecondaryVertexTagInfo & | iData, |
unsigned int | iIndex, | ||
TEveElement & | oItemHolder, | ||
const FWViewContext * | |||
) | [private, virtual] |
iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement
Reimplemented from FWSimpleProxyBuilderTemplate< reco::SecondaryVertexTagInfo >.
Definition at line 39 of file FWSecVertexProxyBuilder.cc.
References reco::TrackBase::charge(), FWProxyBuilderBase::context(), ExpressReco_HICollisions_FallBack::e, reco::Vertex::error(), i, FWProxyBuilderBase::item(), j, m, reco::SecondaryVertexTagInfo::nVertices(), position, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), reco::SecondaryVertexTagInfo::secondaryVertex(), FWProxyBuilderBase::setupAddElement(), mathSSE::sqrt(), matplotRender::t, ExpressReco_HICollisions_FallBack::track, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), v, reco::TrackBase::vx(), reco::TrackBase::vy(), reco::TrackBase::vz(), reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().
{ TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur()); TEvePointSet* pointSet = new TEvePointSet(); pointSet->SetMainColor(item()->defaultDisplayProperties().color()); for(unsigned int i=0;i<iData.nVertices();i++) { const reco::Vertex & v = iData.secondaryVertex(i); // do we need this stuff? TGeoSphere * sphere = new TGeoSphere(0, 0.002); //would that leak? TGeoTranslation position(v.x(), v.y(), v.z() ); TEveGeoShape * shape = new TEveGeoShape(); sphere->SetBoxDimensions(2.5,2.5,2.5); shape->SetShape(sphere); shape->SetMainColor(item()->defaultDisplayProperties().color()); shape->SetMainTransparency(10); TEveTrans & t = shape->RefMainTrans(); reco::Vertex::Error e= v.error(); TMatrixDSym m(3); for(int i=0;i<3;i++) for(int j=0;j<3;j++) { m(i,j) = e(i,j); } TMatrixDEigen eig(m); TDecompSVD svd(m); TMatrixD mm = svd.GetU(); // TMatrixD mm = eig.GetEigenVectors().Print(); for(int i=0;i<3;i++) for(int j=0;j<3;j++) { t(i+1,j+1) = mm(i,j); } TVectorD vv ( eig.GetEigenValuesRe()) ; t.Scale(sqrt(vv(0))*1000.,sqrt(vv(1))*1000.,sqrt(vv(2))*1000.); t.SetPos(v.x(),v.y(),v.z()); setupAddElement(shape, &oItemHolder); pointSet->SetNextPoint( v.x(), v.y(), v.z() ); for(reco::Vertex::trackRef_iterator it = v.tracks_begin(), itEnd = v.tracks_end(); it != itEnd; ++it) { const reco::Track & track = *it->get(); TEveRecTrack t; t.fBeta = 1.; t.fV = TEveVector(track.vx(), track.vy(), track.vz()); t.fP = TEveVector(track.px(), track.py(), track.pz()); t.fSign = track.charge(); TEveTrack* trk = new TEveTrack(&t, context().getTrackPropagator()); trk->SetMainColor(item()->defaultDisplayProperties().color()); trk->MakeTrack(); setupAddElement(trk, &oItemHolder); } } setupAddElement(pointSet, &oItemHolder); }
const FWSecVertexProxyBuilder& FWSecVertexProxyBuilder::operator= | ( | const FWSecVertexProxyBuilder & | ) | [private] |
FWSecVertexProxyBuilder::REGISTER_PROXYBUILDER_METHODS | ( | ) |