CMS 3D CMS Logo

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)
 
 HitDoublets (HitDoublets &&rh)
 
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 129 of file RecHitsSortedInPhi.h.

Member Typedef Documentation

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

Definition at line 135 of file RecHitsSortedInPhi.h.

Definition at line 134 of file RecHitsSortedInPhi.h.

Definition at line 133 of file RecHitsSortedInPhi.h.

Member Enumeration Documentation

Enumerator
inner 
outer 

Definition at line 131 of file RecHitsSortedInPhi.h.

Constructor & Destructor Documentation

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

Definition at line 137 of file RecHitsSortedInPhi.h.

References recoMuon::in.

138  :
139  layers{{&in,&out}}{}
std::array< RecHitsSortedInPhi const *, 2 > layers
HitDoublets::HitDoublets ( HitDoublets &&  rh)
inline

Definition at line 141 of file RecHitsSortedInPhi.h.

std::array< RecHitsSortedInPhi const *, 2 > layers
def move(src, dest)
Definition: eostools.py:510
std::vector< ADoublet > indeces

Member Function Documentation

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

Definition at line 151 of file RecHitsSortedInPhi.h.

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

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

Definition at line 146 of file RecHitsSortedInPhi.h.

Referenced by HitPairGeneratorFromLayerPair::doublets().

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

Definition at line 156 of file RecHitsSortedInPhi.h.

References checklumidiff::l, and LayerTriplets::layers().

Referenced by PixelTripletLargeTipGenerator::hitTriplets(), and PixelTripletHLTGenerator::hitTriplets().

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

Definition at line 145 of file RecHitsSortedInPhi.h.

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

Definition at line 168 of file RecHitsSortedInPhi.h.

References RecHitsSortedInPhi::x, RecHitsSortedInPhi::y, and RecHitsSortedInPhi::z.

Referenced by MultiHitGeneratorFromChi2::hitSets().

168 { 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 161 of file RecHitsSortedInPhi.h.

References diffTreeTool::index, checklumidiff::l, and LayerTriplets::layers().

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

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

Definition at line 155 of file RecHitsSortedInPhi.h.

References SurfaceOrientation::inner.

Referenced by BeautifulSoup.PageElement::insert().

155 { 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 159 of file RecHitsSortedInPhi.h.

References mps_fire::i.

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

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

Definition at line 157 of file RecHitsSortedInPhi.h.

References SurfaceOrientation::inner, and LayerTriplets::layers().

Referenced by MultiHitGeneratorFromChi2::hitSets().

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

Definition at line 160 of file RecHitsSortedInPhi.h.

References mps_fire::i.

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

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

Definition at line 158 of file RecHitsSortedInPhi.h.

References LayerTriplets::layers(), and SurfaceOrientation::outer.

Referenced by MultiHitGeneratorFromChi2::hitSets().

158 { 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 164 of file RecHitsSortedInPhi.h.

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

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

Definition at line 143 of file RecHitsSortedInPhi.h.

Referenced by HitPairGeneratorFromLayerPair::doublets().

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

Definition at line 163 of file RecHitsSortedInPhi.h.

References diffTreeTool::index, checklumidiff::l, and LayerTriplets::layers().

Referenced by PixelTripletHLTGenerator::hitTriplets().

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

Definition at line 147 of file RecHitsSortedInPhi.h.

Referenced by HitPairGeneratorFromLayerPair::doublets().

147  {
148  indeces.shrink_to_fit();
149  }
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 175 of file RecHitsSortedInPhi.h.

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

Definition at line 172 of file RecHitsSortedInPhi.h.