CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Classes | Functions | Variables
fireworks Namespace Reference

Namespaces

 expression
 
 geometry
 
 table
 

Classes

class  Context
 
struct  jetScaleMarker
 
class  OptionNode
 
struct  OptionNodePtrCompare
 
struct  OptionNodePtrEqual
 
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 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 int m_nrows)
 
float pixelLocalY (const double mpy, const int m_ncols)
 
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 int BIG_PIX_PER_ROC_X = 1
 
static const int BIG_PIX_PER_ROC_Y = 2
 
static const int COLS_PER_ROC = 52
 
static const double MICRON = 1./1000./10.
 
const TString p1 = gSystem->Getenv("CMSSW_BASE") + datadir
 
const TString p2 = gSystem->Getenv("CMSSW_RELEASE_BASE") + datadir
 
static const double PITCHX = 100*MICRON
 
static const double PITCHY = 150*MICRON
 
static const int ROWS_PER_ROC = 80
 
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 146 of file BuilderUtils.cc.

References FWProxyBuilderBase::setupAddElement().

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

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

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

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

157  {
158  TEveStraightLineSet* container = new TEveStraightLineSet;
159 
160  for( unsigned int iphi = 0; iphi < nLineSegments; ++iphi )
161  {
162  container->AddLine( eta + radius * cos( 2 * M_PI / nLineSegments * iphi ),
163  phi + radius * sin( 2 * M_PI / nLineSegments * iphi ),
164  0.01,
165  eta + radius * cos( 2 * M_PI / nLineSegments * ( iphi + 1 )),
166  phi + radius * sin( 2 * M_PI / nLineSegments * ( iphi + 1 )),
167  0.01 );
168  }
169  pb->setupAddElement( container, comp );
170  }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T eta() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
void fireworks::addDashedArrow ( double  phi,
double  size,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 172 of file BuilderUtils.cc.

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

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

173  {
174  TEveScalableStraightLineSet* marker = new TEveScalableStraightLineSet;
175  marker->SetLineWidth( 1 );
176  marker->SetLineStyle( 2 );
177  marker->AddLine( 0, 0, 0, size * cos( phi ), size * sin( phi ), 0 );
178  marker->AddLine( size * 0.9 * cos( phi + 0.03 ), size * 0.9 * sin( phi + 0.03 ), 0, size * cos( phi ), size * sin( phi ), 0 );
179  marker->AddLine( size * 0.9 * cos( phi - 0.03 ), size * 0.9 * sin( phi - 0.03 ), 0, size * cos( phi ), size * sin( phi ), 0 );
180  pb->setupAddElement( marker, comp );
181  }
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.
Definition: DDAxes.h:10
void fireworks::addDashedLine ( double  phi,
double  theta,
double  size,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

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

184  {
185  double r( 0 );
186  if( theta < pb->context().caloTransAngle() || M_PI - theta < pb->context().caloTransAngle())
187  r = pb->context().caloZ2() / fabs( cos( theta ));
188  else
189  r = pb->context().caloR1() / sin( theta );
190 
191  TEveStraightLineSet* marker = new TEveStraightLineSet;
192  marker->SetLineWidth( 2 );
193  marker->SetLineStyle( 2 );
194  marker->AddLine( r * cos( phi ) * sin( theta ), r * sin( phi ) * sin( theta ), r * cos( theta ),
195  ( r + size ) * cos( phi ) * sin( theta ), ( r + size ) * sin( phi ) * sin( theta ), ( r + size ) * cos( theta ));
196  pb->setupAddElement( marker, comp );
197  }
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:225
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static float caloR1(bool offset=true)
Definition: Context.cc:210
#define M_PI
Definition: BFit3D.cc:3
tuple size
Write out results.
Definition: DDAxes.h:10
void fireworks::addDoubleLines ( double  phi,
TEveElement *  comp,
FWProxyBuilderBase pb 
)

Definition at line 199 of file BuilderUtils.cc.

References M_PI, and FWProxyBuilderBase::setupAddElement().

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

200  {
201  TEveStraightLineSet* mainLine = new TEveStraightLineSet;
202  mainLine->AddLine( -5.191, phi, 0.01, 5.191, phi, 0.01 );
203  pb->setupAddElement( mainLine, comp );
204 
205  phi = phi > 0 ? phi - M_PI : phi + M_PI;
206  TEveStraightLineSet* secondLine = new TEveStraightLineSet;
207  secondLine->SetLineStyle( 7 );
208  secondLine->AddLine( -5.191, phi, 0.01, 5.191, phi, 0.01 );
209  pb->setupAddElement( secondLine, comp );
210  }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
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
Definition: DDAxes.h:10
void fireworks::addSiStripClusters ( const FWEventItem iItem,
const reco::Track t,
class TEveElement *  tList,
bool  addNearbyClusters,
bool  master 
)

Definition at line 404 of file TrackUtils.cc.

References edmNew::DetSet< T >::begin(), FWGeometry::contains(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), extractClusterFromTrackingRecHit(), edmNew::DetSetVector< T >::find(), SiStripCluster::firstStrip(), fwLog, TrackingRecHit::geographicalId(), relativeConstraints::geom, FWEventItem::getGeom(), FWGeometry::getParameters(), TrackingRecHit::isValid(), fwlog::kDebug, fwlog::kError, localSiStrip(), FWGeometry::localToGlobal(), DetId::rawId(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), and setupAddElement().

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

405 {
406  // master is true if the product is for proxy builder
407  const FWGeometry *geom = iItem->getGeom();
408 
409  const edmNew::DetSetVector<SiStripCluster> * allClusters = 0;
410  if( addNearbyClusters )
411  {
412  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
413  {
414  if( typeid( **it ) == typeid( SiStripRecHit2D ))
415  {
416  const SiStripRecHit2D &hit = static_cast<const SiStripRecHit2D &>( **it );
417  if( hit.cluster().isNonnull() && hit.cluster().isAvailable())
418  {
419  allClusters = hit.cluster().product();
420  break;
421  }
422  }
423  else if( typeid( **it ) == typeid( SiStripRecHit1D ))
424  {
425  const SiStripRecHit1D &hit = static_cast<const SiStripRecHit1D &>( **it );
426  if( hit.cluster().isNonnull() && hit.cluster().isAvailable())
427  {
428  allClusters = hit.cluster().product();
429  break;
430  }
431  }
432  }
433  }
434 
435  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
436  {
437  unsigned int rawid = (*it)->geographicalId();
438  if( ! geom->contains( rawid ))
439  {
441  << "failed to get geometry of SiStripCluster with detid: "
442  << rawid << std::endl;
443 
444  continue;
445  }
446 
447  const float* pars = geom->getParameters( rawid );
448 
449  // -- get phi from SiStripHit
450  TrackingRecHitRef rechitRef = *it;
451  const TrackingRecHit *rechit = &( *rechitRef );
452  const SiStripCluster *cluster = extractClusterFromTrackingRecHit( rechit );
453 
454  if( cluster )
455  {
456  if( allClusters != 0 )
457  {
458  const edmNew::DetSet<SiStripCluster> & clustersOnThisDet = (*allClusters)[rechit->geographicalId().rawId()];
459 
460  for( edmNew::DetSet<SiStripCluster>::const_iterator itc = clustersOnThisDet.begin(), edc = clustersOnThisDet.end(); itc != edc; ++itc )
461  {
462 
463  TEveStraightLineSet *scposition = new TEveStraightLineSet;
464  scposition->SetDepthTest( false );
465  scposition->SetPickable( kTRUE );
466 
467  short firststrip = itc->firstStrip();
468 
469  if( &*itc == cluster )
470  {
471  scposition->SetTitle( Form( "Exact SiStripCluster from TrackingRecHit, first strip %d", firststrip ));
472  scposition->SetLineColor( kGreen );
473  }
474  else
475  {
476  scposition->SetTitle( Form( "SiStripCluster, first strip %d", firststrip ));
477  scposition->SetLineColor( kRed );
478  }
479 
480  float localTop[3] = { 0.0, 0.0, 0.0 };
481  float localBottom[3] = { 0.0, 0.0, 0.0 };
482 
483  fireworks::localSiStrip( firststrip, localTop, localBottom, pars, rawid );
484 
485  float globalTop[3];
486  float globalBottom[3];
487  geom->localToGlobal( rawid, localTop, globalTop, localBottom, globalBottom );
488 
489  scposition->AddLine( globalTop[0], globalTop[1], globalTop[2],
490  globalBottom[0], globalBottom[1], globalBottom[2] );
491 
492  setupAddElement( scposition, tList, iItem, master, false );
493  }
494  }
495  else
496  {
497  short firststrip = cluster->firstStrip();
498  TEveStraightLineSet *scposition = new TEveStraightLineSet;
499  scposition->SetDepthTest( false );
500  scposition->SetPickable( kTRUE );
501  scposition->SetTitle( Form( "SiStripCluster, first strip %d", firststrip ));
502 
503  float localTop[3] = { 0.0, 0.0, 0.0 };
504  float localBottom[3] = { 0.0, 0.0, 0.0 };
505 
506  fireworks::localSiStrip( firststrip, localTop, localBottom, pars, rawid );
507 
508  float globalTop[3];
509  float globalBottom[3];
510  geom->localToGlobal( rawid, localTop, globalTop, localBottom, globalBottom );
511 
512  scposition->AddLine( globalTop[0], globalTop[1], globalTop[2],
513  globalBottom[0], globalBottom[1], globalBottom[2] );
514 
515  setupAddElement( scposition, tList, iItem, master, true );
516  }
517  }
518  else if( !rechit->isValid() && ( rawid != 0 )) // lost hit
519  {
520  if( allClusters != 0 )
521  {
522  edmNew::DetSetVector<SiStripCluster>::const_iterator itds = allClusters->find( rawid );
523  if( itds != allClusters->end())
524  {
525  const edmNew::DetSet<SiStripCluster> & clustersOnThisDet = *itds;
526  for( edmNew::DetSet<SiStripCluster>::const_iterator itc = clustersOnThisDet.begin(), edc = clustersOnThisDet.end(); itc != edc; ++itc )
527  {
528  short firststrip = itc->firstStrip();
529 
530  TEveStraightLineSet *scposition = new TEveStraightLineSet;
531  scposition->SetDepthTest( false );
532  scposition->SetPickable( kTRUE );
533  scposition->SetTitle( Form( "Lost SiStripCluster, first strip %d", firststrip ));
534 
535  float localTop[3] = { 0.0, 0.0, 0.0 };
536  float localBottom[3] = { 0.0, 0.0, 0.0 };
537 
538  fireworks::localSiStrip( firststrip, localTop, localBottom, pars, rawid );
539 
540  float globalTop[3];
541  float globalBottom[3];
542  geom->localToGlobal( rawid, localTop, globalTop, localBottom, globalBottom );
543 
544  scposition->AddLine( globalTop[0], globalTop[1], globalTop[2],
545  globalBottom[0], globalBottom[1], globalBottom[2] );
546 
547 
548  setupAddElement( scposition, tList, iItem, master, false );
549  scposition->SetLineColor( kRed );
550  }
551  }
552  }
553  }
554  else
555  {
557  << "*ANOTHER* option possible: valid=" << rechit->isValid()
558  << ", rawid=" << rawid << std::endl;
559  }
560  }
561 }
Master< F > master(const F &f)
Definition: FunctClone.h:68
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:293
uint16_t firstStrip() const
data_type const * const_iterator
Definition: DetSetNew.h:25
void localToGlobal(unsigned int id, const float *local, float *global) const
Definition: FWGeometry.cc:325
const_iterator find(id_type i) const
void localSiStrip(short strip, float *localTop, float *localBottom, const float *pars, unsigned int id)
Definition: TrackUtils.cc:292
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
const SiStripCluster * extractClusterFromTrackingRecHit(const TrackingRecHit *rh)
Definition: TrackUtils.cc:359
bool contains(unsigned int id) const
Definition: FWGeometry.h:98
const_iterator end() const
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:63
#define fwLog(_level_)
Definition: fwLog.h:51
bool isValid() const
iterator end()
Definition: DetSetNew.h:59
DetId geographicalId() const
void setupAddElement(TEveElement *el, TEveElement *parent, const FWEventItem *item, bool master, bool color)
Definition: TrackUtils.cc:337
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:681
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:65
iterator begin()
Definition: DetSetNew.h:56
void fireworks::addStraightLineSegment ( TEveStraightLineSet *  marker,
reco::Candidate const *  cand,
double  scale_factor = 2 
)

Definition at line 23 of file CandidateUtils.cc.

References funct::cos(), phi, 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 }
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.
Definition: DDAxes.h:10
const TGGC & fireworks::boldGC ( )

Definition at line 12 of file GlobalContexts.cc.

References fetchall_from_DQM_v2::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, fwlog::kWarning, mag(), mathSSE::sqrt(), funct::tan(), and theta().

18  {
19  if( detector == MuonSubdetId::CSC )
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())
Geom::Theta< T > theta() const
static const int CSC
Definition: MuonSubdetId.h:15
T sqrt(T t)
Definition: SSEVec.h:46
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:51
static const int DT
Definition: MuonSubdetId.h:14
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 239 of file BuilderUtils.cc.

References addBox(), and energyScaledBox3DCorners().

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

References addBox(), and energyTower3DCorners().

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

References addBox(), and etScaledBox3DCorners().

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

References addBox(), and etTower3DCorners().

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

References f, i, and invertBox().

Referenced by drawEnergyScaledBox3D().

214  {
215  std::vector<float> centre( 3, 0 );
216 
217  for( unsigned int i = 0; i < 24; i += 3 )
218  {
219  centre[0] += corners[i];
220  centre[1] += corners[i + 1];
221  centre[2] += corners[i + 2];
222  }
223 
224  for( unsigned int i = 0; i < 3; ++i )
225  centre[i] *= 1.0f / 8.0f;
226 
227  // Coordinates for a scaled version of the original box
228  for( unsigned int i = 0; i < 24; i += 3 )
229  {
230  scaledCorners[i] = centre[0] + ( corners[i] - centre[0] ) * scale;
231  scaledCorners[i + 1] = centre[1] + ( corners[i + 1] - centre[1] ) * scale;
232  scaledCorners[i + 2] = centre[2] + ( corners[i + 2] - centre[2] ) * scale;
233  }
234 
235  if( invert )
236  invertBox( scaledCorners );
237  }
int i
Definition: DBlmapReader.cc:9
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 284 of file BuilderUtils.cc.

References diffTreeTool::diff, i, and pileupReCalc_HLTpaths::scale.

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

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

Definition at line 247 of file BuilderUtils.cc.

References trackerHits::c, f, i, invertBox(), pileupReCalc_HLTpaths::scale, and funct::sin().

Referenced by drawEtScaledBox3D().

248  {
249  std::vector<float> centre( 3, 0 );
250 
251  for( unsigned int i = 0; i < 24; i += 3 )
252  {
253  centre[0] += corners[i];
254  centre[1] += corners[i + 1];
255  centre[2] += corners[i + 2];
256  }
257 
258  for( unsigned int i = 0; i < 3; ++i )
259  centre[i] *= 1.0f / 8.0f;
260 
261  TEveVector c( centre[0], centre[1], centre[2] );
262  float scale = energy / maxEnergy * sin( c.Theta());
263 
264  // Coordinates for a scaled version of the original box
265  for( unsigned int i = 0; i < 24; i += 3 )
266  {
267  scaledCorners[i] = centre[0] + ( corners[i] - centre[0] ) * scale;
268  scaledCorners[i + 1] = centre[1] + ( corners[i + 1] - centre[1] ) * scale;
269  scaledCorners[i + 2] = centre[2] + ( corners[i + 2] - centre[2] ) * scale;
270  }
271 
272  if( invert )
273  invertBox( scaledCorners );
274  }
int i
Definition: DBlmapReader.cc:9
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 332 of file BuilderUtils.cc.

References diffTreeTool::diff, i, and funct::sin().

Referenced by drawEtTower3D().

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

Definition at line 359 of file TrackUtils.cc.

References fwLog, and fwlog::kDebug.

Referenced by addSiStripClusters().

360 {
361  const SiStripCluster* cluster = 0;
362 
363  if( const SiStripRecHit2D* hit2D = dynamic_cast<const SiStripRecHit2D*>( rechit ))
364  {
365  fwLog( fwlog::kDebug ) << "hit 2D ";
366 
367  if( hit2D->cluster().isNonnull())
368  {
369  cluster = hit2D->cluster().get();
370  }
371  else if( hit2D->cluster_regional().isNonnull())
372  {
373  cluster = hit2D->cluster_regional().get();
374  }
375  else
376  {
377  fwLog( fwlog::kDebug ) << "no cluster found!\n";
378  }
379  }
380  if( cluster == 0 )
381  {
382  if( const SiStripRecHit1D* hit1D = dynamic_cast<const SiStripRecHit1D*>( rechit ))
383  {
384  fwLog( fwlog::kDebug ) << "hit 1D ";
385 
386  if( hit1D->cluster().isNonnull())
387  {
388  cluster = hit1D->cluster().get();
389  }
390  else if( hit1D->cluster_regional().isNonnull())
391  {
392  cluster = hit1D->cluster_regional().get();
393  }
394  else
395  {
396  fwLog( fwlog::kDebug ) << "no cluster found!\n";
397  }
398  }
399  }
400  return cluster;
401 }
#define fwLog(_level_)
Definition: fwLog.h:51
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 }
tuple out
Definition: dbtoconf.py:99
std::string fireworks::getLocalTime ( const edm::EventBase event)

