13 #include "TEveJetCone.h" 14 #include "TEveScalableStraightLineSet.h" 74 TEveElement& oItemHolder,
79 TEveElement* iCompound,
86 typedef std::vector<fireworks::jetScaleMarker>
Lines_t;
96 m_common =
new TEveElementList(
"common electron scene");
103 if (
m_common->HasChildren() ==
false) {
104 for (
int i = 0; i < static_cast<int>(
item()->
size()); ++
i) {
107 cone->SetFillColor(
item()->defaultDisplayProperties().color());
108 cone->SetLineColor(
item()->defaultDisplayProperties().color());
118 TEveElement& oItemHolder,
123 TEveElement::List_i coneIt = cones->BeginChildren();
124 std::advance(coneIt, iIndex);
128 (*coneIt)->SetMainTransparency(
TMath::Min(100, 80 +
dp.transparency() / 5));
142 static const float_t offr = 4;
161 markers.m_ls->SetScaleCenter(
p1.fX,
p1.fY,
p1.fZ);
162 markers.m_ls->AddLine(
p1,
p2);
164 markers.m_ls->SetLineWidth(4);
165 markers.m_ls->SetLineColor(
dp.color());
172 markers.m_text->SetMainColor(
item()->defaultDisplayProperties().color());
176 markers.m_ls->SetMarkerColor(markers.m_ls->GetMainColor());
185 TEveElement* iCompound,
198 for (TEveElement::List_i
i =
m_common->BeginChildren();
i !=
m_common->EndChildren(); ++
i) {
199 TEveJetCone*
cone =
dynamic_cast<TEveJetCone*
>(*i);
207 for (
auto&
c : product->RefChildren()) {
210 if (
parent->NumChildren() > 1) {
211 auto compIt =
parent->BeginChildren();
213 TEveScalableStraightLineSet* lineSet =
dynamic_cast<TEveScalableStraightLineSet*
>(*compIt);
220 for (TEveProjectable::ProjList_i
j = lineSet->BeginProjecteds();
j != lineSet->EndProjecteds(); ++
j) {
221 (*j)->UpdateProjection();
230 TEveChunkManager::iterator li(
s.m_ls->GetLinePlex());
232 TEveStraightLineSet::Line_t&
l = *(TEveStraightLineSet::Line_t*)li();
233 TEveVector
v(
l.fV2[0] -
l.fV1[0],
l.fV2[1] -
l.fV1[1],
l.fV2[2] -
l.fV1[2]);
241 float x =
l.fV1[0] +
v[0];
242 float y =
l.fV1[1] +
v[1];
243 float z =
l.fV1[2] +
v[2];
246 s.m_text->RefMainTrans().SetPos(
x,
y,
z);
247 if ((
s.m_text)->BeginProjecteds() != (
s.m_text)->EndProjecteds()) {
void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
static const std::string kJetApexBeamSpot("Place Apex In BeamSpot")
void UpdateProjection() override
const void * modelData(int iIndex) const
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const std::string kJetLabelsRhoPhiOn("Draw Labels in RhoPhi View")
static const int kAllRPZBits
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
CmsShowCommon * commonPrefs() const
FWProxyBuilderConfiguration * getConfig() const
Base class for all types of Jets.
jetScaleMarker(TEveScalableStraightLineSet *ls, float et, float e, const FWViewContext *vc)
Sin< T >::type sin(const T &t)
float getMaxEnergyInEvent(bool isEt) const
const FWJetProxyBuilder & operator=(const FWJetProxyBuilder &)=delete
static float caloZ2(bool offset=true)
std::vector< fireworks::jetScaleMarker > Lines_t
static const std::string kJetOffset("Label Offset")
static const int kAll3DBits
const fireworks::Context & context() const
FWViewEnergyScale * getEnergyScale() const
static bool isProjected(int)
double theta() const final
momentum polar angle
const FWDisplayProperties & defaultDisplayProperties() const
const reco::Jet & modelData(int index)
virtual void setItem(const FWEventItem *iItem)
void voteMaxEtAndEnergy(float Et, float energy) const
Cos< T >::type cos(const T &t)
void setItem(const FWEventItem *iItem) override
static float caloR1(bool offset=true)
Tan< T >::type tan(const T &t)
static const std::string kJetLabelsRhoZOn("Draw Labels in RhoZ View")
static Context * getInstance()
TEveElementList * m_common
FWGenericParameter< T > * assertParam(const std::string &name, T def)
float getScaleFactor3D() const
bool haveSingleProduct() const override
void buildViewType(const reco::Jet &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
double et() const final
transverse energy
static float caloZ1(bool offset=true)
bool havePerViewProduct(FWViewType::EType) const override
T value(const std::string &name)
void cleanLocal() override
TEveElementList * requestCommon()
~FWJetProxyBuilder() override
void getEventCenter(float *inC) const
double phi() const final
momentum azimuthal angle
Geom::Theta< T > theta() const
const FWEventItem * item() const
void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
void setTextPos(fireworks::jetScaleMarker &s, const FWViewContext *vc, FWViewType::EType)
void increaseComponentTransparency(unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
TEveJetCone * makeEveJetCone(const reco::Jet &iData, const fireworks::Context &context)
double energy() const final
energy