CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 152 of file BuilderUtils.cc.

References FWProxyBuilderBase::setupAddElement().

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

152  {
153  TEveBox* eveBox = new TEveBox("Box");
154  eveBox->SetDrawFrame(false);
155  eveBox->SetPickable(true);
156  eveBox->SetVertices(&corners[0]);
157 
158  pb->setupAddElement(eveBox, comp);
159  }
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 161 of file BuilderUtils.cc.

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

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

166  {
167  TEveStraightLineSet* container = new TEveStraightLineSet;
168 
169  for (unsigned int iphi = 0; iphi < nLineSegments; ++iphi) {
170  container->AddLine(eta + radius * cos(2 * M_PI / nLineSegments * iphi),
171  phi + radius * sin(2 * M_PI / nLineSegments * iphi),
172  0.01,
173  eta + radius * cos(2 * M_PI / nLineSegments * (iphi + 1)),
174  phi + radius * sin(2 * M_PI / nLineSegments * (iphi + 1)),
175  0.01);
176  }
177  pb->setupAddElement(container, comp);
178  }
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 180 of file BuilderUtils.cc.

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

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

180  {
181  TEveScalableStraightLineSet* marker = new TEveScalableStraightLineSet;
182  marker->SetLineWidth(1);
183  marker->SetLineStyle(2);
184  marker->AddLine(0, 0, 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  marker->AddLine(size * 0.9 * cos(phi - 0.03), size * 0.9 * sin(phi - 0.03), 0, size * cos(phi), size * sin(phi), 0);
187  pb->setupAddElement(marker, comp);
188  }
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
tuple size
Write out results.
void fireworks::addDashedLine ( double  phi,
double  theta,
double  size,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 190 of file BuilderUtils.cc.

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

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

190  {
191  double r(0);
192  if (theta < pb->context().caloTransAngle() || M_PI - theta < pb->context().caloTransAngle())
193  r = pb->context().caloZ2() / fabs(cos(theta));
194  else
195  r = pb->context().caloR1() / sin(theta);
196 
197  TEveStraightLineSet* marker = new TEveStraightLineSet;
198  marker->SetLineWidth(2);
199  marker->SetLineStyle(2);
200  marker->AddLine(r * cos(phi) * sin(theta),
201  r * sin(phi) * sin(theta),
202  r * cos(theta),
203  (r + size) * cos(phi) * sin(theta),
204  (r + size) * sin(phi) * sin(theta),
205  (r + size) * cos(theta));
206  pb->setupAddElement(marker, comp);
207  }
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
tuple size
Write out results.
void fireworks::addDoubleLines ( double  phi,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 209 of file BuilderUtils.cc.

References M_PI, and FWProxyBuilderBase::setupAddElement().

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

209  {
210  TEveStraightLineSet* mainLine = new TEveStraightLineSet;
211  mainLine->AddLine(-5.191, phi, 0.01, 5.191, phi, 0.01);
212  pb->setupAddElement(mainLine, comp);
213 
214  phi = phi > 0 ? phi - M_PI : phi + M_PI;
215  TEveStraightLineSet* secondLine = new TEveStraightLineSet;
216  secondLine->SetLineStyle(7);
217  secondLine->AddLine(-5.191, phi, 0.01, 5.191, phi, 0.01);
218  pb->setupAddElement(secondLine, comp);
219  }
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 58 of file BuilderUtils.cc.

References diffTwoXMLs::r1, diffTwoXMLs::r2, FWProxyBuilderBase::setupAddElement(), submitPVValidationJobs::t, and funct::tan().

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

64  {
65  TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur());
66  double z1 = r_ecal / tan(theta_min);
67  if (z1 > z_ecal)
68  z1 = z_ecal;
69  if (z1 < -z_ecal)
70  z1 = -z_ecal;
71  double z2 = r_ecal / tan(theta_max);
72  if (z2 > z_ecal)
73  z2 = z_ecal;
74  if (z2 < -z_ecal)
75  z2 = -z_ecal;
76  double r1 = z_ecal * fabs(tan(theta_min));
77  if (r1 > r_ecal)
78  r1 = r_ecal;
79  if (phi < 0)
80  r1 = -r1;
81  double r2 = z_ecal * fabs(tan(theta_max));
82  if (r2 > r_ecal)
83  r2 = r_ecal;
84  if (phi < 0)
85  r2 = -r2;
86 
87  if (fabs(r2 - r1) > 1) {
88  TGeoBBox* sc_box = new TGeoBBox(0., fabs(r2 - r1) / 2, 1);
89  TEveGeoShape* element = new TEveGeoShape("r-segment");
90  element->SetShape(sc_box);
91  TEveTrans& t = element->RefMainTrans();
92  t(1, 4) = 0;
93  t(2, 4) = (r2 + r1) / 2;
94  t(3, 4) = fabs(z2) > fabs(z1) ? z2 : z1;
95  pb->setupAddElement(element, container);
96  }
97  if (fabs(z2 - z1) > 1) {
98  TGeoBBox* sc_box = new TGeoBBox(0., 1, (z2 - z1) / 2);
99  TEveGeoShape* element = new TEveGeoShape("z-segment");
100  element->SetShape(sc_box);
101  TEveTrans& t = element->RefMainTrans();
102  t(1, 4) = 0;
103  t(2, 4) = fabs(r2) > fabs(r1) ? r2 : r1;
104  t(3, 4) = (z2 + z1) / 2;
105  pb->setupAddElement(element, container);
106  }
107  }
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 FWConvTrackHitsDetailView::addHits(), FWTrackHitsDetailView::addHits(), and FWTracksRecHitsProxyBuilder::build().

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
bool isAvailable() const
Definition: Ref.h:537
Master< F > master(const F &f)
Definition: FunctClone.h:63
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:472
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
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:494
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:70
#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  }
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
tuple size
Write out results.
const TGGC & fireworks::boldGC ( )

Definition at line 11 of file GlobalContexts.cc.

References submitPVResolutionJobs::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  {
17  if (detector == MuonSubdetId::CSC || detector == MuonSubdetId::GEM || detector == MuonSubdetId::ME0) {
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 245 of file BuilderUtils.cc.

References addBox(), and energyScaledBox3DCorners().

245  {
246  std::vector<float> scaledCorners(24);
247  energyScaledBox3DCorners(corners, scale, scaledCorners, invert);
248  addBox(scaledCorners, comp, pb);
249  }
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 322 of file BuilderUtils.cc.

References addBox(), and energyTower3DCorners().

322  {
323  std::vector<float> scaledCorners(24);
324  energyTower3DCorners(corners, scale, scaledCorners, reflect);
325  addBox(scaledCorners, comp, pb);
326  }
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 279 of file BuilderUtils.cc.

References addBox(), and etScaledBox3DCorners().

280  {
281  std::vector<float> scaledCorners(24);
282  etScaledBox3DCorners(corners, energy, maxEnergy, scaledCorners, invert);
283  addBox(scaledCorners, comp, pb);
284  }
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 365 of file BuilderUtils.cc.

References addBox(), and etTower3DCorners().

365  {
366  std::vector<float> scaledCorners(24);
367  etTower3DCorners(corners, scale, scaledCorners, reflect);
368  addBox(scaledCorners, comp, pb);
369  }
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 222 of file BuilderUtils.cc.

References validate-o2o-wbm::f, mps_fire::i, and invertBox().

Referenced by drawEnergyScaledBox3D().

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

Definition at line 287 of file BuilderUtils.cc.

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

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

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

Definition at line 252 of file BuilderUtils.cc.

References c, validate-o2o-wbm::f, mps_fire::i, invertBox(), pileupReCalc_HLTpaths::scale, and funct::sin().

Referenced by drawEtScaledBox3D().

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

Definition at line 330 of file BuilderUtils.cc.

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

Referenced by drawEtTower3D().

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

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, validate-o2o-wbm::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, alignCSCRings::s, and relativeConstraints::value.

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 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 119 of file BuilderUtils.cc.

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

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

119  {
120  time_t t(event.time().value() >> 32);
121  struct tm* xx = localtime(&t);
122  std::string text(asctime(xx));
123  size_t pos = text.find('\n');
124  if (pos != std::string::npos)
125  text = text.substr(0, pos);
126  text += " ";
127  if (xx->tm_isdst)
128  text += tzname[1];
129  else
130  text += tzname[0];
131  return text;
132  }
tuple text
Definition: runonSM.py:43
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 21 of file BuilderUtils.cc.

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

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

21  {
22  double min = 100;
23  double max = -100;
24 
25  for (std::vector<double>::const_iterator i = phis.begin(); i != phis.end(); ++i) {
26  double aphi = *i;
27  // make phi continuous around jet phi
28  if (aphi - phi > M_PI)
29  aphi -= 2 * M_PI;
30  if (phi - aphi > M_PI)
31  aphi += 2 * M_PI;
32  if (aphi > max)
33  max = aphi;
34  if (aphi < min)
35  min = aphi;
36  }
37 
38  if (min > max)
39  return std::pair<double, double>(0, 0);
40 
41  return std::pair<double, double>(min, max);
42  }
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 44 of file BuilderUtils.cc.

References c.

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

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

Definition at line 109 of file BuilderUtils.cc.

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

109  {
110  time_t t(event.time().value() >> 32);
111  std::string text(asctime(gmtime(&t)));
112  size_t pos = text.find('\n');
113  if (pos != std::string::npos)
114  text = text.substr(0, pos);
115  text += " GMT";
116  return text;
117  }
tuple text
Definition: runonSM.py:43
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 FWConvTrackHitsDetailView::addModules(), FWTrackHitsDetailView::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 gpuClustering::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)
uint16_t *__restrict__ id
tuple text
Definition: runonSM.py:43
std::string fireworks::info ( const std::vector< DetId > &  idSet)

Definition at line 725 of file TrackUtils.cc.

References gpuClustering::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)
uint16_t *__restrict__ id
tuple text
Definition: runonSM.py:43
void fireworks::invertBox ( std::vector< float > &  corners)

Definition at line 134 of file BuilderUtils.cc.

References std::swap().

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

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

Definition at line 49 of file GlobalContexts.cc.

References submitPVResolutionJobs::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 CommonMethods::delta(), fwLog, fwlog::kError, hltrates_dqm_sourceclient-live_cfg::offset, and funct::tan().

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

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  }
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 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  }
const edm::EventSetup & c
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
const Point & vertex() const override
vertex position (overwritten by PF...)
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
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
double eta() const final
momentum pseudorapidity
bool fireworks::makeRhoPhiSuperCluster ( FWProxyBuilderBase pb,
const reco::SuperClusterRef iCluster,
float  iPhi,
TEveElement &  oItemHolder 
)

