CMS 3D CMS Logo

FWTracksModulesProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: FWTracksModulesProxyBuilder.cc,v 1.1 2009/01/16 10:37:00 Tom Danielson
3 //
4 
5 // user include files
6 #include "TEveGeoShape.h"
7 
12 
16 
18 
20 public:
22  ~FWTracksModulesProxyBuilder(void) override {}
23 
25 
26  static bool representsSubPart(void);
27 
28 private:
30  void build(const reco::Track& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*) override;
31 
32  FWTracksModulesProxyBuilder(const FWTracksModulesProxyBuilder&) = delete; // stop default
33  const FWTracksModulesProxyBuilder& operator=(const FWTracksModulesProxyBuilder&) = delete; // stop default
34 };
35 
37  unsigned int iIndex,
38  TEveElement& oItemHolder,
39  const FWViewContext*) {
40  if (track.extra().isAvailable()) {
41  const FWGeometry* geom = item()->getGeom();
42 
43  for (trackingRecHit_iterator recIt = track.recHitsBegin(), recItEnd = track.recHitsEnd(); recIt != recItEnd;
44  ++recIt) {
45  DetId detid = (*recIt)->geographicalId();
46  if ((*recIt)->isValid()) {
47  if (detid.det() == DetId::Muon) {
48  if (detid.subdetId() == MuonSubdetId::DT)
49  detid = DetId(DTChamberId(detid)); // get rid of layer bits
50  }
51 
52  TEveGeoShape* shape = geom->getEveShape(detid);
53  if (shape) {
54  setupAddElement(shape, &oItemHolder);
55  } else {
56  fwLog(fwlog::kDebug) << "Failed to get shape extract for track-id " << iIndex << ", tracking rec hit: "
57  << "\n"
58  << fireworks::info(detid) << std::endl;
59  }
60  }
61  }
62  }
63 }
64 
66 
69  "TrackDets",
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWGeometry
Definition: FWGeometry.h:27
FWSimpleProxyBuilderTemplate.h
FWTracksModulesProxyBuilder::FWTracksModulesProxyBuilder
FWTracksModulesProxyBuilder(void)
Definition: FWTracksModulesProxyBuilder.cc:21
FWViewType::kAllRPZBits
static const int kAllRPZBits
Definition: FWViewType.h:67
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition: register_dataproxybuilder_macro.h:28
fireworks::info
std::string info(const DetId &)
Definition: TrackUtils.cc:599
TrackUtils.h
FWViewType::kAll3DBits
static const int kAll3DBits
Definition: FWViewType.h:68
DetId
Definition: DetId.h:17
Track.h
reco::Track
Definition: Track.h:27
FWTracksModulesProxyBuilder::representsSubPart
static bool representsSubPart(void)
Definition: FWTracksModulesProxyBuilder.cc:65
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
DTChamberId.h
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
FWGeometry.h
FWTracksModulesProxyBuilder::~FWTracksModulesProxyBuilder
~FWTracksModulesProxyBuilder(void) override
Definition: FWTracksModulesProxyBuilder.cc:22
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
fwLog.h
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
MuonSubdetId.h
FWEventItem.h
FWViewContext
Definition: FWViewContext.h:32
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
fwlog::kDebug
Definition: fwLog.h:35
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
FWSimpleProxyBuilderTemplate
Definition: FWSimpleProxyBuilderTemplate.h:30
DetId::Muon
Definition: DetId.h:26
DTChamberId
Definition: DTChamberId.h:14
FWTracksModulesProxyBuilder
Definition: FWTracksModulesProxyBuilder.cc:19
FWTracksModulesProxyBuilder::operator=
const FWTracksModulesProxyBuilder & operator=(const FWTracksModulesProxyBuilder &)=delete