13 #include "TEveJetCone.h" 14 #include "TEveScalableStraightLineSet.h" 56 virtual void cleanLocal();
76 virtual void localModelChanges(
const FWModelId& iId, TEveElement* iCompound,
82 typedef std::vector<fireworks::jetScaleMarker>
Lines_t;
87 TEveElementList* requestCommon();
92 std::vector<fireworks::jetScaleMarker>
m_lines;
100 m_common =
new TEveElementList(
"common electron scene" );
114 for (
int i = 0; i < static_cast<int>(
item()->
size()); ++
i)
121 cone->SetApex(TEveVector(bs->
x0(), bs->
y0(), bs->
z0()));
123 cone->SetFillColor(
item()->defaultDisplayProperties().
color());
124 cone->SetLineColor(
item()->defaultDisplayProperties().
color());
137 TEveElement::List_i coneIt = cones->BeginChildren();
138 std::advance(coneIt, iIndex);
159 static const float_t offr = 4;
166 r = z_ecal/fabs(
cos(theta));
170 r = r_ecal/
sin(theta);
173 p1.Set( 0., (phi>0 ? r*fabs(
sin(theta)) : -r*fabs(
sin(theta))), r*
cos(theta));
174 p2.Set( 0., (phi>0 ? (r+size)*fabs(
sin(theta)) : -(r+size)*fabs(
sin(theta))), (r+size)*
cos(theta) );
179 p1.Set(ecalR*
cos(phi), ecalR*
sin(phi), 0);
180 p2.Set((ecalR+size)*
cos(phi), (ecalR+size)*
sin(phi), 0);
186 TEveVector bsOff(bs->
x0(), bs->
y0(), bs->
z0());
191 markers.
m_ls->SetScaleCenter(p1.fX, p1.fY, p1.fZ);
192 markers.
m_ls->AddLine(p1, p2);
194 markers.
m_ls->SetLineWidth(4);
203 markers.
m_text->SetMainColor(
item()->defaultDisplayProperties().
color());
207 markers.
m_ls->SetMarkerColor(markers.
m_ls->GetMainColor());
224 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
225 if (projLineSet) projLineSet->UpdateProjection();
249 (*i).m_text->SetText(Form(
"%.1f", value));
252 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*(*i).m_ls->BeginProjecteds());
253 projLineSet->UpdateProjection();
261 TEveChunkManager::iterator li( s.
m_ls->GetLinePlex() );
263 TEveStraightLineSet::Line_t &
l = * ( TEveStraightLineSet::Line_t* ) li();
264 TEveVector
v(l.fV2[0] - l.fV1[0], l.fV2[1] - l.fV1[1], l.fV2[2] - l.fV1[2] );
273 float x = l.fV1[0] + v[0];
274 float y = l.fV1[1] + v[1];
275 float z = l.fV1[2] + v[2];
278 s.
m_text->RefMainTrans().SetPos(x, y, z);
279 if ((s.
m_text)->BeginProjecteds() != (s.
m_text)->EndProjecteds()) {
const fireworks::Context & context() const
FWProxyBuilderConfiguration * getConfig() const
float getScaleFactor3D() const
static const std::string kJetApexBeamSpot("Place Apex In BeamSpot")
const FWDisplayProperties & defaultDisplayProperties() const
#define REGISTER_PROXYBUILDER_METHODS()
#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 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
virtual double phi() const final
momentum azimuthal angle
static bool isProjected(int)
virtual double et() const final
transverse energy
virtual void cleanLocal()
virtual double theta() const final
momentum polar angle
Char_t transparency() const
FWBeamSpot * getBeamSpot() const
const reco::Jet & modelData(int index)
virtual void setItem(const FWEventItem *iItem)
Cos< T >::type cos(const T &t)
virtual double energy() const final
energy
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
et
define resolution functions of each parameter
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)
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()
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)