Definition at line 29 of file makeSuperCluster.cc.

References fireworks::Context::caloR1(), FWDisplayProperties::color(), FWProxyBuilderBase::context(), FWEventItem::defaultDisplayProperties(), dataset::end, FWGeometry::getCorners(), fireworks::Context::getGeom(), getPhiRange(), getShape(), mps_fire::i, gpuClustering::id, edm::Ref< C, T, F >::isAvailable(), FWProxyBuilderBase::item(), M_PI, colinearityKinematic::Phi, alignCSCRings::r, FWProxyBuilderBase::setupAddElement(), and trackerHitRTTI::vector.

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

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

Definition at line 69 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(), visDQMUpload::context, FWProxyBuilderBase::context(), dataset::end, FWGeometry::getCorners(), fireworks::Context::getGeom(), mps_fire::i, gpuClustering::id, edm::Ref< C, T, F >::isAvailable(), Pi, theta(), and trackerHitRTTI::vector.

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

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

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().

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(), and MICRON.

Referenced by FWSiPixelDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), 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 SplitLinear::begin, dataset::end, fireworks::Context::getInstance(), dqmiolumiharvest::j, cuda_std::lower_bound(), and MICRON.

Referenced by FWSiPixelDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), 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
static Context * getInstance()
Definition: Context.cc:193
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
string end
Definition: dataset.py:937
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(), submitPVValidationJobs::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  }
tuple propagator
virtual double pz() const =0
z coordinate of momentum vector
virtual const Point & vertex() const =0
vertex position
virtual int charge() const =0
electric charge
virtual double py() const =0
y coordinate of momentum vector
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 cms::cuda::assert(), reco::TrackBase::charge(), reco::Track::extra(), validate-o2o-wbm::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(), submitPVValidationJobs::t, reco::btau::trackMomentum, findQualityFiles::v, reco::TrackBase::vx(), reco::TrackBase::vy(), and reco::TrackBase::vz().

