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
FWDTRecHitProxyBuilder Class Reference
Inheritance diagram for FWDTRecHitProxyBuilder:
FWSimpleProxyBuilderTemplate< DTRecHit1DPair > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWDTRecHitProxyBuilder (void)
 
virtual bool haveSingleProduct () const override
 
 REGISTER_PROXYBUILDER_METHODS ()
 
virtual ~FWDTRecHitProxyBuilder (void)
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< DTRecHit1DPair >
 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 ()
 

Private Member Functions

virtual void buildViewType (const DTRecHit1DPair &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 
 FWDTRecHitProxyBuilder (const FWDTRecHitProxyBuilder &)
 
const FWDTRecHitProxyBuilderoperator= (const FWDTRecHitProxyBuilder &)
 

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< DTRecHit1DPair >
const DTRecHit1DPairmodelData (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 21 of file FWDTRecHitProxyBuilder.cc.

Constructor & Destructor Documentation

FWDTRecHitProxyBuilder::FWDTRecHitProxyBuilder ( void  )
inline

Definition at line 24 of file FWDTRecHitProxyBuilder.cc.

24 {}
virtual FWDTRecHitProxyBuilder::~FWDTRecHitProxyBuilder ( void  )
inlinevirtual

Definition at line 25 of file FWDTRecHitProxyBuilder.cc.

25 {}
FWDTRecHitProxyBuilder::FWDTRecHitProxyBuilder ( const FWDTRecHitProxyBuilder )
private

Member Function Documentation

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

Reimplemented from FWSimpleProxyBuilderTemplate< DTRecHit1DPair >.

Definition at line 41 of file FWDTRecHitProxyBuilder.cc.

References DTRecHit1DPair::componentRecHit(), FWGeometry::contains(), fwLog, relativeConstraints::geom, FWViewType::k3D, fwlog::kError, FWViewType::kISpy, FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, FWViewType::kRhoZ, DTWireId::layerId(), DTEnums::Left, DTRecHit1D::localPosition(), FWGeometry::localToGlobal(), DTEnums::Right, fireworks::setupAddElement(), DTSuperLayerId::superLayer(), DTLayerId::superlayerId(), DTRecHit1DPair::wireId(), and PV3DBase< T, PVType, FrameType >::x().

42 {
43  const DTLayerId& layerId = iData.wireId().layerId();
44  int superLayer = layerId.superlayerId().superLayer();
45 
46  const FWGeometry *geom = item()->getGeom();
47 
48  if( ! geom->contains( layerId ))
49  {
50  fwLog( fwlog::kError ) << "failed get geometry of DT layer with detid: "
51  << layerId << std::endl;
52  return;
53  }
54 
55  TEveStraightLineSet* recHitSet = new TEveStraightLineSet;
56  setupAddElement( recHitSet, &oItemHolder );
57 
58  TEvePointSet* pointSet = new TEvePointSet;
59  setupAddElement( pointSet, &oItemHolder );
60 
61  const DTRecHit1D* leftRecHit = iData.componentRecHit( Left );
62  const DTRecHit1D* rightRecHit = iData.componentRecHit( Right );
63  float lLocalPos[3] = { leftRecHit->localPosition().x(), 0.0, 0.0 };
64  float rLocalPos[3] = { rightRecHit->localPosition().x(), 0.0, 0.0 };
65 
66  if(( (type == FWViewType::kRhoPhi || type == FWViewType::kRhoPhiPF) && superLayer != 2 ) ||
67  ( type == FWViewType::kRhoZ && superLayer == 2 ) ||
68  type == FWViewType::k3D ||
70  {
71  float leftGlobalPoint[3];
72  float rightGlobalPoint[3];
73 
74  geom->localToGlobal( layerId, lLocalPos, leftGlobalPoint, rLocalPos, rightGlobalPoint );
75 
76  pointSet->SetNextPoint( leftGlobalPoint[0], leftGlobalPoint[1], leftGlobalPoint[2] );
77  pointSet->SetNextPoint( rightGlobalPoint[0], rightGlobalPoint[1], rightGlobalPoint[2] );
78 
79  recHitSet->AddLine( leftGlobalPoint[0], leftGlobalPoint[1], leftGlobalPoint[2],
80  rightGlobalPoint[0], rightGlobalPoint[1], rightGlobalPoint[2] );
81  }
82 }
type
Definition: HCALResponse.h:21
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:59
const FWEventItem * item() const
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:325
int superLayer() const
Return the superlayer number.
bool contains(unsigned int id) const
Definition: FWGeometry.h:98
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:60
#define fwLog(_level_)
Definition: fwLog.h:50
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:62
DTWireId wireId() const
T x() const
Definition: PV3DBase.h:62
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:681
virtual bool FWDTRecHitProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 27 of file FWDTRecHitProxyBuilder.cc.

27 { return false; }
const FWDTRecHitProxyBuilder& FWDTRecHitProxyBuilder::operator= ( const FWDTRecHitProxyBuilder )
private
FWDTRecHitProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )