CMS 3D CMS Logo

Namespaces | Classes | Functions | Variables
fireworks Namespace Reference

Namespaces

 expression
 
 geometry
 
 table
 

Classes

class  Context
 
struct  jetScaleMarker
 
class  OptionNode
 
struct  OptionNodePtrCompare
 
struct  OptionNodePtrEqual
 
struct  PaletteExtraTopBottomIndices
 
struct  scaleMarker
 
struct  State
 
class  StateOrdering
 

Functions

bool acceptDataFormatsVersion (TString &n)
 
void addBox (const std::vector< float > &corners, TEveElement *, FWProxyBuilderBase *)
 
void addCircle (double eta, double phi, double radius, const unsigned int nLineSegments, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addDashedArrow (double phi, double size, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addDashedLine (double phi, double theta, double size, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addDoubleLines (double phi, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addRhoZEnergyProjection (FWProxyBuilderBase *, TEveElement *, double r_ecal, double z_ecal, double theta_min, double theta_max, double phi)
 
void addSiStripClusters (const FWEventItem *iItem, const reco::Track &t, class TEveElement *tList, bool addNearbyClusters, bool master)
 
void addStraightLineSegment (TEveStraightLineSet *marker, reco::Candidate const *cand, double scale_factor=2)
 
const TGGC & boldGC ()
 
void createSegment (int detector, bool matchedSegment, float segmentLength, float segmentLimit, float *segmentPosition, float *segmentDirection, float *segmentInnerPoint, float *segmentOuterPoint)
 
const TString datadir ("/src/Fireworks/Core/")
 
void drawEnergyScaledBox3D (const float *corners, float scale, TEveElement *, FWProxyBuilderBase *, bool invert=false)
 
void drawEnergyTower3D (const float *corners, float scale, TEveElement *, FWProxyBuilderBase *, bool reflect=false)
 
void drawEtScaledBox3D (const float *corners, float energy, float maxEnergy, TEveElement *, FWProxyBuilderBase *, bool reflect=false)
 
void drawEtTower3D (const float *corners, float scale, TEveElement *, FWProxyBuilderBase *, bool reflect=false)
 
void energyScaledBox3DCorners (const float *corners, float scale, std::vector< float > &, bool invert=false)
 
void energyTower3DCorners (const float *corners, float scale, std::vector< float > &, bool reflect=false)
 
void etScaledBox3DCorners (const float *corners, float energy, float maxEnergy, std::vector< float > &scaledCorners, bool reflect=false)
 
void etTower3DCorners (const float *corners, float scale, std::vector< float > &, bool reflect=false)
 
const SiStripClusterextractClusterFromTrackingRecHit (const TrackingRecHit *rh)
 
void GetColorValuesForPaletteExtra (float(*iColors)[3], unsigned int iSize, FWColorManager::EPalette id, bool isWhiteBg)
 
void getDecomposedVersion (const TString &s, int *out)
 
std::string getLocalTime (const edm::EventBase &event)
 
std::pair< double, double > getPhiRange (const std::vector< double > &phis, double phi)
 
TEveGeoShape * getShape (const char *name, TGeoBBox *shape, Color_t color)
 
std::string getTimeGMT (const edm::EventBase &event)
 
const TGGC & greenGC ()
 
std::string info (const DetId &)
 
std::string info (const std::set< DetId > &)
 
std::string info (const std::vector< DetId > &)
 
void invertBox (std::vector< float > &corners)
 
const TGGC & italicGC ()
 
void localSiStrip (short strip, float *localTop, float *localBottom, const float *pars, unsigned int id)
 
TEveJetCone * makeEveJetCone (const reco::Jet &iData, const fireworks::Context &context)
 
bool makeRhoPhiSuperCluster (FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
 
bool makeRhoZSuperCluster (FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
 
float phase2PixelLocalX (const double mpx, const float *, const float *)
 
float phase2PixelLocalY (const double mpy, const float *, const float *)
 
float pixelLocalX (const double mpx, const float *)
 
float pixelLocalY (const double mpy, const float *)
 
TEveTrack * prepareCandidate (const reco::Candidate &track, TEveTrackPropagator *propagator)
 
TEveTrack * prepareTrack (const reco::Track &track, TEveTrackPropagator *propagator, const std::vector< TEveVector > &extraRefPoints=std::vector< TEveVector >())
 
void pushNearbyPixelHits (std::vector< TVector3 > &pixelPoints, const FWEventItem &iItem, const reco::Track &t)
 
void pushPixelCluster (std::vector< TVector3 > &pixelPoints, const FWGeometry &geom, DetId id, const SiPixelCluster &c, const float *pars)
 
void pushPixelHits (std::vector< TVector3 > &pixelPoints, const FWEventItem &iItem, const reco::Track &t)
 
const TGGC & redGC ()
 
void setPath (TString &v)
 
void setTrackTypePF (const reco::PFCandidate &pfCand, TAttLine *track)
 
void setupAddElement (TEveElement *el, TEveElement *parent, const FWEventItem *item, bool master, bool color)
 
int * supportedDataFormatsVersion ()
 
std::vector< std::pair< double, double > > thetaBins ()
 

Variables

static const double MICRON = 1. / 1000. / 1000.
 
const TString p1 = gSystem->Getenv("CMSSW_BASE") + datadir
 
const TString p2 = gSystem->Getenv("CMSSW_RELEASE_BASE") + datadir
 
static const std::string subdets [7] = {"UNKNOWN", "PXB", "PXF", "TIB", "TID", "TOB", "TEC"}
 

Function Documentation

bool fireworks::acceptDataFormatsVersion ( TString &  n)

Definition at line 60 of file fwPaths.cc.

References data, getDecomposedVersion(), and supportedDataFormatsVersion().

Referenced by FWFileEntry::openFile().

60  {
61  int data[] = {0, 0, 0};
62  getDecomposedVersion(processConfigurationVersion, data);
63 
64  int* running = supportedDataFormatsVersion();
65  if ((data[0] == 6 && running[0] == 5 && running[1] > 1) || (data[0] == 5 && data[1] > 1 && running[0] == 6))
66  return true;
67  else
68  return data[0] == running[0];
69  }
void getDecomposedVersion(const TString &s, int *out)
Definition: fwPaths.cc:26
int * supportedDataFormatsVersion()
Definition: fwPaths.cc:35
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
void fireworks::addBox ( const std::vector< float > &  corners,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 151 of file BuilderUtils.cc.

References FWProxyBuilderBase::setupAddElement().

Referenced by drawEnergyScaledBox3D(), drawEnergyTower3D(), drawEtScaledBox3D(), and drawEtTower3D().

151  {
152  TEveBox* eveBox = new TEveBox("Box");
153  eveBox->SetDrawFrame(false);
154  eveBox->SetPickable(true);
155  eveBox->SetVertices(&corners[0]);
156 
157  pb->setupAddElement(eveBox, comp);
158  }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void fireworks::addCircle ( double  eta,
double  phi,
double  radius,
const unsigned int  nLineSegments,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 160 of file BuilderUtils.cc.

References funct::cos(), LEDCalibrationChannels::iphi, M_PI, FWProxyBuilderBase::setupAddElement(), and funct::sin().

Referenced by FWJetLegoProxyBuilder::build(), FWL1JetParticleLegoProxyBuilder::build(), FWL1MuonParticleLegoProxyBuilder::build(), and FWPFTauProxyBuilder::buildViewType().

165  {
166  TEveStraightLineSet* container = new TEveStraightLineSet;
167 
168  for (unsigned int iphi = 0; iphi < nLineSegments; ++iphi) {
169  container->AddLine(eta + radius * cos(2 * M_PI / nLineSegments * iphi),
170  phi + radius * sin(2 * M_PI / nLineSegments * iphi),
171  0.01,
172  eta + radius * cos(2 * M_PI / nLineSegments * (iphi + 1)),
173  phi + radius * sin(2 * M_PI / nLineSegments * (iphi + 1)),
174  0.01);
175  }
176  pb->setupAddElement(container, comp);
177  }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
#define M_PI
void fireworks::addDashedArrow ( double  phi,
double  size,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 179 of file BuilderUtils.cc.

References funct::cos(), FWProxyBuilderBase::setupAddElement(), and funct::sin().

Referenced by FWMETGlimpseProxyBuilder::build(), and FWL1EtMissParticleGlimpseProxyBuilder::build().

179  {
180  TEveScalableStraightLineSet* marker = new TEveScalableStraightLineSet;
181  marker->SetLineWidth(1);
182  marker->SetLineStyle(2);
183  marker->AddLine(0, 0, 0, size * cos(phi), size * sin(phi), 0);
184  marker->AddLine(size * 0.9 * cos(phi + 0.03), size * 0.9 * sin(phi + 0.03), 0, size * cos(phi), size * sin(phi), 0);
185  marker->AddLine(size * 0.9 * cos(phi - 0.03), size * 0.9 * sin(phi - 0.03), 0, size * cos(phi), size * sin(phi), 0);
186  pb->setupAddElement(marker, comp);
187  }
size
Write out results.
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
void fireworks::addDashedLine ( double  phi,
double  theta,
double  size,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 189 of file BuilderUtils.cc.

References fireworks::Context::caloR1(), fireworks::Context::caloZ2(), FWProxyBuilderBase::context(), funct::cos(), M_PI, alignCSCRings::r, FWProxyBuilderBase::setupAddElement(), and funct::sin().

Referenced by FWL1EmParticleProxyBuilder::build(), FWL1MuonParticleProxyBuilder::build(), FWL1JetParticleProxyBuilder::build(), and FWL1EtMissParticleProxyBuilder::build().

189  {
190  double r(0);
191  if (theta < pb->context().caloTransAngle() || M_PI - theta < pb->context().caloTransAngle())
192  r = pb->context().caloZ2() / fabs(cos(theta));
193  else
194  r = pb->context().caloR1() / sin(theta);
195 
196  TEveStraightLineSet* marker = new TEveStraightLineSet;
197  marker->SetLineWidth(2);
198  marker->SetLineStyle(2);
199  marker->AddLine(r * cos(phi) * sin(theta),
200  r * sin(phi) * sin(theta),
201  r * cos(theta),
202  (r + size) * cos(phi) * sin(theta),
203  (r + size) * sin(phi) * sin(theta),
204  (r + size) * cos(theta));
205  pb->setupAddElement(marker, comp);
206  }
size
Write out results.
const fireworks::Context & context() const
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
static float caloZ2(bool offset=true)
Definition: Context.cc:185
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static float caloR1(bool offset=true)
Definition: Context.cc:180
#define M_PI
void fireworks::addDoubleLines ( double  phi,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 208 of file BuilderUtils.cc.

References M_PI, and FWProxyBuilderBase::setupAddElement().

Referenced by FWMETLegoProxyBuilder::build(), and FWL1EtMissParticleLegoProxyBuilder::build().

208  {
209  TEveStraightLineSet* mainLine = new TEveStraightLineSet;
210  mainLine->AddLine(-5.191, phi, 0.01, 5.191, phi, 0.01);
211  pb->setupAddElement(mainLine, comp);
212 
213  phi = phi > 0 ? phi - M_PI : phi + M_PI;
214  TEveStraightLineSet* secondLine = new TEveStraightLineSet;
215  secondLine->SetLineStyle(7);
216  secondLine->AddLine(-5.191, phi, 0.01, 5.191, phi, 0.01);
217  pb->setupAddElement(secondLine, comp);
218  }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
#define M_PI
void fireworks::addRhoZEnergyProjection ( FWProxyBuilderBase pb,
TEveElement *  container,
double  r_ecal,
double  z_ecal,
double  theta_min,
double  theta_max,
double  phi 
)

Definition at line 57 of file BuilderUtils.cc.

References diffTwoXMLs::r1, diffTwoXMLs::r2, FWProxyBuilderBase::setupAddElement(), OrderedSet::t, funct::tan(), and testProducerWithPsetDescEmpty_cfi::z2.

Referenced by FWTauProxyBuilderBase::buildBaseTau(), FWMETProxyBuilder::buildViewType(), and makeRhoZSuperCluster().

63  {
64  TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur());
65  double z1 = r_ecal / tan(theta_min);
66  if (z1 > z_ecal)
67  z1 = z_ecal;
68  if (z1 < -z_ecal)
69  z1 = -z_ecal;
70  double z2 = r_ecal / tan(theta_max);
71  if (z2 > z_ecal)
72  z2 = z_ecal;
73  if (z2 < -z_ecal)
74  z2 = -z_ecal;
75  double r1 = z_ecal * fabs(tan(theta_min));
76  if (r1 > r_ecal)
77  r1 = r_ecal;
78  if (phi < 0)
79  r1 = -r1;
80  double r2 = z_ecal * fabs(tan(theta_max));
81  if (r2 > r_ecal)
82  r2 = r_ecal;
83  if (phi < 0)
84  r2 = -r2;
85 
86  if (fabs(r2 - r1) > 1) {
87  TGeoBBox* sc_box = new TGeoBBox(0., fabs(r2 - r1) / 2, 1);
88  TEveGeoShape* element = new TEveGeoShape("r-segment");
89  element->SetShape(sc_box);
90  TEveTrans& t = element->RefMainTrans();
91  t(1, 4) = 0;
92  t(2, 4) = (r2 + r1) / 2;
93  t(3, 4) = fabs(z2) > fabs(z1) ? z2 : z1;
94  pb->setupAddElement(element, container);
95  }
96  if (fabs(z2 - z1) > 1) {
97  TGeoBBox* sc_box = new TGeoBBox(0., 1, (z2 - z1) / 2);
98  TEveGeoShape* element = new TEveGeoShape("z-segment");
99  element->SetShape(sc_box);
100  TEveTrans& t = element->RefMainTrans();
101  t(1, 4) = 0;
102  t(2, 4) = fabs(r2) > fabs(r1) ? r2 : r1;
103  t(3, 4) = (z2 + z1) / 2;
104  pb->setupAddElement(element, container);
105  }
106  }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void fireworks::addSiStripClusters ( const FWEventItem iItem,
const reco::Track t,
class TEveElement *  tList,
bool  addNearbyClusters,
bool  master 
)

Definition at line 336 of file TrackUtils.cc.

References edmNew::DetSet< T >::begin(), SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), FWGeometry::contains(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), extractClusterFromTrackingRecHit(), edmNew::DetSetVector< T >::find(), SiStripCluster::firstStrip(), fwLog, TrackingRecHit::geographicalId(), relativeConstraints::geom, edm::EventBase::get(), FWEventItem::getEvent(), FWEventItem::getGeom(), FWGeometry::getParameters(), edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), TrackingRecHit::isValid(), fwlog::kDebug, fwlog::kError, localSiStrip(), FWGeometry::localToGlobal(), edm::Handle< T >::product(), DetId::rawId(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), and setupAddElement().

Referenced by FWTrackHitsDetailView::addHits(), FWConvTrackHitsDetailView::addHits(), FWTracksRecHitsProxyBuilder::build(), and fireworks::StateOrdering::operator()().

337  {
338  // master is true if the product is for proxy builder
339  const FWGeometry* geom = iItem->getGeom();
340 
341  const edmNew::DetSetVector<SiStripCluster>* allClusters = nullptr;
342  if (addNearbyClusters) {
343  for (trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it) {
344  const auto& rhs = *(*(it));
345  if (typeid(rhs) == typeid(SiStripRecHit2D)) {
346  const SiStripRecHit2D& hit = static_cast<const SiStripRecHit2D&>(**it);
347  if (hit.cluster().isNonnull() && hit.cluster().isAvailable()) {
349  iItem->getEvent()->get(hit.cluster().id(), allClustersHandle);
350  allClusters = allClustersHandle.product();
351  break;
352  }
353  } else if (typeid(rhs) == typeid(SiStripRecHit1D)) {
354  const SiStripRecHit1D& hit = static_cast<const SiStripRecHit1D&>(**it);
355  if (hit.cluster().isNonnull() && hit.cluster().isAvailable()) {
357  iItem->getEvent()->get(hit.cluster().id(), allClustersHandle);
358  allClusters = allClustersHandle.product();
359  break;
360  }
361  }
362  }
363  }
364 
365  for (trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it) {
366  unsigned int rawid = (*it)->geographicalId();
367  if (!geom->contains(rawid)) {
368  fwLog(fwlog::kError) << "failed to get geometry of SiStripCluster with detid: " << rawid << std::endl;
369 
370  continue;
371  }
372 
373  const float* pars = geom->getParameters(rawid);
374 
375  // -- get phi from SiStripHit
376  auto rechitRef = *it;
377  const TrackingRecHit* rechit = &(*rechitRef);
378  const SiStripCluster* cluster = extractClusterFromTrackingRecHit(rechit);
379 
380  if (cluster) {
381  if (allClusters != nullptr) {
382  const edmNew::DetSet<SiStripCluster>& clustersOnThisDet = (*allClusters)[rechit->geographicalId().rawId()];
383 
384  for (edmNew::DetSet<SiStripCluster>::const_iterator itc = clustersOnThisDet.begin(),
385  edc = clustersOnThisDet.end();
386  itc != edc;
387  ++itc) {
388  TEveStraightLineSet* scposition = new TEveStraightLineSet;
389  scposition->SetDepthTest(false);
390  scposition->SetPickable(kTRUE);
391 
392  short firststrip = itc->firstStrip();
393 
394  if (&*itc == cluster) {
395  scposition->SetTitle(Form("Exact SiStripCluster from TrackingRecHit, first strip %d", firststrip));
396  scposition->SetLineColor(kGreen);
397  } else {
398  scposition->SetTitle(Form("SiStripCluster, first strip %d", firststrip));
399  scposition->SetLineColor(kRed);
400  }
401 
402  float localTop[3] = {0.0, 0.0, 0.0};
403  float localBottom[3] = {0.0, 0.0, 0.0};
404 
405  fireworks::localSiStrip(firststrip, localTop, localBottom, pars, rawid);
406 
407  float globalTop[3];
408  float globalBottom[3];
409  geom->localToGlobal(rawid, localTop, globalTop, localBottom, globalBottom);
410 
411  scposition->AddLine(
412  globalTop[0], globalTop[1], globalTop[2], globalBottom[0], globalBottom[1], globalBottom[2]);
413 
414  setupAddElement(scposition, tList, iItem, master, false);
415  }
416  } else {
417  short firststrip = cluster->firstStrip();
418  TEveStraightLineSet* scposition = new TEveStraightLineSet;
419  scposition->SetDepthTest(false);
420  scposition->SetPickable(kTRUE);
421  scposition->SetTitle(Form("SiStripCluster, first strip %d", firststrip));
422 
423  float localTop[3] = {0.0, 0.0, 0.0};
424  float localBottom[3] = {0.0, 0.0, 0.0};
425 
426  fireworks::localSiStrip(firststrip, localTop, localBottom, pars, rawid);
427 
428  float globalTop[3];
429  float globalBottom[3];
430  geom->localToGlobal(rawid, localTop, globalTop, localBottom, globalBottom);
431 
432  scposition->AddLine(
433  globalTop[0], globalTop[1], globalTop[2], globalBottom[0], globalBottom[1], globalBottom[2]);
434 
435  setupAddElement(scposition, tList, iItem, master, true);
436  }
437  } else if (!rechit->isValid() && (rawid != 0)) // lost hit
438  {
439  if (allClusters != nullptr) {
441  if (itds != allClusters->end()) {
442  const edmNew::DetSet<SiStripCluster>& clustersOnThisDet = *itds;
443  for (edmNew::DetSet<SiStripCluster>::const_iterator itc = clustersOnThisDet.begin(),
444  edc = clustersOnThisDet.end();
445  itc != edc;
446  ++itc) {
447  short firststrip = itc->firstStrip();
448 
449  TEveStraightLineSet* scposition = new TEveStraightLineSet;
450  scposition->SetDepthTest(false);
451  scposition->SetPickable(kTRUE);
452  scposition->SetTitle(Form("Lost SiStripCluster, first strip %d", firststrip));
453 
454  float localTop[3] = {0.0, 0.0, 0.0};
455  float localBottom[3] = {0.0, 0.0, 0.0};
456 
457  fireworks::localSiStrip(firststrip, localTop, localBottom, pars, rawid);
458 
459  float globalTop[3];
460  float globalBottom[3];
461  geom->localToGlobal(rawid, localTop, globalTop, localBottom, globalBottom);
462 
463  scposition->AddLine(
464  globalTop[0], globalTop[1], globalTop[2], globalBottom[0], globalBottom[1], globalBottom[2]);
465 
466  setupAddElement(scposition, tList, iItem, master, false);
467  scposition->SetLineColor(kRed);
468  }
469  }
470  }
471  } else {
472  fwLog(fwlog::kDebug) << "*ANOTHER* option possible: valid=" << rechit->isValid() << ", rawid=" << rawid
473  << std::endl;
474  }
475  }
476  }
ClusterRef cluster() const
const_iterator end(bool update=false) const
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:474
bool get(ProductID const &, Handle< T > &) const
Definition: EventBase.h:103
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint16_t firstStrip() const
data_type const * const_iterator
Definition: DetSetNew.h:31
bool isAvailable() const
Definition: Ref.h:537
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244
void localSiStrip(short strip, float *localTop, float *localBottom, const float *pars, unsigned int id)
Definition: TrackUtils.cc:263
const SiStripCluster * extractClusterFromTrackingRecHit(const TrackingRecHit *rh)
Definition: TrackUtils.cc:318
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:496
ClusterRef cluster() const
bool contains(unsigned int id) const
Definition: FWGeometry.h:139
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const edm::EventBase * getEvent() const
Definition: FWEventItem.h:131
T const * product() const
Definition: Handle.h:69
#define fwLog(_level_)
Definition: fwLog.h:45
bool isValid() const
const_iterator find(id_type i, bool update=false) const
iterator end()
Definition: DetSetNew.h:56
DetId geographicalId() const
void setupAddElement(TEveElement *el, TEveElement *parent, const FWEventItem *item, bool master, bool color)
Definition: TrackUtils.cc:299
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
iterator begin()
Definition: DetSetNew.h:54
void fireworks::addStraightLineSegment ( TEveStraightLineSet *  marker,
reco::Candidate const *  cand,
double  scale_factor = 2 
)

Definition at line 19 of file CandidateUtils.cc.

References funct::cos(), reco::Candidate::phi(), reco::Candidate::pt(), funct::sin(), findQualityFiles::size, reco::Candidate::theta(), and theta().

Referenced by FWMuonGlimpseProxyBuilder::build(), and FWElectronGlimpseProxyBuilder::build().

19  {
20  double phi = cand->phi();
21  double theta = cand->theta();
22  double size = cand->pt() * scale_factor;
23  marker->AddLine(0, 0, 0, size * cos(phi) * sin(theta), size * sin(phi) * sin(theta), size * cos(theta));
24  }
size
Write out results.
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const TGGC & fireworks::boldGC ( )

Definition at line 11 of file GlobalContexts.cc.

References dqmiodatasetharvest::pool.

Referenced by FWPSetTableManager::cellRenderer().

11  {
12  static TGGC s_boldGC(*gClient->GetResourcePool()->GetFrameGC());
13 
14  TGFontPool* pool = gClient->GetFontPool();
15  //TGFont *font = pool->FindFontByHandle(s_boldGC.GetFont());
16  //FontAttributes_t attributes = font->GetFontAttributes();
17 
18  /*
19  This doesn't seem to work:
20  attributes.fWeight = 1;
21  TGFont *newFont = pool->GetFont(attributes.fFamily, 9,
22  attributes.fWeight, attributes.fSlant);
23 
24  But this does:
25  */
26 
27  TGFont* newFont = pool->GetFont("-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1");
28 
29  if (!newFont)
30  return s_boldGC;
31 
32  s_boldGC.SetFont(newFont->GetFontHandle());
33 
34  return s_boldGC;
35  }
void fireworks::createSegment ( int  detector,
bool  matchedSegment,
float  segmentLength,
float  segmentLimit,
float *  segmentPosition,
float *  segmentDirection,
float *  segmentInnerPoint,
float *  segmentOuterPoint 
)

Definition at line 9 of file SegmentUtils.cc.

References funct::cos(), MuonSubdetId::CSC, MuonSubdetId::DT, fwLog, MuonSubdetId::GEM, fwlog::kWarning, mag(), MuonSubdetId::ME0, mathSSE::sqrt(), funct::tan(), and theta().

16  {
18  if (matchedSegment) {
19  segmentOuterPoint[0] = segmentPosition[0] + segmentLength * segmentDirection[0];
20  segmentOuterPoint[1] = segmentPosition[1] + segmentLength * segmentDirection[1];
21  segmentOuterPoint[2] = segmentLength;
22 
23  if (fabs(segmentOuterPoint[1]) > segmentLimit)
24  segmentOuterPoint[1] = segmentLimit * (segmentOuterPoint[1] / fabs(segmentOuterPoint[1]));
25 
26  segmentInnerPoint[0] = segmentPosition[0] - segmentLength * segmentDirection[0];
27  segmentInnerPoint[1] = segmentPosition[1] - segmentLength * segmentDirection[1];
28  segmentInnerPoint[2] = -segmentLength;
29 
30  if (fabs(segmentInnerPoint[1]) > segmentLimit)
31  segmentInnerPoint[1] = segmentLimit * (segmentInnerPoint[1] / fabs(segmentInnerPoint[1]));
32 
33  return;
34  } else {
35  segmentOuterPoint[0] = segmentPosition[0] + segmentDirection[0] * (segmentPosition[2] / segmentDirection[2]);
36  segmentOuterPoint[1] = segmentPosition[1] + segmentDirection[1] * (segmentPosition[2] / segmentDirection[2]);
37  segmentOuterPoint[2] = segmentPosition[2];
38 
39  if (fabs(segmentOuterPoint[1]) > segmentLength)
40  segmentOuterPoint[1] = segmentLength * (segmentOuterPoint[1] / fabs(segmentOuterPoint[1]));
41 
42  segmentInnerPoint[0] = segmentPosition[0] - segmentDirection[0] * (segmentPosition[2] / segmentDirection[2]);
43  segmentInnerPoint[1] = segmentPosition[1] - segmentDirection[1] * (segmentPosition[2] / segmentDirection[2]);
44  segmentInnerPoint[2] = -segmentPosition[2];
45 
46  if (fabs(segmentInnerPoint[1]) > segmentLength)
47  segmentInnerPoint[1] = segmentLength * (segmentInnerPoint[1] / fabs(segmentInnerPoint[1]));
48 
49  return;
50  }
51  }
52 
53  if (detector == MuonSubdetId::DT) {
54  if (matchedSegment) {
55  segmentOuterPoint[0] = segmentPosition[0] + segmentLength * segmentDirection[0];
56  segmentOuterPoint[1] = segmentPosition[1] + segmentLength * segmentDirection[1];
57  segmentOuterPoint[2] = segmentLength;
58 
59  segmentInnerPoint[0] = segmentPosition[0] - segmentLength * segmentDirection[0];
60  segmentInnerPoint[1] = segmentPosition[1] - segmentLength * segmentDirection[1];
61  segmentInnerPoint[2] = -segmentLength;
62 
63  return;
64  } else {
65  double mag = sqrt(segmentDirection[0] * segmentDirection[0] + segmentDirection[1] * segmentDirection[1] +
66  segmentDirection[2] * segmentDirection[2]);
67 
68  double theta =
69  atan2(sqrt(segmentDirection[0] * segmentDirection[0] + segmentDirection[1] * segmentDirection[1]),
70  segmentDirection[2]);
71 
72  double newSegmentLength = segmentLength / cos(theta);
73 
74  segmentInnerPoint[0] = segmentPosition[0] + (segmentDirection[0] / mag) * newSegmentLength;
75  segmentInnerPoint[1] = segmentPosition[1] + (segmentDirection[1] / mag) * newSegmentLength;
76  segmentInnerPoint[2] = segmentPosition[2] + (segmentDirection[2] / mag) * newSegmentLength;
77 
78  segmentOuterPoint[0] = segmentPosition[0] - (segmentDirection[0] / mag) * newSegmentLength;
79  segmentOuterPoint[1] = segmentPosition[1] - (segmentDirection[1] / mag) * newSegmentLength;
80  segmentOuterPoint[2] = segmentPosition[2] - (segmentDirection[2] / mag) * newSegmentLength;
81 
82  if (fabs(segmentOuterPoint[0]) > segmentLimit) {
83  segmentOuterPoint[0] = segmentLimit * (segmentOuterPoint[0] / fabs(segmentOuterPoint[0]));
84  segmentOuterPoint[1] = (segmentOuterPoint[1] / fabs(segmentOuterPoint[1])) * tan(theta);
85  }
86 
87  return;
88  }
89  }
90 
91  fwLog(fwlog::kWarning) << "MuonSubdetId: " << detector << std::endl;
92  return;
93  }
static constexpr int GEM
Definition: MuonSubdetId.h:14
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Geom::Theta< T > theta() const
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static constexpr int ME0
Definition: MuonSubdetId.h:15
#define fwLog(_level_)
Definition: fwLog.h:45
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12
const TString fireworks::datadir ( "/src/Fireworks/Core/"  )
void fireworks::drawEnergyScaledBox3D ( const float *  corners,
float  scale,
TEveElement *  comp,
FWProxyBuilderBase pb,
bool  invert = false 
)

Definition at line 244 of file BuilderUtils.cc.

References addBox(), and energyScaledBox3DCorners().

244  {
245  std::vector<float> scaledCorners(24);
246  energyScaledBox3DCorners(corners, scale, scaledCorners, invert);
247  addBox(scaledCorners, comp, pb);
248  }
void energyScaledBox3DCorners(const float *corners, float scale, std::vector< float > &, bool invert=false)
void addBox(const std::vector< float > &corners, TEveElement *, FWProxyBuilderBase *)
void fireworks::drawEnergyTower3D ( const float *  corners,
float  scale,
TEveElement *  comp,
FWProxyBuilderBase pb,
bool  reflect = false 
)

Definition at line 321 of file BuilderUtils.cc.

References addBox(), and energyTower3DCorners().

321  {
322  std::vector<float> scaledCorners(24);
323  energyTower3DCorners(corners, scale, scaledCorners, reflect);
324  addBox(scaledCorners, comp, pb);
325  }
void energyTower3DCorners(const float *corners, float scale, std::vector< float > &, bool reflect=false)
void addBox(const std::vector< float > &corners, TEveElement *, FWProxyBuilderBase *)
void fireworks::drawEtScaledBox3D ( const float *  corners,
float  energy,
float  maxEnergy,
TEveElement *  comp,
FWProxyBuilderBase pb,
bool  reflect = false 
)

Definition at line 278 of file BuilderUtils.cc.

References addBox(), and etScaledBox3DCorners().

279  {
280  std::vector<float> scaledCorners(24);
281  etScaledBox3DCorners(corners, energy, maxEnergy, scaledCorners, invert);
282  addBox(scaledCorners, comp, pb);
283  }
void addBox(const std::vector< float > &corners, TEveElement *, FWProxyBuilderBase *)
void etScaledBox3DCorners(const float *corners, float energy, float maxEnergy, std::vector< float > &scaledCorners, bool reflect=false)
void fireworks::drawEtTower3D ( const float *  corners,
float  scale,
TEveElement *  comp,
FWProxyBuilderBase pb,
bool  reflect = false 
)

Definition at line 364 of file BuilderUtils.cc.

References addBox(), and etTower3DCorners().

364  {
365  std::vector<float> scaledCorners(24);
366  etTower3DCorners(corners, scale, scaledCorners, reflect);
367  addBox(scaledCorners, comp, pb);
368  }
void etTower3DCorners(const float *corners, float scale, std::vector< float > &, bool reflect=false)
void addBox(const std::vector< float > &corners, TEveElement *, FWProxyBuilderBase *)
void fireworks::energyScaledBox3DCorners ( const float *  corners,
float  scale,
std::vector< float > &  scaledCorners,
bool  invert = false 
)

Definition at line 221 of file BuilderUtils.cc.

References f, mps_fire::i, and invertBox().

Referenced by drawEnergyScaledBox3D().

221  {
222  std::vector<float> centre(3, 0);
223 
224  for (unsigned int i = 0; i < 24; i += 3) {
225  centre[0] += corners[i];
226  centre[1] += corners[i + 1];
227  centre[2] += corners[i + 2];
228  }
229 
230  for (unsigned int i = 0; i < 3; ++i)
231  centre[i] *= 1.0f / 8.0f;
232 
233  // Coordinates for a scaled version of the original box
234  for (unsigned int i = 0; i < 24; i += 3) {
235  scaledCorners[i] = centre[0] + (corners[i] - centre[0]) * scale;
236  scaledCorners[i + 1] = centre[1] + (corners[i + 1] - centre[1]) * scale;
237  scaledCorners[i + 2] = centre[2] + (corners[i + 2] - centre[2]) * scale;
238  }
239 
240  if (invert)
241  invertBox(scaledCorners);
242  }
void invertBox(std::vector< float > &corners)
double f[11][100]
void fireworks::energyTower3DCorners ( const float *  corners,
float  scale,
std::vector< float > &  scaledCorners,
bool  reflect = false 
)

Definition at line 286 of file BuilderUtils.cc.

References change_name::diff, mps_fire::i, and Scenarios_cff::scale.

Referenced by FWPRCaloTowerProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), and drawEnergyTower3D().

286  {
287  for (int i = 0; i < 24; ++i)
288  scaledCorners[i] = corners[i];
289  // Coordinates of a front face scaled
290  if (reflect) {
291  // We know, that an ES rechit geometry in -Z needs correction.
292  // The back face is actually its front face.
293  for (unsigned int i = 0; i < 12; i += 3) {
294  TEveVector diff(
295  corners[i] - corners[i + 12], corners[i + 1] - corners[i + 13], corners[i + 2] - corners[i + 14]);
296  diff.Normalize();
297  diff *= scale;
298 
299  scaledCorners[i] = corners[i] + diff.fX;
300  scaledCorners[i + 1] = corners[i + 1] + diff.fY;
301  scaledCorners[i + 2] = corners[i + 2] + diff.fZ;
302  }
303  } else {
304  for (unsigned int i = 0; i < 12; i += 3) {
305  TEveVector diff(
306  corners[i + 12] - corners[i], corners[i + 13] - corners[i + 1], corners[i + 14] - corners[i + 2]);
307  diff.Normalize();
308  diff *= scale;
309 
310  scaledCorners[i] = corners[i + 12];
311  scaledCorners[i + 1] = corners[i + 13];
312  scaledCorners[i + 2] = corners[i + 14];
313 
314  scaledCorners[i + 12] = corners[i + 12] + diff.fX;
315  scaledCorners[i + 13] = corners[i + 13] + diff.fY;
316  scaledCorners[i + 14] = corners[i + 14] + diff.fZ;
317  }
318  }
319  }
void fireworks::etScaledBox3DCorners ( const float *  corners,
float  energy,
float  maxEnergy,
std::vector< float > &  scaledCorners,
bool  reflect = false 
)

Definition at line 251 of file BuilderUtils.cc.

References HltBtagPostValidation_cff::c, f, mps_fire::i, invertBox(), Scenarios_cff::scale, and funct::sin().

Referenced by drawEtScaledBox3D().

252  {
253  std::vector<float> centre(3, 0);
254 
255  for (unsigned int i = 0; i < 24; i += 3) {
256  centre[0] += corners[i];
257  centre[1] += corners[i + 1];
258  centre[2] += corners[i + 2];
259  }
260 
261  for (unsigned int i = 0; i < 3; ++i)
262  centre[i] *= 1.0f / 8.0f;
263 
264  TEveVector c(centre[0], centre[1], centre[2]);
265  float scale = energy / maxEnergy * sin(c.Theta());
266 
267  // Coordinates for a scaled version of the original box
268  for (unsigned int i = 0; i < 24; i += 3) {
269  scaledCorners[i] = centre[0] + (corners[i] - centre[0]) * scale;
270  scaledCorners[i + 1] = centre[1] + (corners[i + 1] - centre[1]) * scale;
271  scaledCorners[i + 2] = centre[2] + (corners[i + 2] - centre[2]) * scale;
272  }
273 
274  if (invert)
275  invertBox(scaledCorners);
276  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void invertBox(std::vector< float > &corners)
double f[11][100]
void fireworks::etTower3DCorners ( const float *  corners,
float  scale,
std::vector< float > &  scaledCorners,
bool  reflect = false 
)

Definition at line 329 of file BuilderUtils.cc.

References change_name::diff, mps_fire::i, and funct::sin().

Referenced by drawEtTower3D().

329  {
330  for (int i = 0; i < 24; ++i)
331  scaledCorners[i] = corners[i];
332  // Coordinates of a front face scaled
333  if (reflect) {
334  // We know, that an ES rechit geometry in -Z needs correction.
335  // The back face is actually its front face.
336  for (unsigned int i = 0; i < 12; i += 3) {
337  TEveVector diff(
338  corners[i] - corners[i + 12], corners[i + 1] - corners[i + 13], corners[i + 2] - corners[i + 14]);
339  diff.Normalize();
340  diff *= (scale * sin(diff.Theta()));
341 
342  scaledCorners[i] = corners[i] + diff.fX;
343  scaledCorners[i + 1] = corners[i + 1] + diff.fY;
344  scaledCorners[i + 2] = corners[i + 2] + diff.fZ;
345  }
346  } else {
347  for (unsigned int i = 0; i < 12; i += 3) {
348  TEveVector diff(
349  corners[i + 12] - corners[i], corners[i + 13] - corners[i + 1], corners[i + 14] - corners[i + 2]);
350  diff.Normalize();
351  diff *= (scale * sin(diff.Theta()));
352 
353  scaledCorners[i] = corners[i + 12];
354  scaledCorners[i + 1] = corners[i + 13];
355  scaledCorners[i + 2] = corners[i + 14];
356 
357  scaledCorners[i + 12] = corners[i + 12] + diff.fX;
358  scaledCorners[i + 13] = corners[i + 13] + diff.fY;
359  scaledCorners[i + 14] = corners[i + 14] + diff.fZ;
360  }
361  }
362  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const SiStripCluster * fireworks::extractClusterFromTrackingRecHit ( const TrackingRecHit rh)

Definition at line 318 of file TrackUtils.cc.

References fwLog, and fwlog::kDebug.

Referenced by addSiStripClusters(), FWTrajectorySeedProxyBuilder::build(), and fireworks::StateOrdering::operator()().

318  {
319  const SiStripCluster* cluster = nullptr;
320 
321  if (const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>(rechit)) {
322  fwLog(fwlog::kDebug) << "hit 2D ";
323 
324  cluster = hit2D->cluster().get();
325  }
326  if (cluster == nullptr) {
327  if (const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>(rechit)) {
328  fwLog(fwlog::kDebug) << "hit 1D ";
329 
330  cluster = hit1D->cluster().get();
331  }
332  }
333  return cluster;
334  }
#define fwLog(_level_)
Definition: fwLog.h:45
void fireworks::GetColorValuesForPaletteExtra ( float(*)  iColors[3],
unsigned int  iSize,
FWColorManager::EPalette  id,
bool  isWhiteBg 
)

Definition at line 135 of file fwPaletteExtra.cc.

References b, f, g, mps_fire::i, fireworks::PaletteExtraTopBottomIndices::InitArctic(), fireworks::PaletteExtraTopBottomIndices::InitFall(), fireworks::PaletteExtraTopBottomIndices::InitPurple(), fireworks::PaletteExtraTopBottomIndices::InitSpring(), FWColorManager::kArctic, FWColorManager::kFall, FWColorManager::kPurple, FWColorManager::kSpring, Min(), AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, and alignCSCRings::s.

Referenced by FWColorManager::initColorTable().

138  {
139  PaletteExtraTopBottomIndices p(iColors, isWhiteBg, id);
140  switch (id) {
142  p.InitArctic();
143  break;
145  p.InitFall();
146  break;
148  p.InitSpring();
149  break;
150 
152  p.InitPurple();
153  break;
154  default:
155  break;
156  }
157 
158  iSize = iSize / 2;
159  unsigned int lastIdx = iSize - 2;
160  if (isWhiteBg) {
161  for (unsigned int i = 0; i < lastIdx; ++i) {
162  float s = 1.2;
163  float r = TMath::Min(1.f, s * iColors[i][0]);
164  float g = TMath::Min(1.f, s * iColors[i][1]);
165  float b = TMath::Min(1.f, s * iColors[i][2]);
166 
167  iColors[i][0] = r;
168  iColors[i][1] = g;
169  iColors[i][2] = b;
170 
171  float value = 1.7;
172  r = TMath::Power(r, (2.5 - value) / 2.5);
173  g = TMath::Power(g, (2.5 - value) / 2.5);
174  b = TMath::Power(b, (2.5 - value) / 2.5);
175  /*
176  s = 1.2;
177  r = TMath::Min(1.f,s* iColors[i][0]);
178  g = TMath::Min(1.f,s *iColors[i][1]);
179  b = TMath::Min(1.f,s *iColors[i][2]);
180  */
181 
182  r = TMath::Min(1.f, r);
183  g = TMath::Min(1.f, g);
184  b = TMath::Min(1.f, b);
185 
186  iColors[i + iSize][0] = r;
187  iColors[i + iSize][1] = g;
188  iColors[i + iSize][2] = b;
189  }
190  } else {
191  for (unsigned int i = 0; i < lastIdx; ++i) {
192  // TColor* c = gROOT->GetColor(i);
193  float s = 0.4;
194  float r = s * iColors[i][0];
195  float g = s * iColors[i][1];
196  float b = s * iColors[i][2];
197 
198  // printf("[%d] (%.1f, %.1f, %.1f) => ", i, r, g, b);
199  float value = -0.5;
200  r = TMath::Power(r, (2.5 - value) / 2.5);
201  g = TMath::Power(g, (2.5 - value) / 2.5);
202  b = TMath::Power(b, (2.5 - value) / 2.5);
203 
204  // printf(" (%.1f, %.1f, %.1f) \n", r, g, b);
205  //TColor::HLStoRGB(c->GetHue(), c->GetSaturation(), c->GetLight()*0.8, r, g, b);
206  iColors[i + iSize][0] = r;
207  iColors[i + iSize][1] = g;
208  iColors[i + iSize][2] = b;
209  }
210  }
211  }
T Min(T a, T b)
Definition: MathUtil.h:39
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
double f[11][100]
Definition: value.py:1
double b
Definition: hdecay.h:118
void fireworks::getDecomposedVersion ( const TString &  s,
int *  out 
)

Definition at line 26 of file fwPaths.cc.

Referenced by acceptDataFormatsVersion(), FWFileEntry::openFile(), and supportedDataFormatsVersion().

26  {
27  TPMERegexp re("CMSSW_(\\d+)_(\\d+)_");
28  re.Match(s);
29  if (re.NMatches() > 2) {
30  out[0] = re[1].Atoi();
31  out[1] = re[2].Atoi();
32  }
33  }
std::string fireworks::getLocalTime ( const edm::EventBase event)

Definition at line 118 of file BuilderUtils.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, OrderedSet::t, runonSM::text, edm::EventBase::time(), edm::Timestamp::value(), and geometryCSVtoXML::xx.

Referenced by CmsShowMainFrame::loadEvent(), and FWEventAnnotation::updateOverlayText().

118  {
119  time_t t(event.time().value() >> 32);
120  struct tm* xx = localtime(&t);
121  std::string text(asctime(xx));
122  size_t pos = text.find('\n');
123  if (pos != std::string::npos)
124  text = text.substr(0, pos);
125  text += " ";
126  if (xx->tm_isdst)
127  text += tzname[1];
128  else
129  text += tzname[0];
130  return text;
131  }
TimeValue_t value() const
Definition: Timestamp.h:45
edm::Timestamp time() const
Definition: EventBase.h:60
std::pair< double, double > fireworks::getPhiRange ( const std::vector< double > &  phis,
double  phi 
)

Definition at line 20 of file BuilderUtils.cc.

References mps_fire::i, M_PI, SiStripPI::max, and min().

Referenced by FWTauProxyBuilderBase::buildBaseTau(), and makeRhoPhiSuperCluster().

20  {
21  double min = 100;
22  double max = -100;
23 
24  for (std::vector<double>::const_iterator i = phis.begin(); i != phis.end(); ++i) {
25  double aphi = *i;
26  // make phi continuous around jet phi
27  if (aphi - phi > M_PI)
28  aphi -= 2 * M_PI;
29  if (phi - aphi > M_PI)
30  aphi += 2 * M_PI;
31  if (aphi > max)
32  max = aphi;
33  if (aphi < min)
34  min = aphi;
35  }
36 
37  if (min > max)
38  return std::pair<double, double>(0, 0);
39 
40  return std::pair<double, double>(min, max);
41  }
T min(T a, T b)
Definition: MathUtil.h:58
#define M_PI
TEveGeoShape * fireworks::getShape ( const char *  name,
TGeoBBox *  shape,
Color_t  color 
)

Definition at line 43 of file BuilderUtils.cc.

References HltBtagPostValidation_cff::c.

Referenced by FWTauProxyBuilderBase::buildBaseTau(), FWMETProxyBuilder::buildViewType(), FWGlimpseView::FWGlimpseView(), HcalPulseShapes::hoShape(), cms::DDFilteredView::isA(), and makeRhoPhiSuperCluster().

43  {
44  TEveGeoShape* egs = new TEveGeoShape(name);
45  TColor* c = gROOT->GetColor(color);
46  Float_t rgba[4] = {1, 0, 0, 1};
47  if (c) {
48  rgba[0] = c->GetRed();
49  rgba[1] = c->GetGreen();
50  rgba[2] = c->GetBlue();
51  }
52  egs->SetMainColorRGB(rgba[0], rgba[1], rgba[2]);
53  egs->SetShape(shape);
54  return egs;
55  }
std::string fireworks::getTimeGMT ( const edm::EventBase event)

Definition at line 108 of file BuilderUtils.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, OrderedSet::t, runonSM::text, edm::EventBase::time(), and edm::Timestamp::value().

108  {
109  time_t t(event.time().value() >> 32);
110  std::string text(asctime(gmtime(&t)));
111  size_t pos = text.find('\n');
112  if (pos != std::string::npos)
113  text = text.substr(0, pos);
114  text += " GMT";
115  return text;
116  }
TimeValue_t value() const
Definition: Timestamp.h:45
edm::Timestamp time() const
Definition: EventBase.h:60
const TGGC & fireworks::greenGC ( )

Definition at line 37 of file GlobalContexts.cc.

37  {
38  static TGGC s_greenGC(*gClient->GetResourcePool()->GetFrameGC());
39  s_greenGC.SetForeground(gVirtualX->GetPixel(kGreen - 5));
40  return s_greenGC;
41  }
std::string fireworks::info ( const DetId id)

Definition at line 599 of file TrackUtils.cc.

References DetId::Calo, ME0DetId::chamber(), CSCDetId::chamber(), GEMDetId::chamber(), MuonSubdetId::CSC, HcalDetId::depth(), MuonSubdetId::DT, DetId::Ecal, EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalPreshower, EcalTriggerTower, CSCDetId::endcap(), MuonSubdetId::GEM, fireworks::Context::getGeom(), fireworks::Context::getInstance(), FWGeometry::getTrackerTopology(), DetId::Hcal, HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, EEDetId::ic(), CaloTowerDetId::ieta(), EBDetId::ieta(), HcalDetId::ieta(), CaloTowerDetId::iphi(), EBDetId::iphi(), HcalDetId::iphi(), EEDetId::iquadrant(), EEDetId::isc(), EEDetId::ix(), EEDetId::iy(), ME0DetId::layer(), CSCDetId::layer(), RPCDetId::layer(), GEMDetId::layer(), MuonSubdetId::ME0, DetId::Muon, TrackerTopology::print(), ME0DetId::region(), RPCDetId::region(), GEMDetId::region(), RPCDetId::ring(), CSCDetId::ring(), GEMDetId::ring(), RPCDetId::roll(), MuonSubdetId::RPC, DTChamberId::sector(), RPCDetId::sector(), DTChamberId::station(), RPCDetId::station(), CSCDetId::station(), GEMDetId::station(), HcalDetId::subdet(), RPCDetId::subsector(), EBDetId::tower_ieta(), EBDetId::tower_iphi(), DetId::Tracker, and DTChamberId::wheel().

Referenced by FWTrackHitsDetailView::addModules(), FWConvTrackHitsDetailView::addModules(), FWTracksModulesProxyBuilder::build(), and info().

599  {
600  std::ostringstream oss;
601 
602  oss << "DetId: " << id.rawId() << "\n";
603 
604  switch (id.det()) {
605  case DetId::Tracker:
607  break;
608 
609  case DetId::Muon:
610  switch (id.subdetId()) {
611  case MuonSubdetId::DT: {
612  DTChamberId detId(id.rawId());
613  oss << "DT chamber (wheel, station, sector): " << detId.wheel() << ", " << detId.station() << ", "
614  << detId.sector();
615  } break;
616  case MuonSubdetId::CSC: {
617  CSCDetId detId(id.rawId());
618  oss << "CSC chamber (endcap, station, ring, chamber, layer): " << detId.endcap() << ", " << detId.station()
619  << ", " << detId.ring() << ", " << detId.chamber() << ", " << detId.layer();
620  } break;
621  case MuonSubdetId::RPC: {
622  RPCDetId detId(id.rawId());
623  oss << "RPC chamber ";
624  switch (detId.region()) {
625  case 0:
626  oss << "/ barrel / (wheel, station, sector, layer, subsector, roll): " << detId.ring() << ", "
627  << detId.station() << ", " << detId.sector() << ", " << detId.layer() << ", " << detId.subsector()
628  << ", " << detId.roll();
629  break;
630  case 1:
631  oss << "/ forward endcap / (wheel, station, sector, layer, subsector, roll): " << detId.ring() << ", "
632  << detId.station() << ", " << detId.sector() << ", " << detId.layer() << ", " << detId.subsector()
633  << ", " << detId.roll();
634  break;
635  case -1:
636  oss << "/ backward endcap / (wheel, station, sector, layer, subsector, roll): " << detId.ring() << ", "
637  << detId.station() << ", " << detId.sector() << ", " << detId.layer() << ", " << detId.subsector()
638  << ", " << detId.roll();
639  break;
640  }
641  } break;
642  case MuonSubdetId::GEM: {
643  GEMDetId detId(id.rawId());
644  oss << "GEM chamber (region, station, ring, chamber, layer): " << detId.region() << ", " << detId.station()
645  << ", " << detId.ring() << ", " << detId.chamber() << ", " << detId.layer();
646  } break;
647  case MuonSubdetId::ME0: {
648  ME0DetId detId(id.rawId());
649  oss << "ME0 chamber (region, chamber, layer): " << detId.region() << ", " << detId.chamber() << ", "
650  << detId.layer();
651  } break;
652  }
653  break;
654 
655  case DetId::Calo: {
656  CaloTowerDetId detId(id.rawId());
657  oss << "CaloTower (ieta, iphi): " << detId.ieta() << ", " << detId.iphi();
658  } break;
659 
660  case DetId::Ecal:
661  switch (id.subdetId()) {
662  case EcalBarrel: {
663  EBDetId detId(id);
664  oss << "EcalBarrel (ieta, iphi, tower_ieta, tower_iphi): " << detId.ieta() << ", " << detId.iphi() << ", "
665  << detId.tower_ieta() << ", " << detId.tower_iphi();
666  } break;
667  case EcalEndcap: {
668  EEDetId detId(id);
669  oss << "EcalEndcap (ix, iy, SuperCrystal, crystal, quadrant): " << detId.ix() << ", " << detId.iy() << ", "
670  << detId.isc() << ", " << detId.ic() << ", " << detId.iquadrant();
671  } break;
672  case EcalPreshower:
673  oss << "EcalPreshower";
674  break;
675  case EcalTriggerTower:
676  oss << "EcalTriggerTower";
677  break;
678  case EcalLaserPnDiode:
679  oss << "EcalLaserPnDiode";
680  break;
681  }
682  break;
683 
684  case DetId::Hcal: {
685  HcalDetId detId(id);
686  switch (detId.subdet()) {
687  case HcalEmpty:
688  oss << "HcalEmpty ";
689  break;
690  case HcalBarrel:
691  oss << "HcalBarrel ";
692  break;
693  case HcalEndcap:
694  oss << "HcalEndcap ";
695  break;
696  case HcalOuter:
697  oss << "HcalOuter ";
698  break;
699  case HcalForward:
700  oss << "HcalForward ";
701  break;
702  case HcalTriggerTower:
703  oss << "HcalTriggerTower ";
704  break;
705  case HcalOther:
706  oss << "HcalOther ";
707  break;
708  }
709  oss << "(ieta, iphi, depth):" << detId.ieta() << ", " << detId.iphi() << ", " << detId.depth();
710  } break;
711  default:;
712  }
713  return oss.str();
714  }
static constexpr int GEM
Definition: MuonSubdetId.h:14
std::string print(DetId detid) const
static constexpr int ME0
Definition: MuonSubdetId.h:15
static Context * getInstance()
Definition: Context.cc:193
static constexpr int RPC
Definition: MuonSubdetId.h:13
const TrackerTopology * getTrackerTopology() const
Definition: FWGeometry.h:156
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12
FWGeometry * getGeom() const
Definition: Context.h:72
std::string fireworks::info ( const std::set< DetId > &  idSet)

Definition at line 716 of file TrackUtils.cc.

References triggerObjects_cff::id, info(), AlCaHLTBitMon_QueryRunRegistry::string, and runonSM::text.

716  {
718  for (std::set<DetId>::const_iterator id = idSet.begin(), idEnd = idSet.end(); id != idEnd; ++id) {
719  text += info(*id);
720  text += "\n";
721  }
722  return text;
723  }
static const TGPicture * info(bool iBackgroundIsBlack)
std::string fireworks::info ( const std::vector< DetId > &  idSet)

Definition at line 725 of file TrackUtils.cc.

References triggerObjects_cff::id, info(), AlCaHLTBitMon_QueryRunRegistry::string, and runonSM::text.

725  {
727  for (std::vector<DetId>::const_iterator id = idSet.begin(), idEnd = idSet.end(); id != idEnd; ++id) {
728  text += info(*id);
729  text += "\n";
730  }
731  return text;
732  }
static const TGPicture * info(bool iBackgroundIsBlack)
void fireworks::invertBox ( std::vector< float > &  corners)

Definition at line 133 of file BuilderUtils.cc.

References std::swap().

Referenced by energyScaledBox3DCorners(), etScaledBox3DCorners(), and FWCaloRecHitDigitSetProxyBuilder::viewContextBoxScale().

133  {
134  std::swap(corners[0], corners[9]);
135  std::swap(corners[1], corners[10]);
136  std::swap(corners[2], corners[11]);
137 
138  std::swap(corners[3], corners[6]);
139  std::swap(corners[4], corners[7]);
140  std::swap(corners[5], corners[8]);
141 
142  std::swap(corners[12], corners[21]);
143  std::swap(corners[13], corners[22]);
144  std::swap(corners[14], corners[23]);
145 
146  std::swap(corners[15], corners[18]);
147  std::swap(corners[16], corners[19]);
148  std::swap(corners[17], corners[20]);
149  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const TGGC & fireworks::italicGC ( )

Definition at line 49 of file GlobalContexts.cc.

References dqmiodatasetharvest::pool.

Referenced by FWPSetTableManager::cellRenderer().

49  {
50  static TGGC s_italicGC(*gClient->GetResourcePool()->GetFrameGC());
51 
52  TGFontPool* pool = gClient->GetFontPool();
53  TGFont* font = pool->FindFontByHandle(s_italicGC.GetFont());
54  FontAttributes_t attributes = font->GetFontAttributes();
55 
56  attributes.fSlant = 1;
57  TGFont* newFont = pool->GetFont(attributes.fFamily, 9, attributes.fWeight, attributes.fSlant);
58 
59  s_italicGC.SetFont(newFont->GetFontHandle());
60 
61  return s_italicGC;
62  }
void fireworks::localSiStrip ( short  strip,
float *  localTop,
float *  localBottom,
const float *  pars,
unsigned int  id 
)

Definition at line 263 of file TrackUtils.cc.

References dumpMFGeometry_cfg::delta, fwLog, fwlog::kError, hltrates_dqm_sourceclient-live_cfg::offset, funct::tan(), and ecaldqm::topology().

Referenced by addSiStripClusters(), FWSiStripClusterProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), and fireworks::StateOrdering::operator()().

263  {
264  Float_t topology = pars[0];
265  Float_t halfStripLength = pars[2] * 0.5;
266 
267  Double_t localCenter[3] = {0.0, 0.0, 0.0};
268  localTop[1] = halfStripLength;
269  localBottom[1] = -halfStripLength;
270 
271  if (topology == 1) // RadialStripTopology
272  {
273  // stripAngle = phiOfOneEdge + strip * angularWidth
274  // localY = originToIntersection * tan( stripAngle )
275  Float_t stripAngle = tan(pars[5] + strip * pars[6]);
276  Float_t delta = halfStripLength * stripAngle;
277  localCenter[0] = pars[4] * stripAngle;
278  localTop[0] = localCenter[0] + delta;
279  localBottom[0] = localCenter[0] - delta;
280  } else if (topology == 2) // RectangularStripTopology
281  {
282  // offset = -numberOfStrips/2. * pitch
283  // localY = strip * pitch + offset
284  Float_t offset = -pars[1] * 0.5 * pars[3];
285  localCenter[0] = strip * pars[3] + offset;
286  localTop[0] = localCenter[0];
287  localBottom[0] = localCenter[0];
288  } else if (topology == 3) // TrapezoidalStripTopology
289  {
290  fwLog(fwlog::kError) << "did not expect TrapezoidalStripTopology of " << id << std::endl;
291  } else if (pars[0] == 0) // StripTopology
292  {
293  fwLog(fwlog::kError) << "did not find StripTopology of " << id << std::endl;
294  }
295  }
CaloTopology const * topology(0)
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
#define fwLog(_level_)
Definition: fwLog.h:45
TEveJetCone * fireworks::makeEveJetCone ( const reco::Jet iData,
const fireworks::Context context 
)

Definition at line 6 of file makeEveJetCone.cc.

References HltBtagPostValidation_cff::c, fireworks::Context::caloMaxEta(), fireworks::Context::caloR1(), fireworks::Context::caloR2(), fireworks::Context::caloTransAngle(), fireworks::Context::caloZ1(), fireworks::Context::caloZ2(), reco::LeafCandidate::eta(), reco::Jet::etaetaMoment(), reco::Jet::getJetConstituents(), metsig::jet, reco::LeafCandidate::phi(), reco::Jet::phiphiMoment(), mathSSE::sqrt(), funct::tan(), and reco::LeafCandidate::vertex().

Referenced by FWTauProxyBuilderBase::buildBaseTau(), and FWJetProxyBuilder::requestCommon().

6  {
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  }
double eta() const final
momentum pseudorapidity
static float caloTransAngle()
Definition: Context.cc:189
static float caloZ2(bool offset=true)
Definition: Context.cc:185
std::vector< Constituent > Constituents
Definition: Jet.h:23
float etaetaMoment() const
eta-eta second moment, ET weighted
virtual Constituents getJetConstituents() const
list of constituents
static float caloR2(bool offset=true)
Definition: Context.cc:182
T sqrt(T t)
Definition: SSEVec.h:19
const Point & vertex() const override
vertex position (overwritten by PF...)
static float caloR1(bool offset=true)
Definition: Context.cc:180
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float phiphiMoment() const
phi-phi second moment, ET weighted
static double caloMaxEta()
Definition: Context.cc:191
static float caloZ1(bool offset=true)
Definition: Context.cc:183
double phi() const final
momentum azimuthal angle
bool fireworks::makeRhoPhiSuperCluster ( FWProxyBuilderBase pb,
const reco::SuperClusterRef iCluster,
float  iPhi,
TEveElement &  oItemHolder 
)

Definition at line 28 of file makeSuperCluster.cc.

References fireworks::Context::caloR1(), FWDisplayProperties::color(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), end, FWGeometry::getCorners(), fireworks::Context::getGeom(), getPhiRange(), getShape(), mps_fire::i, triggerObjects_cff::id, edm::Ref< C, T, F >::isAvailable(), FWProxyBuilderBase::item(), M_PI, VtxSmearedParameters_cfi::Phi, alignCSCRings::r, SimDataFormats::CaloAnalysis::sc, and FWProxyBuilderBase::setupAddElement().

Referenced by FWPhotonProxyBuilder::buildViewType(), and FWElectronProxyBuilder::buildViewType().

31  {
32  if (!iCluster.isAvailable())
33  return false;
34  TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur());
35 
36  std::vector<std::pair<DetId, float> > detids = iCluster->hitsAndFractions();
37  if (detids.empty())
38  return false;
39  std::vector<double> phis;
40  for (std::vector<std::pair<DetId, float> >::const_iterator id = detids.begin(), end = detids.end(); id != end;
41  ++id) {
42  const float* corners = pb->context().getGeom()->getCorners(id->first.rawId());
43  if (corners != nullptr) {
44  std::vector<float> centre(3, 0);
45 
46  for (unsigned int i = 0; i < 24; i += 3) {
47  centre[0] += corners[i];
48  centre[1] += corners[i + 1];
49  centre[2] += corners[i + 2];
50  }
51 
52  phis.push_back(TEveVector(centre[0], centre[1], centre[2]).Phi());
53  }
54  }
55  std::pair<double, double> phiRange = fireworks::getPhiRange(phis, iPhi);
56  const double r = pb->context().caloR1();
57  TGeoBBox* sc_box = new TGeoTubeSeg(r - 2,
58  r,
59  1,
60  phiRange.first * 180 / M_PI - 0.5,
61  phiRange.second * 180 / M_PI + 0.5); // 0.5 is roughly half size of a crystal
62  TEveGeoShape* sc = fireworks::getShape("supercluster", sc_box, pb->item()->defaultDisplayProperties().color());
63  sc->SetPickable(kTRUE);
64  pb->setupAddElement(sc, &oItemHolder);
65  return true;
66  }
const fireworks::Context & context() const
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
std::pair< double, double > getPhiRange(const std::vector< double > &phis, double phi)
Definition: BuilderUtils.cc:20
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
bool isAvailable() const
Definition: Ref.h:537
const FWEventItem * item() const
Color_t color() const
static float caloR1(bool offset=true)
Definition: Context.cc:180
#define end
Definition: vmac.h:39
#define M_PI
const float * getCorners(unsigned int id) const
Definition: FWGeometry.cc:463
TEveGeoShape * getShape(const char *name, TGeoBBox *shape, Color_t color)
Definition: BuilderUtils.cc:43
FWGeometry * getGeom() const
Definition: Context.h:72
bool fireworks::makeRhoZSuperCluster ( FWProxyBuilderBase pb,
const reco::SuperClusterRef iCluster,
float  iPhi,
TEveElement &  oItemHolder 
)

Definition at line 68 of file makeSuperCluster.cc.

References addRhoZEnergyProjection(), Reference_intrackfit_cff::barrel, fireworks::Context::caloR1(), fireworks::Context::caloR2(), fireworks::Context::caloTransAngle(), fireworks::Context::caloZ1(), fireworks::Context::caloZ2(), FWProxyBuilderBase::context(), end, FWGeometry::getCorners(), fireworks::Context::getGeom(), mps_fire::i, triggerObjects_cff::id, edm::Ref< C, T, F >::isAvailable(), Pi, and theta().

Referenced by FWPhotonProxyBuilder::buildViewType(), and FWElectronProxyBuilder::buildViewType().

71  {
72  if (!iCluster.isAvailable())
73  return false;
74  TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur());
75  double theta_max = 0;
76  double theta_min = 10;
77  std::vector<std::pair<DetId, float> > detids = iCluster->hitsAndFractions();
78  if (detids.empty())
79  return false;
80  for (std::vector<std::pair<DetId, float> >::const_iterator id = detids.begin(), end = detids.end(); id != end;
81  ++id) {
82  const float* corners = pb->context().getGeom()->getCorners(id->first.rawId());
83  if (corners != nullptr) {
84  std::vector<float> centre(3, 0);
85 
86  for (unsigned int i = 0; i < 24; i += 3) {
87  centre[0] += corners[i];
88  centre[1] += corners[i + 1];
89  centre[2] += corners[i + 2];
90  }
91 
92  double theta = TEveVector(centre[0], centre[1], centre[2]).Theta();
93  if (theta > theta_max)
94  theta_max = theta;
95  if (theta < theta_min)
96  theta_min = theta;
97  }
98  }
99  // expand theta range by the size of a crystal to avoid segments of zero length
100  bool barrel = true;
101  if ((theta_max > 0 && theta_max < pb->context().caloTransAngle()) ||
102  (theta_min > (TMath::Pi() - pb->context().caloTransAngle()))) {
103  barrel = false;
104  }
105 
106  double z_ecal = barrel ? pb->context().caloZ1() : pb->context().caloZ2();
107  double r_ecal = barrel ? pb->context().caloR1() : pb->context().caloR2();
108 
110  pb, &oItemHolder, r_ecal - 1, z_ecal - 1, theta_min - 0.003, theta_max + 0.003, iPhi);
111 
112  return true;
113  }
const double Pi
const fireworks::Context & context() const
static float caloTransAngle()
Definition: Context.cc:189
Geom::Theta< T > theta() const
static float caloZ2(bool offset=true)
Definition: Context.cc:185
bool isAvailable() const
Definition: Ref.h:537
static float caloR2(bool offset=true)
Definition: Context.cc:182
static float caloR1(bool offset=true)
Definition: Context.cc:180
#define end
Definition: vmac.h:39
void addRhoZEnergyProjection(FWProxyBuilderBase *, TEveElement *, double r_ecal, double z_ecal, double theta_min, double theta_max, double phi)
Definition: BuilderUtils.cc:57
const float * getCorners(unsigned int id) const
Definition: FWGeometry.cc:463
static float caloZ1(bool offset=true)
Definition: Context.cc:183
FWGeometry * getGeom() const
Definition: Context.h:72
float fireworks::phase2PixelLocalX ( const double  mpx,
const float *  par,
const float *  shape 
)

Definition at line 249 of file TrackUtils.cc.

Referenced by FWPhase2TrackerCluster1DProxyBuilder::build(), and fireworks::StateOrdering::operator()().

249  {
250  // The final position in local coordinates
251  return (-shape[1] + mpx * par[0]);
252  }
float fireworks::phase2PixelLocalY ( const double  mpy,
const float *  par,
const float *  shape 
)

Definition at line 255 of file TrackUtils.cc.

Referenced by FWPhase2TrackerCluster1DProxyBuilder::build(), and fireworks::StateOrdering::operator()().

255  {
256  // The final position in local coordinates
257  return (-shape[2] + mpy * par[1]);
258  }
float fireworks::pixelLocalX ( const double  mpx,
const float *  par 
)

Definition at line 159 of file TrackUtils.cc.

References fireworks::Context::getInstance(), createfilelist::int, and MICRON.

Referenced by FWSiPixelDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), fireworks::StateOrdering::operator()(), pushPixelCluster(), and ValidateGeometry::validatePixelTopology().

159  {
160  float xoffset = 0;
161  float xpitch = 0;
162  // std::cerr << "version pr0d " << fireworks::Context::getInstance()->getGeom()->getProducerVersion() << "\n";
163  if (fireworks::Context::getInstance() && fireworks::Context::getInstance()->getGeom()->getProducerVersion() < 1) {
164  static const int ROWS_PER_ROC = 80; // Num of cols per ROC
165  static const int BIG_PIX_PER_ROC_X = 1; // in x direction, rows
166  static const double PITCHX = 100 * MICRON;
167  // Calculate the edge of the active sensor with respect to the center,
168  // that is simply the half-size.
169  // Take into account large pixels
170  xpitch = PITCHX;
171  xoffset = -(par[0] + BIG_PIX_PER_ROC_X * par[0] / ROWS_PER_ROC) / 2. * PITCHX;
172  } else {
173  xpitch = par[0];
174  xoffset = par[2];
175  }
176 
177  bool bigPixelsLayout = par[4];
178 
179  int binoffx = int(mpx); // truncate to int
180  double fractionX = mpx - binoffx; // find the fraction
181  double local_xpitch = xpitch; // defaultpitch
182 
183  if (bigPixelsLayout == 0) {
184  // Measurement to local transformation for X coordinate
185  // X coordinate is in the ROC row number direction
186  // Copy from RectangularPixelTopology::localX implementation
187  if (binoffx > 80) { // ROC 1 - handles x on edge cluster
188  binoffx = binoffx + 2;
189  } else if (binoffx == 80) { // ROC 1
190  binoffx = binoffx + 1;
191  local_xpitch = 2 * xpitch;
192  } else if (binoffx == 79) { // ROC 0
193  binoffx = binoffx + 0;
194  local_xpitch = 2 * xpitch;
195  } else if (binoffx >= 0) { // ROC 0
196  binoffx = binoffx + 0;
197  }
198  }
199 
200  // The final position in local coordinates
201  double lpX = double(binoffx * xpitch) + fractionX * local_xpitch + xoffset;
202 
203  return lpX;
204  }
static const double MICRON
Definition: TrackUtils.cc:57
static Context * getInstance()
Definition: Context.cc:193
float fireworks::pixelLocalY ( const double  mpy,
const float *  par 
)

Definition at line 209 of file TrackUtils.cc.

References begin, constexpr, end, fireworks::Context::getInstance(), createfilelist::int, dqmiolumiharvest::j, and MICRON.

Referenced by FWSiPixelDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), fireworks::StateOrdering::operator()(), pushPixelCluster(), and ValidateGeometry::validatePixelTopology().

209  {
210  float ypitch = 0;
211  float yoffset = 0;
212  if (fireworks::Context::getInstance() && fireworks::Context::getInstance()->getGeom()->getProducerVersion() < 1) {
213  static const double PITCHY = 150 * MICRON;
214  static const int BIG_PIX_PER_ROC_Y = 2; // in y direction, cols
215  static const int COLS_PER_ROC = 52; // Num of Rows per ROC
216 
217  // Calculate the edge of the active sensor with respect to the center,
218  // that is simply the half-size.
219  // Take into account large pixels
220  yoffset = -(par[1] + BIG_PIX_PER_ROC_Y * par[1] / COLS_PER_ROC) / 2. * PITCHY;
221  ypitch = PITCHY;
222  } else {
223  ypitch = par[1];
224  yoffset = par[3];
225  }
226  // Measurement to local transformation for Y coordinate
227  // Y is in the ROC column number direction
228  // Copy from RectangularPixelTopology::localY implementation
229  int binoffy = int(mpy); // truncate to int
230  double fractionY = mpy - binoffy; // find the fraction
231  double local_pitchy = ypitch; // defaultpitch
232 
233  bool bigPixelsLayout = par[4];
234  if (bigPixelsLayout == 0) {
235  constexpr int bigYIndeces[]{0, 51, 52, 103, 104, 155, 156, 207, 208, 259, 260, 311, 312, 363, 364, 415, 416, 511};
236  auto const j = std::lower_bound(std::begin(bigYIndeces), std::end(bigYIndeces), binoffy);
237  if (*j == binoffy)
238  local_pitchy *= 2;
239  binoffy += (j - bigYIndeces);
240  }
241 
242  // The final position in local coordinates
243  double lpY = double(binoffy * ypitch) + fractionY * local_pitchy + yoffset;
244 
245  return lpY;
246  }
static const double MICRON
Definition: TrackUtils.cc:57
#define end
Definition: vmac.h:39
static Context * getInstance()
Definition: Context.cc:193
#define begin
Definition: vmac.h:32
#define constexpr
TEveTrack * fireworks::prepareCandidate ( const reco::Candidate track,
TEveTrackPropagator *  propagator 
)

Definition at line 9 of file CandidateUtils.cc.

References reco::Candidate::charge(), reco::Candidate::px(), reco::Candidate::py(), reco::Candidate::pz(), OrderedSet::t, and reco::Candidate::vertex().

Referenced by FWElectronLegoProxyBuilder::build(), FWCandidatePtrProxyBuilder::build(), FWSecVertexCandidateProxyBuilder::build(), FWGenParticleProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWVertexCandidateProxyBuilder::build(), FWMuonBuilder::buildMuon(), and FWElectronProxyBuilder::requestCommon().

9  {
10  TEveRecTrack t;
11  t.fBeta = 1.;
12  t.fP = TEveVector(track.px(), track.py(), track.pz());
13  t.fV = TEveVector(track.vertex().x(), track.vertex().y(), track.vertex().z());
14  t.fSign = track.charge();
15  TEveTrack* trk = new TEveTrack(&t, propagator);
16  return trk;
17  }
virtual double pz() const =0
z coordinate of momentum vector
virtual double py() const =0
y coordinate of momentum vector
virtual int charge() const =0
electric charge
virtual const Point & vertex() const =0
vertex position
virtual double px() const =0
x coordinate of momentum vector
TEveTrack * fireworks::prepareTrack ( const reco::Track track,
TEveTrackPropagator *  propagator,
const std::vector< TEveVector > &  extraRefPoints = std::vector<TEveVector>() 
)

Definition at line 62 of file TrackUtils.cc.

References reco::TrackBase::charge(), reco::Track::extra(), f, mps_fire::i, reco::Track::innerMomentum(), reco::Track::innerOk(), reco::Track::innerPosition(), edm::Ref< C, T, F >::isAvailable(), dqmiolumiharvest::j, reco::Track::outerMomentum(), reco::Track::outerOk(), reco::Track::outerPosition(), AlCaHLTBitMon_ParallelJobs::p, point, position, reco::TrackBase::pt(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), OrderedSet::t, reco::btau::trackMomentum, findQualityFiles::v, validateGeometry_cfg::valid, reco::TrackBase::vx(), reco::TrackBase::vy(), and reco::TrackBase::vz().

Referenced by FWTauProxyBuilderBase::addConstituentTracks(), FWTauProxyBuilderBase::addLeadTrack(), DummyEvelyser::analyze(), FWElectronLegoProxyBuilder::build(), FWTrackHitsDetailView::build(), FWTrackProxyBuilder::build(), FWConvTrackHitsDetailView::build(), FWMuonBuilder::buildMuon(), fireworks::StateOrdering::operator()(), and FWElectronProxyBuilder::requestCommon().

64  {
65  // To make use of all available information, we have to order states
66  // properly first. Propagator should take care of y=0 transition.
67 
68  std::vector<State> refStates;
69  TEveVector trackMomentum(track.px(), track.py(), track.pz());
70  refStates.push_back(State(TEveVector(track.vx(), track.vy(), track.vz()), trackMomentum));
71  if (track.extra().isAvailable()) {
72  if (track.innerOk()) {
73  const reco::TrackBase::Point& v = track.innerPosition();
74  const reco::TrackBase::Vector& p = track.innerMomentum();
75  refStates.push_back(State(TEveVector(v.x(), v.y(), v.z()), TEveVector(p.x(), p.y(), p.z())));
76  }
77  if (track.outerOk()) {
78  const reco::TrackBase::Point& v = track.outerPosition();
79  const reco::TrackBase::Vector& p = track.outerMomentum();
80  refStates.push_back(State(TEveVector(v.x(), v.y(), v.z()), TEveVector(p.x(), p.y(), p.z())));
81  }
82  }
83  for (std::vector<TEveVector>::const_iterator point = extraRefPoints.begin(), pointEnd = extraRefPoints.end();
84  point != pointEnd;
85  ++point)
86  refStates.push_back(State(*point));
87  if (track.pt() > 1)
88  std::sort(refStates.begin(), refStates.end(), StateOrdering(trackMomentum));
89 
90  // * if the first state has non-zero momentum use it as a starting point
91  // and all other points as PathMarks to follow
92  // * if the first state has only position, try the last state. If it has
93  // momentum we propagate backword, if not, we look for the first one
94  // on left that has momentum and ignore all earlier.
95  //
96 
97  TEveRecTrack t;
98  t.fBeta = 1.;
99  t.fSign = track.charge();
100 
101  if (refStates.front().valid) {
102  t.fV = refStates.front().position;
103  t.fP = refStates.front().momentum;
104  TEveTrack* trk = new TEveTrack(&t, propagator);
105  for (unsigned int i(1); i < refStates.size() - 1; ++i) {
106  if (refStates[i].valid)
107  trk->AddPathMark(TEvePathMark(TEvePathMark::kReference, refStates[i].position, refStates[i].momentum));
108  else
109  trk->AddPathMark(TEvePathMark(TEvePathMark::kDaughter, refStates[i].position));
110  }
111  if (refStates.size() > 1) {
112  trk->AddPathMark(TEvePathMark(TEvePathMark::kDecay, refStates.back().position));
113  }
114  return trk;
115  }
116 
117  if (refStates.back().valid) {
118  t.fSign = (-1) * track.charge();
119  t.fV = refStates.back().position;
120  t.fP = refStates.back().momentum * (-1.0f);
121  TEveTrack* trk = new TEveTrack(&t, propagator);
122  unsigned int i(refStates.size() - 1);
123  for (; i > 0; --i) {
124  if (refStates[i].valid)
125  trk->AddPathMark(
126  TEvePathMark(TEvePathMark::kReference, refStates[i].position, refStates[i].momentum * (-1.0f)));
127  else
128  trk->AddPathMark(TEvePathMark(TEvePathMark::kDaughter, refStates[i].position));
129  }
130  if (refStates.size() > 1) {
131  trk->AddPathMark(TEvePathMark(TEvePathMark::kDecay, refStates.front().position));
132  }
133  return trk;
134  }
135 
136  unsigned int i(0);
137  while (i < refStates.size() && !refStates[i].valid)
138  ++i;
139  assert(i < refStates.size());
140 
141  t.fV = refStates[i].position;
142  t.fP = refStates[i].momentum;
143  TEveTrack* trk = new TEveTrack(&t, propagator);
144  for (unsigned int j(i + 1); j < refStates.size() - 1; ++j) {
145  if (refStates[i].valid)
146  trk->AddPathMark(TEvePathMark(TEvePathMark::kReference, refStates[i].position, refStates[i].momentum));
147  else
148  trk->AddPathMark(TEvePathMark(TEvePathMark::kDaughter, refStates[i].position));
149  }
150  if (i < refStates.size()) {
151  trk->AddPathMark(TEvePathMark(TEvePathMark::kDecay, refStates.back().position));
152  }
153  return trk;
154  }
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
bool innerOk() const
return true if the innermost hit is valid
Definition: Track.h:53
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:605
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
bool isAvailable() const
Definition: Ref.h:537
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
double pt() const
track transverse momentum
Definition: TrackBase.h:602
double f[11][100]
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:611
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:626
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:65
bool outerOk() const
return true if the outermost hit is valid
Definition: Track.h:50
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:623
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59
static int position[264][3]
Definition: ReadPGInfo.cc:289
int charge() const
track electric charge
Definition: TrackBase.h:575
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:620
void fireworks::pushNearbyPixelHits ( std::vector< TVector3 > &  pixelPoints,
const FWEventItem iItem,
const reco::Track t 
)

Definition at line 480 of file TrackUtils.cc.

References edmNew::DetSet< T >::begin(), SiPixelRecHit::cluster(), FWGeometry::contains(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), edmNew::DetSetVector< T >::find(), fwLog, relativeConstraints::geom, edm::EventBase::get(), FWEventItem::getEvent(), FWEventItem::getGeom(), FWGeometry::getParameters(), edm::Ref< C, T, F >::id(), createfilelist::int, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), fwlog::kError, muonClassificationByHits_cfi::pixel, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, edm::Handle< T >::product(), pushPixelCluster(), reco::Track::recHitsBegin(), and reco::Track::recHitsEnd().

Referenced by FWTrackHitsDetailView::addHits(), FWConvTrackHitsDetailView::addHits(), and fireworks::StateOrdering::operator()().

480  {
481  const edmNew::DetSetVector<SiPixelCluster>* allClusters = nullptr;
482  for (trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it) {
483  const auto& rhs = *(*(it));
484  if (typeid(rhs) == typeid(SiPixelRecHit)) {
485  const SiPixelRecHit& hit = static_cast<const SiPixelRecHit&>(**it);
486  if (hit.cluster().isNonnull() && hit.cluster().isAvailable()) {
488  iItem.getEvent()->get(hit.cluster().id(), allClustersHandle);
489  allClusters = allClustersHandle.product();
490  break;
491  }
492  }
493  }
494  if (allClusters == nullptr)
495  return;
496 
497  const FWGeometry* geom = iItem.getGeom();
498 
499  for (trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it) {
500  const TrackingRecHit* rh = &(**it);
501 
502  DetId id = (*it)->geographicalId();
503  if (!geom->contains(id)) {
504  fwLog(fwlog::kError) << "failed to get geometry of Tracker Det with raw id: " << id.rawId() << std::endl;
505 
506  continue;
507  }
508 
509  // -- in which detector are we?
510  unsigned int subdet = (unsigned int)id.subdetId();
511  if ((subdet != PixelSubdetector::PixelBarrel) && (subdet != PixelSubdetector::PixelEndcap))
512  continue;
513 
514  const SiPixelCluster* hitCluster = nullptr;
515  if (const SiPixelRecHit* pixel = dynamic_cast<const SiPixelRecHit*>(rh))
516  hitCluster = pixel->cluster().get();
517  edmNew::DetSetVector<SiPixelCluster>::const_iterator itds = allClusters->find(id.rawId());
518  if (itds != allClusters->end()) {
519  const edmNew::DetSet<SiPixelCluster>& clustersOnThisDet = *itds;
520  for (edmNew::DetSet<SiPixelCluster>::const_iterator itc = clustersOnThisDet.begin(),
521  edc = clustersOnThisDet.end();
522  itc != edc;
523  ++itc) {
524  if (&*itc != hitCluster)
525  pushPixelCluster(pixelPoints, *geom, id, *itc, geom->getParameters(id));
526  }
527  }
528  }
529  }
const_iterator end(bool update=false) const
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:474
bool get(ProductID const &, Handle< T > &) const
Definition: EventBase.h:103
data_type const * const_iterator
Definition: DetSetNew.h:31
bool isAvailable() const
Definition: Ref.h:537
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244
bool contains(unsigned int id) const
Definition: FWGeometry.h:139
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const edm::EventBase * getEvent() const
Definition: FWEventItem.h:131
Definition: DetId.h:17
T const * product() const
Definition: Handle.h:69
#define fwLog(_level_)
Definition: fwLog.h:45
ClusterRef cluster() const
Definition: SiPixelRecHit.h:47
const_iterator find(id_type i, bool update=false) const
Pixel cluster – collection of neighboring pixels above threshold.
iterator end()
Definition: DetSetNew.h:56
void pushPixelCluster(std::vector< TVector3 > &pixelPoints, const FWGeometry &geom, DetId id, const SiPixelCluster &c, const float *pars)
Definition: TrackUtils.cc:570
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
Our base class.
Definition: SiPixelRecHit.h:23
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
iterator begin()
Definition: DetSetNew.h:54
void fireworks::pushPixelCluster ( std::vector< TVector3 > &  pixelPoints,
const FWGeometry geom,
DetId  id,
const SiPixelCluster c,
const float *  pars 
)

Definition at line 570 of file TrackUtils.cc.

References cuy::col, fwLog, fwlog::kDebug, DTRecHitClients_cfi::local, FWGeometry::localToGlobal(), SiPixelCluster::minPixelCol(), SiPixelCluster::minPixelRow(), pixelLocalX(), and pixelLocalY().

Referenced by fireworks::StateOrdering::operator()(), pushNearbyPixelHits(), and pushPixelHits().

574  {
575  double row = c.minPixelRow();
576  double col = c.minPixelCol();
577  float lx = 0.;
578  float ly = 0.;
579 
580  // int nrows = (int)pars[0];
581  // int ncols = (int)pars[1];
582  lx = pixelLocalX(row, pars);
583  ly = pixelLocalY(col, pars);
584 
585  fwLog(fwlog::kDebug) << ", row: " << row << ", col: " << col << ", lx: " << lx << ", ly: " << ly;
586 
587  float local[3] = {lx, ly, 0.};
588  float global[3];
589  geom.localToGlobal(id, local, global);
590  TVector3 pb(global[0], global[1], global[2]);
591  pixelPoints.push_back(pb);
592 
593  fwLog(fwlog::kDebug) << " x: " << pb.X() << ", y: " << pb.Y() << " z: " << pb.Z() << " eta: " << pb.Eta()
594  << ", phi: " << pb.Phi() << " rho: " << pb.Pt() << std::endl;
595  }
int minPixelCol() const
int minPixelRow() const
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:496
float pixelLocalX(const double mpx, const float *)
Definition: TrackUtils.cc:159
float pixelLocalY(const double mpy, const float *)
Definition: TrackUtils.cc:209
#define fwLog(_level_)
Definition: fwLog.h:45
col
Definition: cuy.py:1010
void fireworks::pushPixelHits ( std::vector< TVector3 > &  pixelPoints,
const FWEventItem iItem,
const reco::Track t 
)

Definition at line 533 of file TrackUtils.cc.

References HltBtagPostValidation_cff::c, FWGeometry::contains(), PVValHelper::dz, reco::TrackBase::dz(), reco::TrackBase::eta(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), FWGeometry::getParameters(), createfilelist::int, fwlog::kDebug, fwlog::kError, muonClassificationByHits_cfi::pixel, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, pushPixelCluster(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), and reco::TrackBase::vz().

Referenced by FWTrackHitsDetailView::addHits(), FWConvTrackHitsDetailView::addHits(), FWTracksRecHitsProxyBuilder::build(), and fireworks::StateOrdering::operator()().

533  {
534  /*
535  * -- return for each Pixel Hit a 3D point
536  */
537  const FWGeometry* geom = iItem.getGeom();
538 
539  double dz = t.dz();
540  double vz = t.vz();
541  double etaT = t.eta();
542 
543  fwLog(fwlog::kDebug) << "Track eta: " << etaT << ", vz: " << vz << ", dz: " << dz << std::endl;
544 
545  int cnt = 0;
546  for (trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it) {
547  const TrackingRecHit* rh = &(**it);
548  // -- get position of center of wafer, assuming (0,0,0) is the center
549  DetId id = (*it)->geographicalId();
550  if (!geom->contains(id)) {
551  fwLog(fwlog::kError) << "failed to get geometry of Tracker Det with raw id: " << id.rawId() << std::endl;
552 
553  continue;
554  }
555 
556  // -- in which detector are we?
557  unsigned int subdet = (unsigned int)id.subdetId();
558 
559  if ((subdet == PixelSubdetector::PixelBarrel) || (subdet == PixelSubdetector::PixelEndcap)) {
560  fwLog(fwlog::kDebug) << cnt++ << " -- " << subdets[subdet];
561 
562  if (const SiPixelRecHit* pixel = dynamic_cast<const SiPixelRecHit*>(rh)) {
563  const SiPixelCluster& c = *(pixel->cluster());
564  pushPixelCluster(pixelPoints, *geom, id, c, geom->getParameters(id));
565  }
566  }
567  }
568  }
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:474
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
bool contains(unsigned int id) const
Definition: FWGeometry.h:139
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:596
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:626
Definition: DetId.h:17
#define fwLog(_level_)
Definition: fwLog.h:45
Pixel cluster – collection of neighboring pixels above threshold.
static const std::string subdets[7]
Definition: TrackUtils.cc:60
void pushPixelCluster(std::vector< TVector3 > &pixelPoints, const FWGeometry &geom, DetId id, const SiPixelCluster &c, const float *pars)
Definition: TrackUtils.cc:570
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
Our base class.
Definition: SiPixelRecHit.h:23
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
const TGGC & fireworks::redGC ( )

Definition at line 43 of file GlobalContexts.cc.

43  {
44  static TGGC s_redGC(*gClient->GetResourcePool()->GetFrameGC());
45  s_redGC.SetForeground(gVirtualX->GetPixel(kRed - 5));
46  return s_redGC;
47  }
void fireworks::setPath ( TString &  v)

Definition at line 15 of file fwPaths.cc.

References fwLog, and fwlog::kError.

Referenced by CmsShowHelpPopup::CmsShowHelpPopup(), main(), CmsShowMainBase::sendVersionInfo(), and CmsShowMainFrame::showFWorksInfo().

15  {
16  if (gSystem->AccessPathName(p1 + v) == kFALSE) {
17  v.Prepend(p1);
18  return;
19  }
20 
21  v.Prepend(p2);
22  if (gSystem->AccessPathName(v))
23  fwLog(fwlog::kError) << "Can't access path " << v << std::endl;
24  }
double p2[4]
Definition: TauolaWrapper.h:90
#define fwLog(_level_)
Definition: fwLog.h:45
double p1[4]
Definition: TauolaWrapper.h:89
void fireworks::setTrackTypePF ( const reco::PFCandidate pfCand,
TAttLine *  track 
)

Definition at line 16 of file setTrackTypePF.cc.

Referenced by FWPFCandidateWithHitsProxyBuilder::build(), FWPFCandidate3DProxyBuilder::build(), FWPFPatJet3DProxyBuilder< T >::build(), FWPFPatJetLegoProxyBuilder< T >::build(), and FWPFCandidatesLegoProxyBuilder::build().

16  {
17  using namespace reco;
18 
19  // switch (pfCand.particleId() ) {
20  // case PFCandidate::e: track->SetLineStyle(5); break;
21  // case PFCandidate::mu: track->SetLineStyle(6); break;
22  // case PFCandidate::h0: track->SetLineStyle(3); break;
23  // case PFCandidate::gamma: track->SetLineStyle(7); break;
24  // default: break;
25  // }
26  }
fixed size matrix
void fireworks::setupAddElement ( TEveElement *  el,
TEveElement *  parent,
const FWEventItem item,
bool  master,
bool  color 
)

Definition at line 299 of file TrackUtils.cc.

References FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), and FWDisplayProperties::transparency().

Referenced by addSiStripClusters(), FWDTRecHitProxyBuilder::buildViewType(), and FWProxyBuilderBase::getHaveWindow().

299  {
300  if (master) {
301  el->CSCTakeAnyParentAsMaster();
302  el->SetPickable(true);
303  }
304 
305  if (color) {
306  el->CSCApplyMainColorToMatchingChildren();
307  el->CSCApplyMainTransparencyToMatchingChildren();
308  el->SetMainColor(item->defaultDisplayProperties().color());
309  assert((item->defaultDisplayProperties().transparency() >= 0) &&
310  (item->defaultDisplayProperties().transparency() <= 100));
311  el->SetMainTransparency(item->defaultDisplayProperties().transparency());
312  }
313  parent->AddElement(el);
314  }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
Color_t color() const
Char_t transparency() const
int * fireworks::supportedDataFormatsVersion ( )

Definition at line 35 of file fwPaths.cc.

References getDecomposedVersion(), and findQualityFiles::v.

Referenced by acceptDataFormatsVersion(), CmsShowSearchFiles::CmsShowSearchFiles(), FWFileEntry::openFile(), and CmsShowSearchFiles::readInfo().

35  {
36  static int mm[] = {0, 0, 0};
37 
38  if (!mm[0]) {
39  TString v;
40  if (gSystem->Getenv("CMSSW_VERSION")) {
41  v = gSystem->Getenv("CMSSW_VERSION");
42 
43  } else {
44  TString versionFileName = gSystem->Getenv("CMSSW_BASE");
45  versionFileName += "/src/Fireworks/Core/data/version.txt";
46  std::ifstream fs(versionFileName);
47  TString infoText;
48  infoText.ReadLine(fs);
49  infoText.ReadLine(fs);
50  fs.close();
51  v = &infoText[13];
52  }
53 
54  getDecomposedVersion(v, &mm[0]);
55  }
56 
57  return &mm[0];
58  }
void getDecomposedVersion(const TString &s, int *out)
Definition: fwPaths.cc:26
std::vector< std::pair< double, double > > fireworks::thetaBins ( )

Definition at line 46 of file thetaBins.cc.

References JetChargeProducer_cfi::exp, mps_fire::i, fw3dlego::xbins, and fw3dlego::xbins_n.

46  {
47  const int n_bins = fw3dlego::xbins_n - 1;
48  std::vector<std::pair<double, double> > thetaBins(n_bins);
49  for (int i = 0; i < n_bins; ++i) {
50  thetaBins[i].first = 2 * atan(exp(-fw3dlego::xbins[i]));
51  thetaBins[i].second = 2 * atan(exp(-fw3dlego::xbins[i + 1]));
52  }
53  return thetaBins;
54  }
const double xbins[]
std::vector< std::pair< double, double > > thetaBins()
Definition: thetaBins.cc:46
const int xbins_n

Variable Documentation

const double fireworks::MICRON = 1. / 1000. / 1000.
static

Definition at line 57 of file TrackUtils.cc.

Referenced by pixelLocalX(), and pixelLocalY().

const TString fireworks::p1 = gSystem->Getenv("CMSSW_BASE") + datadir

Definition at line 12 of file fwPaths.cc.

const TString fireworks::p2 = gSystem->Getenv("CMSSW_RELEASE_BASE") + datadir

Definition at line 13 of file fwPaths.cc.

const std::string fireworks::subdets[7] = {"UNKNOWN", "PXB", "PXF", "TIB", "TID", "TOB", "TEC"}
static