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
FWBeamSpotProxyBuilder Class Reference
Inheritance diagram for FWBeamSpotProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::BeamSpot > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWBeamSpotProxyBuilder (void)
 
 REGISTER_PROXYBUILDER_METHODS ()
 
virtual ~FWBeamSpotProxyBuilder (void)
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::BeamSpot >
 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
 
virtual bool haveSingleProduct () 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 build (const reco::BeamSpot &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *) override
 
 FWBeamSpotProxyBuilder (const FWBeamSpotProxyBuilder &)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *parent, FWViewType::EType viewType, const FWViewContext *vc) override
 
const FWBeamSpotProxyBuilderoperator= (const FWBeamSpotProxyBuilder &)
 

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< reco::BeamSpot >
const reco::BeamSpotmodelData (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 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 15 of file FWBeamSpotProxyBuilder.cc.

Constructor & Destructor Documentation

FWBeamSpotProxyBuilder::FWBeamSpotProxyBuilder ( void  )
inline

Definition at line 18 of file FWBeamSpotProxyBuilder.cc.

18 {}
virtual FWBeamSpotProxyBuilder::~FWBeamSpotProxyBuilder ( void  )
inlinevirtual

Definition at line 19 of file FWBeamSpotProxyBuilder.cc.

19 {}
FWBeamSpotProxyBuilder::FWBeamSpotProxyBuilder ( const FWBeamSpotProxyBuilder )
private

Member Function Documentation

void FWBeamSpotProxyBuilder::build ( const reco::BeamSpot iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
overrideprivatevirtual

iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement

Reimplemented from FWSimpleProxyBuilderTemplate< reco::BeamSpot >.

Definition at line 53 of file FWBeamSpotProxyBuilder.cc.

References a, b, FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), reco::dp, alignCSCRings::e, i, FWProxyBuilderBase::item(), python.rootplot.utilities::ls(), N, Pi, FWProxyBuilderBase::setupAddElement(), reco::BeamSpot::x0(), reco::BeamSpot::x0Error(), reco::BeamSpot::y0(), reco::BeamSpot::y0Error(), reco::BeamSpot::z0(), and reco::BeamSpot::z0Error().

54 {
55  TEveStraightLineSet* ls = new TEveStraightLineSet();
56 
57  double pos[3] = { bs.x0(), bs.y0(), bs.z0() };
58  double e[3] = { bs.x0Error(), bs.y0Error(), bs.z0Error() };
59 
60  const Int_t N = 32;
61  const Float_t S = 2*TMath::Pi()/N;
62 
63  Float_t a = e[0], b = e[1];
64  for (Int_t i = 0; i<N; i++)
65  ls->AddLine(a*TMath::Cos(i*S) , b*TMath::Sin(i*S) , 0,
66  a*TMath::Cos(i*S+S), b*TMath::Sin(i*S+S), 0);
67 
68  a = e[0]; b = e[2];
69  for (Int_t i = 0; i<N; i++)
70  ls->AddLine(a*TMath::Cos(i*S) , 0, b*TMath::Sin(i*S),
71  a*TMath::Cos(i*S+S), 0, b*TMath::Sin(i*S+S));
72 
73  a = e[1]; b = e[2];
74  for (Int_t i = 0; i<N; i++)
75  ls->AddLine(0, a*TMath::Cos(i*S) , b*TMath::Sin(i*S),
76  0, a*TMath::Cos(i*S+S), b*TMath::Sin(i*S+S));
77 
78  ls->AddLine(0,0,0,0,0,0);
79  ls->AddMarker(0,0,0);
80  ls->SetMarkerStyle(21);
81  const FWDisplayProperties &dp =
83  ls->SetMarkerColor( dp.color() );
84 
85  ls->RefMainTrans().SetPos(pos);
86  setupAddElement(ls, &oItemHolder);
87 }
const double Pi
int i
Definition: DBlmapReader.cc:9
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:451
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWEventItem * item() const
Color_t color() const
#define N
Definition: blowfish.cc:9
auto dp
Definition: deltaR.h:24
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void FWBeamSpotProxyBuilder::localModelChanges ( const FWModelId iId,
TEveElement *  parent,
FWViewType::EType  viewType,
const FWViewContext vc 
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 33 of file FWBeamSpotProxyBuilder.cc.

References trackerHits::c, FWModelId::index(), FWProxyBuilderBase::item(), j, python.rootplot.utilities::ls(), and FWEventItem::modelInfo().

34 {
35  if( TEveStraightLineSet *ls = dynamic_cast<TEveStraightLineSet*> ( *parent->BeginChildren() ))
36  {
37  Color_t c = FWProxyBuilderBase::item()->modelInfo( iId.index() ).displayProperties().color();
38  for (TEveProjectable::ProjList_i j = ls->BeginProjecteds(); j != ls->EndProjecteds(); ++j)
39  {
40  if( TEveStraightLineSet *pls = dynamic_cast<TEveStraightLineSet*> (*j))
41  {
42  pls->SetMarkerColor(c);
43  pls->ElementChanged();
44  }
45  }
46 
47  ls->SetMarkerColor(c);
48  ls->ElementChanged();
49  }
50 }
list parent
Definition: dbtoconf.py:74
const FWEventItem * item() const
int index() const
Definition: FWModelId.h:49
int j
Definition: DBlmapReader.cc:9
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
const FWBeamSpotProxyBuilder& FWBeamSpotProxyBuilder::operator= ( const FWBeamSpotProxyBuilder )
private
FWBeamSpotProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )