CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
FWRPCRecHitProxyBuilder Class Reference
Inheritance diagram for FWRPCRecHitProxyBuilder:
FWSimpleProxyBuilderTemplate< RPCRecHit > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWRPCRecHitProxyBuilder ()
 
virtual bool haveSingleProduct () const
 
 REGISTER_PROXYBUILDER_METHODS ()
 
virtual ~FWRPCRecHitProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< RPCRecHit >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
virtual ~FWSimpleProxyBuilder ()
 
- 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 &)
 
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 ()
 

Private Member Functions

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

Additional Inherited Members

- 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...
 
- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< RPCRecHit >
const RPCRecHitmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)
 
virtual void clean ()
 
- 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::FWRPCRecHitProxyBuilder ( )
inline

Definition at line 25 of file FWRPCRecHitProxyBuilder.cc.

25 {}
virtual FWRPCRecHitProxyBuilder::~FWRPCRecHitProxyBuilder ( )
inlinevirtual

Definition at line 26 of file FWRPCRecHitProxyBuilder.cc.

26 {}
FWRPCRecHitProxyBuilder::FWRPCRecHitProxyBuilder ( const FWRPCRecHitProxyBuilder )
private

Member Function Documentation

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

Reimplemented from FWSimpleProxyBuilderTemplate< RPCRecHit >.

Definition at line 48 of file FWRPCRecHitProxyBuilder.cc.

References FWGeometry::contains(), FWGeometry::find(), fwLog, relativeConstraints::geom, FWGeometry::getEveShape(), FWEventItem::getGeom(), FWProxyBuilderBase::item(), FWViewType::k3D, fwlog::kError, FWViewType::kISpy, RPCRecHit::localPosition(), RPCRecHit::localPositionError(), FWGeometry::localToGlobal(), DetId::rawId(), RPCRecHit::rpcId(), FWProxyBuilderBase::setupAddElement(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

53 {
54  RPCDetId rpcId = iData.rpcId();
55  unsigned int rawid = rpcId.rawId();
56 
57  const FWGeometry *geom = item()->getGeom();
58 
59  if( ! geom->contains( rawid ))
60  {
61  fwLog( fwlog::kError ) << "failed to get geometry of RPC roll with detid: "
62  << rawid <<std::endl;
63  return;
64  }
65 
66  TEveStraightLineSet* recHitSet = new TEveStraightLineSet;
67  recHitSet->SetLineWidth(3);
68 
70  {
71  TEveGeoShape* shape = geom->getEveShape( rawid );
72  shape->SetMainTransparency( 75 );
73  shape->SetMainColor( item()->defaultDisplayProperties().color());
74  recHitSet->AddElement( shape );
75  }
76 
77  float localX = iData.localPosition().x();
78  float localY = iData.localPosition().y();
79  float localZ = iData.localPosition().z();
80 
81  float localXerr = sqrt(iData.localPositionError().xx());
82  float localYerr = sqrt(iData.localPositionError().yy());
83 
84  float localU1[3] =
85  {
86  localX - localXerr, localY, localZ
87  };
88 
89  float localU2[3] =
90  {
91  localX + localXerr, localY, localZ
92  };
93 
94  float localV1[3] =
95  {
96  localX, localY - localYerr, localZ
97  };
98 
99  float localV2[3] =
100  {
101  localX, localY + localYerr, localZ
102  };
103 
104  float globalU1[3];
105  float globalU2[3];
106  float globalV1[3];
107  float globalV2[3];
108 
109  FWGeometry::IdToInfoItr det = geom->find( rawid );
110 
111  geom->localToGlobal( *det, localU1, globalU1 );
112  geom->localToGlobal( *det, localU2, globalU2 );
113  geom->localToGlobal( *det, localV1, globalV1 );
114  geom->localToGlobal( *det, localV2, globalV2 );
115 
116  recHitSet->AddLine( globalU1[0], globalU1[1], globalU1[2],
117  globalU2[0], globalU2[1], globalU2[2] );
118 
119  recHitSet->AddLine( globalV1[0], globalV1[1], globalV1[2],
120  globalV2[0], globalV2[1], globalV2[2] );
121 
122  setupAddElement( recHitSet, &oItemHolder );
123 }
type
Definition: HCALResponse.h:22
float xx() const
Definition: LocalError.h:19
IdToInfoItr find(unsigned int) const
Definition: FWGeometry.cc:355
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
T y() const
Definition: PV3DBase.h:57
void localToGlobal(unsigned int id, const float *local, float *global) const
Definition: FWGeometry.cc:326
const FWEventItem * item() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:99
float yy() const
Definition: LocalError.h:21
TEveGeoShape * getEveShape(unsigned int id) const
Definition: FWGeometry.cc:251
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
bool contains(unsigned int id) const
Definition: FWGeometry.h:98
#define fwLog(_level_)
Definition: fwLog.h:51
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: RPCRecHit.h:61
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: RPCRecHit.h:55
T x() const
Definition: PV3DBase.h:56
std::vector< FWGeometry::GeomDetInfo >::const_iterator IdToInfoItr
Definition: FWGeometry.h:96
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:687
virtual bool FWRPCRecHitProxyBuilder::haveSingleProduct ( void  ) const
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 28 of file FWRPCRecHitProxyBuilder.cc.

29  {
30  return false;
31  }
const FWRPCRecHitProxyBuilder& FWRPCRecHitProxyBuilder::operator= ( const FWRPCRecHitProxyBuilder )
private
FWRPCRecHitProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )