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  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 isBlack)
 
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 ()
 
 if (isWhiteBg)
 
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 ()
 
 switch (id)
 
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
 
 iSize = iSize/2
 
unsigned int lastIdx = iSize -2
 
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 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" }
 
 void
 

Function Documentation

bool fireworks::acceptDataFormatsVersion ( TString &  n)

Definition at line 71 of file fwPaths.cc.

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

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.

void fireworks::addCircle ( double  eta,
double  phi,
double  radius,
const unsigned int  nLineSegments,
TEveElement *  comp,
FWProxyBuilderBase pb 
)
void fireworks::addDashedArrow ( double  phi,
double  size,
TEveElement *  comp,
FWProxyBuilderBase pb 
)
void fireworks::addDashedLine ( double  phi,
double  theta,
double  size,
TEveElement *  comp,
FWProxyBuilderBase pb 
)
void fireworks::addDoubleLines ( double  phi,
TEveElement *  comp,
FWProxyBuilderBase pb 
)
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.

Referenced by makeRhoZSuperCluster().

void fireworks::addSiStripClusters ( const FWEventItem iItem,
const reco::Track t,
class TEveElement *  tList,
bool  addNearbyClusters,
bool  master 
)

Definition at line 387 of file TrackUtils.cc.

Referenced by FWTracksRecHitsProxyBuilder::build().

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(), phi(), reco::Candidate::pt(), funct::sin(), findQualityFiles::size, reco::Candidate::theta(), and theta().

Referenced by FWMuonGlimpseProxyBuilder::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
Geom::Phi< T > phi() const
tuple size
Write out results.
const TGGC & fireworks::boldGC ( )

Definition at line 12 of file GlobalContexts.cc.

References edmIntegrityCheck::pool.

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: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.

void fireworks::drawEnergyTower3D ( const float *  corners,
float  scale,
TEveElement *  comp,
FWProxyBuilderBase pb,
bool  reflect = false 
)

Definition at line 325 of file BuilderUtils.cc.

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.

void fireworks::drawEtTower3D ( const float *  corners,
float  scale,
TEveElement *  comp,
FWProxyBuilderBase pb,
bool  reflect = false 
)

Definition at line 374 of file BuilderUtils.cc.

void fireworks::energyScaledBox3DCorners ( const float *  corners,
float  scale,
std::vector< float > &  scaledCorners,
bool  invert = false 
)

Definition at line 215 of file BuilderUtils.cc.

void fireworks::energyTower3DCorners ( const float *  corners,
float  scale,
std::vector< float > &  scaledCorners,
bool  reflect = false 
)
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.

void fireworks::etTower3DCorners ( const float *  corners,
float  scale,
std::vector< float > &  scaledCorners,
bool  reflect = false 
)

Definition at line 334 of file BuilderUtils.cc.

const SiStripCluster * fireworks::extractClusterFromTrackingRecHit ( const TrackingRecHit rh)

Definition at line 364 of file TrackUtils.cc.

Referenced by FWTrajectorySeedProxyBuilder::build().

void fireworks::GetColorValuesForPaletteExtra ( float(*)  iColors[3],
unsigned int  iSize,
FWColorManager::EPalette  id,
bool  isBlack 
)
void fireworks::getDecomposedVersion ( const TString &  s,
int *  out 
)

Definition at line 30 of file fwPaths.cc.

Referenced by acceptDataFormatsVersion(), 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.

Referenced by FWEventAnnotation::updateOverlayText().

std::pair< double, double > fireworks::getPhiRange ( const std::vector< double > &  phis,
double  phi 
)

Definition at line 21 of file BuilderUtils.cc.

Referenced by makeRhoPhiSuperCluster().

TEveGeoShape * fireworks::getShape ( const char *  name,
TGeoBBox *  shape,
Color_t  color 
)

Definition at line 42 of file BuilderUtils.cc.

Referenced by FWGlimpseView::FWGlimpseView(), and makeRhoPhiSuperCluster().

std::string fireworks::getTimeGMT ( const edm::EventBase event)

Definition at line 103 of file BuilderUtils.cc.

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 }
fireworks::if ( isWhiteBg  )

Definition at line 176 of file fwPaletteExtra.cc.

std::string fireworks::info ( const DetId id)

Definition at line 692 of file TrackUtils.cc.

Referenced by FWTracksModulesProxyBuilder::build().

std::string fireworks::info ( const std::set< DetId > &  idSet)

Definition at line 896 of file TrackUtils.cc.

std::string fireworks::info ( const std::vector< DetId > &  idSet)

Definition at line 907 of file TrackUtils.cc.

void fireworks::invertBox ( std::vector< float > &  corners)

Definition at line 129 of file BuilderUtils.cc.

const TGGC & fireworks::italicGC ( )

Definition at line 53 of file GlobalContexts.cc.

