CMS 3D CMS Logo

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 public:
21  ~FWTracksRecHitsProxyBuilder(void) override {}
22 
24 
25  static bool representsSubPart(void);
26 
27 private:
29  void build(const reco::Track& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*) override;
30 
31  FWTracksRecHitsProxyBuilder(const FWTracksRecHitsProxyBuilder&) = delete; // stop default
32  const FWTracksRecHitsProxyBuilder& operator=(const FWTracksRecHitsProxyBuilder&) = delete; // stop default
33 };
34 
36  unsigned int iIndex,
37  TEveElement& oItemHolder,
38  const FWViewContext*) {
39  if (track.extra().isAvailable()) {
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  pointSet->SetNextPoint(it->x(), it->y(), it->z());
47  }
48  setupAddElement(pointSet, &oItemHolder);
49 
50  fireworks::addSiStripClusters(item(), track, &oItemHolder, false, true);
51  }
52 }
53 
55 
58  "TrackHits",
static const int kAllRPZBits
Definition: FWViewType.h:67
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWTracksRecHitsProxyBuilder & operator=(const FWTracksRecHitsProxyBuilder &)=delete
bool isAvailable() const
Definition: Ref.h:537
const FWEventItem * item() const
static const int kAll3DBits
Definition: FWViewType.h:68
void pushPixelHits(std::vector< TVector3 > &pixelPoints, const FWEventItem &iItem, const reco::Track &t)
Definition: TrackUtils.cc:533
void addSiStripClusters(const FWEventItem *iItem, const reco::Track &t, class TEveElement *tList, bool addNearbyClusters, bool master)
Definition: TrackUtils.cc:336
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)