Referenced by FWTauProxyBuilderBase::addConstituentTracks(), FWTauProxyBuilderBase::addLeadTrack(), DummyEvelyser::analyze(), FWElectronLegoProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTrackHitsDetailView::build(), FWConvTrackHitsDetailView::build(), FWMuonBuilder::buildMuon(), 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  }
bool isAvailable() const
Definition: Ref.h:537
tuple propagator
const TrackExtraRef & extra() const
reference to &quot;extra&quot; 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:640
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
assert(be >=bs)
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
double pt() const
track transverse momentum
Definition: TrackBase.h:637
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:661
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:658
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:596
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:643
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:655
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(), edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), fwlog::kError, digitizers_cfi::pixel, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, edm::Handle< T >::product(), pushPixelCluster(), reco::Track::recHitsBegin(), and reco::Track::recHitsEnd().

Referenced by FWConvTrackHitsDetailView::addHits(), and FWTrackHitsDetailView::addHits().

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  }
bool isAvailable() const
Definition: Ref.h:537
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:472
bool get(ProductID const &, Handle< T > &) const
Definition: EventBase.h:103
data_type const * const_iterator
Definition: DetSetNew.h:31
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:70
#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, FWGeometry::localToGlobal(), SiPixelCluster::minPixelCol(), SiPixelCluster::minPixelRow(), pixelLocalX(), and pixelLocalY().