Definition at line 113 of file BuilderUtils.cc.

References pos, lumiQTWidget::t, runonSM::text, edm::EventBase::time(), and edm::Timestamp::value().

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

114  {
115  time_t t( event.time().value() >> 32 );
116  std::string text( asctime( localtime( &t ) ) );
117  size_t pos = text.find('\n');
118  if( pos != std::string::npos ) text = text.substr( 0, pos );
119  text += " ";
120  if( daylight )
121  text += tzname[1];
122  else
123  text += tzname[0];
124  return text;
125  }
tuple text
Definition: runonSM.py:42
TimeValue_t value() const
Definition: Timestamp.cc:72
edm::Timestamp time() const
Definition: EventBase.h:57
std::pair< double, double > fireworks::getPhiRange ( const std::vector< double > &  phis,
double  phi 
)

Definition at line 21 of file BuilderUtils.cc.

References i, M_PI, 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  }
int i
Definition: DBlmapReader.cc:9
#define min(a, b)
Definition: mlp_lapack.h:161
const T & max(const T &a, const T &b)
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
TEveGeoShape * fireworks::getShape ( const char *  name,
TGeoBBox *  shape,
Color_t  color 
)

Definition at line 42 of file BuilderUtils.cc.

References trackerHits::c.

Referenced by FWTauProxyBuilderBase::buildBaseTau(), FWMETProxyBuilder::buildViewType(), FWGlimpseView::FWGlimpseView(), 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 pos, lumiQTWidget::t, runonSM::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  }
tuple text
Definition: runonSM.py:42
TimeValue_t value() const
Definition: Timestamp.cc:72
edm::Timestamp time() const
Definition: EventBase.h:57
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 703 of file TrackUtils.cc.

