14 #include "TEveJetCone.h"
15 #include "TEveScalableStraightLineSet.h"
79 typedef std::vector<fireworks::jetScaleMarker>
Lines_t;
89 std::vector<fireworks::jetScaleMarker>
m_lines;
97 m_common =
new TEveElementList(
"common electron scene" );
111 for (
int i = 0; i < static_cast<int>(
item()->
size()); ++
i)
116 cone->SetFillColor(
item()->defaultDisplayProperties().
color());
117 cone->SetLineColor(
item()->defaultDisplayProperties().
color());
129 TEveElement::List_i coneIt = cones->BeginChildren();
130 std::advance(coneIt, iIndex);
149 static const float_t offr = 4;
156 r = z_ecal/fabs(
cos(theta));
160 r = r_ecal/
sin(theta);
163 markers.
m_ls->SetScaleCenter( 0., (phi>0 ? r*fabs(
sin(theta)) : -r*fabs(
sin(theta))), r*
cos(theta) );
164 markers.
m_ls->AddLine( 0., (phi>0 ? r*fabs(
sin(theta)) : -r*fabs(
sin(theta))), r*
cos(theta),
165 0., (phi>0 ? (r+size)*fabs(
sin(theta)) : -(r+size)*fabs(
sin(theta))), (r+size)*
cos(theta) );
170 markers.
m_ls->SetScaleCenter(ecalR*
cos(phi), ecalR*
sin(phi), 0);
171 markers.
m_ls->AddLine(ecalR*
cos(phi), ecalR*
sin(phi), 0, (ecalR+size)*
cos(phi), (ecalR+size)*
sin(phi), 0);
174 markers.
m_ls->SetLineWidth(4);
183 markers.
m_text->SetMainColor(
item()->defaultDisplayProperties().
color());
188 markers.
m_ls->SetMarkerColor(markers.
m_ls->GetMainColor());
205 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
206 if (projLineSet) projLineSet->UpdateProjection();
230 (*i).m_text->SetText(Form(
"%.1f", value));
233 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
234 projLineSet->UpdateProjection();
242 TEveChunkManager::iterator li( s.
m_ls->GetLinePlex() );
244 TEveStraightLineSet::Line_t &
l = * ( TEveStraightLineSet::Line_t* ) li();
245 TEveVector
v(l.fV2[0] - l.fV1[0], l.fV2[1] - l.fV1[1], l.fV2[2] - l.fV1[2] );
254 float x = l.fV1[0] + v[0];
255 float y = l.fV1[1] + v[1];
256 float z = l.fV1[2] + v[2];
259 s.
m_text->RefMainTrans().SetPos(x, y, z);
260 if ((s.
m_text)->BeginProjecteds() != (s.
m_text)->EndProjecteds()) {
const FWJetProxyBuilder & operator=(const FWJetProxyBuilder &)
virtual double energy() const GCC11_FINAL
energy
const fireworks::Context & context() const
FWProxyBuilderConfiguration * getConfig() const
float getScaleFactor3D() const
virtual double et() const GCC11_FINAL
transverse energy
const FWDisplayProperties & defaultDisplayProperties() const
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
virtual void UpdateProjection()
static const std::string kJetLabelsRhoPhiOn("Draw Labels in RhoPhi View")
static const int kAllRPZBits
Base class for all types of Jets.
void voteMaxEtAndEnergy(float Et, float energy) const
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
jetScaleMarker(TEveScalableStraightLineSet *ls, float et, float e, const FWViewContext *vc)
Sin< T >::type sin(const T &t)
FWViewEnergyScale * getEnergyScale() const
Geom::Theta< T > theta() const
static float caloZ2(bool offset=true)
virtual double theta() const GCC11_FINAL
momentum polar angle
virtual void setItem(const FWEventItem *iItem)
std::vector< fireworks::jetScaleMarker > Lines_t
static const std::string kJetOffset("Label Offset")
const FWEventItem * item() const
static const int kAll3DBits
static bool isProjected(int)
virtual void cleanLocal()
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
Char_t transparency() const
const reco::Jet & modelData(int index)
virtual void setItem(const FWEventItem *iItem)
Cos< T >::type cos(const T &t)
static float caloR1(bool offset=true)
Tan< T >::type tan(const T &t)
static const std::string kJetLabelsRhoZOn("Draw Labels in RhoZ View")
float getMaxEnergyInEvent(bool isEt) const
virtual ~FWJetProxyBuilder()
virtual bool havePerViewProduct(FWViewType::EType) const
TEveElementList * m_common
FWGenericParameter< T > * assertParam(const std::string &name, T def)
virtual bool haveSingleProduct() const
virtual void buildViewType(const reco::Jet &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *)
TEveScalableStraightLineSet * m_ls
virtual void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
REGISTER_PROXYBUILDER_METHODS()
static float caloZ1(bool offset=true)
T value(const std::string &name)
std::vector< fireworks::jetScaleMarker > m_lines
virtual void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
TEveElementList * requestCommon()
tuple size
Write out results.
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)