CMS 3D CMS Logo

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

Public Member Functions

 FWVertexCandidateProxyBuilder ()
 
const std::string & purpose () const
 
void setItem (const FWEventItem *iItem) override
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWVertexCandidateProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::VertexCompositePtrCandidate >
 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
 
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 &)
 
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 build (const reco::VertexCompositePtrCandidate &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *) override
 
 FWVertexCandidateProxyBuilder (const FWVertexCandidateProxyBuilder &)=delete
 
void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
 
const FWVertexCandidateProxyBuilderoperator= (const FWVertexCandidateProxyBuilder &)=delete
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::VertexCompositePtrCandidate >
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 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 reco::VertexCompositePtrCandidate &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
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::VertexCompositePtrCandidatemodelData (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
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 41 of file FWVertexCandidateProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWVertexCandidateProxyBuilder() [1/2]

FWVertexCandidateProxyBuilder::FWVertexCandidateProxyBuilder ( )
inline

Definition at line 43 of file FWVertexCandidateProxyBuilder.cc.

43 {}

◆ ~FWVertexCandidateProxyBuilder()

FWVertexCandidateProxyBuilder::~FWVertexCandidateProxyBuilder ( )
inlineoverride

Definition at line 44 of file FWVertexCandidateProxyBuilder.cc.

44 {}

◆ FWVertexCandidateProxyBuilder() [2/2]

FWVertexCandidateProxyBuilder::FWVertexCandidateProxyBuilder ( const FWVertexCandidateProxyBuilder )
privatedelete

Member Function Documentation

◆ build()

void FWVertexCandidateProxyBuilder::build ( const reco::VertexCompositePtrCandidate 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::VertexCompositePtrCandidate >.

Definition at line 76 of file FWVertexCandidateProxyBuilder.cc.

79  {
80  const reco::VertexCompositePtrCandidate& v = iData;
81 
82  // marker
83  TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur());
84  TEvePointSet* pointSet = new TEvePointSet();
85  pointSet->SetNextPoint(v.vx(), v.vy(), v.vz());
86  setupAddElement(pointSet, &oItemHolder);
87 
88  // ellipse
89  if (item()->getConfig()->value<bool>("Draw Ellipse")) {
90  TEveEllipsoid* eveEllipsoid = new TEveEllipsoid("Ellipsoid", Form("Ellipsoid %d", iIndex));
91 
92  eveEllipsoid->RefPos().Set(v.vx(), v.vy(), v.vz());
93 
94  reco::Vertex::Error e = v.error();
95  TMatrixDSym m(3);
96  for (int i = 0; i < 3; i++)
97  for (int j = 0; j < 3; j++) {
98  m(i, j) = e(i, j);
99  eveEllipsoid->RefEMtx()(i + 1, j + 1) = e(i, j);
100  }
101 
102  // external scaling
103  double ellipseScale = 1.;
104  if (item()->getConfig()->value<long>("Scale Ellipse"))
105  ellipseScale = item()->getConfig()->value<long>("Scale Ellipse");
106 
107  eveEllipsoid->SetScale(ellipseScale);
108 
109  // cache 3D extend used in eval bbox and render 3D
110  TMatrixDEigen eig(m);
111  TVectorD vv(eig.GetEigenValuesRe());
112  eveEllipsoid->RefExtent3D().Set(sqrt(vv(0)) * ellipseScale, sqrt(vv(1)) * ellipseScale, sqrt(vv(2)) * ellipseScale);
113 
114  eveEllipsoid->SetLineWidth(2);
115  setupAddElement(eveEllipsoid, &oItemHolder);
116  eveEllipsoid->SetMainTransparency(TMath::Min(100, 80 + item()->defaultDisplayProperties().transparency() / 5));
117 
118  Color_t color = item()->getConfig()->value<long>("Ellipse Color Index");
119  // eveEllipsoid->SetFillColor(item()->defaultDisplayProperties().color());
120  // eveEllipsoid->SetLineColor(item()->defaultDisplayProperties().color());
121  eveEllipsoid->SetMainColor(color + context().colorManager()->offsetOfLimitedColors());
122  }
123 
124  // tracks
125  if (item()->getConfig()->value<bool>("Draw Tracks")) {
126  for (unsigned int j = 0; j < v.numberOfDaughters(); j++) {
127  const reco::Candidate* c = v.daughter(j);
128  std::cout << c << std::endl;
129  TEveTrack* trk = fireworks::prepareCandidate(*c, context().getTrackPropagator());
130 
131  trk->SetMainColor(item()->defaultDisplayProperties().color());
132  trk->MakeTrack();
133  setupAddElement(trk, &oItemHolder);
134  }
135  }
136  if (item()->getConfig()->value<bool>("Draw Pseudo Track")) {
137  TEveRecTrack t;
138  t.fBeta = 1.;
139  t.fV = TEveVector(v.vx(), v.vy(), v.vz());
140  t.fP = TEveVector(-v.p4().px(), -v.p4().py(), -v.p4().pz());
141  t.fSign = 1;
142  TEveTrack* trk = new TEveTrack(&t, context().getTrackPropagator());
143  trk->SetLineStyle(7);
144  trk->MakeTrack();
145  setupAddElement(trk, &oItemHolder);
146  }
147 }

References c, FWProxyBuilderBase::context(), gather_cfg::cout, MillePedeFileConverter_cfg::e, FWEventItem::getConfig(), mps_fire::i, FWProxyBuilderBase::item(), dqmiolumiharvest::j, visualization-live-secondInstance_cfg::m, Min(), fireworks::prepareCandidate(), TEveEllipsoid::RefEMtx(), TEveEllipsoid::RefExtent3D(), TEveEllipsoid::RefPos(), TEveEllipsoid::SetScale(), FWProxyBuilderBase::setupAddElement(), mathSSE::sqrt(), submitPVValidationJobs::t, findQualityFiles::v, and FWProxyBuilderConfiguration::value().

◆ classPurpose()

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

Definition at line 166 of file FWVertexCandidateProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 166 of file FWVertexCandidateProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 166 of file FWVertexCandidateProxyBuilder.cc.

◆ classView()

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

Definition at line 166 of file FWVertexCandidateProxyBuilder.cc.

◆ localModelChanges()

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

Reimplemented from FWProxyBuilderBase.

Definition at line 149 of file FWVertexCandidateProxyBuilder.cc.

152  {
153  increaseComponentTransparency(iId.index(), iCompound, "Ellipsoid", 80);
154  TEveElement* el = iCompound->FindChild("Ellipsoid");
155  if (el)
156  el->SetMainColor(item()->getConfig()->value<long>("Ellipse Color Index") +
157  context().colorManager()->offsetOfLimitedColors());
158 }

References FWProxyBuilderBase::context(), FWProxyBuilderBase::increaseComponentTransparency(), FWModelId::index(), and FWProxyBuilderBase::item().

◆ operator=()

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

◆ purpose()

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

Definition at line 58 of file FWVertexCandidateProxyBuilder.cc.

60 :
61  FWVertexCandidateProxyBuilder(const FWVertexCandidateProxyBuilder&) = delete; // stop default

◆ setItem()

void FWVertexCandidateProxyBuilder::setItem ( const FWEventItem iItem)
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 46 of file FWVertexCandidateProxyBuilder.cc.

46  {
48  if (iItem) {
49  iItem->getConfig()->assertParam("Draw Tracks", false);
50  iItem->getConfig()->assertParam("Draw Pseudo Track", false);
51  iItem->getConfig()->assertParam("Draw Ellipse", false);
52  iItem->getConfig()->assertParam("Scale Ellipse", 2l, 1l, 10l);
53  iItem->getConfig()->assertParam(
54  "Ellipse Color Index", 6l, 0l, (long)context().colorManager()->numberOfLimitedColors());
55  }
56  }

References FWProxyBuilderConfiguration::assertParam(), FWProxyBuilderBase::context(), FWEventItem::getConfig(), cmsLHEtoEOSManager::l, and FWProxyBuilderBase::setItem().

◆ typeName()

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

Definition at line 58 of file FWVertexCandidateProxyBuilder.cc.

60 :
61  FWVertexCandidateProxyBuilder(const FWVertexCandidateProxyBuilder&) = delete; // stop default

◆ view()

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

Definition at line 58 of file FWVertexCandidateProxyBuilder.cc.

60 :
61  FWVertexCandidateProxyBuilder(const FWVertexCandidateProxyBuilder&) = delete; // stop default
FWVertexCandidateProxyBuilder
Definition: FWVertexCandidateProxyBuilder.cc:41
mps_fire.i
i
Definition: mps_fire.py:428
TEveEllipsoid::RefPos
TEveVector & RefPos()
Definition: TEveEllipsoid.h:36
FWEventItem::getConfig
FWProxyBuilderConfiguration * getConfig() const
Definition: FWEventItem.h:150
reco::Vertex::Error
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
TEveEllipsoid::RefEMtx
TEveTrans & RefEMtx()
Definition: TEveEllipsoid.h:38
gather_cfg.cout
cout
Definition: gather_cfg.py:144
TEveEllipsoid::SetScale
void SetScale(float x)
Definition: TEveEllipsoid.h:40
findQualityFiles.v
v
Definition: findQualityFiles.py:179
reco::VertexCompositePtrCandidate
Definition: VertexCompositePtrCandidate.h:16
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
FWProxyBuilderBase::increaseComponentTransparency
void increaseComponentTransparency(unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
Definition: FWProxyBuilderBase.cc:393
FWModelId::index
int index() const
Definition: FWModelId.h:41
FWProxyBuilderConfiguration::assertParam
FWGenericParameter< T > * assertParam(const std::string &name, T def)
Definition: FWProxyBuilderConfiguration.cc:83
TEveEllipsoid::RefExtent3D
TEveVector & RefExtent3D()
Definition: TEveEllipsoid.h:37
TEveEllipsoid
Definition: TEveEllipsoid.h:13
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
reco::Candidate
Definition: Candidate.h:27
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWProxyBuilderConfiguration::value
T value(const std::string &name)
Definition: FWProxyBuilderConfiguration.cc:123
FWVertexCandidateProxyBuilder::FWVertexCandidateProxyBuilder
FWVertexCandidateProxyBuilder()
Definition: FWVertexCandidateProxyBuilder.cc:43
fireworks::prepareCandidate
TEveTrack * prepareCandidate(const reco::Candidate &track, TEveTrackPropagator *propagator)
Definition: CandidateUtils.cc:9
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition: FWProxyBuilderBase.cc:412
Min
T Min(T a, T b)
Definition: MathUtil.h:39
FWProxyBuilderBase::setItem
virtual void setItem(const FWEventItem *iItem)
Definition: FWProxyBuilderBase.cc:83
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37