CMS 3D CMS Logo

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)
 
 HitDoublets (HitDoublets &&rh)
 
int innerHitId (int i) const
 
int outerHitId (int i) 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< 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
HitDoublets::HitDoublets ( HitDoublets &&  rh)
inline

Definition at line 138 of file RecHitsSortedInPhi.h.

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

Member Function Documentation

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

Definition at line 146 of file RecHitsSortedInPhi.h.

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

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.

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 checklumidiff::l, and LayerTriplets::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.

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

Definition at line 158 of file RecHitsSortedInPhi.h.

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

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

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

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

151 { 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
int HitDoublets::innerHitId ( int  i) const
inline

Definition at line 149 of file RecHitsSortedInPhi.h.

References i.

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

149 {return indeces[2*i];}
int i
Definition: DBlmapReader.cc:9
std::vector< int > indeces
int HitDoublets::outerHitId ( int  i) const
inline

Definition at line 150 of file RecHitsSortedInPhi.h.

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

150 {return indeces[2*i+1];}
int i
Definition: DBlmapReader.cc:9
std::vector< int > indeces
float HitDoublets::phi ( int  i,
layer  l 
) const
inline
float HitDoublets::r ( int  i,
layer  l 
) const
inline

Definition at line 154 of file RecHitsSortedInPhi.h.

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

154 { float xp = x(i,l); float yp = y(i,l); return sqrt (xp*xp + yp*yp);}
int i
Definition: DBlmapReader.cc:9
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 140 of file RecHitsSortedInPhi.h.

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 153 of file RecHitsSortedInPhi.h.

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

Referenced by PixelTripletHLTGenerator::hitTriplets().

153 { 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.

Referenced by HitPairGeneratorFromLayerPair::doublets().

144 { indeces.shrink_to_fit();}
std::vector< int > 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

Definition at line 155 of file RecHitsSortedInPhi.h.

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

Referenced by PixelTripletLargeTipGenerator::hitTriplets(), PixelTripletHLTGenerator::hitTriplets(), and geometryXMLparser.Alignable::pos().

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

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

Definition at line 162 of file RecHitsSortedInPhi.h.