Referenced by 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:494
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
int col
Definition: cuy.py:1009
void fireworks::pushPixelHits ( std::vector< TVector3 > &  pixelPoints,
const FWEventItem iItem,
const reco::Track t 
)

Definition at line 533 of file TrackUtils.cc.

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

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

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 edm::EventSetup & c
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:472
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
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:622
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:661
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, fwlog::kError, p1, and p2.

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  }
const TString p2
Definition: fwPaths.cc:13
const TString p1
Definition: fwPaths.cc:12
#define fwLog(_level_)
Definition: fwLog.h:45
void fireworks::setTrackTypePF ( const reco::PFCandidate pfCand,
TAttLine *  track 
)

Definition at line 16 of file setTrackTypePF.cc.

References dt_dqm_sourceclient_common_cff::reco.

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  }
void fireworks::setupAddElement ( TEveElement *  el,
TEveElement *  parent,
const FWEventItem item,
bool  master,
bool  color 
)

Definition at line 299 of file TrackUtils.cc.

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

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

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  }
Master< F > master(const F &f)
Definition: FunctClone.h:63
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
assert(be >=bs)
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 funct::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
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
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.

Referenced by CMSTopTagger::_split_once(), FullModelReactionDynamics::AddBlackTrackParticles(), PFEnergyCalibration::Alpha(), HcalTestSimHitID::analyze(), MuonAlignmentAnalyzer::analyze(), BPHMonitor::analyze(), TkConvValidator::analyze(), PhotonValidator::analyze(), StudyCaloResponse::analyze(), IsolatedTracksCone::analyze(), IsolatedTracksNxN::analyze(), ThirdHitPrediction::angleRatio(), gen::PhotosppInterface::apply(), HLTMuonDimuonL3Filter::applyDiMuonSelection(), BesselI0(), BesselI1(), PFEnergyCalibration::Beta(), SiStripGainFromCalibTree::bookDQMHistos(), SiStripGainsPCLWorker::bookHistograms(), BPHDecayToTkpTknSymChargeBuilder::build(), FWJetProxyBuilder::buildViewType(), Phase2TrackerDigitizerAlgorithm::calcQ(), edm::InputTag::calcSkipCurrentProcess(), CSCWireElectronicsSim::calculateAmpResponse(), ThirdHitPrediction::calculateRangesBarrel(), ThirdHitPrediction::calculateRangesForward(), CSCSimHitMatcher::chamberIdsStation(), DTSimHitMatcher::chamberIdsStation(), L1MuonPixelTrackFitter::Circle::Circle(), DTTracoChip::clear(), AnalyticalCurvilinearJacobian::computeFullJacobian(), HcalPulseShapes::computeHFShape(), AnalyticalCurvilinearJacobian::computeStraightLineJacobian(), TwoBodyDecayTrajectoryState::construct(), PFEnergyCalibration::CorrBarrel(), HFRecoEcalCandidateAlgo::correctEPosition(), EnergyScaleCorrection::CorrectionCategory::CorrectionCategory(), correctionCategory_class::correctionCategory_class(), DynamicTruncation::correctThrByPAndEta(), PFEnergyCalibration::CorrPhi(), CaloDetIdAssociator::crossedElement(), Qjets::d_ij(), DDCompareCPV(), gen::TauolappInterface::decay(), Decay(), reco::deltaR2(), pat::helper::ParametrizationHelper::diffToParameters(), Decay3Body::doDecay(), SurveyPxbDicer::doDice(), MuonTrackValidatorBase::doProfileX(), TEveEllipsoidProjectedGL::DrawRhoPhi(), DTTracoChip::DTTracoChip(), EcalLaserAPDPNRatiosXMLTranslator::dumpXML(), EcalLinearCorrectionsXMLTranslator::dumpXML(), PFEnergyCalibration::EcorrPS(), PFEnergyCalibration::EcorrPS_ePSNil(), PFEnergyCalibration::EcorrZoneAfterPS(), PFEnergyCalibration::EcorrZoneBeforePS(), analyzer::SiPixelLorentzAngle::endJob(), L1MuonPixelTrackFitter::errCotTheta(), L1MuonPixelTrackFitter::errInversePt(), L1MuonPixelTrackFitter::errPhi(), L1MuonPixelTrackFitter::errTip(), L1MuonPixelTrackFitter::errZip(), etaCorrE1E25(), etaCorrE1E49(), etaCorrE1E9(), TMultiDimFet::EvalFactor(), AlignmentMonitorTracksFromTrajectories::event(), VVIObjFDetails::expint(), VVIObjDetails::expint(), sistripvvi::VVIObjDetails::expint(), EcalClusterEnergyCorrection::fBrem(), EcalClusterEnergyCorrection::fEta(), EcalClusterEnergyCorrectionObjectSpecific::fEta(), ZeeCalibration::fEtaBarrelBad(), ZeeCalibration::fEtaBarrelGood(), ZeeCalibration::fEtaEndcapBad(), ZeeCalibration::fEtaEndcapGood(), EcalClusterEnergyCorrection::fEtEta(), ColinearityKinematicConstraintT< Dim >::fillParametersDerivative(), DeepBoostedJetTagInfoProducer::fillParticleFeatures(), ColinearityKinematicConstraintT< Dim >::fillPositionDerivative(), QcdLowPtDQM::fillTracklets(), ColinearityKinematicConstraintT< Dim >::fillValue(), PythiaFilterIsolatedTrack::filter(), SiPixelPI::findMinMaxInMap(), OutInConversionSeedFinder::fixPointRadius(), fnc_dscb(), HiEgammaSCEnergyCorrectionAlgo::fNCrystals(), EgammaSCEnergyCorrectionAlgo::fNCrystals(), EcalLaserCondTools::from_hdf_to_db(), root::function(), PFEnergyCalibration::Gamma(), ZIterativeAlgorithmWithFit::gausfit(), funct::GaussLegendreIntegrator::GaussLegendreIntegrator(), L1MuonPixelTrackFitter::getBending(), L1MuonPixelTrackFitter::getBendingError(), MatcherUsingTracksAlgorithm::getChi2(), FWPFTrackUtils::getCollisionMarkers(), btagbtvdeep::getDRSubjetFeatures(), TwoBodyDecayLinearizationPointFinder::getLinearizationPoint(), popcon::EcalTPGPhysicsConstHandler::getNewObjects(), FastLineRecognition::getOneLine(), MuonRecoAnalyzer::GetRes(), EcalClusterEnergyUncertainty::getValue(), TrajSeedMatcher::getZVtxFromExtrapolation(), HFGflash::gfParameterization(), HankelK0(), HankelK1(), PixelTripletNoTipGenerator::hitTriplets(), HLTMuonDimuonL2Filter::hltFilter(), HLTMuonDimuonL2FromL1TFilter::hltFilter(), HLTMuonTrimuonL3Filter::hltFilter(), HLTDoublet< T1, T2 >::hltFilter(), HLTmmkkFilter::hltFilter(), HLTmmkFilter::hltFilter(), ThirdHitPredictionFromInvParabola::init(), DTBtiChip::init(), DTBtiChip::init_clock(), CMSCGEN::initialize(), ThirdHitPrediction::invertCircle(), ThirdHitPrediction::invertPoint(), ThirdHitPrediction::isCompatibleWithMultipleScattering(), CSCSegmentValidation::keyHit(), L1MuDTEtaPattern::L1MuDTEtaPattern(), L1TowerCalibrator::L1TowerCalibrator(), FWPFMaths::lineLineIntersect(), HGCalGeomParameters::loadGeometryHexagon(), DTTSPhi::localClear(), Multi5x5BremRecoveryClusterAlgo::makeIslandSuperClusters(), reco::tau::xclean::makePredicateAND(), LowPtConversion::mee(), SiPixelDigitizerAlgorithm::missCalibrate(), MasslessInvariantMass::operator()(), LinTrackCache::Vicinity::operator()(), TrackMerger::GlobalMomentumSort::operator()(), TrackMerger::MomentumSort::operator()(), DTTracoChip::operator=(), GflashEMShowerProfile::parameterization(), ColinearityKinematicConstraint::parametersDerivative(), TwoTrackMassKinematicConstraint::parametersDerivative(), pdgEntryReplace(), FullModelReactionDynamics::Poisson(), ColinearityKinematicConstraint::positionDerivative(), TwoTrackMassKinematicConstraint::positionDerivative(), FullModelHadronicProcess::PostStepDoIt(), HLTDisplacedmumumuVtxProducer::produce(), HLTDisplacedmumuVtxProducer::produce(), HLTDisplacedtktkVtxProducer::produce(), HLTmumutktkVtxProducer::produce(), PATHemisphereProducer::produce(), HLTmumutkVtxProducer::produce(), OscarMTProducer::produce(), IPProducer< Container, Base, Helper >::produce(), FullModelReactionDynamics::ProduceStrangeParticlePairs(), MuonUpdatorAtVertex::propagateToNominalLine(), ErrorCorrelationMgr::readFromReportFile(), HepMCFileReader::ReadStats(), EcalLaserAPDPNRatiosXMLTranslator::readXML(), EcalLinearCorrectionsXMLTranslator::readXML(), MultiHitGeneratorFromChi2::refit2Hits(), PFJetFilter::resolution(), PFJetFilter::response(), L1MuBMTrackAssembler::run(), L1MuDTTrackAssembler::run(), GlobalMuonTrackMatcher::samePlane(), magneticfield::BaseVolumeHandle::sameSurface(), SiG4UniversalFluctuation::SampleFluctuations(), LandauFP420::SampleFluctuations(), DTConfigTraco::setDefaults(), setPath(), magneticfield::BaseVolumeHandle::setSurface(), FWPFTrackUtils::setupLegoTrack(), Cone::side(), reco::SCDynamicDPhiParametersHelper::sortDynamicDPhiParametersCollection(), reco::MustacheSCParametersHelper::sortParabolaParametersCollection(), DAClusterizerInZ::split(), DAClusterizerInZ_vect::split(), DAClusterizerInZT_vect::split(), root::tf1(), ThirdHitPrediction::ThirdHitPrediction(), ThirdHitZPrediction::ThirdHitZPrediction(), QcdLowPtDQM::trackletVertexUnbinned(), L1MuonPixelTrackFitter::valInversePt(), ColinearityKinematicConstraint::value(), TwoTrackMassKinematicConstraint::value(), vtxMean(), EPOS::IO_EPOS::write_event(), and HtrXmlPatternWriter::writePattern().

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

