CMS 3D CMS Logo

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

Public Member Functions

 FWDTRecHitProxyBuilder (void)
 
bool haveSingleProduct () const override
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWDTRecHitProxyBuilder (void) override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< DTRecHit1DPair >
 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
 
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 DTRecHit1DPair &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 
 FWDTRecHitProxyBuilder (const FWDTRecHitProxyBuilder &)=delete
 
const FWDTRecHitProxyBuilderoperator= (const FWDTRecHitProxyBuilder &)=delete
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ FWDTRecHitProxyBuilder() [1/2]

FWDTRecHitProxyBuilder::FWDTRecHitProxyBuilder ( void  )
inline

Definition at line 23 of file FWDTRecHitProxyBuilder.cc.

23 {}

◆ ~FWDTRecHitProxyBuilder()

FWDTRecHitProxyBuilder::~FWDTRecHitProxyBuilder ( void  )
inlineoverride

Definition at line 24 of file FWDTRecHitProxyBuilder.cc.

24 {}

◆ FWDTRecHitProxyBuilder() [2/2]

FWDTRecHitProxyBuilder::FWDTRecHitProxyBuilder ( const FWDTRecHitProxyBuilder )
privatedelete

Member Function Documentation

◆ buildViewType()

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

Reimplemented from FWSimpleProxyBuilderTemplate< DTRecHit1DPair >.

Definition at line 44 of file FWDTRecHitProxyBuilder.cc.

48  {
49  const DTLayerId& layerId = iData.wireId().layerId();
50  int superLayer = layerId.superlayerId().superLayer();
51 
52  const FWGeometry* geom = item()->getGeom();
53 
54  if (!geom->contains(layerId)) {
55  fwLog(fwlog::kError) << "failed get geometry of DT layer with detid: " << layerId << std::endl;
56  return;
57  }
58 
59  TEveStraightLineSet* recHitSet = new TEveStraightLineSet;
60  setupAddElement(recHitSet, &oItemHolder);
61 
62  TEvePointSet* pointSet = new TEvePointSet;
63  setupAddElement(pointSet, &oItemHolder);
64 
65  const DTRecHit1D* leftRecHit = iData.componentRecHit(Left);
66  const DTRecHit1D* rightRecHit = iData.componentRecHit(Right);
67  float lLocalPos[3] = {leftRecHit->localPosition().x(), 0.0, 0.0};
68  float rLocalPos[3] = {rightRecHit->localPosition().x(), 0.0, 0.0};
69 
70  if (((type == FWViewType::kRhoPhi || type == FWViewType::kRhoPhiPF) && superLayer != 2) ||
71  (type == FWViewType::kRhoZ && superLayer == 2) || type == FWViewType::k3D || type == FWViewType::kISpy) {
72  float leftGlobalPoint[3];
73  float rightGlobalPoint[3];
74 
75  geom->localToGlobal(layerId, lLocalPos, leftGlobalPoint, rLocalPos, rightGlobalPoint);
76 
77  pointSet->SetNextPoint(leftGlobalPoint[0], leftGlobalPoint[1], leftGlobalPoint[2]);
78  pointSet->SetNextPoint(rightGlobalPoint[0], rightGlobalPoint[1], rightGlobalPoint[2]);
79 
80  recHitSet->AddLine(leftGlobalPoint[0],
81  leftGlobalPoint[1],
82  leftGlobalPoint[2],
83  rightGlobalPoint[0],
84  rightGlobalPoint[1],
85  rightGlobalPoint[2]);
86  }
87 }

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

◆ classPurpose()

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

Definition at line 92 of file FWDTRecHitProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 92 of file FWDTRecHitProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 92 of file FWDTRecHitProxyBuilder.cc.

◆ classView()

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

Definition at line 92 of file FWDTRecHitProxyBuilder.cc.

◆ haveSingleProduct()

bool FWDTRecHitProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 26 of file FWDTRecHitProxyBuilder.cc.

26 { return false; }

◆ operator=()

const FWDTRecHitProxyBuilder& FWDTRecHitProxyBuilder::operator= ( const FWDTRecHitProxyBuilder )
privatedelete

◆ purpose()

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

Definition at line 28 of file FWDTRecHitProxyBuilder.cc.

30 :
31  // Disable default copy constructor

◆ typeName()

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

Definition at line 28 of file FWDTRecHitProxyBuilder.cc.

30 :
31  // Disable default copy constructor

◆ view()

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

Definition at line 28 of file FWDTRecHitProxyBuilder.cc.

30 :
31  // Disable default copy constructor
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWGeometry
Definition: FWGeometry.h:27
DTRecHit1DPair::componentRecHit
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
FWViewType::kRhoZ
Definition: FWViewType.h:33
DTRecHit1D
Definition: DTRecHit1D.h:25
DTSuperLayerId::superLayer
int superLayer() const
Return the superlayer number.
Definition: DTSuperLayerId.h:39
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
DTLayerId
Definition: DTLayerId.h:12
DTRecHit1D::localPosition
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:47
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
DTRecHit1DPair::wireId
DTWireId wireId() const
Definition: DTRecHit1DPair.h:89
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWViewType::kISpy
Definition: FWViewType.h:35
DTLayerId::superlayerId
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45
FWViewType::k3D
Definition: FWViewType.h:34
fwlog::kError
Definition: fwLog.h:35
DTWireId::layerId
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:45
FWViewType::kRhoPhiPF
Definition: FWViewType.h:42
FWViewType::kRhoPhi
Definition: FWViewType.h:32