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)
 
bool haveSingleProduct () const override
 
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 ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 ~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
 
 FWPSimHitProxyBuilder (const FWPSimHitProxyBuilder &)=delete
 
const FWPSimHitProxyBuilderoperator= (const FWPSimHitProxyBuilder &)=delete
 

Additional Inherited Members

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

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.

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 }

References funct::abs(), PSimHit::detUnitId(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), triggerObjects_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().

◆ 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 )
privatedelete

◆ purpose()

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

Definition at line 25 of file FWPSimHitProxyBuilder.cc.

27 :
28  // Disable default copy constructor

◆ typeName()

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

Definition at line 25 of file FWPSimHitProxyBuilder.cc.

27 :
28  // Disable default copy constructor

◆ view()

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

Definition at line 25 of file FWPSimHitProxyBuilder.cc.

27 :
28  // Disable default copy constructor
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWGeometry
Definition: FWGeometry.h:27
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
FWViewType::kRhoZ
Definition: FWViewType.h:33
PSimHit::detUnitId
unsigned int detUnitId() const
Definition: PSimHit.h:97
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
DTWireId
Definition: DTWireId.h:12
PSimHit::localPosition
Local3DPoint localPosition() const
Definition: PSimHit.h:52
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
PSimHit::particleType
int particleType() const
Definition: PSimHit.h:89
fwlog::kError
Definition: fwLog.h:35
DetId::Muon
Definition: DetId.h:26
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22