Definition at line 13 of file fwPaths.cc.

Referenced by CMSTopTagger::_split_once(), FullModelReactionDynamics::AddBlackTrackParticles(), BPHDecayToTkpTknSymChargeBuilder::addParticle(), PFEnergyCalibration::Alpha(), TrackingRecoMaterialAnalyser::analyze(), HcalTestSimHitID::analyze(), MuonAlignmentAnalyzer::analyze(), BPHMonitor::analyze(), TkConvValidator::analyze(), PhotonValidator::analyze(), ThirdHitPrediction::angleRatio(), HLTMuonDimuonL3Filter::applyDiMuonSelection(), BesselI0(), BesselI1(), PFEnergyCalibration::Beta(), SiStripGainFromCalibTree::bookDQMHistos(), SiStripGainsPCLWorker::bookHistograms(), BPHX3872ToJPsiPiPiBuilder::build(), BPHDecayToTkpTknSymChargeBuilder::build(), FWJetProxyBuilder::buildViewType(), Phase2TrackerDigitizerAlgorithm::calcQ(), edm::InputTag::calcSkipCurrentProcess(), ThirdHitPrediction::calculateRangesBarrel(), ThirdHitPrediction::calculateRangesForward(), TwoBodyDecayModel::cartesianSecondaryMomenta(), DTSimHitMatcher::chamberIdsStation(), CSCSimHitMatcher::chamberIdsStation(), L1MuonPixelTrackFitter::Circle::Circle(), EventShapeVariables::compTensorsAndVectors(), MultipleScatteringUpdator::compute(), MultipleScatteringSimulator::compute(), EnergyLossSimulator::compute(), EnergyLossUpdator::computeBetheBloch(), EnergyLossUpdator::computeElectrons(), AnalyticalCurvilinearJacobian::computeFullJacobian(), HcalPulseShapes::computeHFShape(), l1tpf_impl::PuppiAlgo::computePuppiAlphas(), l1tpf_impl::PuppiAlgo::computePuppiMedRMS(), TwoBodyDecayTrajectoryState::construct(), PFEnergyCalibration::CorrBarrel(), HFRecoEcalCandidateAlgo::correctEPosition(), EnergyScaleCorrection::CorrectionCategory::CorrectionCategory(), correctionCategory_class::correctionCategory_class(), PFEnergyCalibration::CorrPhi(), MuonSensitiveDetector::createHit(), CaloDetIdAssociator::crossedElement(), MuonShowerInformationFiller::crossingPoint(), Qjets::d_ij(), DDCompareCPV(), Decay(), reco::deltaR2(), pat::helper::ParametrizationHelper::diffToParameters(), Decay3Body::doDecay(), SurveyPxbDicer::doDice(), TwoBodyDecayDerivatives::dqsdm(), TwoBodyDecayDerivatives::dqsdpx(), TwoBodyDecayDerivatives::dqsdpy(), TwoBodyDecayDerivatives::dqsdpz(), TwoBodyDecayDerivatives::dqsdtheta(), TEveEllipsoidProjectedGL::DrawRhoPhi(), EcalLaserAPDPNRatiosXMLTranslator::dumpXML(), EcalLinearCorrectionsXMLTranslator::dumpXML(), PFEnergyCalibration::EcorrPS(), PFEnergyCalibration::EcorrPS_ePSNil(), PFEnergyCalibration::EcorrZoneAfterPS(), PFEnergyCalibration::EcorrZoneBeforePS(), etaCorrE1E25(), etaCorrE1E49(), etaCorrE1E9(), TMultiDimFet::EvalFactor(), AlignmentMonitorTracksFromTrajectories::event(), VVIObjFDetails::expint(), VVIObjDetails::expint(), sistripvvi::VVIObjDetails::expint(), EcalClusterEnergyCorrection::fBrem(), lowptgsfeleid::features_V0(), lowptgsfeleid::features_V1(), ZeeCalibration::fEtaBarrelBad(), ZeeCalibration::fEtaBarrelGood(), ZeeCalibration::fEtaEndcapBad(), ZeeCalibration::fEtaEndcapGood(), EcalClusterEnergyCorrection::fEtEta(), ColinearityKinematicConstraintT< Dim >::fillParametersDerivative(), DeepBoostedJetTagInfoProducer::fillParticleFeatures(), ColinearityKinematicConstraintT< Dim >::fillPositionDerivative(), QcdLowPtDQM::fillTracklets(), ColinearityKinematicConstraintT< Dim >::fillValue(), PythiaFilterIsolatedTrack::filter(), SiPixelPI::findMinMaxInMap(), ThirdHitPrediction::findTouchingCircles(), OutInConversionSeedFinder::fixPointRadius(), fnc_dscb(), HiEgammaSCEnergyCorrectionAlgo::fNCrystals(), EgammaSCEnergyCorrectionAlgo::fNCrystals(), EcalLaserCondTools::from_hdf_to_db(), root::function(), PFEnergyCalibration::Gamma(), funct::GaussLegendreIntegrator::GaussLegendreIntegrator(), L1MuonPixelTrackFitter::getBending(), MatcherUsingTracksAlgorithm::getChi2(), FWPFTrackUtils::getCollisionMarkers(), btagbtvdeep::getDRSubjetFeatures(), TwoBodyDecayLinearizationPointFinder::getLinearizationPoint(), popcon::EcalTPGPhysicsConstHandler::getNewObjects(), FastLineRecognition::getOneLine(), MuonRecoAnalyzer::GetRes(), pat::helper::ResolutionHelper::getResolEt(), EcalClusterEnergyUncertainty::getValue(), TrajSeedMatcher::getZVtxFromExtrapolation(), HFGflash::gfParameterization(), HankelK0(), HankelK1(), HelixArbitraryPlaneCrossing::HelixArbitraryPlaneCrossing(), HelixArbitraryPlaneCrossing2Order::HelixArbitraryPlaneCrossing2Order(), HelixBarrelCylinderCrossing::HelixBarrelCylinderCrossing(), HelixForwardPlaneCrossing::HelixForwardPlaneCrossing(), PixelTripletNoTipGenerator::hitTriplets(), HLTMuonDimuonL2Filter::hltFilter(), HLTMuonDimuonL2FromL1TFilter::hltFilter(), HLTMuonTrimuonL3Filter::hltFilter(), HLTDoublet< T1, T2 >::hltFilter(), HLTmmkFilter::hltFilter(), HLTmmkkFilter::hltFilter(), ThirdHitPredictionFromInvParabola::init(), CMSCGEN::initialize(), fastsim::EnergyLoss::interact(), fastsim::MultipleScattering::interact(), ThirdHitPrediction::isCompatibleWithMultipleScattering(), jacobianCartesianToCurvilinear(), jacobianCurvilinearToCartesian(), CSCSegmentValidation::keyHit(), L1MuDTEtaPattern::L1MuDTEtaPattern(), L1TowerCalibrator::L1TowerCalibrator(), HGCalGeomParameters::loadGeometryHexagon(), Multi5x5BremRecoveryClusterAlgo::makeIslandSuperClusters(), reco::tau::xclean::makePredicateAND(), LowPtConversion::mee(), SiPixelDigitizerAlgorithm::missCalibrate(), reco::PFDisplacedVertex::momentum(), MasslessInvariantMass::operator()(), LinTrackCache::Vicinity::operator()(), TrackMerger::GlobalMomentumSort::operator()(), TrackMerger::MomentumSort::operator()(), GflashEMShowerProfile::parameterization(), ColinearityKinematicConstraint::parametersDerivative(), TwoTrackMassKinematicConstraint::parametersDerivative(), pdgEntryReplace(), FullModelReactionDynamics::Poisson(), ColinearityKinematicConstraint::positionDerivative(), TwoTrackMassKinematicConstraint::positionDerivative(), HLTDisplacedmumumuVtxProducer::produce(), HLTDisplacedmumuVtxProducer::produce(), HLTDisplacedtktkVtxProducer::produce(), HLTmumutktkVtxProducer::produce(), PATHemisphereProducer::produce(), HLTmumutkVtxProducer::produce(), OscarMTProducer::produce(), IPProducer< Container, Base, Helper >::produce(), MuonUpdatorAtVertex::propagateToNominalLine(), ErrorCorrelationMgr::readFromReportFile(), HepMCFileReader::ReadStats(), EcalLinearCorrectionsXMLTranslator::readXML(), EcalLaserAPDPNRatiosXMLTranslator::readXML(), MultiHitGeneratorFromChi2::refit2Hits(), PFJetFilter::resolution(), PFJetFilter::response(), TwoBodyDecayModel::rotationMatrix(), L1MuBMTrackAssembler::run(), L1MuDTTrackAssembler::run(), GlobalMuonTrackMatcher::samePlane(), magneticfield::BaseVolumeHandle::sameSurface(), SiG4UniversalFluctuation::SampleFluctuations(), LandauFP420::SampleFluctuations(), setPath(), magneticfield::BaseVolumeHandle::setSurface(), FWPFTrackUtils::setupLegoTrack(), reco::SCDynamicDPhiParametersHelper::sortDynamicDPhiParametersCollection(), reco::MustacheSCParametersHelper::sortParabolaParametersCollection(), DAClusterizerInZ::split(), DAClusterizerInZ_vect::split(), DAClusterizerInZT_vect::split(), root::tf1(), ThirdHitPrediction::ThirdHitPrediction(), ThirdHitPredictionFromCircle::ThirdHitPredictionFromCircle(), QcdLowPtDQM::trackletVertexUnbinned(), MuonSensitiveDetector::updateHit(), L1MuonPixelTrackFitter::valInversePt(), ColinearityKinematicConstraint::value(), TwoTrackMassKinematicConstraint::value(), EPOS::IO_EPOS::write_event(), and HtrXmlPatternWriter::writePattern().

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