CMS 3D CMS Logo

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

#include <RecHitsSortedInPhi.h>

Public Types

using Hit = RecHitsSortedInPhi::Hit
 
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))
 
float phi (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< int > indeces
 
std::array< RecHitsSortedInPhi
const *, 2 > 
layers
 

Detailed Description

Definition at line 127 of file RecHitsSortedInPhi.h.

Member Typedef Documentation

Definition at line 131 of file RecHitsSortedInPhi.h.

Member Enumeration Documentation

Enumerator
inner 
outer 

Definition at line 129 of file RecHitsSortedInPhi.h.

Constructor & Destructor Documentation

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

Definition at line 134 of file RecHitsSortedInPhi.h.

References recoMuon::in.

135  :
136  layers{{&in,&out}}{}
std::array< RecHitsSortedInPhi const *, 2 > layers
tuple out
Definition: dbtoconf.py:99

Member Function Documentation

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

Definition at line 146 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

146 { indeces.push_back(il);indeces.push_back(ol);}
std::vector< int > indeces
void HitDoublets::clear ( void  )
inline

Definition at line 143 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

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

Definition at line 148 of file RecHitsSortedInPhi.h.

References ConfigFiles::l, and layers.

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

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

Definition at line 142 of file RecHitsSortedInPhi.h.

References indeces.

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

Definition at line 156 of file RecHitsSortedInPhi.h.

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

156 { return GlobalPoint(x(i,l),y(i,l),z(i,l));}
int i
Definition: DBlmapReader.cc:9
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 indeces, ConfigFiles::l, and layers.

150 { return layers[l]->theHits[indeces[2*i+l]].hit();}
int i
Definition: DBlmapReader.cc:9
std::array< RecHitsSortedInPhi const *, 2 > layers
std::vector< int > indeces
HitDoublets::indeces ( std::  moverh.indeces)
inline

Definition at line 138 of file RecHitsSortedInPhi.h.

138 : layers(std::move(rh.layers)), indeces(std::move(rh.indeces)){}
std::array< RecHitsSortedInPhi const *, 2 > layers
std::vector< int > indeces
float HitDoublets::phi ( int  i,
layer  l 
) const
inline

Definition at line 151 of file RecHitsSortedInPhi.h.

References indeces, ConfigFiles::l, and layers.

151 { return layers[l]->phi(indeces[2*i+l]);}
int i
Definition: DBlmapReader.cc:9
std::array< RecHitsSortedInPhi const *, 2 > layers
std::vector< int > indeces
void HitDoublets::reserve ( std::size_t  s)
inline

Definition at line 140 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

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

Definition at line 152 of file RecHitsSortedInPhi.h.

References indeces, ConfigFiles::l, and layers.

152 { return layers[l]->rv(indeces[2*i+l]);}
int i
Definition: DBlmapReader.cc:9
std::array< RecHitsSortedInPhi const *, 2 > layers
std::vector< int > indeces
void HitDoublets::shrink_to_fit ( )
inline

Definition at line 144 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

144 { indeces.shrink_to_fit();}
std::vector< int > indeces
std::size_t HitDoublets::size ( void  ) const
inline

Definition at line 141 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by HitPairGeneratorFromLayerPair::doublets().

141 { return indeces.size()/2;}
std::vector< int > indeces
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

Definition at line 153 of file RecHitsSortedInPhi.h.

References indeces, ConfigFiles::l, and layers.

Referenced by gp(), and geometryXMLparser.Alignable::pos().

153 { return layers[l]->z[indeces[2*i+l]];}
int i
Definition: DBlmapReader.cc:9
std::array< RecHitsSortedInPhi const *, 2 > layers
std::vector< int > indeces

Member Data Documentation

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

Definition at line 163 of file RecHitsSortedInPhi.h.

Referenced by add(), clear(), empty(), hit(), phi(), reserve(), rv(), shrink_to_fit(), size(), x(), y(), and z().

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

Definition at line 160 of file RecHitsSortedInPhi.h.

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