References DetId::Calo, CSCDetId::chamber(), MuonSubdetId::CSC, HcalDetId::depth(), MuonSubdetId::DT, DetId::Ecal, EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalPreshower, EcalTriggerTower, CSCDetId::endcap(), DetId::Hcal, HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, EEDetId::ic(), CaloTowerDetId::ieta(), HcalDetId::ieta(), EBDetId::ieta(), CaloTowerDetId::iphi(), HcalDetId::iphi(), EBDetId::iphi(), EEDetId::iquadrant(), EEDetId::isc(), EEDetId::ix(), EEDetId::iy(), PXBDetId::layer(), TOBDetId::layer(), TIBDetId::layer(), CSCDetId::layer(), RPCDetId::layer(), DetId::Muon, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, RPCDetId::region(), RPCDetId::ring(), CSCDetId::ring(), RPCDetId::roll(), MuonSubdetId::RPC, DTChamberId::sector(), RPCDetId::sector(), DTChamberId::station(), CSCDetId::station(), RPCDetId::station(), 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 FWConvTrackHitsDetailView::addModules(), FWTrackHitsDetailView::addModules(), FWTracksModulesProxyBuilder::build(), and info().

703  {
704  std::ostringstream oss;
705 
706  oss << "DetId: " << id.rawId() << "\n";
707 
708  switch ( id.det() ) {
709 
710  case DetId::Tracker:
711  switch ( id.subdetId() ) {
713  {
714  oss <<"TIB "<<TIBDetId(id).layer();
715  }
716  break;
718  {
719  oss <<"TOB "<<TOBDetId(id).layer();
720  }
721  break;
723  {
724  oss <<"TEC "<<TECDetId(id).wheel();
725  }
726  break;
728  {
729  oss <<"TID "<<TIDDetId(id).wheel();
730  }
731  break;
733  {
734  oss <<"PixBarrel "<< PXBDetId(id).layer();
735  }
736  break;
738  {
739  oss <<"PixEndcap "<< PXBDetId(id).layer();
740  }
741  break;
742  }
743  break;
744 
745  case DetId::Muon:
746  switch ( id.subdetId() ) {
747  case MuonSubdetId::DT:
748  {
749  DTChamberId detId(id.rawId());
750  oss << "DT chamber (wheel, station, sector): "
751  << detId.wheel() << ", "
752  << detId.station() << ", "
753  << detId.sector();
754  }
755  break;
756  case MuonSubdetId::CSC:
757  {
758  CSCDetId detId(id.rawId());
759  oss << "CSC chamber (endcap, station, ring, chamber, layer): "
760  << detId.endcap() << ", "
761  << detId.station() << ", "
762  << detId.ring() << ", "
763  << detId.chamber() << ", "
764  << detId.layer();
765  }
766  break;
767  case MuonSubdetId::RPC:
768  {
769  RPCDetId detId(id.rawId());
770  oss << "RPC chamber ";
771  switch ( detId.region() ) {
772  case 0:
773  oss << "/ barrel / (wheel, station, sector, layer, subsector, roll): "
774  << detId.ring() << ", "
775  << detId.station() << ", "
776  << detId.sector() << ", "
777  << detId.layer() << ", "
778  << detId.subsector() << ", "
779  << detId.roll();
780  break;
781  case 1:
782  oss << "/ forward endcap / (wheel, station, sector, layer, subsector, roll): "
783  << detId.ring() << ", "
784  << detId.station() << ", "
785  << detId.sector() << ", "
786  << detId.layer() << ", "
787  << detId.subsector() << ", "
788  << detId.roll();
789  break;
790  case -1:
791  oss << "/ backward endcap / (wheel, station, sector, layer, subsector, roll): "
792  << detId.ring() << ", "
793  << detId.station() << ", "
794  << detId.sector() << ", "
795  << detId.layer() << ", "
796  << detId.subsector() << ", "
797  << detId.roll();
798  break;
799  }
800  }
801  break;
802  }
803  break;
804 
805  case DetId::Calo:
806  {
807  CaloTowerDetId detId( id.rawId() );
808  oss << "CaloTower (ieta, iphi): "
809  << detId.ieta() << ", "
810  << detId.iphi();
811  }
812  break;
813 
814  case DetId::Ecal:
815  switch ( id.subdetId() ) {
816  case EcalBarrel:
817  {
818  EBDetId detId(id);
819  oss << "EcalBarrel (ieta, iphi, tower_ieta, tower_iphi): "
820  << detId.ieta() << ", "
821  << detId.iphi() << ", "
822  << detId.tower_ieta() << ", "
823  << detId.tower_iphi();
824  }
825  break;
826  case EcalEndcap:
827  {
828  EEDetId detId(id);
829  oss << "EcalEndcap (ix, iy, SuperCrystal, crystal, quadrant): "
830  << detId.ix() << ", "
831  << detId.iy() << ", "
832  << detId.isc() << ", "
833  << detId.ic() << ", "
834  << detId.iquadrant();
835  }
836  break;
837  case EcalPreshower:
838  oss << "EcalPreshower";
839  break;
840  case EcalTriggerTower:
841  oss << "EcalTriggerTower";
842  break;
843  case EcalLaserPnDiode:
844  oss << "EcalLaserPnDiode";
845  break;
846  }
847  break;
848 
849  case DetId::Hcal:
850  {
851  HcalDetId detId(id);
852  switch ( detId.subdet() ) {
853  case HcalEmpty:
854  oss << "HcalEmpty ";
855  break;
856  case HcalBarrel:
857  oss << "HcalBarrel ";
858  break;
859  case HcalEndcap:
860  oss << "HcalEndcap ";
861  break;
862  case HcalOuter:
863  oss << "HcalOuter ";
864  break;
865  case HcalForward:
866  oss << "HcalForward ";
867  break;
868  case HcalTriggerTower:
869  oss << "HcalTriggerTower ";
870  break;
871  case HcalOther:
872  oss << "HcalOther ";
873  break;
874  }
875  oss << "(ieta, iphi, depth):"
876  << detId.ieta() << ", "
877  << detId.iphi() << ", "
878  << detId.depth();
879  }
880  break;
881  default :;
882  }
883  return oss.str();
884 }
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
static const int CSC
Definition: MuonSubdetId.h:15
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:16
static const int DT
Definition: MuonSubdetId.h:14
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
std::string fireworks::info ( const std::set< DetId > &  idSet)