References edmIntegrityCheck::pool.

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

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 const Point & vertex() const
vertex position (overwritten by PF...)
static float caloZ2(bool offset=true)
Definition: Context.cc:223
virtual double phi() const final
momentum azimuthal angle
std::vector< Constituent > Constituents
Definition: Jet.h:23
float etaetaMoment() const
eta-eta second moment, ET weighted
virtual Constituents getJetConstituents() const
list of constituents
static float caloR2(bool offset=true)
Definition: Context.cc: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
virtual double eta() const final
momentum pseudorapidity
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(), i, edm::Ref< C, T, F >::isAvailable(), FWProxyBuilderBase::item(), M_PI, colinearityKinematic::Phi, alignCSCRings::r, and FWProxyBuilderBase::setupAddElement().

Referenced by FWPhotonProxyBuilder::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
int i
Definition: DBlmapReader.cc:9
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:280
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, edm::Ref< C, T, F >::isAvailable(), Pi, and theta().

Referenced by FWPhotonProxyBuilder::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
int i
Definition: DBlmapReader.cc:9
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:280
static float caloZ1(bool offset=true)
Definition: Context.cc:218
float fireworks::pixelLocalX ( const double  mpx,
const int  m_nrows 
)
float fireworks::pixelLocalY ( const double  mpy,
const int  m_ncols 
)
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(), and FWCandidateProxyBuilder::build().

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 75 of file TrackUtils.cc.

Referenced by FWElectronLegoProxyBuilder::build(), and FWTrackProxyBuilder::build().

void fireworks::pushNearbyPixelHits ( std::vector< TVector3 > &  pixelPoints,
const FWEventItem iItem,
const reco::Track t 
)

Definition at line 553 of file TrackUtils.cc.

void fireworks::pushPixelCluster ( std::vector< TVector3 > &  pixelPoints,
const FWGeometry geom,
DetId  id,
const SiPixelCluster c,
const float *  pars 
)

Definition at line 658 of file TrackUtils.cc.

void fireworks::pushPixelHits ( std::vector< TVector3 > &  pixelPoints,
const FWEventItem iItem,
const reco::Track t 
)

Definition at line 611 of file TrackUtils.cc.

Referenced by FWTracksRecHitsProxyBuilder::build().

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

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.

References dt_dqm_sourceclient_common_cff::reco.

Referenced by FWPFCandidate3DProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWPFPatJet3DProxyBuilder< T >::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 342 of file TrackUtils.cc.

Referenced by FWDTRecHitProxyBuilder::buildViewType().

int * fireworks::supportedDataFormatsVersion ( )

Definition at line 43 of file fwPaths.cc.

References getDecomposedVersion(), and findQualityFiles::v.

Referenced by acceptDataFormatsVersion().

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
fireworks::switch ( id  )

Definition at line 155 of file fwPaletteExtra.cc.

std::vector< std::pair< double, double > > fireworks::thetaBins ( )

Definition at line 48 of file thetaBins.cc.

References create_public_lumi_plots::exp, 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  }
int i
Definition: DBlmapReader.cc:9
const double xbins[]
std::vector< std::pair< double, double > > thetaBins()
Definition: thetaBins.cc:48
const int xbins_n

Variable Documentation

const int fireworks::BIG_PIX_PER_ROC_X = 1
static

Definition at line 69 of file TrackUtils.cc.

Referenced by PixelTopologyBuilder::build().

const int fireworks::BIG_PIX_PER_ROC_Y = 2
static

Definition at line 66 of file TrackUtils.cc.

Referenced by PixelTopologyBuilder::build().

const int fireworks::COLS_PER_ROC = 52
static

Definition at line 67 of file TrackUtils.cc.

fireworks::iSize = iSize/2

Definition at line 174 of file fwPaletteExtra.cc.

Referenced by edm::Guid::fromString().

unsigned int fireworks::lastIdx = iSize -2

Definition at line 175 of file fwPaletteExtra.cc.

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

Definition at line 63 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 64 of file TrackUtils.cc.

const double fireworks::PITCHY = 150*MICRON
static

Definition at line 65 of file TrackUtils.cc.

const int fireworks::ROWS_PER_ROC = 80
static

Definition at line 68 of file TrackUtils.cc.

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

Definition at line 42 of file fwPaletteClassic.cc.

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

Definition at line 4 of file fwPaletteClassic.cc.

const unsigned int fireworks::s_size = sizeof(s_forBlack)/sizeof(s_forBlack[0])
static

Definition at line 101 of file fwPaletteClassic.cc.

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

Definition at line 72 of file TrackUtils.cc.

fireworks::void
Initial value:
{
PaletteExtraTopBottomIndices p(iColors, isWhiteBg, id)

Definition at line 153 of file fwPaletteExtra.cc.