CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
HitDoublets Class Reference

#include <RecHitsSortedInPhi.h>

Public Types

using ADoublet = std::pair< int, int >
 
using Hit = RecHitsSortedInPhi::Hit
 
using HitLayer = RecHitsSortedInPhi
 
enum  layer { inner = 0, outer = 1 }
 

Public Member Functions

void add (int il, int ol)
 
void clear ()
 
DetLayer const * detLayer (layer l) const
 
bool empty () const
 
GlobalPoint gp (int i, layer l) const
 
Hit const & hit (int i, layer l) const
 
 HitDoublets (RecHitsSortedInPhi const &in, RecHitsSortedInPhi const &out)
 
 indeces (std::move(rh.indeces))
 
int index (int i, layer l) const
 
int innerHitId (int i) const
 
HitLayer const & innerLayer () const
 
int outerHitId (int i) const
 
HitLayer const & outerLayer () const
 
float phi (int i, layer l) const
 
float r (int i, layer l) const
 
void reserve (std::size_t s)
 
float rv (int i, layer l) const
 
void shrink_to_fit ()
 
std::size_t size () const
 
float x (int i, layer l) const
 
float y (int i, layer l) const
 
float z (int i, layer l) const
 

Private Attributes

std::vector< ADoubletindeces
 
std::array< RecHitsSortedInPhi
const *, 2 > 
layers
 

Detailed Description

Definition at line 124 of file RecHitsSortedInPhi.h.

Member Typedef Documentation

using HitDoublets::ADoublet = std::pair<int, int>

Definition at line 130 of file RecHitsSortedInPhi.h.

Definition at line 129 of file RecHitsSortedInPhi.h.

Definition at line 128 of file RecHitsSortedInPhi.h.

Member Enumeration Documentation

Enumerator
inner 
outer 

Definition at line 126 of file RecHitsSortedInPhi.h.

Constructor & Destructor Documentation

HitDoublets::HitDoublets ( RecHitsSortedInPhi const &  in,
RecHitsSortedInPhi const &  out 
)
inline

Definition at line 132 of file RecHitsSortedInPhi.h.

References recoMuon::in.

132 : layers{{&in, &out}} {}
std::array< RecHitsSortedInPhi const *, 2 > layers

Member Function Documentation

void HitDoublets::add ( int  il,
int  ol 
)
inline

Definition at line 142 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets(), and counter.Counter::register().

142 { indeces.emplace_back(il, ol); }
std::vector< ADoublet > indeces
void HitDoublets::clear ( void  )
inline

Definition at line 139 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

139 { indeces.clear(); }
std::vector< ADoublet > indeces
DetLayer const* HitDoublets::detLayer ( layer  l) const
inline

Definition at line 145 of file RecHitsSortedInPhi.h.

References cmsLHEtoEOSManager::l, and layers.

Referenced by CACell::getInnerLayer(), CACell::getOuterLayer(), PixelTripletHLTGenerator::hitTriplets(), and PixelTripletLargeTipGenerator::hitTriplets().

145 { return layers[l]->layer; }
std::array< RecHitsSortedInPhi const *, 2 > layers
bool HitDoublets::empty ( void  ) const
inline

Definition at line 138 of file RecHitsSortedInPhi.h.

References indeces.

138 { return indeces.empty(); }
std::vector< ADoublet > indeces
GlobalPoint HitDoublets::gp ( int  i,
layer  l 
) const
inline

Definition at line 161 of file RecHitsSortedInPhi.h.

References x(), y(), and z().

Referenced by MultiHitGeneratorFromChi2::hitSets().

161 { return GlobalPoint(x(i, l), y(i, l), z(i, l)); }
float x(int i, layer l) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
float z(int i, layer l) const
float y(int i, layer l) const
Hit const& HitDoublets::hit ( int  i,
layer  l 
) const
inline

Definition at line 150 of file RecHitsSortedInPhi.h.

References index(), cmsLHEtoEOSManager::l, and layers.

Referenced by CACell::getInnerHit(), CACell::getOuterHit(), MultiHitGeneratorFromChi2::hitSets(), PixelTripletHLTGenerator::hitTriplets(), and PixelTripletLargeTipGenerator::hitTriplets().

