CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWPSimHitProxyBuilder Class Reference
Inheritance diagram for FWPSimHitProxyBuilder:
FWSimpleProxyBuilderTemplate< PSimHit > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWPSimHitProxyBuilder (void)
 
 FWPSimHitProxyBuilder (const FWPSimHitProxyBuilder &)=delete
 
bool haveSingleProduct () const override
 
const FWPSimHitProxyBuilderoperator= (const FWPSimHitProxyBuilder &)=delete
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWPSimHitProxyBuilder (void) override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< PSimHit >
 FWSimpleProxyBuilderTemplate ()
 
 FWSimpleProxyBuilderTemplate (const FWSimpleProxyBuilderTemplate &)=delete
 
const FWSimpleProxyBuilderTemplateoperator= (const FWSimpleProxyBuilderTemplate &)=delete
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 FWSimpleProxyBuilder (const FWSimpleProxyBuilder &)=delete
 
const FWSimpleProxyBuilderoperator= (const FWSimpleProxyBuilder &)=delete
 
 ~FWSimpleProxyBuilder () override
 
- 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
 
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 &)
 
virtual 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 ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 
static const std::string & classView ()
 
- 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...
 

Private Member Functions

void buildViewType (const PSimHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< PSimHit >
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void build (const void *, unsigned int iIndex, TEveElement &iItemHolder, const FWViewContext *)=0
 
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void build (const PSimHit &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
virtual void buildViewType (const void *, unsigned int iIndex, TEveElement &iItemHolder, FWViewType::EType, const FWViewContext *)=0
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
const PSimHitmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void clean () override
 
- 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 18 of file FWPSimHitProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWPSimHitProxyBuilder() [1/2]

FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( void  )
inline

Definition at line 20 of file FWPSimHitProxyBuilder.cc.

20 {}

◆ ~FWPSimHitProxyBuilder()

FWPSimHitProxyBuilder::~FWPSimHitProxyBuilder ( void  )
inlineoverride

Definition at line 21 of file FWPSimHitProxyBuilder.cc.

21 {}

◆ FWPSimHitProxyBuilder() [2/2]

FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( const FWPSimHitProxyBuilder )
delete

Member Function Documentation

◆ buildViewType()

void FWPSimHitProxyBuilder::buildViewType ( const PSimHit iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
FWViewType::EType  type,
const FWViewContext  
)
overrideprivatevirtual

Reimplemented from FWSimpleProxyBuilderTemplate< PSimHit >.

Definition at line 41 of file FWPSimHitProxyBuilder.cc.

References funct::abs(), PSimHit::detUnitId(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), l1ctLayer2EG_cff::id, FWProxyBuilderBase::item(), fwlog::kError, FWViewType::kRhoZ, DTWireId::layerId(), DTRecHitClients_cfi::local, PSimHit::localPosition(), DetId::Muon, PSimHit::particleType(), DetId::rawId(), FWProxyBuilderBase::setupAddElement(), DTSuperLayerId::superLayer(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

42  {
43  TEvePointSet* pointSet = new TEvePointSet;
44  setupAddElement(pointSet, &oItemHolder);
45  const FWGeometry* geom = item()->getGeom();
46  unsigned int rawid = iData.detUnitId();
47  if (!geom->contains(rawid)) {
48  fwLog(fwlog::kError) << "failed to get geometry of detid: " << rawid << std::endl;
49  return;
50  }
51 
52  float local[3] = {iData.localPosition().x(), iData.localPosition().y(), iData.localPosition().z()};
53  float global[3];
54 
55  // Specialized for DT simhits
56  DetId id(rawid);
57  if (id.det() == DetId::Muon && id.subdetId() == 1) {
58  DTWireId wId(rawid);
59  rawid = wId.layerId().rawId(); // DT simhits are in the RF of the DTLayer, but their ID is the id of the wire!
60  if (abs(iData.particleType()) != 13) {
61  pointSet->SetMarkerStyle(26); // Draw non-muon simhits (e.g. delta rays) with a different marker
62  }
63  if (type == FWViewType::kRhoZ) { //
64  // In RhoZ view, draw hits at the middle of the layer in the global Z coordinate,
65  // otherwise they won't align with 1D rechits, for which only one coordinate is known.
66  if (wId.superLayer() == 2) {
67  local[1] = 0;
68  } else {
69  local[0] = 0;
70  }
71  }
72  }
73 
74  geom->localToGlobal(rawid, local, global);
75  pointSet->SetNextPoint(global[0], global[1], global[2]);
76 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
unsigned int detUnitId() const
Definition: PSimHit.h:99
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: DetId.h:17
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
#define fwLog(_level_)
Definition: fwLog.h:45
Local3DPoint localPosition() const
Definition: PSimHit.h:54
int particleType() const
Definition: PSimHit.h:91
const FWEventItem * item() const

◆ classPurpose()

const std::string & FWPSimHitProxyBuilder::classPurpose ( )
static

Definition at line 78 of file FWPSimHitProxyBuilder.cc.

◆ classRegisterTypeName()

const std::string & FWPSimHitProxyBuilder::classRegisterTypeName ( )
static

Definition at line 78 of file FWPSimHitProxyBuilder.cc.

◆ classTypeName()

const std::string & FWPSimHitProxyBuilder::classTypeName ( )
static

Definition at line 78 of file FWPSimHitProxyBuilder.cc.

◆ classView()

const std::string & FWPSimHitProxyBuilder::classView ( )
static

Definition at line 78 of file FWPSimHitProxyBuilder.cc.

◆ haveSingleProduct()

bool FWPSimHitProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 23 of file FWPSimHitProxyBuilder.cc.

23 { return false; }

◆ operator=()

const FWPSimHitProxyBuilder& FWPSimHitProxyBuilder::operator= ( const FWPSimHitProxyBuilder )
delete

◆ purpose()

const std::string& FWPSimHitProxyBuilder::purpose ( ) const
inline

◆ typeName()

const std::string& FWPSimHitProxyBuilder::typeName ( ) const
inline

◆ view()

const std::string& FWPSimHitProxyBuilder::view ( ) const
inline