CMS 3D CMS Logo

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

Public Member Functions

 FWRPCRecHitProxyBuilder ()
 
bool haveSingleProduct () const override
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWRPCRecHitProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< RPCRecHit >
 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 RPCRecHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 
 FWRPCRecHitProxyBuilder (const FWRPCRecHitProxyBuilder &)=delete
 
const FWRPCRecHitProxyBuilderoperator= (const FWRPCRecHitProxyBuilder &)=delete
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< RPCRecHit >
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 RPCRecHit &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 RPCRecHitmodelData (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 22 of file FWRPCRecHitProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWRPCRecHitProxyBuilder() [1/2]

FWRPCRecHitProxyBuilder::FWRPCRecHitProxyBuilder ( )
inline

Definition at line 24 of file FWRPCRecHitProxyBuilder.cc.

24 {}

◆ ~FWRPCRecHitProxyBuilder()

FWRPCRecHitProxyBuilder::~FWRPCRecHitProxyBuilder ( )
inlineoverride

Definition at line 25 of file FWRPCRecHitProxyBuilder.cc.

25 {}

◆ FWRPCRecHitProxyBuilder() [2/2]

FWRPCRecHitProxyBuilder::FWRPCRecHitProxyBuilder ( const FWRPCRecHitProxyBuilder )
privatedelete

Member Function Documentation

◆ buildViewType()

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

Reimplemented from FWSimpleProxyBuilderTemplate< RPCRecHit >.

Definition at line 43 of file FWRPCRecHitProxyBuilder.cc.

47  {
48  RPCDetId rpcId = iData.rpcId();
49  unsigned int rawid = rpcId.rawId();
50 
51  const FWGeometry* geom = item()->getGeom();
52 
53  if (!geom->contains(rawid)) {
54  fwLog(fwlog::kError) << "failed to get geometry of RPC roll with detid: " << rawid << std::endl;
55  return;
56  }
57 
58  TEveStraightLineSet* recHitSet = new TEveStraightLineSet;
59  recHitSet->SetLineWidth(3);
60 
62  TEveGeoShape* shape = geom->getEveShape(rawid);
63  shape->SetMainTransparency(75);
64  shape->SetMainColor(item()->defaultDisplayProperties().color());
65  recHitSet->AddElement(shape);
66  }
67 
68  float localX = iData.localPosition().x();
69  float localY = iData.localPosition().y();
70  float localZ = iData.localPosition().z();
71 
72  float localXerr = sqrt(iData.localPositionError().xx());
73  float localYerr = sqrt(iData.localPositionError().yy());
74 
75  float localU1[3] = {localX - localXerr, localY, localZ};
76 
77  float localU2[3] = {localX + localXerr, localY, localZ};
78 
79  float localV1[3] = {localX, localY - localYerr, localZ};
80 
81  float localV2[3] = {localX, localY + localYerr, localZ};
82 
83  float globalU1[3];
84  float globalU2[3];
85  float globalV1[3];
86  float globalV2[3];
87 
88  FWGeometry::IdToInfoItr det = geom->find(rawid);
89 
90  geom->localToGlobal(*det, localU1, globalU1);
91  geom->localToGlobal(*det, localU2, globalU2);
92  geom->localToGlobal(*det, localV1, globalV1);
93  geom->localToGlobal(*det, localV2, globalV2);
94 
95  recHitSet->AddLine(globalU1[0], globalU1[1], globalU1[2], globalU2[0], globalU2[1], globalU2[2]);
96 
97  recHitSet->AddLine(globalV1[0], globalV1[1], globalV1[2], globalV2[0], globalV2[1], globalV2[2]);
98 
99  setupAddElement(recHitSet, &oItemHolder);
100 }

References fwLog, relativeConstraints::geom, FWEventItem::getGeom(), FWProxyBuilderBase::item(), FWViewType::k3D, fwlog::kError, FWViewType::kISpy, RPCRecHit::localPosition(), RPCRecHit::localPositionError(), phase1PixelTopology::localX(), phase1PixelTopology::localY(), DetId::rawId(), RPCRecHit::rpcId(), FWProxyBuilderBase::setupAddElement(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().

◆ classPurpose()

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

Definition at line 105 of file FWRPCRecHitProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 105 of file FWRPCRecHitProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 105 of file FWRPCRecHitProxyBuilder.cc.

◆ classView()

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

Definition at line 105 of file FWRPCRecHitProxyBuilder.cc.

◆ haveSingleProduct()

bool FWRPCRecHitProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 27 of file FWRPCRecHitProxyBuilder.cc.

27 { return false; }

◆ operator=()

const FWRPCRecHitProxyBuilder& FWRPCRecHitProxyBuilder::operator= ( const FWRPCRecHitProxyBuilder )
privatedelete

◆ purpose()

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

Definition at line 29 of file FWRPCRecHitProxyBuilder.cc.

31 :

◆ typeName()

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

Definition at line 29 of file FWRPCRecHitProxyBuilder.cc.

31 :

◆ view()

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

Definition at line 29 of file FWRPCRecHitProxyBuilder.cc.

31 :
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWGeometry
Definition: FWGeometry.h:27
FWRPCRecHitProxyBuilder::FWRPCRecHitProxyBuilder
FWRPCRecHitProxyBuilder()
Definition: FWRPCRecHitProxyBuilder.cc:24
phase1PixelTopology::localY
constexpr uint16_t localY(uint16_t py)
Definition: phase1PixelTopology.h:58
RPCDetId
Definition: RPCDetId.h:16
FWGeometry::IdToInfoItr
std::vector< FWGeometry::GeomDetInfo >::const_iterator IdToInfoItr
Definition: FWGeometry.h:137
LocalError::xx
float xx() const
Definition: LocalError.h:22
FWRPCRecHitProxyBuilder
Definition: FWRPCRecHitProxyBuilder.cc:22
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
RPCRecHit::localPositionError
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: RPCRecHit.h:40
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
phase1PixelTopology::localX
constexpr uint16_t localX(uint16_t px)
Definition: phase1PixelTopology.h:49
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
RPCRecHit::localPosition
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: RPCRecHit.h:37
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
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
FWViewType::kISpy
Definition: FWViewType.h:35
FWViewType::k3D
Definition: FWViewType.h:34
fwlog::kError
Definition: fwLog.h:35
RPCRecHit::rpcId
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:71
LocalError::yy
float yy() const
Definition: LocalError.h:24