Definition at line 887 of file TrackUtils.cc.

References errorMatrix2Lands_multiChannel::id, info(), and runonSM::text.

887  {
888  std::string text;
889  for(std::set<DetId>::const_iterator id = idSet.begin(), idEnd = idSet.end(); id != idEnd; ++id)
890  {
891  text += info(*id);
892  text += "\n";
893  }
894  return text;
895 }
tuple text
Definition: runonSM.py:42
std::string fireworks::info ( const std::vector< DetId > &  idSet)

Definition at line 898 of file TrackUtils.cc.

References errorMatrix2Lands_multiChannel::id, info(), and runonSM::text.

898  {
899  std::string text;
900  for(std::vector<DetId>::const_iterator id = idSet.begin(), idEnd = idSet.end(); id != idEnd; ++id)
901  {
902  text += info(*id);
903  text += "\n";
904  }
905  return text;
906 }
tuple text
Definition: runonSM.py:42
void fireworks::invertBox ( std::vector< float > &  corners)

Definition at line 127 of file BuilderUtils.cc.

References std::swap().

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

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

Definition at line 53 of file GlobalContexts.cc.

References asciidump::attributes, and fetchall_from_DQM_v2::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 }
list attributes
Definition: asciidump.py:415
void fireworks::localSiStrip ( short  strip,
float *  localTop,
float *  localBottom,
const float *  pars,
unsigned int  id 
)

