13 #include "TEveJetCone.h"
14 #include "TEveScalableStraightLineSet.h"
78 typedef std::vector<fireworks::jetScaleMarker>
Lines_t;
88 std::vector<fireworks::jetScaleMarker>
m_lines;
96 m_common =
new TEveElementList(
"common electron scene" );
110 for (
int i = 0; i < static_cast<int>(
item()->
size()); ++
i)
115 cone->SetFillColor(
item()->defaultDisplayProperties().
color());
116 cone->SetLineColor(
item()->defaultDisplayProperties().
color());
128 TEveElement::List_i coneIt = cones->BeginChildren();
129 std::advance(coneIt, iIndex);
148 static const float_t offr = 4;
155 r = z_ecal/fabs(
cos(theta));
159 r = r_ecal/
sin(theta);
162 markers.
m_ls->SetScaleCenter( 0., (phi>0 ? r*fabs(
sin(theta)) : -r*fabs(
sin(theta))), r*
cos(theta) );
163 markers.
m_ls->AddLine( 0., (phi>0 ? r*fabs(
sin(theta)) : -r*fabs(
sin(theta))), r*
cos(theta),
164 0., (phi>0 ? (r+size)*fabs(
sin(theta)) : -(r+size)*fabs(
sin(theta))), (r+size)*
cos(theta) );
169 markers.
m_ls->SetScaleCenter(ecalR*
cos(phi), ecalR*
sin(phi), 0);
170 markers.
m_ls->AddLine(ecalR*
cos(phi), ecalR*
sin(phi), 0, (ecalR+size)*
cos(phi), (ecalR+size)*
sin(phi), 0);
173 markers.
m_ls->SetLineWidth(4);
182 markers.
m_text->SetMainColor(
item()->defaultDisplayProperties().
color());
187 markers.
m_ls->SetMarkerColor(markers.
m_ls->GetMainColor());
204 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
205 if (projLineSet) projLineSet->UpdateProjection();
229 (*i).m_text->SetText(Form(
"%.1f", value));
232 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
233 projLineSet->UpdateProjection();
241 TEveChunkManager::iterator li( s.
m_ls->GetLinePlex() );
243 TEveStraightLineSet::Line_t &
l = * ( TEveStraightLineSet::Line_t* ) li();
244 TEveVector
v(l.fV2[0] - l.fV1[0], l.fV2[1] - l.fV1[1], l.fV2[2] - l.fV1[2] );
253 float x = l.fV1[0] + v[0];
254 float y = l.fV1[1] + v[1];
255 float z = l.fV1[2] + v[2];
258 s.
m_text->RefMainTrans().SetPos(x, y, z);
259 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()
volatile std::atomic< bool > shutdown_flag false
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)