CMS 3D CMS Logo

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

Public Member Functions

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

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< PSimHit >
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void build (const PSimHit &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
const PSimHitmodelData (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 FWPSimHitProxyBuilder.cc.

Constructor & Destructor Documentation

FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( void  )
inline

Definition at line 21 of file FWPSimHitProxyBuilder.cc.

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

Definition at line 22 of file FWPSimHitProxyBuilder.cc.

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

Member Function Documentation

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

Reimplemented from FWSimpleProxyBuilderTemplate< PSimHit >.

Definition at line 39 of file FWPSimHitProxyBuilder.cc.

References funct::abs(), FWGeometry::contains(), PSimHit::detUnitId(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), triggerObjects_cff::id, FWProxyBuilderBase::item(), fwlog::kError, FWViewType::kRhoZ, DTWireId::layerId(), DTRecHitClients_cfi::local, 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().

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

Definition at line 79 of file FWPSimHitProxyBuilder.cc.

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

Definition at line 79 of file FWPSimHitProxyBuilder.cc.

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

Definition at line 79 of file FWPSimHitProxyBuilder.cc.

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

Definition at line 79 of file FWPSimHitProxyBuilder.cc.

bool FWPSimHitProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 24 of file FWPSimHitProxyBuilder.cc.

24 { return false; }
const FWPSimHitProxyBuilder& FWPSimHitProxyBuilder::operator= ( const FWPSimHitProxyBuilder )
privatedelete
const std::string& FWPSimHitProxyBuilder::purpose ( ) const
inline

Definition at line 26 of file FWPSimHitProxyBuilder.cc.

28 :
29  // Disable default copy constructor
const std::string& FWPSimHitProxyBuilder::typeName ( ) const
inline

Definition at line 26 of file FWPSimHitProxyBuilder.cc.

28 :
29  // Disable default copy constructor
const std::string& FWPSimHitProxyBuilder::view ( ) const
inline

Definition at line 26 of file FWPSimHitProxyBuilder.cc.

28 :
29  // Disable default copy constructor