Definition at line 292 of file TrackUtils.cc.

References delta, fwLog, fwlog::kError, evf::evtn::offset(), and funct::tan().

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

293 {
294  Float_t topology = pars[0];
295  Float_t halfStripLength = pars[2] * 0.5;
296 
297  Double_t localCenter[3] = { 0.0, 0.0, 0.0 };
298  localTop[1] = halfStripLength;
299  localBottom[1] = -halfStripLength;
300 
301  if( topology == 1 ) // RadialStripTopology
302  {
303  // stripAngle = phiOfOneEdge + strip * angularWidth
304  // localY = originToIntersection * tan( stripAngle )
305  Float_t stripAngle = tan( pars[5] + strip * pars[6] );
306  Float_t delta = halfStripLength * stripAngle;
307  localCenter[0] = pars[4] * stripAngle;
308  localTop[0] = localCenter[0] + delta;
309  localBottom[0] = localCenter[0] - delta;
310  }
311  else if( topology == 2 ) // RectangularStripTopology
312  {
313  // offset = -numberOfStrips/2. * pitch
314  // localY = strip * pitch + offset
315  Float_t offset = -pars[1] * 0.5 * pars[3];
316  localCenter[0] = strip * pars[3] + offset;
317  localTop[0] = localCenter[0];
318  localBottom[0] = localCenter[0];
319  }
320  else if( topology == 3 ) // TrapezoidalStripTopology
321  {
323  << "did not expect TrapezoidalStripTopology of "
324  << id << std::endl;
325  }
326  else if( pars[0] == 0 ) // StripTopology
327  {
329  << "did not find StripTopology of "
330  << id << std::endl;
331  }
332 }
dbl * delta
Definition: mlp_gen.cc:36
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
unsigned int offset(bool)
#define fwLog(_level_)
Definition: fwLog.h:51
TEveJetCone * fireworks::makeEveJetCone ( const reco::Jet iData,
const fireworks::Context context 
)

Definition at line 7 of file makeEveJetCone.cc.

References trackerHits::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:235
virtual const Point & vertex() const
vertex position
static float caloZ2(bool offset=true)
Definition: Context.cc:225
std::vector< Constituent > Constituents
Definition: Jet.h:24
virtual double eta() const
momentum pseudorapidity
static float caloR2(bool offset=true)
Definition: Context.cc:215
T sqrt(T t)
Definition: SSEVec.h:46
static float caloR1(bool offset=true)
Definition: Context.cc:210
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float etaetaMoment() const
eta-eta second moment, ET weighted
Definition: Jet.cc:224
float phiphiMoment() const
phi-phi second moment, ET weighted
Definition: Jet.cc:241
static double caloMaxEta()
Definition: Context.cc:240
static float caloZ1(bool offset=true)
Definition: Context.cc:220
virtual double phi() const
momentum azimuthal angle
virtual Constituents getJetConstituents() const
list of constituents
Definition: Jet.cc:351
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(), end, FWGeometry::getCorners(), fireworks::Context::getGeom(), getPhiRange(), getShape(), i, errorMatrix2Lands_multiChannel::id, edm::Ref< C, T, F >::isAvailable(), FWProxyBuilderBase::item(), M_PI, colinearityKinematic::Phi, alignCSCRings::r, and FWProxyBuilderBase::setupAddElement().

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