150 { return layers[l]->theHits[index(i, l)].hit(); }
int index(int i, layer l) const
std::array< RecHitsSortedInPhi const *, 2 > layers
HitDoublets::indeces ( std::  moverh.indeces)
inline

Definition at line 134 of file RecHitsSortedInPhi.h.

134 : layers(rh.layers), indeces(std::move(rh.indeces)) {}
def move
Definition: eostools.py:511
std::vector< ADoublet > indeces
std::array< RecHitsSortedInPhi const *, 2 > layers
int HitDoublets::index ( int  i,
layer  l 
) const
inline

Definition at line 144 of file RecHitsSortedInPhi.h.

References inner, innerHitId(), and outerHitId().

Referenced by BeautifulSoup.PageElement::_invert(), hit(), phi(), rv(), x(), y(), and z().

144 { return l == inner ? innerHitId(i) : outerHitId(i); }
int outerHitId(int i) const
int innerHitId(int i) const
int HitDoublets::innerHitId ( int  i) const
inline

Definition at line 148 of file RecHitsSortedInPhi.h.

References mps_fire::i, and indeces.

Referenced by CellularAutomaton::createAndConnectCells(), CellularAutomaton::findTriplets(), and index().

148 { return indeces[i].first; }
std::vector< ADoublet > indeces
HitLayer const& HitDoublets::innerLayer ( ) const
inline

Definition at line 146 of file RecHitsSortedInPhi.h.

References inner, and layers.

Referenced by MultiHitGeneratorFromChi2::hitSets().

146 { return *layers[inner]; }
std::array< RecHitsSortedInPhi const *, 2 > layers
int HitDoublets::outerHitId ( int  i) const
inline

Definition at line 149 of file RecHitsSortedInPhi.h.

References mps_fire::i, and indeces.

Referenced by CellularAutomaton::createAndConnectCells(), CellularAutomaton::findTriplets(), and index().

149 { return indeces[i].second; }
std::vector< ADoublet > indeces
HitLayer const& HitDoublets::outerLayer ( ) const
inline

Definition at line 147 of file RecHitsSortedInPhi.h.

References layers, and outer.

Referenced by MultiHitGeneratorFromChi2::hitSets().

147 { return *layers[outer]; }
std::array< RecHitsSortedInPhi const *, 2 > layers
float HitDoublets::phi ( int  i,
layer  l 
) const
inline
float HitDoublets::r ( int  i,
layer  l 
) const
inline

Definition at line 153 of file RecHitsSortedInPhi.h.

References mathSSE::sqrt(), x(), and y().

153  {
154  float xp = x(i, l);
155  float yp = y(i, l);
156  return std::sqrt(xp * xp + yp * yp);
157  }
float x(int i, layer l) const
T sqrt(T t)
Definition: SSEVec.h:19
float y(int i, layer l) const
void HitDoublets::reserve ( std::size_t  s)
inline

Definition at line 136 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

136 { indeces.reserve(s); }
std::vector< ADoublet > indeces
float HitDoublets::rv ( int  i,
layer  l 
) const
inline

Definition at line 152 of file RecHitsSortedInPhi.h.

References index(), cmsLHEtoEOSManager::l, and layers.

Referenced by CACell::getOuterR(), and PixelTripletHLTGenerator::hitTriplets().

152 { return layers[l]->rv(index(i, l)); }
int index(int i, layer l) const
std::array< RecHitsSortedInPhi const *, 2 > layers
void HitDoublets::shrink_to_fit ( )
inline

Definition at line 140 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

140 { indeces.shrink_to_fit(); }
std::vector< ADoublet > indeces
std::size_t HitDoublets::size ( void  ) const
inline
float HitDoublets::x ( int  i,
layer  l 
) const
inline
float HitDoublets::y ( int  i,
layer  l 
) const
inline
float HitDoublets::z ( int  i,
layer  l 
) const
inline

Member Data Documentation

std::vector<ADoublet> HitDoublets::indeces
private

Definition at line 166 of file RecHitsSortedInPhi.h.

Referenced by add(), clear(), empty(), innerHitId(), outerHitId(), reserve(), shrink_to_fit(), and size().

std::array<RecHitsSortedInPhi const*, 2> HitDoublets::layers
private

Definition at line 164 of file RecHitsSortedInPhi.h.

Referenced by detLayer(), hit(), innerLayer(), outerLayer(), phi(), rv(), x(), y(), and z().