CMS 3D CMS Logo

makeEveJetCone.cc
Go to the documentation of this file.
1 #include "TEveJetCone.h"
4 
5 namespace fireworks {
6  TEveJetCone* makeEveJetCone(const reco::Jet& iData, const fireworks::Context& context) {
7  TEveJetCone* jet = new TEveJetCone();
8  jet->SetApex(TEveVector(iData.vertex().x(), iData.vertex().y(), iData.vertex().z()));
9 
11  bool haveData = true;
12  for (reco::Jet::Constituents::const_iterator itr = c.begin(); itr != c.end(); ++itr) {
13  if (!itr->isAvailable()) {
14  haveData = false;
15  break;
16  }
17  }
18 
19  double eta_size = 0.2;
20  double phi_size = 0.2;
21  if (haveData) {
22  eta_size = sqrt(iData.etaetaMoment());
23  phi_size = sqrt(iData.phiphiMoment());
24  }
25 
26  static const float offr = 5;
27  static const float offz = offr / tan(context.caloTransAngle());
28  if (iData.eta() < context.caloMaxEta())
29  jet->SetCylinder(context.caloR1(false) - offr, context.caloZ1(false) - offz);
30  else
31  jet->SetCylinder(context.caloR2(false) - offr, context.caloZ2(false) - offz);
32 
33  jet->AddEllipticCone(iData.eta(), iData.phi(), eta_size, phi_size);
34  jet->SetPickable(kTRUE);
35  return jet;
36  }
37 } // namespace fireworks
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
fireworks::Context
Definition: Context.h:41
reco::Jet::Constituents
std::vector< Constituent > Constituents
Definition: Jet.h:23
Jet.h
reco::Jet::phiphiMoment
float phiphiMoment() const
phi-phi second moment, ET weighted
visDQMUpload.context
context
Definition: visDQMUpload.py:37
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Jet::getJetConstituents
virtual Constituents getJetConstituents() const
list of constituents
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
fireworks::makeEveJetCone
TEveJetCone * makeEveJetCone(const reco::Jet &iData, const fireworks::Context &context)
Definition: makeEveJetCone.cc:6
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
reco::LeafCandidate::vertex
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: LeafCandidate.h:165
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
metsig::jet
Definition: SignAlgoResolutions.h:47
reco::Jet::etaetaMoment
float etaetaMoment() const
eta-eta second moment, ET weighted
fireworks
Definition: FWTauProxyBuilderBase.h:35
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
Context.h