33 {
34  if( !iCluster.isAvailable()) return false;
35  TEveGeoManagerHolder gmgr( TEveGeoShape::GetGeoMangeur());
36 
37  std::vector< std::pair<DetId, float> > detids = iCluster->hitsAndFractions();
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 }
const fireworks::Context & context() const
int i
Definition: DBlmapReader.cc:9
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:451
std::pair< double, double > getPhiRange(const std::vector< double > &phis, double phi)
Definition: BuilderUtils.cc:21
const FWGeometry * getGeom() const
Definition: Context.h:84
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
bool isAvailable() const
Definition: Ref.h:276
const FWEventItem * item() const
Color_t color() const
static float caloR1(bool offset=true)
Definition: Context.cc:210
#define end
Definition: vmac.h:38
#define M_PI
Definition: BFit3D.cc:3
const float * getCorners(unsigned int id) const
Definition: FWGeometry.cc:277
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(), i, errorMatrix2Lands_multiChannel::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  for( std::vector<std::pair<DetId, float> >::const_iterator id = detids.begin(), end = detids.end(); id != end; ++id )
78  {
79  const float* corners = pb->context().getGeom()->getCorners( id->first.rawId());
80  if( corners != 0 )
81  {
82  std::vector<float> centre( 3, 0 );
83 
84  for( unsigned int i = 0; i < 24; i += 3 )
85  {
86  centre[0] += corners[i];
87  centre[1] += corners[i + 1];
88  centre[2] += corners[i + 2];
89  }
90 
91  double theta = TEveVector( centre[0], centre[1], centre[2] ).Theta();
92  if( theta > theta_max ) theta_max = theta;
93  if( theta < theta_min ) theta_min = theta;
94  }
95  }
96  // expand theta range by the size of a crystal to avoid segments of zero length
97  bool barrel = true;
98  if ((theta_max > 0 && theta_max < pb->context().caloTransAngle()) ||
99  ( theta_min > (TMath::Pi() -pb->context().caloTransAngle())) )
100  {
101  barrel = false;
102  }
103 
104  double z_ecal = barrel ? pb->context().caloZ1() : pb->context().caloZ2();
105  double r_ecal = barrel ? pb->context().caloR1() : pb->context().caloR2();
106 
107  fireworks::addRhoZEnergyProjection( pb, &oItemHolder, r_ecal-1, z_ecal-1,
108  theta_min - 0.003, theta_max + 0.003,
109  iPhi );
110 
111  return true;
112 }
const double Pi
const fireworks::Context & context() const
int i
Definition: DBlmapReader.cc:9
static float caloTransAngle()
Definition: Context.cc:235
const FWGeometry * getGeom() const
Definition: Context.h:84
Geom::Theta< T > theta() const
static float caloZ2(bool offset=true)
Definition: Context.cc:225
bool isAvailable() const
Definition: Ref.h:276
static float caloR2(bool offset=true)
Definition: Context.cc:215
static float caloR1(bool offset=true)
Definition: Context.cc:210
#define end
Definition: vmac.h:38
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:277
static float caloZ1(bool offset=true)
Definition: Context.cc:220
float fireworks::pixelLocalX ( const double  mpx,
const int  m_nrows 
)

Definition at line 165 of file TrackUtils.cc.

References BIG_PIX_PER_ROC_X, PITCHX, and ROWS_PER_ROC.

Referenced by FWSiPixelClusterProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), pushPixelCluster(), and ValidateGeometry::validatePixelTopology().

166 {
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  const double xoffset = -( nrows + BIG_PIX_PER_ROC_X * nrows / ROWS_PER_ROC ) / 2. * PITCHX;
171 
172  // Measurement to local transformation for X coordinate
173  // X coordinate is in the ROC row number direction
174  // Copy from RectangularPixelTopology::localX implementation
175  int binoffx = int(mpx); // truncate to int
176  double fractionX = mpx - binoffx; // find the fraction
177  double local_PITCHX = PITCHX; // defaultpitch
178  if( binoffx > 80 ) { // ROC 1 - handles x on edge cluster
179  binoffx = binoffx + 2;
180  } else if( binoffx == 80 ) { // ROC 1
181  binoffx = binoffx+1;
182  local_PITCHX = 2 * PITCHX;
183  } else if( binoffx == 79 ) { // ROC 0
184  binoffx = binoffx + 0;
185  local_PITCHX = 2 * PITCHX;
186  } else if( binoffx >= 0 ) { // ROC 0
187  binoffx = binoffx + 0;
188  }
189 
190  // The final position in local coordinates
191  double lpX = double( binoffx * PITCHX ) + fractionX * local_PITCHX + xoffset;
192 
193  return lpX;
194 }
static const int ROWS_PER_ROC
Definition: TrackUtils.cc:63
static const double PITCHX
Definition: TrackUtils.cc:59
static const int BIG_PIX_PER_ROC_X
Definition: TrackUtils.cc:64
float fireworks::pixelLocalY ( const double  mpy,
const int  m_ncols 
)

Definition at line 198 of file TrackUtils.cc.

References BIG_PIX_PER_ROC_Y, COLS_PER_ROC, and PITCHY.

Referenced by FWSiPixelClusterProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), pushPixelCluster(), and ValidateGeometry::validatePixelTopology().

199 {
200  // Calculate the edge of the active sensor with respect to the center,
201  // that is simply the half-size.
202  // Take into account large pixels
203  double yoffset = -( ncols + BIG_PIX_PER_ROC_Y * ncols / COLS_PER_ROC ) / 2. * PITCHY;
204 
205  // Measurement to local transformation for Y coordinate
206  // Y is in the ROC column number direction
207  // Copy from RectangularPixelTopology::localY implementation
208  int binoffy = int( mpy ); // truncate to int
209  double fractionY = mpy - binoffy; // find the fraction
210  double local_PITCHY = PITCHY; // defaultpitch
211 
212  if( binoffy>416 ) { // ROC 8, not real ROC
213  binoffy = binoffy+17;
214  } else if( binoffy == 416 ) { // ROC 8
215  binoffy = binoffy + 16;
216  local_PITCHY = 2 * PITCHY;
217  } else if( binoffy == 415 ) { // ROC 7, last big pixel
218  binoffy = binoffy + 15;
219  local_PITCHY = 2 * PITCHY;
220  } else if( binoffy > 364 ) { // ROC 7
221  binoffy = binoffy + 15;
222  } else if( binoffy == 364 ) { // ROC 7
223  binoffy = binoffy + 14;
224  local_PITCHY = 2 * PITCHY;
225  } else if( binoffy == 363 ) { // ROC 6
226  binoffy = binoffy + 13;
227  local_PITCHY = 2 * PITCHY;
228  } else if( binoffy > 312 ) { // ROC 6
229  binoffy = binoffy + 13;
230  } else if( binoffy == 312 ) { // ROC 6
231  binoffy = binoffy + 12;
232  local_PITCHY = 2 * PITCHY;
233  } else if( binoffy == 311 ) { // ROC 5
234  binoffy = binoffy + 11;
235  local_PITCHY = 2 * PITCHY;
236  } else if( binoffy > 260 ) { // ROC 5
237  binoffy = binoffy + 11;
238  } else if( binoffy == 260 ) { // ROC 5
239  binoffy = binoffy + 10;
240  local_PITCHY = 2 * PITCHY;
241  } else if( binoffy == 259 ) { // ROC 4
242  binoffy = binoffy + 9;
243  local_PITCHY = 2 * PITCHY;
244  } else if( binoffy > 208 ) { // ROC 4
245  binoffy = binoffy + 9;
246  } else if(binoffy == 208 ) { // ROC 4
247  binoffy = binoffy + 8;
248  local_PITCHY = 2 * PITCHY;
249  } else if( binoffy == 207 ) { // ROC 3
250  binoffy = binoffy + 7;
251  local_PITCHY = 2 * PITCHY;
252  } else if( binoffy > 156 ) { // ROC 3
253  binoffy = binoffy + 7;
254  } else if( binoffy == 156 ) { // ROC 3
255  binoffy = binoffy + 6;
256  local_PITCHY = 2 * PITCHY;
257  } else if( binoffy == 155 ) { // ROC 2
258  binoffy = binoffy + 5;
259  local_PITCHY = 2 * PITCHY;
260  } else if( binoffy > 104 ) { // ROC 2
261  binoffy = binoffy + 5;
262  } else if( binoffy == 104 ) { // ROC 2
263  binoffy = binoffy + 4;
264  local_PITCHY = 2 * PITCHY;
265  } else if( binoffy == 103 ) { // ROC 1
266  binoffy = binoffy + 3;
267  local_PITCHY = 2 * PITCHY;
268  } else if( binoffy > 52 ) { // ROC 1
269  binoffy = binoffy + 3;
270  } else if( binoffy == 52 ) { // ROC 1
271  binoffy = binoffy + 2;
272  local_PITCHY = 2 * PITCHY;
273  } else if( binoffy == 51 ) { // ROC 0
274  binoffy = binoffy + 1;
275  local_PITCHY = 2 * PITCHY;
276  } else if( binoffy > 0 ) { // ROC 0
277  binoffy=binoffy + 1;
278  } else if( binoffy == 0 ) { // ROC 0
279  binoffy = binoffy + 0;
280  local_PITCHY = 2 * PITCHY;
281  }
282 
283  // The final position in local coordinates
284  double lpY = double( binoffy * PITCHY ) + fractionY * local_PITCHY + yoffset;
285 
286  return lpY;
287 }
static const int COLS_PER_ROC
Definition: TrackUtils.cc:62
static const int BIG_PIX_PER_ROC_Y
Definition: TrackUtils.cc:61
static const double PITCHY
Definition: TrackUtils.cc:60
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(), FWCandidateProxyBuilder::build(), FWGenParticleProxyBuilder::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 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 70 of file TrackUtils.cc.

