CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
FWConversionProxyBuilder Class Reference
Inheritance diagram for FWConversionProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::Conversion > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

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

Private Attributes

TEveElementList * m_common
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::Conversion >
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void build (const reco::Conversion &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
virtual void build (const void *, unsigned int iIndex, TEveElement &iItemHolder, const FWViewContext *)=0
 
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
virtual void buildViewType (const void *, unsigned int iIndex, TEveElement &iItemHolder, FWViewType::EType, const FWViewContext *)=0
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
const reco::ConversionmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void clean () override
 
- 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() [1/2]

FWConversionProxyBuilder::FWConversionProxyBuilder ( )

Definition at line 60 of file FWConversionProxyBuilder.cc.

60  : m_common(nullptr) {
61  m_common = new TEveElementList("common conversion scene");
62  m_common->IncDenyDestroy();
63 }

References m_common.

◆ ~FWConversionProxyBuilder()

FWConversionProxyBuilder::~FWConversionProxyBuilder ( )
override

Definition at line 65 of file FWConversionProxyBuilder.cc.

65 { m_common->DecDenyDestroy(); }

References m_common.

◆ FWConversionProxyBuilder() [2/2]

FWConversionProxyBuilder::FWConversionProxyBuilder ( const FWConversionProxyBuilder )
privatedelete

Member Function Documentation

◆ buildViewType()

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 104 of file FWConversionProxyBuilder.cc.

108  {
109  TEveElementList* lines = requestCommon();
110  TEveElement::List_i linIt = lines->BeginChildren();
111  std::advance(linIt, iIndex);
112  TEveLine* line = (TEveLine*)((*linIt)->CloneElement());
113  TEveVector bvec = line->GetLineStart();
114  TEveVector evec = line->GetLineEnd();
115  if (bvec.Mag() != evec.Mag())
116  setupAddElement(*linIt, &oItemHolder);
117 }

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

◆ classPurpose()

const std::string & FWConversionProxyBuilder::classPurpose ( )
static

Definition at line 122 of file FWConversionProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 122 of file FWConversionProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 122 of file FWConversionProxyBuilder.cc.

◆ classView()

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

Definition at line 122 of file FWConversionProxyBuilder.cc.

◆ cleanLocal()

void FWConversionProxyBuilder::cleanLocal ( )
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 102 of file FWConversionProxyBuilder.cc.

102 { m_common->DestroyElements(); }

References m_common.

◆ haveSingleProduct()

bool FWConversionProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 39 of file FWConversionProxyBuilder.cc.

39 { return false; }

◆ operator=()

const FWConversionProxyBuilder& FWConversionProxyBuilder::operator= ( const FWConversionProxyBuilder )
privatedelete

◆ purpose()

const std::string& FWConversionProxyBuilder::purpose ( ) const
inline

Definition at line 42 of file FWConversionProxyBuilder.cc.

44 :
45  FWConversionProxyBuilder(const FWConversionProxyBuilder&) = delete; // stop default

◆ requestCommon()

TEveElementList * FWConversionProxyBuilder::requestCommon ( )
private

Definition at line 67 of file FWConversionProxyBuilder.cc.

67  {
68  if (m_common->HasChildren() == false) {
69  for (int i = 0; i < static_cast<int>(item()->size()); ++i) {
71  TEveLine* line = new TEveLine(0);
72  if (conversion.nTracks() == 2) {
73  if (fabs(conversion.zOfPrimaryVertexFromTracks()) < fireworks::Context::caloZ1())
74  line->SetNextPoint(0., 0., conversion.zOfPrimaryVertexFromTracks());
75  else
76  line->SetNextPoint(0., 0., 0.);
77 
78  float phi = conversion.pairMomentum().phi();
79  if (fabs(conversion.pairMomentum().eta()) < fireworks::Context::caloTransEta()) {
81  float z = radius / tan(conversion.pairMomentum().theta());
82  line->SetNextPoint(radius * cos(phi), radius * sin(phi), z);
83  } else {
84  float z = fireworks::Context::caloZ1();
85  float radius = z * tan(conversion.pairMomentum().theta());
86  z *= (conversion.pairMomentum().eta() / fabs(conversion.pairMomentum().eta()));
87  line->SetNextPoint(radius * cos(phi), radius * sin(phi), z);
88  }
89  } else {
90  line->SetNextPoint(0., 0., 0.);
91  line->SetNextPoint(0., 0., 0.);
92  }
93 
95  m_common->AddElement(line);
96  }
97  }
98 
99  return m_common;
100 }

References fireworks::Context::caloR1(), fireworks::Context::caloTransEta(), fireworks::Context::caloZ1(), edm::conversion(), funct::cos(), mps_fire::i, FWProxyBuilderBase::item(), mps_splice::line, m_common, FWSimpleProxyBuilderTemplate< reco::Conversion >::modelData(), phi, CosmicsPD_Skims::radius, FWProxyBuilderBase::setupElement(), funct::sin(), findQualityFiles::size, funct::tan(), and z.

Referenced by buildViewType().

◆ typeName()

const std::string& FWConversionProxyBuilder::typeName ( ) const
inline

Definition at line 42 of file FWConversionProxyBuilder.cc.

44 :
45  FWConversionProxyBuilder(const FWConversionProxyBuilder&) = delete; // stop default

◆ view()

const std::string& FWConversionProxyBuilder::view ( ) const
inline

Definition at line 42 of file FWConversionProxyBuilder.cc.

44 :
45  FWConversionProxyBuilder(const FWConversionProxyBuilder&) = delete; // stop default

Member Data Documentation

◆ m_common

TEveElementList* FWConversionProxyBuilder::m_common
private
reco::Conversion
Definition: Conversion.h:23
mps_fire.i
i
Definition: mps_fire.py:428
edm::conversion
void conversion(EventAux const &from, EventAuxiliary &to)
Definition: EventAux.cc:9
FWProxyBuilderBase::setupElement
void setupElement(TEveElement *el, bool color=true) const
Definition: FWProxyBuilderBase.cc:358
FWSimpleProxyBuilderTemplate< reco::Conversion >::modelData
const reco::Conversion & modelData(int index)
Definition: FWSimpleProxyBuilderTemplate.h:43
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDAxes::z
fireworks::Context::caloTransEta
static float caloTransEta()
Definition: Context.cc:187
FWConversionProxyBuilder
Definition: FWConversionProxyBuilder.cc:34
groupFilesInBlocks.lines
lines
Definition: groupFilesInBlocks.py:95
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
DDAxes::phi
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWConversionProxyBuilder::FWConversionProxyBuilder
FWConversionProxyBuilder()
Definition: FWConversionProxyBuilder.cc:60
fireworks::Context::caloZ1
static float caloZ1(bool offset=true)
Definition: Context.cc:183
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
mps_splice.line
line
Definition: mps_splice.py:76
FWConversionProxyBuilder::m_common
TEveElementList * m_common
Definition: FWConversionProxyBuilder.cc:57
fireworks::Context::caloR1
static float caloR1(bool offset=true)
Definition: Context.cc:180
FWConversionProxyBuilder::requestCommon
TEveElementList * requestCommon()
Definition: FWConversionProxyBuilder.cc:67
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443