CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWTracksRecHitsProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: FWTracksRecHitsProxyBuilder.cc,v 1.1 2009/01/16 10:37:00 Tom Danielson
3 //
4 
5 // user include files
6 #include "TEveGeoShape.h"
7 #include "TEvePointSet.h"
8 
13 
15 
17 
19 {
20 public:
22  virtual ~FWTracksRecHitsProxyBuilder( void ) {}
23 
25 
26  static bool representsSubPart( void );
27 
28 private:
29  void build( const reco::Track& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* );
30 
32  const FWTracksRecHitsProxyBuilder& operator=( const FWTracksRecHitsProxyBuilder& ); // stop default
33 };
34 
35 void
36 FWTracksRecHitsProxyBuilder::build( const reco::Track& track, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* )
37 {
38  if( track.extra().isAvailable() )
39  {
40  std::vector<TVector3> points;
41  const FWEventItem &iItem = *item();
42  fireworks::pushPixelHits( points, iItem, track );
43 
44  TEvePointSet* pointSet = new TEvePointSet();
45  for( std::vector<TVector3>::const_iterator it = points.begin(), itEnd = points.end(); it != itEnd; ++it )
46  {
47  pointSet->SetNextPoint( it->x(), it->y(), it->z());
48  }
49  setupAddElement(pointSet, &oItemHolder);
50 
51  fireworks::addSiStripClusters( item(), track, &oItemHolder, false, true );
52  }
53 }
54 
55 bool
57 {
58  return true;
59 }
60 
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:58
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:97
const FWTracksRecHitsProxyBuilder & operator=(const FWTracksRecHitsProxyBuilder &)
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
bool isAvailable() const
Definition: Ref.h:275
const FWEventItem * item() const
static const int kAll3DBits
Definition: FWViewType.h:59
void pushPixelHits(std::vector< TVector3 > &pixelPoints, const FWEventItem &iItem, const reco::Track &t)
Definition: TrackUtils.cc:622
void addSiStripClusters(const FWEventItem *iItem, const reco::Track &t, class TEveElement *tList, bool addNearbyClusters, bool master)
Definition: TrackUtils.cc:404