References reco::TrackBase::charge(), reco::Track::extra(), f, i, reco::Track::innerMomentum(), reco::Track::innerOk(), reco::Track::innerPosition(), edm::Ref< C, T, F >::isAvailable(), 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(), python.multivaluedict::sort(), lumiQTWidget::t, reco::btau::trackMomentum, v, TrackValidation_HighPurity_cff::valid, 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().

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

Definition at line 566 of file TrackUtils.cc.

References edmNew::DetSet< T >::begin(), FWGeometry::contains(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), edmNew::DetSetVector< T >::find(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), FWGeometry::getParameters(), fwlog::kError, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, pushPixelCluster(), reco::Track::recHitsBegin(), and reco::Track::recHitsEnd().

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

567 {
568  const edmNew::DetSetVector<SiPixelCluster> * allClusters = 0;
569  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it)
570  {
571  if( typeid(**it) == typeid( SiPixelRecHit ))
572  {
573  const SiPixelRecHit &hit = static_cast<const SiPixelRecHit &>(**it);
574  if( hit.cluster().isNonnull() && hit.cluster().isAvailable())
575  {
576  allClusters = hit.cluster().product();
577  break;
578  }
579  }
580  }
581  if( allClusters == 0 ) return;
582 
583  const FWGeometry *geom = iItem.getGeom();
584 
585  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
586  {
587  const TrackingRecHit* rh = &(**it);
588 
589  DetId id = (*it)->geographicalId();
590  if( ! geom->contains( id ))
591  {
593  << "failed to get geometry of Tracker Det with raw id: "
594  << id.rawId() << std::endl;
595 
596  continue;
597  }
598 
599  // -- in which detector are we?
600  unsigned int subdet = (unsigned int)id.subdetId();
601  if(( subdet != PixelSubdetector::PixelBarrel ) && ( subdet != PixelSubdetector::PixelEndcap )) continue;
602 
603  const SiPixelCluster* hitCluster = 0;
604  if( const SiPixelRecHit* pixel = dynamic_cast<const SiPixelRecHit*>( rh ))
605  hitCluster = pixel->cluster().get();
606  edmNew::DetSetVector<SiPixelCluster>::const_iterator itds = allClusters->find(id.rawId());
607  if( itds != allClusters->end())
608  {
609  const edmNew::DetSet<SiPixelCluster> & clustersOnThisDet = *itds;
610  for( edmNew::DetSet<SiPixelCluster>::const_iterator itc = clustersOnThisDet.begin(), edc = clustersOnThisDet.end(); itc != edc; ++itc )
611  {
612  if( &*itc != hitCluster )
613  pushPixelCluster( pixelPoints, *geom, id, *itc, geom->getParameters( id ));
614  }
615  }
616  }
617 }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:293
data_type const * const_iterator
Definition: DetSetNew.h:25
const_iterator find(id_type i) const
bool contains(unsigned int id) const
Definition: FWGeometry.h:98
const_iterator end() const
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:63
Definition: DetId.h:20
#define fwLog(_level_)
Definition: fwLog.h:51
Pixel cluster – collection of neighboring pixels above threshold.
iterator end()
Definition: DetSetNew.h:59
void pushPixelCluster(std::vector< TVector3 > &pixelPoints, const FWGeometry &geom, DetId id, const SiPixelCluster &c, const float *pars)
Definition: TrackUtils.cc:669
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:681
Pixel Reconstructed Hit.
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:65
iterator begin()
Definition: DetSetNew.h:56
void fireworks::pushPixelCluster ( std::vector< TVector3 > &  pixelPoints,
const FWGeometry geom,
DetId  id,
const SiPixelCluster c,
const float *  pars 
)

Definition at line 669 of file TrackUtils.cc.

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

Referenced by pushNearbyPixelHits(), and pushPixelHits().

