CMS 3D CMS Logo

Namespaces | Classes | Functions | Variables
fireworks Namespace Reference

Namespaces

 expression
 
 geometry
 
 table
 

Classes

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

Functions

bool acceptDataFormatsVersion (TString &n)
 
void addBox (const std::vector< float > &corners, TEveElement *, FWProxyBuilderBase *)
 
void addCircle (double eta, double phi, double radius, const unsigned int nLineSegments, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addDashedArrow (double phi, double size, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addDashedLine (double phi, double theta, double size, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addDoubleLines (double phi, TEveElement *comp, FWProxyBuilderBase *pb)
 
void addRhoZEnergyProjection (FWProxyBuilderBase *, TEveElement *, double r_ecal, double z_ecal, double theta_min, double theta_max, double phi)
 
void addSiStripClusters (const FWEventItem *iItem, const reco::Track &t, class TEveElement *tList, bool addNearbyClusters, bool master)
 
void addStraightLineSegment (TEveStraightLineSet *marker, reco::Candidate const *cand, double scale_factor=2)
 
const TGGC & boldGC ()
 
void createSegment (int detector, bool matchedSegment, float segmentLength, float segmentLimit, float *segmentPosition, float *segmentDirection, float *segmentInnerPoint, float *segmentOuterPoint)
 
const TString datadir ("/src/Fireworks/Core/")
 
void drawEnergyScaledBox3D (const float *corners, float scale, TEveElement *, FWProxyBuilderBase *, bool invert=false)
 
void drawEnergyTower3D (const float *corners, float scale, TEveElement *, FWProxyBuilderBase *, bool reflect=false)
 
void drawEtScaledBox3D (const float *corners, float energy, float maxEnergy, TEveElement *, FWProxyBuilderBase *, bool reflect=false)
 
void drawEtTower3D (const float *corners, float scale, TEveElement *, FWProxyBuilderBase *, bool reflect=false)
 
void energyScaledBox3DCorners (const float *corners, float scale, std::vector< float > &, bool invert=false)
 
void energyTower3DCorners (const float *corners, float scale, std::vector< float > &, bool reflect=false)
 
void etScaledBox3DCorners (const float *corners, float energy, float maxEnergy, std::vector< float > &scaledCorners, bool reflect=false)
 
void etTower3DCorners (const float *corners, float scale, std::vector< float > &, bool reflect=false)
 
const SiStripClusterextractClusterFromTrackingRecHit (const TrackingRecHit *rh)
 
void GetColorValuesForPaletteExtra (float(*iColors)[3], unsigned int iSize, FWColorManager::EPalette id, bool isWhiteBg)
 
void getDecomposedVersion (const TString &s, int *out)
 
std::string getLocalTime (const edm::EventBase &event)
 
std::pair< double, double > getPhiRange (const std::vector< double > &phis, double phi)
 
TEveGeoShape * getShape (const char *name, TGeoBBox *shape, Color_t color)
 
std::string getTimeGMT (const edm::EventBase &event)
 
const TGGC & greenGC ()
 
std::string info (const DetId &)
 
std::string info (const std::set< DetId > &)
 
std::string info (const std::vector< DetId > &)
 
void invertBox (std::vector< float > &corners)
 
const TGGC & italicGC ()
 
void localSiStrip (short strip, float *localTop, float *localBottom, const float *pars, unsigned int id)
 
TEveJetCone * makeEveJetCone (const reco::Jet &iData, const fireworks::Context &context)
 
bool makeRhoPhiSuperCluster (FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
 
bool makeRhoZSuperCluster (FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
 
float 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 float s_forBlack [][3]
 
static const float s_forWhite [][3]
 
static const unsigned int s_size = sizeof(s_forBlack)/sizeof(s_forBlack[0])
 
static const std::string subdets [7] = { "UNKNOWN", "PXB", "PXF", "TIB", "TID", "TOB", "TEC" }
 

Function Documentation

bool fireworks::acceptDataFormatsVersion ( TString &  n)

Definition at line 71 of file fwPaths.cc.

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

Referenced by FWFileEntry::openFile().

72 {
73  int data[] = {0, 0, 0};
74  getDecomposedVersion(processConfigurationVersion, data);
75 
76 
77  int* running = supportedDataFormatsVersion();
78  if ((data[0] == 6 && running[0] == 5 && running[1] > 1) ||
79  (data[0] == 5 && data[1] > 1 && running[0] == 6))
80  return true;
81  else
82  return data[0] == running[0];
83 }
void getDecomposedVersion(const TString &s, int *out)
Definition: fwPaths.cc:30
int * supportedDataFormatsVersion()
Definition: fwPaths.cc:43
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void fireworks::addBox ( const std::vector< float > &  corners,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 148 of file BuilderUtils.cc.

References FWProxyBuilderBase::setupAddElement().

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

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

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

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

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

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

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

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

Definition at line 185 of file BuilderUtils.cc.

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

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

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

Definition at line 201 of file BuilderUtils.cc.

References M_PI, and FWProxyBuilderBase::setupAddElement().

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

202  {
203  TEveStraightLineSet* mainLine = new TEveStraightLineSet;
204  mainLine->AddLine( -5.191, phi, 0.01, 5.191, phi, 0.01 );
205  pb->setupAddElement( mainLine, comp );
206 
207  phi = phi > 0 ? phi - M_PI : phi + M_PI;
208  TEveStraightLineSet* secondLine = new TEveStraightLineSet;
209  secondLine->SetLineStyle( 7 );
210  secondLine->AddLine( -5.191, phi, 0.01, 5.191, phi, 0.01 );
211  pb->setupAddElement( secondLine, comp );
212  }
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 60 of file BuilderUtils.cc.

References diffTwoXMLs::r1, diffTwoXMLs::r2, FWProxyBuilderBase::setupAddElement(), lumiQTWidget::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 ) z1 = z_ecal;
68  if( z1 < -z_ecal ) z1 = -z_ecal;
69  double z2 = r_ecal / tan( theta_max );
70  if( z2 > z_ecal ) z2 = z_ecal;
71  if( z2 < -z_ecal ) z2 = -z_ecal;
72  double r1 = z_ecal * fabs( tan( theta_min ));
73  if( r1 > r_ecal ) r1 = r_ecal;
74  if( phi < 0 ) r1 = -r1;
75  double r2 = z_ecal * fabs( tan( theta_max ));
76  if( r2 > r_ecal ) r2 = r_ecal;
77  if( phi < 0 ) r2 = -r2;
78 
79  if( fabs(r2 - r1) > 1 )
80  {
81  TGeoBBox *sc_box = new TGeoBBox( 0., fabs( r2 - r1 ) / 2, 1 );
82  TEveGeoShape *element = new TEveGeoShape("r-segment");
83  element->SetShape(sc_box);
84  TEveTrans &t = element->RefMainTrans();
85  t(1,4) = 0;
86  t(2,4) = (r2+r1)/2;
87  t(3,4) = fabs(z2)>fabs(z1) ? z2 : z1;
88  pb->setupAddElement(element, container);
89  }
90  if( fabs(z2 - z1) > 1 )
91  {
92  TGeoBBox *sc_box = new TGeoBBox( 0., 1, ( z2 - z1 ) / 2 );
93  TEveGeoShape *element = new TEveGeoShape("z-segment");
94  element->SetShape( sc_box );
95  TEveTrans &t = element->RefMainTrans();
96  t(1,4) = 0;
97  t(2,4) = fabs(r2)>fabs(r1) ? r2 : r1;
98  t(3,4) = (z2+z1)/2;
99  pb->setupAddElement(element, container);
100  }
101  }
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 358 of file TrackUtils.cc.

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

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

359 {
360  // master is true if the product is for proxy builder
361  const FWGeometry *geom = iItem->getGeom();
362 
363  const edmNew::DetSetVector<SiStripCluster> * allClusters = 0;
364  if( addNearbyClusters )
365  {
366  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
367  {
368  if( typeid( **it ) == typeid( SiStripRecHit2D ))
369  {
370  const SiStripRecHit2D &hit = static_cast<const SiStripRecHit2D &>( **it );
371  if( hit.cluster().isNonnull() && hit.cluster().isAvailable())
372  {
374  iItem->getEvent()->get(hit.cluster().id(), allClustersHandle);
375  allClusters = allClustersHandle.product();
376  break;
377  }
378  }
379  else if( typeid( **it ) == typeid( SiStripRecHit1D ))
380  {
381  const SiStripRecHit1D &hit = static_cast<const SiStripRecHit1D &>( **it );
382  if( hit.cluster().isNonnull() && hit.cluster().isAvailable())
383  {
385  iItem->getEvent()->get(hit.cluster().id(), allClustersHandle);
386  allClusters = allClustersHandle.product();
387  break;
388  }
389  }
390  }
391  }
392 
393  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
394  {
395  unsigned int rawid = (*it)->geographicalId();
396  if( ! geom->contains( rawid ))
397  {
399  << "failed to get geometry of SiStripCluster with detid: "
400  << rawid << std::endl;
401 
402  continue;
403  }
404 
405  const float* pars = geom->getParameters( rawid );
406 
407  // -- get phi from SiStripHit
408  auto rechitRef = *it;
409  const TrackingRecHit *rechit = &( *rechitRef );
410  const SiStripCluster *cluster = extractClusterFromTrackingRecHit( rechit );
411 
412  if( cluster )
413  {
414  if( allClusters != 0 )
415  {
416  const edmNew::DetSet<SiStripCluster> & clustersOnThisDet = (*allClusters)[rechit->geographicalId().rawId()];
417 
418  for( edmNew::DetSet<SiStripCluster>::const_iterator itc = clustersOnThisDet.begin(), edc = clustersOnThisDet.end(); itc != edc; ++itc )
419  {
420 
421  TEveStraightLineSet *scposition = new TEveStraightLineSet;
422  scposition->SetDepthTest( false );
423  scposition->SetPickable( kTRUE );
424 
425  short firststrip = itc->firstStrip();
426 
427  if( &*itc == cluster )
428  {
429  scposition->SetTitle( Form( "Exact SiStripCluster from TrackingRecHit, first strip %d", firststrip ));
430  scposition->SetLineColor( kGreen );
431  }
432  else
433  {
434  scposition->SetTitle( Form( "SiStripCluster, first strip %d", firststrip ));
435  scposition->SetLineColor( kRed );
436  }
437 
438  float localTop[3] = { 0.0, 0.0, 0.0 };
439  float localBottom[3] = { 0.0, 0.0, 0.0 };
440 
441  fireworks::localSiStrip( firststrip, localTop, localBottom, pars, rawid );
442 
443  float globalTop[3];
444  float globalBottom[3];
445  geom->localToGlobal( rawid, localTop, globalTop, localBottom, globalBottom );
446 
447  scposition->AddLine( globalTop[0], globalTop[1], globalTop[2],
448  globalBottom[0], globalBottom[1], globalBottom[2] );
449 
450  setupAddElement( scposition, tList, iItem, master, false );
451  }
452  }
453  else
454  {
455  short firststrip = cluster->firstStrip();
456  TEveStraightLineSet *scposition = new TEveStraightLineSet;
457  scposition->SetDepthTest( false );
458  scposition->SetPickable( kTRUE );
459  scposition->SetTitle( Form( "SiStripCluster, first strip %d", firststrip ));
460 
461  float localTop[3] = { 0.0, 0.0, 0.0 };
462  float localBottom[3] = { 0.0, 0.0, 0.0 };
463 
464  fireworks::localSiStrip( firststrip, localTop, localBottom, pars, rawid );
465 
466  float globalTop[3];
467  float globalBottom[3];
468  geom->localToGlobal( rawid, localTop, globalTop, localBottom, globalBottom );
469 
470  scposition->AddLine( globalTop[0], globalTop[1], globalTop[2],
471  globalBottom[0], globalBottom[1], globalBottom[2] );
472 
473  setupAddElement( scposition, tList, iItem, master, true );
474  }
475  }
476  else if( !rechit->isValid() && ( rawid != 0 )) // lost hit
477  {
478  if( allClusters != 0 )
479  {
480  edmNew::DetSetVector<SiStripCluster>::const_iterator itds = allClusters->find( rawid );
481  if( itds != allClusters->end())
482  {
483  const edmNew::DetSet<SiStripCluster> & clustersOnThisDet = *itds;
484  for( edmNew::DetSet<SiStripCluster>::const_iterator itc = clustersOnThisDet.begin(), edc = clustersOnThisDet.end(); itc != edc; ++itc )
485  {
486  short firststrip = itc->firstStrip();
487 
488  TEveStraightLineSet *scposition = new TEveStraightLineSet;
489  scposition->SetDepthTest( false );
490  scposition->SetPickable( kTRUE );
491  scposition->SetTitle( Form( "Lost SiStripCluster, first strip %d", firststrip ));
492 
493  float localTop[3] = { 0.0, 0.0, 0.0 };
494  float localBottom[3] = { 0.0, 0.0, 0.0 };
495 
496  fireworks::localSiStrip( firststrip, localTop, localBottom, pars, rawid );
497 
498  float globalTop[3];
499  float globalBottom[3];
500  geom->localToGlobal( rawid, localTop, globalTop, localBottom, globalBottom );
501 
502  scposition->AddLine( globalTop[0], globalTop[1], globalTop[2],
503  globalBottom[0], globalBottom[1], globalBottom[2] );
504 
505 
506  setupAddElement( scposition, tList, iItem, master, false );
507  scposition->SetLineColor( kRed );
508  }
509  }
510  }
511  }
512  else
513  {
515  << "*ANOTHER* option possible: valid=" << rechit->isValid()
516  << ", rawid=" << rawid << std::endl;
517  }
518  }
519 }
ClusterRef cluster() const
bool isAvailable() const
Definition: Ref.h:576
Master< F > master(const F &f)
Definition: FunctClone.h:68
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:302
bool get(ProductID const &, Handle< T > &) const
Definition: EventBase.h:106
uint16_t firstStrip() const
data_type const * const_iterator
Definition: DetSetNew.h:30
ProductID id() const
Accessor for product ID.
Definition: Ref.h:258
void localSiStrip(short strip, float *localTop, float *localBottom, const float *pars, unsigned int id)
Definition: TrackUtils.cc:268
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const SiStripCluster * extractClusterFromTrackingRecHit(const TrackingRecHit *rh)
Definition: TrackUtils.cc:335
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:334
ClusterRef cluster() const
bool contains(unsigned int id) const
Definition: FWGeometry.h:110
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:104
const edm::EventBase * getEvent() const
Definition: FWEventItem.h:148
T const * product() const
Definition: Handle.h:81
#define fwLog(_level_)
Definition: fwLog.h:50
bool isValid() const
const_iterator find(id_type i, bool update=false) const
iterator end()
Definition: DetSetNew.h:70
DetId geographicalId() const
void setupAddElement(TEveElement *el, TEveElement *parent, const FWEventItem *item, bool master, bool color)
Definition: TrackUtils.cc:313
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:683
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:109
iterator begin()
Definition: DetSetNew.h:67
void fireworks::addStraightLineSegment ( TEveStraightLineSet *  marker,
reco::Candidate const *  cand,
double  scale_factor = 2 
)

Definition at line 23 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().

26 {
27  double phi = cand->phi();
28  double theta = cand->theta();
29  double size = cand->pt() * scale_factor;
30  marker->AddLine( 0, 0, 0, size * cos(phi)*sin(theta), size *sin(phi)*sin(theta), size*cos(theta));
31 }
size
Write out results.
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const TGGC & fireworks::boldGC ( )

Definition at line 12 of file GlobalContexts.cc.

References edmIntegrityCheck::pool.

Referenced by FWPSetTableManager::cellRenderer().

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

Definition at line 10 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().

18  {
20  {
21  if( matchedSegment )
22  {
23  segmentOuterPoint[0] = segmentPosition[0] + segmentLength*segmentDirection[0];
24  segmentOuterPoint[1] = segmentPosition[1] + segmentLength*segmentDirection[1];
25  segmentOuterPoint[2] = segmentLength;
26 
27  if( fabs(segmentOuterPoint[1]) > segmentLimit )
28  segmentOuterPoint[1] = segmentLimit * ( segmentOuterPoint[1] / fabs( segmentOuterPoint[1] ));
29 
30  segmentInnerPoint[0] = segmentPosition[0] - segmentLength*segmentDirection[0];
31  segmentInnerPoint[1] = segmentPosition[1] - segmentLength*segmentDirection[1];
32  segmentInnerPoint[2] = -segmentLength;
33 
34  if( fabs(segmentInnerPoint[1]) > segmentLimit )
35  segmentInnerPoint[1] = segmentLimit * ( segmentInnerPoint[1] / fabs( segmentInnerPoint[1] ));
36 
37  return;
38  }
39  else
40  {
41  segmentOuterPoint[0] = segmentPosition[0] + segmentDirection[0] * ( segmentPosition[2] / segmentDirection[2] );
42  segmentOuterPoint[1] = segmentPosition[1] + segmentDirection[1] * ( segmentPosition[2] / segmentDirection[2] );
43  segmentOuterPoint[2] = segmentPosition[2];
44 
45  if( fabs( segmentOuterPoint[1] ) > segmentLength )
46  segmentOuterPoint[1] = segmentLength * ( segmentOuterPoint[1]/fabs( segmentOuterPoint[1] ));
47 
48  segmentInnerPoint[0] = segmentPosition[0] - segmentDirection[0] * ( segmentPosition[2] / segmentDirection[2] );
49  segmentInnerPoint[1] = segmentPosition[1] - segmentDirection[1] * ( segmentPosition[2] / segmentDirection[2] );
50  segmentInnerPoint[2] = -segmentPosition[2];
51 
52  if( fabs( segmentInnerPoint[1] ) > segmentLength )
53  segmentInnerPoint[1] = segmentLength * ( segmentInnerPoint[1] / fabs( segmentInnerPoint[1] ));
54 
55  return;
56  }
57  }
58 
59  if ( detector == MuonSubdetId::DT )
60  {
61  if( matchedSegment )
62  {
63  segmentOuterPoint[0] = segmentPosition[0] + segmentLength*segmentDirection[0];
64  segmentOuterPoint[1] = segmentPosition[1] + segmentLength*segmentDirection[1];
65  segmentOuterPoint[2] = segmentLength;
66 
67  segmentInnerPoint[0] = segmentPosition[0] - segmentLength*segmentDirection[0];
68  segmentInnerPoint[1] = segmentPosition[1] - segmentLength*segmentDirection[1];
69  segmentInnerPoint[2] = -segmentLength;
70 
71  return;
72  }
73  else
74  {
75  double mag = sqrt( segmentDirection[0] * segmentDirection[0] +
76  segmentDirection[1] * segmentDirection[1] +
77  segmentDirection[2] * segmentDirection[2] );
78 
79  double theta = atan2( sqrt( segmentDirection[0] * segmentDirection[0]
80  + segmentDirection[1] * segmentDirection[1] ), segmentDirection[2] );
81 
82  double newSegmentLength = segmentLength / cos( theta );
83 
84  segmentInnerPoint[0] = segmentPosition[0] + ( segmentDirection[0] / mag ) * newSegmentLength;
85  segmentInnerPoint[1] = segmentPosition[1] + ( segmentDirection[1] / mag ) * newSegmentLength;
86  segmentInnerPoint[2] = segmentPosition[2] + ( segmentDirection[2] / mag ) * newSegmentLength;
87 
88  segmentOuterPoint[0] = segmentPosition[0] - ( segmentDirection[0] / mag ) * newSegmentLength;
89  segmentOuterPoint[1] = segmentPosition[1] - ( segmentDirection[1] / mag ) * newSegmentLength;
90  segmentOuterPoint[2] = segmentPosition[2] - ( segmentDirection[2] / mag ) * newSegmentLength;
91 
92  if( fabs(segmentOuterPoint[0]) > segmentLimit )
93  {
94  segmentOuterPoint[0] = segmentLimit * ( segmentOuterPoint[0]/fabs( segmentOuterPoint[0] ));
95  segmentOuterPoint[1] = ( segmentOuterPoint[1]/fabs( segmentOuterPoint[1] )) * tan( theta );
96  }
97 
98  return;
99  }
100  }
101 
102  fwLog( fwlog::kWarning ) << "MuonSubdetId: " << detector << std::endl;
103  return;
104  }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
static const int GEM
Definition: MuonSubdetId.h:15
Geom::Theta< T > theta() const
static const int ME0
Definition: MuonSubdetId.h:16
static const int CSC
Definition: MuonSubdetId.h:13
T sqrt(T t)
Definition: SSEVec.h:18
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
#define fwLog(_level_)
Definition: fwLog.h:50
static const int DT
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 241 of file BuilderUtils.cc.

References addBox(), and energyScaledBox3DCorners().

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

References addBox(), and energyTower3DCorners().

326  {
327  std::vector<float> scaledCorners( 24 );
328  energyTower3DCorners(corners, scale, scaledCorners, reflect);
329  addBox( scaledCorners, comp, pb );
330  }
void energyTower3DCorners(const float *corners, float scale, std::vector< float > &, bool reflect=false)
void addBox(const std::vector< float > &corners, TEveElement *, FWProxyBuilderBase *)
void fireworks::drawEtScaledBox3D ( const float *  corners,
float  energy,
float  maxEnergy,
TEveElement *  comp,
FWProxyBuilderBase pb,
bool  reflect = false 
)

Definition at line 278 of file BuilderUtils.cc.

References addBox(), and etScaledBox3DCorners().

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

Definition at line 374 of file BuilderUtils.cc.

References addBox(), and etTower3DCorners().

375  {
376  std::vector<float> scaledCorners( 24 );
377  etTower3DCorners(corners, scale, scaledCorners, reflect);
378  addBox( scaledCorners, comp, pb );
379  }
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 215 of file BuilderUtils.cc.

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

Referenced by drawEnergyScaledBox3D().

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

Definition at line 286 of file BuilderUtils.cc.

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

Referenced by FWPRCaloTowerProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWPCaloHitProxyBuilder::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  {
293  // We know, that an ES rechit geometry in -Z needs correction.
294  // The back face is actually its front face.
295  for( unsigned int i = 0; i < 12; i += 3 )
296  {
297  TEveVector diff( corners[i] - corners[i + 12], corners[i + 1] - corners[i + 13], corners[i + 2] - corners[i + 14] );
298  diff.Normalize();
299  diff *= scale;
300 
301  scaledCorners[i] = corners[i] + diff.fX;
302  scaledCorners[i + 1] = corners[i + 1] + diff.fY;
303  scaledCorners[i + 2] = corners[i + 2] + diff.fZ;
304  }
305  }
306  else
307  {
308  for( unsigned int i = 0; i < 12; i += 3 )
309  {
310  TEveVector diff( corners[i + 12] - corners[i], corners[i + 13] - corners[i + 1], corners[i + 14] - corners[i + 2] );
311  diff.Normalize();
312  diff *= scale;
313 
314  scaledCorners[i] = corners[i + 12];
315  scaledCorners[i + 1] = corners[i + 13];
316  scaledCorners[i + 2] = corners[i + 14];
317 
318  scaledCorners[i + 12] = corners[i + 12] + diff.fX;
319  scaledCorners[i + 13] = corners[i + 13] + diff.fY;
320  scaledCorners[i + 14] = corners[i + 14] + diff.fZ;
321  }
322  }
323  }
void fireworks::etScaledBox3DCorners ( const float *  corners,
float  energy,
float  maxEnergy,
std::vector< float > &  scaledCorners,
bool  reflect = false 
)

Definition at line 249 of file BuilderUtils.cc.

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

Referenced by drawEtScaledBox3D().

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

Definition at line 334 of file BuilderUtils.cc.

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

Referenced by drawEtTower3D().

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

Definition at line 335 of file TrackUtils.cc.

References fwLog, and fwlog::kDebug.

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

336 {
337  const SiStripCluster* cluster = 0;
338 
339  if( const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>( rechit ))
340  {
341  fwLog( fwlog::kDebug ) << "hit 2D ";
342 
343  cluster = hit2D->cluster().get();
344  }
345  if( cluster == 0 )
346  {
347  if( const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>( rechit ))
348  {
349  fwLog( fwlog::kDebug ) << "hit 1D ";
350 
351  cluster = hit1D->cluster().get();
352  }
353  }
354  return cluster;
355 }
#define fwLog(_level_)
Definition: fwLog.h:50
void fireworks::GetColorValuesForPaletteExtra ( float(*)  iColors[3],
unsigned int  iSize,
FWColorManager::EPalette  id,
bool  isWhiteBg 
)

Definition at line 152 of file fwPaletteExtra.cc.

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

Referenced by FWColorManager::initColorTable().

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

Definition at line 30 of file fwPaths.cc.

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

31 {
32  TPMERegexp re("CMSSW_(\\d+)_(\\d+)_");
33  re.Match(s);
34  if (re.NMatches() > 2)
35  {
36  out[0] = re[1].Atoi();
37  out[1] = re[2].Atoi();
38  }
39 }
std::string fireworks::getLocalTime ( const edm::EventBase event)

Definition at line 113 of file BuilderUtils.cc.

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

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

114  {
115 
116  time_t t( event.time().value() >> 32 );
117  struct tm * xx = localtime( &t );
118  std::string text( asctime(xx) );
119  size_t pos = text.find('\n');
120  if( pos != std::string::npos ) text = text.substr( 0, pos );
121  text += " ";
122  if( xx->tm_isdst )
123  text += tzname[1];
124  else
125  text += tzname[0];
126  return text;
127  }
TimeValue_t value() const
Definition: Timestamp.h:56
edm::Timestamp time() const
Definition: EventBase.h:61
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, hpstanc_transforms::max, and min().

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

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

References EnergyCorrector::c.

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

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

Definition at line 103 of file BuilderUtils.cc.

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

104  {
105  time_t t( event.time().value() >> 32 );
106  std::string text( asctime( gmtime( &t ) ) );
107  size_t pos = text.find( '\n' );
108  if( pos != std::string::npos ) text = text.substr( 0, pos );
109  text += " GMT";
110  return text;
111  }
TimeValue_t value() const
Definition: Timestamp.h:56
edm::Timestamp time() const
Definition: EventBase.h:61
const TGGC & fireworks::greenGC ( )

Definition at line 39 of file GlobalContexts.cc.

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

Definition at line 663 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, 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(), PXBDetId::layer(), TOBDetId::layer(), TIBDetId::layer(), ME0DetId::layer(), CSCDetId::layer(), GEMDetId::layer(), RPCDetId::layer(), MuonSubdetId::ME0, DetId::Muon, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, ME0DetId::region(), GEMDetId::region(), RPCDetId::region(), GEMDetId::ring(), RPCDetId::ring(), CSCDetId::ring(), RPCDetId::roll(), MuonSubdetId::RPC, DTChamberId::sector(), RPCDetId::sector(), DTChamberId::station(), GEMDetId::station(), CSCDetId::station(), RPCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), RPCDetId::subsector(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, EBDetId::tower_ieta(), EBDetId::tower_iphi(), DetId::Tracker, DTChamberId::wheel(), TIDDetId::wheel(), and TECDetId::wheel().

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

663  {
664  std::ostringstream oss;
665 
666  oss << "DetId: " << id.rawId() << "\n";
667 
668  switch ( id.det() ) {
669 
670  case DetId::Tracker:
671  switch ( id.subdetId() ) {
673  {
674  oss <<"TIB "<<TIBDetId(id).layer();
675  }
676  break;
678  {
679  oss <<"TOB "<<TOBDetId(id).layer();
680  }
681  break;
683  {
684  oss <<"TEC "<<TECDetId(id).wheel();
685  }
686  break;
688  {
689  oss <<"TID "<<TIDDetId(id).wheel();
690  }
691  break;
693  {
694  oss <<"PixBarrel "<< PXBDetId(id).layer();
695  }
696  break;
698  {
699  oss <<"PixEndcap "<< PXBDetId(id).layer();
700  }
701  break;
702  }
703  break;
704 
705  case DetId::Muon:
706  switch ( id.subdetId() ) {
707  case MuonSubdetId::DT:
708  {
709  DTChamberId detId(id.rawId());
710  oss << "DT chamber (wheel, station, sector): "
711  << detId.wheel() << ", "
712  << detId.station() << ", "
713  << detId.sector();
714  }
715  break;
716  case MuonSubdetId::CSC:
717  {
718  CSCDetId detId(id.rawId());
719  oss << "CSC chamber (endcap, station, ring, chamber, layer): "
720  << detId.endcap() << ", "
721  << detId.station() << ", "
722  << detId.ring() << ", "
723  << detId.chamber() << ", "
724  << detId.layer();
725  }
726  break;
727  case MuonSubdetId::RPC:
728  {
729  RPCDetId detId(id.rawId());
730  oss << "RPC chamber ";
731  switch ( detId.region() ) {
732  case 0:
733  oss << "/ barrel / (wheel, station, sector, layer, subsector, roll): "
734  << detId.ring() << ", "
735  << detId.station() << ", "
736  << detId.sector() << ", "
737  << detId.layer() << ", "
738  << detId.subsector() << ", "
739  << detId.roll();
740  break;
741  case 1:
742  oss << "/ forward endcap / (wheel, station, sector, layer, subsector, roll): "
743  << detId.ring() << ", "
744  << detId.station() << ", "
745  << detId.sector() << ", "
746  << detId.layer() << ", "
747  << detId.subsector() << ", "
748  << detId.roll();
749  break;
750  case -1:
751  oss << "/ backward endcap / (wheel, station, sector, layer, subsector, roll): "
752  << detId.ring() << ", "
753  << detId.station() << ", "
754  << detId.sector() << ", "
755  << detId.layer() << ", "
756  << detId.subsector() << ", "
757  << detId.roll();
758  break;
759  }
760  }
761  break;
762  case MuonSubdetId::GEM:
763  {
764  GEMDetId detId(id.rawId());
765  oss << "GEM chamber (region, station, ring, chamber, layer): "
766  << detId.region() << ", "
767  << detId.station() << ", "
768  << detId.ring() << ", "
769  << detId.chamber() << ", "
770  << detId.layer();
771  }
772  break;
773  case MuonSubdetId::ME0:
774  {
775  ME0DetId detId(id.rawId());
776  oss << "ME0 chamber (region, chamber, layer): "
777  << detId.region() << ", "
778  << detId.chamber() << ", "
779  << detId.layer();
780  }
781  break;
782  }
783  break;
784 
785  case DetId::Calo:
786  {
787  CaloTowerDetId detId( id.rawId() );
788  oss << "CaloTower (ieta, iphi): "
789  << detId.ieta() << ", "
790  << detId.iphi();
791  }
792  break;
793 
794  case DetId::Ecal:
795  switch ( id.subdetId() ) {
796  case EcalBarrel:
797  {
798  EBDetId detId(id);
799  oss << "EcalBarrel (ieta, iphi, tower_ieta, tower_iphi): "
800  << detId.ieta() << ", "
801  << detId.iphi() << ", "
802  << detId.tower_ieta() << ", "
803  << detId.tower_iphi();
804  }
805  break;
806  case EcalEndcap:
807  {
808  EEDetId detId(id);
809  oss << "EcalEndcap (ix, iy, SuperCrystal, crystal, quadrant): "
810  << detId.ix() << ", "
811  << detId.iy() << ", "
812  << detId.isc() << ", "
813  << detId.ic() << ", "
814  << detId.iquadrant();
815  }
816  break;
817  case EcalPreshower:
818  oss << "EcalPreshower";
819  break;
820  case EcalTriggerTower:
821  oss << "EcalTriggerTower";
822  break;
823  case EcalLaserPnDiode:
824  oss << "EcalLaserPnDiode";
825  break;
826  }
827  break;
828 
829  case DetId::Hcal:
830  {
831  HcalDetId detId(id);
832  switch ( detId.subdet() ) {
833  case HcalEmpty:
834  oss << "HcalEmpty ";
835  break;
836  case HcalBarrel:
837  oss << "HcalBarrel ";
838  break;
839  case HcalEndcap:
840  oss << "HcalEndcap ";
841  break;
842  case HcalOuter:
843  oss << "HcalOuter ";
844  break;
845  case HcalForward:
846  oss << "HcalForward ";
847  break;
848  case HcalTriggerTower:
849  oss << "HcalTriggerTower ";
850  break;
851  case HcalOther:
852  oss << "HcalOther ";
853  break;
854  }
855  oss << "(ieta, iphi, depth):"
856  << detId.ieta() << ", "
857  << detId.iphi() << ", "
858  << detId.depth();
859  }
860  break;
861  default :;
862  }
863  return oss.str();
864 }
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
static const int GEM
Definition: MuonSubdetId.h:15
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
static const int ME0
Definition: MuonSubdetId.h:16
static const int CSC
Definition: MuonSubdetId.h:13
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
static const int RPC
Definition: MuonSubdetId.h:14
static const int DT
Definition: MuonSubdetId.h:12
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
std::string fireworks::info ( const std::set< DetId > &  idSet)

Definition at line 867 of file TrackUtils.cc.

References hcalTTPDigis_cfi::id, info(), AlCaHLTBitMon_QueryRunRegistry::string, and RecoTauValidation_cfi::text.

867  {
869  for(std::set<DetId>::const_iterator id = idSet.begin(), idEnd = idSet.end(); id != idEnd; ++id)
870  {
871  text += info(*id);
872  text += "\n";
873  }
874  return text;
875 }
static const TGPicture * info(bool iBackgroundIsBlack)
std::string fireworks::info ( const std::vector< DetId > &  idSet)

Definition at line 878 of file TrackUtils.cc.

References hcalTTPDigis_cfi::id, info(), AlCaHLTBitMon_QueryRunRegistry::string, and RecoTauValidation_cfi::text.

878  {
880  for(std::vector<DetId>::const_iterator id = idSet.begin(), idEnd = idSet.end(); id != idEnd; ++id)
881  {
882  text += info(*id);
883  text += "\n";
884  }
885  return text;
886 }
static const TGPicture * info(bool iBackgroundIsBlack)
void fireworks::invertBox ( std::vector< float > &  corners)

Definition at line 129 of file BuilderUtils.cc.

References std::swap().

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

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

Definition at line 53 of file GlobalContexts.cc.

References edmIntegrityCheck::pool.

Referenced by FWPSetTableManager::cellRenderer().

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

Definition at line 268 of file TrackUtils.cc.

References delta, fwLog, fwlog::kError, PFRecoTauDiscriminationByIsolation_cfi::offset, funct::tan(), and ecaldqm::topology().

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

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

Definition at line 7 of file makeEveJetCone.cc.

References EnergyCorrector::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().

8 {
9  TEveJetCone* jet = new TEveJetCone();
10  jet->SetApex(TEveVector(iData.vertex().x(),iData.vertex().y(),iData.vertex().z()));
11 
13  bool haveData = true;
14  for ( reco::Jet::Constituents::const_iterator itr = c.begin(); itr != c.end(); ++itr )
15  {
16  if ( !itr->isAvailable() ) {
17  haveData = false;
18  break;
19  }
20  }
21 
22  double eta_size = 0.2;
23  double phi_size = 0.2;
24  if ( haveData ){
25  eta_size = sqrt(iData.etaetaMoment());
26  phi_size = sqrt(iData.phiphiMoment());
27  }
28 
29  static const float offr = 5;
30  static const float offz = offr/tan(context.caloTransAngle());
31  if (iData.eta() < context.caloMaxEta())
32  jet->SetCylinder(context.caloR1(false) -offr, context.caloZ1(false)-offz);
33  else
34  jet->SetCylinder(context.caloR2(false) -offr, context.caloZ2(false)-offz);
35 
36 
37  jet-> AddEllipticCone(iData.eta(), iData.phi(), eta_size, phi_size);
38  jet->SetPickable(kTRUE);
39  return jet;
40 }
static float caloTransAngle()
Definition: Context.cc:233
virtual double eta() const final
momentum pseudorapidity
virtual const Point & vertex() const
vertex position (overwritten by PF...)
static float caloZ2(bool offset=true)
Definition: Context.cc:223
std::vector< Constituent > Constituents
Definition: Jet.h:23
float etaetaMoment() const
eta-eta second moment, ET weighted
virtual Constituents getJetConstituents() const
list of constituents
virtual double phi() const final
momentum azimuthal angle
static float caloR2(bool offset=true)
Definition: Context.cc:213
T sqrt(T t)
Definition: SSEVec.h:18
static float caloR1(bool offset=true)
Definition: Context.cc:208
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:238
static float caloZ1(bool offset=true)
Definition: Context.cc:218
bool fireworks::makeRhoPhiSuperCluster ( FWProxyBuilderBase pb,
const reco::SuperClusterRef iCluster,
float  iPhi,
TEveElement &  oItemHolder 
)

Definition at line 28 of file makeSuperCluster.cc.

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

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

32 {
33  if( !iCluster.isAvailable()) return false;
34  TEveGeoManagerHolder gmgr( TEveGeoShape::GetGeoMangeur());
35 
36  std::vector< std::pair<DetId, float> > detids = iCluster->hitsAndFractions();
37  if (detids.empty()) return false;
38  std::vector<double> phis;
39  for( std::vector<std::pair<DetId, float> >::const_iterator id = detids.begin(), end = detids.end(); id != end; ++id )
40  {
41  const float* corners = pb->context().getGeom()->getCorners( id->first.rawId());
42  if( corners != 0 )
43  {
44  std::vector<float> centre( 3, 0 );
45 
46  for( unsigned int i = 0; i < 24; i += 3 )
47  {
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, r , 1,
59  phiRange.first * 180 / M_PI - 0.5,
60  phiRange.second * 180 / M_PI + 0.5 ); // 0.5 is roughly half size of a crystal
61  TEveGeoShape *sc = fireworks::getShape( "supercluster", sc_box, pb->item()->defaultDisplayProperties().color());
62  sc->SetPickable( kTRUE );
63  pb->setupAddElement( sc, &oItemHolder );
64  return true;
65 }
bool isAvailable() const
Definition: Ref.h:576
const fireworks::Context & context() const
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:453
std::pair< double, double > getPhiRange(const std::vector< double > &phis, double phi)
Definition: BuilderUtils.cc:21
const FWGeometry * getGeom() const
Definition: Context.h:83
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:208
#define end
Definition: vmac.h:37
#define M_PI
const float * getCorners(unsigned int id) const
Definition: FWGeometry.cc:286
TEveGeoShape * getShape(const char *name, TGeoBBox *shape, Color_t color)
Definition: BuilderUtils.cc:42
bool fireworks::makeRhoZSuperCluster ( FWProxyBuilderBase pb,
const reco::SuperClusterRef iCluster,
float  iPhi,
TEveElement &  oItemHolder 
)

Definition at line 67 of file makeSuperCluster.cc.

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

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

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

Definition at line 166 of file TrackUtils.cc.

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

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

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

Definition at line 222 of file TrackUtils.cc.

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

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

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

Definition at line 10 of file CandidateUtils.cc.

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

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

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

Definition at line 69 of file TrackUtils.cc.

References reco::TrackBase::charge(), reco::Track::extra(), f, mps_fire::i, reco::Track::innerMomentum(), reco::Track::innerOk(), reco::Track::innerPosition(), edm::Ref< C, T, F >::isAvailable(), 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(), lumiQTWidget::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(), fireworks::StateOrdering::operator()(), and FWElectronProxyBuilder::requestCommon().

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

Definition at line 524 of file TrackUtils.cc.

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

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

525 {
526  const edmNew::DetSetVector<SiPixelCluster> * allClusters = 0;
527  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it)
528  {
529  if( typeid(**it) == typeid( SiPixelRecHit ))
530  {
531  const SiPixelRecHit &hit = static_cast<const SiPixelRecHit &>(**it);
532  if( hit.cluster().isNonnull() && hit.cluster().isAvailable())
533  {
535  iItem.getEvent()->get(hit.cluster().id(), allClustersHandle);
536  allClusters = allClustersHandle.product();
537  break;
538  }
539  }
540  }
541  if( allClusters == 0 ) return;
542 
543  const FWGeometry *geom = iItem.getGeom();
544 
545  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
546  {
547  const TrackingRecHit* rh = &(**it);
548 
549  DetId id = (*it)->geographicalId();
550  if( ! geom->contains( id ))
551  {
553  << "failed to get geometry of Tracker Det with raw id: "
554  << id.rawId() << std::endl;
555 
556  continue;
557  }
558 
559  // -- in which detector are we?
560  unsigned int subdet = (unsigned int)id.subdetId();
561  if(( subdet != PixelSubdetector::PixelBarrel ) && ( subdet != PixelSubdetector::PixelEndcap )) continue;
562 
563  const SiPixelCluster* hitCluster = 0;
564  if( const SiPixelRecHit* pixel = dynamic_cast<const SiPixelRecHit*>( rh ))
565  hitCluster = pixel->cluster().get();
566  edmNew::DetSetVector<SiPixelCluster>::const_iterator itds = allClusters->find(id.rawId());
567  if( itds != allClusters->end())
568  {
569  const edmNew::DetSet<SiPixelCluster> & clustersOnThisDet = *itds;
570  for( edmNew::DetSet<SiPixelCluster>::const_iterator itc = clustersOnThisDet.begin(), edc = clustersOnThisDet.end(); itc != edc; ++itc )
571  {
572  if( &*itc != hitCluster )
573  pushPixelCluster( pixelPoints, *geom, id, *itc, geom->getParameters( id ));
574  }
575  }
576  }
577 }
bool isAvailable() const
Definition: Ref.h:576
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:302
bool get(ProductID const &, Handle< T > &) const
Definition: EventBase.h:106
data_type const * const_iterator
Definition: DetSetNew.h:30
ProductID id() const
Accessor for product ID.
Definition: Ref.h:258
bool contains(unsigned int id) const
Definition: FWGeometry.h:110
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:104
const edm::EventBase * getEvent() const
Definition: FWEventItem.h:148
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
#define fwLog(_level_)
Definition: fwLog.h:50
ClusterRef cluster() const
Definition: SiPixelRecHit.h:49
const_iterator find(id_type i, bool update=false) const
Pixel cluster – collection of neighboring pixels above threshold.
iterator end()
Definition: DetSetNew.h:70
void pushPixelCluster(std::vector< TVector3 > &pixelPoints, const FWGeometry &geom, DetId id, const SiPixelCluster &c, const float *pars)
Definition: TrackUtils.cc:629
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:683
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
Our base class.
Definition: SiPixelRecHit.h:23
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:109
iterator begin()
Definition: DetSetNew.h:67
void fireworks::pushPixelCluster ( std::vector< TVector3 > &  pixelPoints,
const FWGeometry geom,
DetId  id,
const SiPixelCluster c,
const float *  pars 
)

Definition at line 629 of file TrackUtils.cc.

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

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

630 {
631  double row = c.minPixelRow();
632  double col = c.minPixelCol();
633  float lx = 0.;
634  float ly = 0.;
635 
636  // int nrows = (int)pars[0];
637  // int ncols = (int)pars[1];
638  lx = pixelLocalX( row, pars );
639  ly = pixelLocalY( col, pars );
640 
642  << ", row: " << row << ", col: " << col
643  << ", lx: " << lx << ", ly: " << ly ;
644 
645  float local[3] = { lx, ly, 0. };
646  float global[3];
647  geom.localToGlobal( id, local, global );
648  TVector3 pb( global[0], global[1], global[2] );
649  pixelPoints.push_back( pb );
650 
652  << " x: " << pb.X()
653  << ", y: " << pb.Y()
654  << " z: " << pb.Z()
655  << " eta: " << pb.Eta()
656  << ", phi: " << pb.Phi()
657  << " rho: " << pb.Pt() << std::endl;
658 }
int minPixelCol() const
int minPixelRow() const
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:334
float pixelLocalX(const double mpx, const float *)
Definition: TrackUtils.cc:166
float pixelLocalY(const double mpy, const float *)
Definition: TrackUtils.cc:222
#define fwLog(_level_)
Definition: fwLog.h:50
col
Definition: cuy.py:1008
void fireworks::pushPixelHits ( std::vector< TVector3 > &  pixelPoints,
const FWEventItem iItem,
const reco::Track t 
)

Definition at line 582 of file TrackUtils.cc.

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

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

583 {
584  /*
585  * -- return for each Pixel Hit a 3D point
586  */
587  const FWGeometry *geom = iItem.getGeom();
588 
589  double dz = t.dz();
590  double vz = t.vz();
591  double etaT = t.eta();
592 
593  fwLog( fwlog::kDebug ) << "Track eta: " << etaT << ", vz: " << vz << ", dz: " << dz
594  << std::endl;
595 
596  int cnt = 0;
597  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
598  {
599  const TrackingRecHit* rh = &(**it);
600  // -- get position of center of wafer, assuming (0,0,0) is the center
601  DetId id = (*it)->geographicalId();
602  if( ! geom->contains( id ))
603  {
605  << "failed to get geometry of Tracker Det with raw id: "
606  << id.rawId() << std::endl;
607 
608  continue;
609  }
610 
611  // -- in which detector are we?
612  unsigned int subdet = (unsigned int)id.subdetId();
613 
614  if(( subdet == PixelSubdetector::PixelBarrel ) || ( subdet == PixelSubdetector::PixelEndcap ))
615  {
616  fwLog( fwlog::kDebug ) << cnt++ << " -- "
617  << subdets[subdet];
618 
619  if( const SiPixelRecHit* pixel = dynamic_cast<const SiPixelRecHit*>( rh ))
620  {
621  const SiPixelCluster& c = *( pixel->cluster());
622  pushPixelCluster( pixelPoints, *geom, id, c, geom->getParameters( id ));
623  }
624  }
625  }
626 }
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:302
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:646
bool contains(unsigned int id) const
Definition: FWGeometry.h:110
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:104
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:604
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:664
Definition: DetId.h:18
#define fwLog(_level_)
Definition: fwLog.h:50
Pixel cluster – collection of neighboring pixels above threshold.
static const std::string subdets[7]
Definition: TrackUtils.cc:66
void pushPixelCluster(std::vector< TVector3 > &pixelPoints, const FWGeometry &geom, DetId id, const SiPixelCluster &c, const float *pars)
Definition: TrackUtils.cc:629
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:683
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
Our base class.
Definition: SiPixelRecHit.h:23
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:109
const TGGC & fireworks::redGC ( )

Definition at line 46 of file GlobalContexts.cc.

47 {
48  static TGGC s_redGC(*gClient->GetResourcePool()->GetFrameGC());
49  s_redGC.SetForeground(gVirtualX->GetPixel(kRed-5));
50  return s_redGC;
51 }
void fireworks::setPath ( TString &  v)

Definition at line 15 of file fwPaths.cc.

References fwLog, and fwlog::kError.

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

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

Definition at line 17 of file setTrackTypePF.cc.

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

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

Definition at line 313 of file TrackUtils.cc.

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

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

314 {
315  if (master)
316  {
317  el->CSCTakeAnyParentAsMaster();
318  el->SetPickable(true);
319  }
320 
321  if (color)
322  {
323  el->CSCApplyMainColorToMatchingChildren();
324  el->CSCApplyMainTransparencyToMatchingChildren();
325  el->SetMainColor(item->defaultDisplayProperties().color());
326  assert((item->defaultDisplayProperties().transparency() >= 0)
327  && (item->defaultDisplayProperties().transparency() <= 100));
328  el->SetMainTransparency(item->defaultDisplayProperties().transparency());
329  }
330  parent->AddElement(el);
331 }
Master< F > master(const F &f)
Definition: FunctClone.h:68
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:453
Color_t color() const
Char_t transparency() const
int * fireworks::supportedDataFormatsVersion ( )

Definition at line 43 of file fwPaths.cc.

References getDecomposedVersion(), and findQualityFiles::v.

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

44 {
45  static int mm[] = {0, 0, 0};
46 
47  if (!mm[0]) {
48  TString v;
49  if (gSystem->Getenv("CMSSW_VERSION"))
50  {
51  v = gSystem->Getenv("CMSSW_VERSION");
52 
53  }
54  else
55  {
56  TString versionFileName = gSystem->Getenv("CMSSW_BASE");
57  versionFileName += "/src/Fireworks/Core/data/version.txt";
58  std::ifstream fs(versionFileName);
59  TString infoText;
60  infoText.ReadLine(fs); infoText.ReadLine(fs);
61  fs.close();
62  v = &infoText[13];
63  }
64 
65  getDecomposedVersion(v, &mm[0]);
66  }
67 
68  return &mm[0];
69 }
void getDecomposedVersion(const TString &s, int *out)
Definition: fwPaths.cc:30
std::vector< std::pair< double, double > > fireworks::thetaBins ( )

Definition at line 48 of file thetaBins.cc.

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

Referenced by FWCaloTauProxyBuilder::buildViewType().

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

Variable Documentation

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

Definition at line 63 of file TrackUtils.cc.

Referenced by pixelLocalX(), and pixelLocalY().

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

Definition at line 12 of file fwPaths.cc.

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

Definition at line 13 of file fwPaths.cc.

const float fireworks::s_forBlack[][3]
static
const float fireworks::s_forWhite[][3]
static

Definition at line 4 of file fwPaletteClassic.cc.

Referenced by FWColorManager::initColorTable().

const unsigned int fireworks::s_size = sizeof(s_forBlack)/sizeof(s_forBlack[0])
static
const std::string fireworks::subdets[7] = { "UNKNOWN", "PXB", "PXF", "TIB", "TID", "TOB", "TEC" }
static