|
|
Go to the documentation of this file.
13 #include "TEveJetCone.h"
14 #include "TEveScalableStraightLineSet.h"
71 TEveElement& oItemHolder,
76 TEveElement* iCompound,
83 typedef std::vector<fireworks::jetScaleMarker>
Lines_t;
93 std::vector<fireworks::jetScaleMarker>
m_lines;
98 m_common =
new TEveElementList(
"common electron scene");
105 if (
m_common->HasChildren() ==
false) {
106 for (
int i = 0; i < static_cast<int>(
item()->
size()); ++
i) {
109 cone->SetFillColor(
item()->defaultDisplayProperties().color());
110 cone->SetLineColor(
item()->defaultDisplayProperties().color());
120 TEveElement& oItemHolder,
125 TEveElement::List_i coneIt = cones->BeginChildren();
126 std::advance(coneIt, iIndex);
130 (*coneIt)->SetMainTransparency(
TMath::Min(100, 80 +
dp.transparency() / 5));
146 static const float_t offr = 4;
165 markers.
m_ls->SetScaleCenter(
p1.fX,
p1.fY,
p1.fZ);
168 markers.
m_ls->SetLineWidth(4);
169 markers.
m_ls->SetLineColor(
dp.color());
176 markers.
m_text->SetMainColor(
item()->defaultDisplayProperties().color());
180 markers.
m_ls->SetMarkerColor(markers.
m_ls->GetMainColor());
189 TEveElement* iCompound,
195 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
197 projLineSet->UpdateProjection();
208 if (vc == (*i).m_vc) {
213 (*i).m_text->SetText(Form(
"%.1f",
value));
216 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
217 projLineSet->UpdateProjection();
225 for (TEveElement::List_i
i =
m_common->BeginChildren();
i !=
m_common->EndChildren(); ++
i) {
226 TEveJetCone* cone = dynamic_cast<TEveJetCone*>(*
i);
234 TEveChunkManager::iterator li(
s.m_ls->GetLinePlex());
236 TEveStraightLineSet::Line_t&
l = *(TEveStraightLineSet::Line_t*)li();
237 TEveVector
v(
l.fV2[0] -
l.fV1[0],
l.fV2[1] -
l.fV1[1],
l.fV2[2] -
l.fV1[2]);
245 float x =
l.fV1[0] +
v[0];
246 float y =
l.fV1[1] +
v[1];
247 float z =
l.fV1[2] +
v[2];
250 s.m_text->RefMainTrans().SetPos(
x,
y,
z);
251 if ((
s.m_text)->BeginProjecteds() != (
s.m_text)->EndProjecteds()) {
void setTextPos(fireworks::jetScaleMarker &s, const FWViewContext *vc, FWViewType::EType)
Base class for all types of Jets.
TEveScalableStraightLineSet * m_ls
FWProxyBuilderConfiguration * getConfig() const
void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
static const int kAllRPZBits
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const std::string kJetLabelsRhoZOn("Draw Labels in RhoZ View")
#define REGISTER_PROXYBUILDER_METHODS()
const reco::Jet & modelData(int index)
std::vector< fireworks::jetScaleMarker > Lines_t
static bool isProjected(int)
const FWJetProxyBuilder & operator=(const FWJetProxyBuilder &)=delete
static const int kAll3DBits
const FWDisplayProperties & defaultDisplayProperties() const
Sin< T >::type sin(const T &t)
static float caloZ2(bool offset=true)
Cos< T >::type cos(const T &t)
void voteMaxEtAndEnergy(float Et, float energy) const
static const std::string kJetApexBeamSpot("Place Apex In BeamSpot")
void increaseComponentTransparency(unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
double theta() const final
momentum polar angle
Geom::Theta< T > theta() const
jetScaleMarker(TEveScalableStraightLineSet *ls, float et, float e, const FWViewContext *vc)
void UpdateProjection() override
TEveElementList * m_common
CmsShowCommon * commonPrefs() const
FWGenericParameter< T > * assertParam(const std::string &name, T def)
TEveJetCone * makeEveJetCone(const reco::Jet &iData, const fireworks::Context &context)
bool haveSingleProduct() const override
Tan< T >::type tan(const T &t)
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void setItem(const FWEventItem *iItem) override
static const std::string kJetLabelsRhoPhiOn("Draw Labels in RhoPhi View")
float getMaxEnergyInEvent(bool isEt) const
std::vector< fireworks::jetScaleMarker > m_lines
const FWEventItem * item() const
float getScaleFactor3D() const
double et() const final
transverse energy
static float caloZ1(bool offset=true)
double phi() const final
momentum azimuthal angle
T value(const std::string &name)
TEveElementList * requestCommon()
static Context * getInstance()
void buildViewType(const reco::Jet &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
~FWJetProxyBuilder() override
static const std::string kJetOffset("Label Offset")
double energy() const final
energy
const fireworks::Context & context() const
virtual void setItem(const FWEventItem *iItem)
void cleanLocal() override
FWViewEnergyScale * getEnergyScale() const
void getEventCenter(float *inC) const
static float caloR1(bool offset=true)
void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
bool havePerViewProduct(FWViewType::EType) const override