670 {
671  double row = c.minPixelRow();
672  double col = c.minPixelCol();
673  float lx = 0.;
674  float ly = 0.;
675 
676  int nrows = (int)pars[0];
677  int ncols = (int)pars[1];
678  lx = pixelLocalX( row, nrows );
679  ly = pixelLocalY( col, ncols );
680 
682  << ", row: " << row << ", col: " << col
683  << ", lx: " << lx << ", ly: " << ly ;
684 
685  float local[3] = { lx, ly, 0. };
686  float global[3];
687  geom.localToGlobal( id, local, global );
688  TVector3 pb( global[0], global[1], global[2] );
689  pixelPoints.push_back( pb );
690 
692  << " x: " << pb.X()
693  << ", y: " << pb.Y()
694  << " z: " << pb.Z()
695  << " eta: " << pb.Eta()
696  << ", phi: " << pb.Phi()
697  << " rho: " << pb.Pt() << std::endl;
698 }
int minPixelCol() const
float pixelLocalY(const double mpy, const int m_ncols)
Definition: TrackUtils.cc:198
void localToGlobal(unsigned int id, const float *local, float *global) const
Definition: FWGeometry.cc:325
int minPixelRow() const
#define fwLog(_level_)
Definition: fwLog.h:51
float pixelLocalX(const double mpx, const int m_nrows)
Definition: TrackUtils.cc:165
void fireworks::pushPixelHits ( std::vector< TVector3 > &  pixelPoints,
const FWEventItem iItem,
const reco::Track t 
)

Definition at line 622 of file TrackUtils.cc.

References trackerHits::c, FWGeometry::contains(), reco::TrackBase::dz(), reco::TrackBase::eta(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), FWGeometry::getParameters(), fwlog::kDebug, fwlog::kError, 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().

623 {
624  /*
625  * -- return for each Pixel Hit a 3D point
626  */
627  const FWGeometry *geom = iItem.getGeom();
628 
629  double dz = t.dz();
630  double vz = t.vz();
631  double etaT = t.eta();
632 
633  fwLog( fwlog::kDebug ) << "Track eta: " << etaT << ", vz: " << vz << ", dz: " << dz
634  << std::endl;
635 
636  int cnt = 0;
637  for( trackingRecHit_iterator it = t.recHitsBegin(), itEnd = t.recHitsEnd(); it != itEnd; ++it )
638  {
639  const TrackingRecHit* rh = &(**it);
640  // -- get position of center of wafer, assuming (0,0,0) is the center
641  DetId id = (*it)->geographicalId();
642  if( ! geom->contains( id ))
643  {
645  << "failed to get geometry of Tracker Det with raw id: "
646  << id.rawId() << std::endl;
647 
648  continue;
649  }
650 
651  // -- in which detector are we?
652  unsigned int subdet = (unsigned int)id.subdetId();
653 
654  if(( subdet == PixelSubdetector::PixelBarrel ) || ( subdet == PixelSubdetector::PixelEndcap ))
655  {
656  fwLog( fwlog::kDebug ) << cnt++ << " -- "
657  << subdets[subdet];
658 
659  if( const SiPixelRecHit* pixel = dynamic_cast<const SiPixelRecHit*>( rh ))
660  {
661  const SiPixelCluster& c = *( pixel->cluster());
662  pushPixelCluster( pixelPoints, *geom, id, c, geom->getParameters( id ));
663  }
664  }
665  }
666 }
const float * getParameters(unsigned int id) const
Definition: FWGeometry.cc:293
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:141
static std::string subdets[11]
bool contains(unsigned int id) const
Definition: FWGeometry.h:98
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:63
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:127
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:147
Definition: DetId.h:20
#define fwLog(_level_)
Definition: fwLog.h:51
Pixel cluster – collection of neighboring pixels above threshold.
void pushPixelCluster(std::vector< TVector3 > &pixelPoints, const FWGeometry &geom, DetId id, const SiPixelCluster &c, const float *pars)
Definition: TrackUtils.cc:669
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:681
Pixel Reconstructed Hit.
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:65
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, fwlog::kError, p1, and p2.

Referenced by CmsShowHelpPopup::CmsShowHelpPopup(), main(), objMon< T >::monitorDenominator(), 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:51
double p1[4]
Definition: TauolaWrapper.h:89
mathSSE::Vec4< T > v
void fireworks::setTrackTypePF ( const reco::PFCandidate pfCand,
TAttLine *  track 
)

Definition at line 17 of file setTrackTypePF.cc.

References dt_dqm_sourceclient_common_cff::reco.

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

Definition at line 337 of file TrackUtils.cc.

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

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

338 {
339  if (master)
340  {
341  el->CSCTakeAnyParentAsMaster();
342  el->SetPickable(true);
343  }
344 
345  if (color)
346  {
347  el->CSCApplyMainColorToMatchingChildren();
348  el->CSCApplyMainTransparencyToMatchingChildren();
349  el->SetMainColor(item->defaultDisplayProperties().color());
350  assert((item->defaultDisplayProperties().transparency() >= 0)
351  && (item->defaultDisplayProperties().transparency() <= 100));
352  el->SetMainTransparency(item->defaultDisplayProperties().transparency());
353  }
354  parent->AddElement(el);
355 }
Master< F > master(const F &f)
Definition: FunctClone.h:68
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:451
list parent
Definition: dbtoconf.py:74
Color_t color() const
Char_t transparency() const
int * fireworks::supportedDataFormatsVersion ( )

Definition at line 43 of file fwPaths.cc.

References getDecomposedVersion(), and 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  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
mathSSE::Vec4< T > v
std::vector< std::pair< double, double > > fireworks::thetaBins ( )

Definition at line 49 of file thetaBins.cc.

References create_public_lumi_plots::exp, i, fw3dlego::xbins, and fw3dlego::xbins_n.

Referenced by FWCaloTauProxyBuilder::buildViewType().

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

Variable Documentation

const int fireworks::BIG_PIX_PER_ROC_X = 1
static
const int fireworks::BIG_PIX_PER_ROC_Y = 2
static
const int fireworks::COLS_PER_ROC = 52
static

Definition at line 62 of file TrackUtils.cc.

Referenced by pixelLocalY(), and GCC11_FINAL::RectangularPixelTopology().

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

Definition at line 58 of file TrackUtils.cc.

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

Definition at line 12 of file fwPaths.cc.

Referenced by setPath().

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

Definition at line 13 of file fwPaths.cc.

Referenced by setPath().

const double fireworks::PITCHX = 100*MICRON
static

Definition at line 59 of file TrackUtils.cc.

Referenced by pixelLocalX().

const double fireworks::PITCHY = 150*MICRON
static

Definition at line 60 of file TrackUtils.cc.

Referenced by pixelLocalY().

const int fireworks::ROWS_PER_ROC = 80
static

Definition at line 63 of file TrackUtils.cc.

Referenced by pixelLocalX(), and GCC11_FINAL::RectangularPixelTopology().

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

Definition at line 67 of file TrackUtils.cc.

Referenced by pushPixelHits().