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 | Private Attributes
FWConversionProxyBuilder Class Reference
Inheritance diagram for FWConversionProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::Conversion > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

virtual void cleanLocal () override
 
 FWConversionProxyBuilder ()
 
virtual bool haveSingleProduct () const override
 
 REGISTER_PROXYBUILDER_METHODS ()
 
virtual ~FWConversionProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::Conversion >
 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

virtual void buildViewType (const reco::Conversion &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 
 FWConversionProxyBuilder (const FWConversionProxyBuilder &)
 
const FWConversionProxyBuilderoperator= (const FWConversionProxyBuilder &)
 
TEveElementList * requestCommon ()
 

Private Attributes

TEveElementList * m_common
 

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::Conversion >
const reco::ConversionmodelData (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
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 34 of file FWConversionProxyBuilder.cc.

Constructor & Destructor Documentation

FWConversionProxyBuilder::FWConversionProxyBuilder ( )

Definition at line 57 of file FWConversionProxyBuilder.cc.

References m_common.

57  :
58  m_common(0)
59 {
60  m_common = new TEveElementList( "common conversion scene" );
61  m_common->IncDenyDestroy();
62 }
FWConversionProxyBuilder::~FWConversionProxyBuilder ( )
virtual

Definition at line 64 of file FWConversionProxyBuilder.cc.

References m_common.

65 {
66  m_common->DecDenyDestroy();
67 }
FWConversionProxyBuilder::FWConversionProxyBuilder ( const FWConversionProxyBuilder )
private

Member Function Documentation

void FWConversionProxyBuilder::buildViewType ( const reco::Conversion iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
FWViewType::EType  type,
const FWViewContext  
)
overrideprivatevirtual

Reimplemented from FWSimpleProxyBuilderTemplate< reco::Conversion >.

Definition at line 117 of file FWConversionProxyBuilder.cc.

References geometryCSVtoXML::line, groupFilesInBlocks::lines, requestCommon(), and FWProxyBuilderBase::setupAddElement().

118 {
119  TEveElementList* lines = requestCommon();
120  TEveElement::List_i linIt = lines->BeginChildren();
121  std::advance(linIt, iIndex);
122  TEveLine* line = (TEveLine*)((*linIt)->CloneElement());
123  TEveVector bvec = line->GetLineStart();
124  TEveVector evec = line->GetLineEnd();
125  if (bvec.Mag() != evec.Mag())
126  setupAddElement(*linIt, &oItemHolder );
127 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void FWConversionProxyBuilder::cleanLocal ( )
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 111 of file FWConversionProxyBuilder.cc.

References m_common.

112 {
113  m_common->DestroyElements();
114 }
virtual bool FWConversionProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 40 of file FWConversionProxyBuilder.cc.

40 { return false; }
const FWConversionProxyBuilder& FWConversionProxyBuilder::operator= ( const FWConversionProxyBuilder )
private
FWConversionProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )
TEveElementList * FWConversionProxyBuilder::requestCommon ( )
private

Definition at line 70 of file FWConversionProxyBuilder.cc.

References fireworks::Context::caloR1(), fireworks::Context::caloTransEta(), fireworks::Context::caloZ1(), edm::conversion(), funct::cos(), edm::false, i, FWProxyBuilderBase::item(), geometryCSVtoXML::line, m_common, FWSimpleProxyBuilderTemplate< reco::Conversion >::modelData(), reco::Conversion::nTracks(), reco::Conversion::pairMomentum(), phi, CosmicsPD_Skims::radius, FWProxyBuilderBase::setupElement(), funct::sin(), FWEventItem::size(), funct::tan(), detailsBasic3DVector::z, and reco::Conversion::zOfPrimaryVertexFromTracks().

Referenced by buildViewType().

71 {
72  if( m_common->HasChildren() == false )
73  {
74  for (int i = 0; i < static_cast<int>(item()->size()); ++i)
75  {
77  TEveLine* line = new TEveLine(0);
78  if (conversion.nTracks() == 2) {
79  if (fabs(conversion.zOfPrimaryVertexFromTracks()) < fireworks::Context::caloZ1())
80  line->SetNextPoint(0., 0., conversion.zOfPrimaryVertexFromTracks());
81  else
82  line->SetNextPoint(0., 0., 0.);
83 
84  float phi = conversion.pairMomentum().phi();
85  if (fabs(conversion.pairMomentum().eta()) < fireworks::Context::caloTransEta()) {
87  float z = radius/tan(conversion.pairMomentum().theta());
88  line->SetNextPoint(radius*cos(phi), radius*sin(phi), z);
89  }
90  else {
91  float z = fireworks::Context::caloZ1();
92  float radius = z*tan(conversion.pairMomentum().theta());
93  z *= (conversion.pairMomentum().eta()/fabs(conversion.pairMomentum().eta()));
94  line->SetNextPoint(radius*cos(phi), radius*sin(phi), z);
95  }
96  }
97  else {
98  line->SetNextPoint(0., 0., 0.);
99  line->SetNextPoint(0., 0., 0.);
100  }
101 
102  setupElement( line );
103  m_common->AddElement( line );
104  }
105  }
106 
107  return m_common;
108 }
static float caloTransEta()
Definition: Context.cc:229
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double zOfPrimaryVertexFromTracks(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const
Definition: Conversion.h:145
float float float z
const FWEventItem * item() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static float caloR1(bool offset=true)
Definition: Context.cc:209
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
unsigned int nTracks() const
Number of tracks= 0,1,2.
Definition: Conversion.h:101
math::XYZVectorF pairMomentum() const
Conversion tracks momentum from the tracks inner momentum.
Definition: Conversion.cc:223
void conversion(EventAux const &from, EventAuxiliary &to)
Definition: EventAux.cc:9
size_t size() const
Definition: FWEventItem.cc:548
static float caloZ1(bool offset=true)
Definition: Context.cc:219
volatile std::atomic< bool > shutdown_flag false
void setupElement(TEveElement *el, bool color=true) const
Definition: DDAxes.h:10

Member Data Documentation

TEveElementList* FWConversionProxyBuilder::m_common
private