CMS 3D CMS Logo

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

Public Member Functions

 FWCSCRecHitProxyBuilder (void)
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWCSCRecHitProxyBuilder (void) override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< CSCRecHit2D >
 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
 
virtual bool haveSingleProduct () 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 build (const CSCRecHit2D &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *) override
 
 FWCSCRecHitProxyBuilder (const FWCSCRecHitProxyBuilder &)=delete
 
const FWCSCRecHitProxyBuilderoperator= (const FWCSCRecHitProxyBuilder &)=delete
 

Additional Inherited Members

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

Constructor & Destructor Documentation

FWCSCRecHitProxyBuilder::FWCSCRecHitProxyBuilder ( void  )
inline

Definition at line 21 of file FWCSCRecHitProxyBuilder.cc.

21 {}
FWCSCRecHitProxyBuilder::~FWCSCRecHitProxyBuilder ( void  )
inlineoverride

Definition at line 22 of file FWCSCRecHitProxyBuilder.cc.

22 {}
FWCSCRecHitProxyBuilder::FWCSCRecHitProxyBuilder ( const FWCSCRecHitProxyBuilder )
privatedelete

Member Function Documentation

void FWCSCRecHitProxyBuilder::build ( const CSCRecHit2D iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
overrideprivatevirtual

iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement

Reimplemented from FWSimpleProxyBuilderTemplate< CSCRecHit2D >.

Definition at line 35 of file FWCSCRecHitProxyBuilder.cc.

References FWGeometry::contains(), CSCRecHit2D::cscDetId(), FWGeometry::find(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), FWProxyBuilderBase::item(), fwlog::kError, CSCRecHit2D::localPosition(), CSCRecHit2D::localPositionError(), FWGeometry::localToGlobal(), DetId::rawId(), FWProxyBuilderBase::setupAddElement(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().

38 {
39  const FWGeometry *geom = item()->getGeom();
40  unsigned int rawid = iData.cscDetId().rawId();
41 
42  if( ! geom->contains( rawid ))
43  {
44  fwLog( fwlog::kError ) << "failed to get geometry of CSC layer with detid: "
45  << rawid <<std::endl;
46  return;
47  }
48  FWGeometry::IdToInfoItr det = geom->find( rawid );
49 
50  TEveStraightLineSet* recHitSet = new TEveStraightLineSet;
51  setupAddElement( recHitSet, &oItemHolder );
52 
53  TEvePointSet* pointSet = new TEvePointSet;
54  setupAddElement( pointSet, &oItemHolder );
55 
56  float localPositionX = iData.localPosition().x();
57  float localPositionY = iData.localPosition().y();
58 
59  float localPositionXX = sqrt( iData.localPositionError().xx());
60  float localPositionYY = sqrt( iData.localPositionError().yy());
61 
62  float localU1Point[3] =
63  {
64  localPositionX - localPositionXX, localPositionY, 0.0
65  };
66 
67  float localU2Point[3] =
68  {
69  localPositionX + localPositionXX, localPositionY, 0.0
70  };
71 
72  float localV1Point[3] =
73  {
74  localPositionX, localPositionY - localPositionYY, 0.0
75  };
76 
77  float localV2Point[3] =
78  {
79  localPositionX, localPositionY + localPositionYY, 0.0
80  };
81 
82  float globalU1Point[3];
83  float globalU2Point[3];
84  float globalV1Point[3];
85  float globalV2Point[3];
86 
87  geom->localToGlobal( *det, localU1Point, globalU1Point );
88  geom->localToGlobal( *det, localU2Point, globalU2Point );
89  geom->localToGlobal( *det, localV1Point, globalV1Point );
90  geom->localToGlobal( *det, localV2Point, globalV2Point );
91 
92  pointSet->SetNextPoint( globalU1Point[0], globalU1Point[1], globalU1Point[2] );
93  pointSet->SetNextPoint( globalU2Point[0], globalU2Point[1], globalU2Point[2] );
94  pointSet->SetNextPoint( globalV1Point[0], globalV1Point[1], globalV1Point[2] );
95  pointSet->SetNextPoint( globalV2Point[0], globalV2Point[1], globalV2Point[2] );
96 
97  recHitSet->AddLine( globalU1Point[0], globalU1Point[1], globalU1Point[2],
98  globalU2Point[0], globalU2Point[1], globalU2Point[2] );
99 
100  recHitSet->AddLine( globalV1Point[0], globalV1Point[1], globalV1Point[2],
101  globalV2Point[0], globalV2Point[1], globalV2Point[2] );
102 }
float xx() const
Definition: LocalError.h:24
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
IdToInfoItr find(unsigned int) const
Definition: FWGeometry.cc:508
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:50
const FWEventItem * item() const
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:18
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:478
bool contains(unsigned int id) const
Definition: FWGeometry.h:117
#define fwLog(_level_)
Definition: fwLog.h:50
LocalError localPositionError() const override
Definition: CSCRecHit2D.h:51
std::vector< FWGeometry::GeomDetInfo >::const_iterator IdToInfoItr
Definition: FWGeometry.h:114
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:683
const std::string & FWCSCRecHitProxyBuilder::classPurpose ( )
static

Definition at line 104 of file FWCSCRecHitProxyBuilder.cc.

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

Definition at line 104 of file FWCSCRecHitProxyBuilder.cc.

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

Definition at line 104 of file FWCSCRecHitProxyBuilder.cc.

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

Definition at line 104 of file FWCSCRecHitProxyBuilder.cc.

const FWCSCRecHitProxyBuilder& FWCSCRecHitProxyBuilder::operator= ( const FWCSCRecHitProxyBuilder )
privatedelete
const std::string& FWCSCRecHitProxyBuilder::purpose ( ) const
inline
const std::string& FWCSCRecHitProxyBuilder::typeName ( ) const
inline
const std::string& FWCSCRecHitProxyBuilder::view ( ) const
inline