test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWBeamSpotProxyBuilder Class Reference
Inheritance diagram for FWBeamSpotProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::BeamSpot > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWBeamSpotProxyBuilder (void)
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
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 ()
 

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

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

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

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

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

Definition at line 90 of file FWBeamSpotProxyBuilder.cc.

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

Definition at line 90 of file FWBeamSpotProxyBuilder.cc.

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

Definition at line 90 of file FWBeamSpotProxyBuilder.cc.

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

Definition at line 90 of file FWBeamSpotProxyBuilder.cc.

void FWBeamSpotProxyBuilder::localModelChanges ( const FWModelId iId,
TEveElement *  parent,
FWViewType::EType  viewType,
const FWViewContext vc 
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 34 of file FWBeamSpotProxyBuilder.cc.

References EnergyCorrector::c, FWModelId::index(), FWProxyBuilderBase::item(), j, eostools::ls(), and FWEventItem::modelInfo().

35 {
36  if( TEveStraightLineSet *ls = dynamic_cast<TEveStraightLineSet*> ( *parent->BeginChildren() ))
37  {
38  Color_t c = FWProxyBuilderBase::item()->modelInfo( iId.index() ).displayProperties().color();
39  for (TEveProjectable::ProjList_i j = ls->BeginProjecteds(); j != ls->EndProjecteds(); ++j)
40  {
41  if( TEveStraightLineSet *pls = dynamic_cast<TEveStraightLineSet*> (*j))
42  {
43  pls->SetMarkerColor(c);
44  pls->ElementChanged();
45  }
46  }
47 
48  ls->SetMarkerColor(c);
49  ls->ElementChanged();
50  }
51 }
def ls
Definition: eostools.py:348
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:537
const FWBeamSpotProxyBuilder& FWBeamSpotProxyBuilder::operator= ( const FWBeamSpotProxyBuilder )
private
const std::string& FWBeamSpotProxyBuilder::purpose ( ) const
inline

Definition at line 21 of file FWBeamSpotProxyBuilder.cc.

23 :
24  // Disable default copy constructor
const std::string& FWBeamSpotProxyBuilder::typeName ( ) const
inline

Definition at line 21 of file FWBeamSpotProxyBuilder.cc.

23 :
24  // Disable default copy constructor
const std::string& FWBeamSpotProxyBuilder::view ( ) const
inline

Definition at line 21 of file FWBeamSpotProxyBuilder.cc.

23 :
24  // Disable default copy constructor