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

Public Member Functions

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

void buildViewType (const PSimHit &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *)
 
 FWPSimHitProxyBuilder (const FWPSimHitProxyBuilder &)
 
const FWPSimHitProxyBuilderoperator= (const FWPSimHitProxyBuilder &)
 

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< PSimHit >
const PSimHitmodelData (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 18 of file FWPSimHitProxyBuilder.cc.

Constructor & Destructor Documentation

FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( void  )
inline

Definition at line 21 of file FWPSimHitProxyBuilder.cc.

21 {}
virtual FWPSimHitProxyBuilder::~FWPSimHitProxyBuilder ( void  )
inlinevirtual

Definition at line 22 of file FWPSimHitProxyBuilder.cc.

22 {}
FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( const FWPSimHitProxyBuilder )
private

Member Function Documentation

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

Reimplemented from FWSimpleProxyBuilderTemplate< PSimHit >.

Definition at line 38 of file FWPSimHitProxyBuilder.cc.

References abs, FWGeometry::contains(), PSimHit::detUnitId(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), errorMatrix2Lands_multiChannel::id, FWProxyBuilderBase::item(), fwlog::kError, FWViewType::kRhoZ, DTWireId::layerId(), PSimHit::localPosition(), FWGeometry::localToGlobal(), DetId::Muon, PSimHit::particleType(), DetId::rawId(), FWProxyBuilderBase::setupAddElement(), DTSuperLayerId::superLayer(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

39 {
40  TEvePointSet* pointSet = new TEvePointSet;
41  setupAddElement( pointSet, &oItemHolder );
42  const FWGeometry *geom = item()->getGeom();
43  unsigned int rawid = iData.detUnitId();
44  if( ! geom->contains( rawid ))
45  {
47  << "failed to get geometry of detid: "
48  << rawid << std::endl;
49  return;
50  }
51 
52  float local[3] = { iData.localPosition().x(), iData.localPosition().y(), iData.localPosition().z() };
53  float global[3];
54 
55  // Specialized for DT simhits
56  DetId id(rawid);
57  if (id.det()==DetId::Muon && id.subdetId()==1) {
58  DTWireId wId(rawid);
59  rawid = wId.layerId().rawId(); // DT simhits are in the RF of the DTLayer, but their ID is the id of the wire!
60  if (abs(iData.particleType())!=13){
61  pointSet->SetMarkerStyle(26); // Draw non-muon simhits (e.g. delta rays) with a different marker
62  }
63  if (type == FWViewType::kRhoZ) { //
64  // In RhoZ view, draw hits at the middle of the layer in the global Z coordinate,
65  // otherwise they won't align with 1D rechits, for which only one coordinate is known.
66  if (wId.superLayer()==2) {
67  local[1]=0;
68  } else {
69  local[0]=0;
70  }
71  }
72  }
73 
74  geom->localToGlobal( rawid, local, global );
75  pointSet->SetNextPoint( global[0], global[1], global[2] );
76 }
type
Definition: HCALResponse.h:22
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
T y() const
Definition: PV3DBase.h:62
#define abs(x)
Definition: mlp_lapack.h:159
void localToGlobal(unsigned int id, const float *local, float *global) const
Definition: FWGeometry.cc:325
const FWEventItem * item() const
Local3DPoint localPosition() const
Definition: PSimHit.h:44
T z() const
Definition: PV3DBase.h:63
bool contains(unsigned int id) const
Definition: FWGeometry.h:98
Definition: DetId.h:20
#define fwLog(_level_)
Definition: fwLog.h:51
int particleType() const
Definition: PSimHit.h:85
T x() const
Definition: PV3DBase.h:61
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:681
unsigned int detUnitId() const
Definition: PSimHit.h:93
virtual bool FWPSimHitProxyBuilder::haveSingleProduct ( void  ) const
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 24 of file FWPSimHitProxyBuilder.cc.

24 { return false; }
const FWPSimHitProxyBuilder& FWPSimHitProxyBuilder::operator= ( const FWPSimHitProxyBuilder )
private
FWPSimHitProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )