CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
FWVertexWithTracksProxyBuilder Class Reference
Inheritance diagram for FWVertexWithTracksProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::Vertex > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWVertexWithTracksProxyBuilder ()
 
 REGISTER_PROXYBUILDER_METHODS ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::Vertex >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
virtual ~FWSimpleProxyBuilder ()
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual bool haveSingleProduct () const
 
const FWEventItemitem () const
 
virtual void itemBeingDestroyed (const FWEventItem *)
 
void itemChanged (const FWEventItem *)
 
int layer () const
 
void modelChanges (const FWModelIds &)
 
void removePerViewProduct (FWViewType::EType, const FWViewContext *vc)
 
void scaleChanged (const FWViewContext *)
 
void setHaveWindow (bool iFlag)
 
virtual void setInteractionList (FWInteractionList *, const std::string &)
 
void setItem (const FWEventItem *iItem)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual bool willHandleInteraction () const
 
virtual ~FWProxyBuilderBase ()
 

Private Member Functions

virtual void build (const reco::Vertex &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
 FWVertexWithTracksProxyBuilder (const FWVertexWithTracksProxyBuilder &)
 
const
FWVertexWithTracksProxyBuilder
operator= (const FWVertexWithTracksProxyBuilder &)
 

Additional Inherited Members

- Static Public Member Functions inherited from FWSimpleProxyBuilder
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::Vertex >
const reco::VertexmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)
 
virtual void clean ()
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void cleanLocal ()
 
TEveCompound * createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const
 
 FWProxyBuilderBase (const FWProxyBuilderBase &)
 
void increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 45 of file FWVertexWithTracksProxyBuilder.cc.

Constructor & Destructor Documentation

FWVertexWithTracksProxyBuilder::FWVertexWithTracksProxyBuilder ( )

Definition at line 79 of file FWVertexWithTracksProxyBuilder.cc.

80 {
81 }
FWVertexWithTracksProxyBuilder::FWVertexWithTracksProxyBuilder ( const FWVertexWithTracksProxyBuilder )
private

Member Function Documentation

void FWVertexWithTracksProxyBuilder::build ( const reco::Vertex iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
privatevirtual

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::Vertex >.

Definition at line 88 of file FWVertexWithTracksProxyBuilder.cc.

References reco::TrackBase::charge(), FWProxyBuilderBase::context(), ExpressReco_HICollisions_FallBack::e, reco::Vertex::error(), i, FWProxyBuilderBase::item(), j, m, position, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), mathSSE::sqrt(), matplotRender::t, ExpressReco_HICollisions_FallBack::track, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), reco::Vertex::trackWeight(), v, reco::TrackBase::vx(), reco::TrackBase::vy(), reco::TrackBase::vz(), reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().

89 {
90 
91  TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur());
92  TEvePointSet* pointSet = new TEvePointSet();
93  pointSet->SetMainColor(item()->defaultDisplayProperties().color());
94 // for(unsigned int i=0;i<iData.nVertices();i++)
95 // {
96  const reco::Vertex & v = iData;
97  // do we need this stuff?
98  TGeoSphere * sphere = new TGeoSphere(0, 0.002); //would that leak?
99  TGeoTranslation position(v.x(), v.y(), v.z() );
100  TEveGeoShape * shape = new TEveGeoShape();
101  sphere->SetBoxDimensions(2.5,2.5,2.5);
102  shape->SetShape(sphere);
103  shape->SetMainColor(item()->defaultDisplayProperties().color());
104  shape->SetMainTransparency(10);
105 
106  TEveTrans & t = shape->RefMainTrans();
108  TMatrixDSym m(3);
109  for(int i=0;i<3;i++)
110  for(int j=0;j<3;j++)
111  {
112  m(i,j) = e(i,j);
113  }
114  TMatrixDEigen eig(m);
115  TDecompSVD svd(m);
116  TMatrixD mm = svd.GetU();
117  // TMatrixD mm = eig.GetEigenVectors().Print();
118  for(int i=0;i<3;i++)
119  for(int j=0;j<3;j++)
120  {
121  t(i+1,j+1) = mm(i,j);
122  }
123  TVectorD vv ( eig.GetEigenValuesRe()) ;
124  t.Scale(sqrt(vv(0))*1000.,sqrt(vv(1))*1000.,sqrt(vv(2))*1000.);
125  t.SetPos(v.x(),v.y(),v.z());
126  oItemHolder.AddElement(shape);
127  pointSet->SetNextPoint( v.x(), v.y(), v.z() );
129  it != v.tracks_end() ; ++it)
130  {
131  float w = v.trackWeight(*it);
132  if (w < 0.5) continue;
133 
134  const reco::Track & track = *it->get();
135  TEveRecTrack t;
136  t.fBeta = 1.;
137  t.fV = TEveVector(track.vx(), track.vy(), track.vz());
138  t.fP = TEveVector(track.px(), track.py(), track.pz());
139  t.fSign = track.charge();
140  TEveTrack* trk = new TEveTrack(&t, context().getTrackPropagator());
141  trk->SetMainColor(item()->defaultDisplayProperties().color());
142  trk->MakeTrack();
143  oItemHolder.AddElement( trk );
144  }
145 
146 // }
147  oItemHolder.AddElement( pointSet );
148 
149 
150 
151 
152 }
const fireworks::Context & context() const
int i
Definition: DBlmapReader.cc:9
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.cc:45
double y() const
y coordinate
Definition: Vertex.h:97
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:132
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
const FWEventItem * item() const
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
T sqrt(T t)
Definition: SSEVec.h:28
int j
Definition: DBlmapReader.cc:9
double z() const
y coordinate
Definition: Vertex.h:99
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:136
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:146
double x() const
x coordinate
Definition: Vertex.h:95
Error error() const
return SMatrix
Definition: Vertex.h:116
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:144
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:38
int charge() const
track electric charge
Definition: TrackBase.h:112
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.cc:40
mathSSE::Vec4< T > v
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:134
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:142
const FWVertexWithTracksProxyBuilder& FWVertexWithTracksProxyBuilder::operator= ( const FWVertexWithTracksProxyBuilder )
private
FWVertexWithTracksProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )