CMS 3D CMS Logo

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

Public Member Functions

 FWGEMRecHitProxyBuilder ()
 
virtual bool haveSingleProduct () const
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
virtual ~FWGEMRecHitProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< GEMRecHit >
 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 &)
 
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

virtual void buildViewType (const GEMRecHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *)
 
 FWGEMRecHitProxyBuilder (const FWGEMRecHitProxyBuilder &)
 
const FWGEMRecHitProxyBuilderoperator= (const FWGEMRecHitProxyBuilder &)
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< GEMRecHit >
virtual void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context)
 
virtual void build (const GEMRecHit &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
virtual void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context)
 
const GEMRecHitmodelData (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 23 of file FWGEMRecHitProxyBuilder.cc.

Constructor & Destructor Documentation

FWGEMRecHitProxyBuilder::FWGEMRecHitProxyBuilder ( )
inline

Definition at line 26 of file FWGEMRecHitProxyBuilder.cc.

26 {}
virtual FWGEMRecHitProxyBuilder::~FWGEMRecHitProxyBuilder ( )
inlinevirtual

Definition at line 27 of file FWGEMRecHitProxyBuilder.cc.

27 {}
FWGEMRecHitProxyBuilder::FWGEMRecHitProxyBuilder ( const FWGEMRecHitProxyBuilder )
private

Member Function Documentation

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

Reimplemented from FWSimpleProxyBuilderTemplate< GEMRecHit >.

Definition at line 50 of file FWGEMRecHitProxyBuilder.cc.

References create_public_lumi_plots::color, FWGeometry::contains(), FWGeometry::find(), fwLog, GEMRecHit::gemId(), relativeConstraints::geom, FWGeometry::getEveShape(), FWEventItem::getGeom(), FWProxyBuilderBase::item(), FWViewType::k3D, fwlog::kError, FWViewType::kISpy, GEMRecHit::localPosition(), GEMRecHit::localPositionError(), FWGeometry::localToGlobal(), DetId::rawId(), FWProxyBuilderBase::setupAddElement(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().

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

Definition at line 128 of file FWGEMRecHitProxyBuilder.cc.

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

Definition at line 128 of file FWGEMRecHitProxyBuilder.cc.

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

Definition at line 128 of file FWGEMRecHitProxyBuilder.cc.

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

Definition at line 128 of file FWGEMRecHitProxyBuilder.cc.

virtual bool FWGEMRecHitProxyBuilder::haveSingleProduct ( void  ) const
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 29 of file FWGEMRecHitProxyBuilder.cc.

30  {
31  return false;
32  }
const FWGEMRecHitProxyBuilder& FWGEMRecHitProxyBuilder::operator= ( const FWGEMRecHitProxyBuilder )
private
const std::string& FWGEMRecHitProxyBuilder::purpose ( ) const
inline
const std::string& FWGEMRecHitProxyBuilder::typeName ( ) const
inline
const std::string& FWGEMRecHitProxyBuilder::view ( ) const
inline