CMS 3D CMS Logo

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

Public Member Functions

 FWME0RecHitProxyBuilder ()
 
 FWME0RecHitProxyBuilder (const FWME0RecHitProxyBuilder &)=delete
 
bool haveSingleProduct () const override
 
const FWME0RecHitProxyBuilderoperator= (const FWME0RecHitProxyBuilder &)=delete
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWME0RecHitProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< ME0RecHit >
 FWSimpleProxyBuilderTemplate ()
 
 FWSimpleProxyBuilderTemplate (const FWSimpleProxyBuilderTemplate &)=delete
 
const FWSimpleProxyBuilderTemplateoperator= (const FWSimpleProxyBuilderTemplate &)=delete
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 FWSimpleProxyBuilder (const FWSimpleProxyBuilder &)=delete
 
const FWSimpleProxyBuilderoperator= (const FWSimpleProxyBuilder &)=delete
 
 ~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 ME0RecHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ FWME0RecHitProxyBuilder() [1/2]

FWME0RecHitProxyBuilder::FWME0RecHitProxyBuilder ( )
inline

Definition at line 14 of file FWME0RecHitProxyBuilder.cc.

14 {}

◆ ~FWME0RecHitProxyBuilder()

FWME0RecHitProxyBuilder::~FWME0RecHitProxyBuilder ( )
inlineoverride

Definition at line 15 of file FWME0RecHitProxyBuilder.cc.

15 {}

◆ FWME0RecHitProxyBuilder() [2/2]

FWME0RecHitProxyBuilder::FWME0RecHitProxyBuilder ( const FWME0RecHitProxyBuilder )
delete

Member Function Documentation

◆ buildViewType()

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

Reimplemented from FWSimpleProxyBuilderTemplate< ME0RecHit >.

Definition at line 32 of file FWME0RecHitProxyBuilder.cc.

References fwLog, relativeConstraints::geom, FWEventItem::getGeom(), FWProxyBuilderBase::item(), FWViewType::k3D, fwlog::kError, FWViewType::kISpy, ME0RecHit::localPosition(), ME0RecHit::localPositionError(), ME0RecHit::me0Id(), DetId::rawId(), FWProxyBuilderBase::setupAddElement(), l1trig_cff::shape, mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().

36  {
37  ME0DetId me0Id = iData.me0Id();
38  unsigned int rawid = me0Id.rawId();
39 
40  const FWGeometry* geom = item()->getGeom();
41 
42  if (!geom->contains(rawid)) {
43  fwLog(fwlog::kError) << "failed to get geometry of ME0 roll with detid: " << rawid << std::endl;
44  return;
45  }
46 
47  TEveStraightLineSet* recHitSet = new TEveStraightLineSet;
48  recHitSet->SetLineWidth(3);
49 
51  TEveGeoShape* shape = geom->getEveShape(rawid);
52  shape->SetMainTransparency(75);
53  shape->SetMainColor(item()->defaultDisplayProperties().color());
54  recHitSet->AddElement(shape);
55  }
56 
57  float localX = iData.localPosition().x();
58  float localY = iData.localPosition().y();
59  float localZ = iData.localPosition().z();
60 
61  float localXerr = sqrt(iData.localPositionError().xx());
62  float localYerr = sqrt(iData.localPositionError().yy());
63 
64  float localU1[3] = {localX - localXerr, localY, localZ};
65 
66  float localU2[3] = {localX + localXerr, localY, localZ};
67 
68  float localV1[3] = {localX, localY - localYerr, localZ};
69 
70  float localV2[3] = {localX, localY + localYerr, localZ};
71 
72  float globalU1[3];
73  float globalU2[3];
74  float globalV1[3];
75  float globalV2[3];
76 
77  FWGeometry::IdToInfoItr det = geom->find(rawid);
78 
79  geom->localToGlobal(*det, localU1, globalU1);
80  geom->localToGlobal(*det, localU2, globalU2);
81  geom->localToGlobal(*det, localV1, globalV1);
82  geom->localToGlobal(*det, localV2, globalV2);
83 
84  recHitSet->AddLine(globalU1[0], globalU1[1], globalU1[2], globalU2[0], globalU2[1], globalU2[2]);
85 
86  recHitSet->AddLine(globalV1[0], globalV1[1], globalV1[2], globalV2[0], globalV2[1], globalV2[2]);
87 
88  setupAddElement(recHitSet, &oItemHolder);
89 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: ME0RecHit.h:36
ME0DetId me0Id() const
Return the gemId.
Definition: ME0RecHit.h:64
float yy() const
Definition: LocalError.h:24
T sqrt(T t)
Definition: SSEVec.h:19
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
#define fwLog(_level_)
Definition: fwLog.h:45
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: ME0RecHit.h:39
const FWEventItem * item() const
std::vector< FWGeometry::GeomDetInfo >::const_iterator IdToInfoItr
Definition: FWGeometry.h:138
float xx() const
Definition: LocalError.h:22

◆ classPurpose()

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

Definition at line 94 of file FWME0RecHitProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 94 of file FWME0RecHitProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 94 of file FWME0RecHitProxyBuilder.cc.

◆ classView()

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

Definition at line 94 of file FWME0RecHitProxyBuilder.cc.

◆ haveSingleProduct()

bool FWME0RecHitProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 17 of file FWME0RecHitProxyBuilder.cc.

17 { return false; }

◆ operator=()

const FWME0RecHitProxyBuilder& FWME0RecHitProxyBuilder::operator= ( const FWME0RecHitProxyBuilder )
delete

◆ purpose()

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

Definition at line 19 of file FWME0RecHitProxyBuilder.cc.

24 :
25  void buildViewType(const ME0RecHit& iData,
void buildViewType(const ME0RecHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override

◆ typeName()

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

Definition at line 19 of file FWME0RecHitProxyBuilder.cc.

24 :
25  void buildViewType(const ME0RecHit& iData,
void buildViewType(const ME0RecHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override

◆ view()

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

Definition at line 19 of file FWME0RecHitProxyBuilder.cc.

24 :
25  void buildViewType(const ME0RecHit& iData,
void buildViewType(const ME0RecHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override