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

Member Typedef Documentation

◆ ADoublet

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

Definition at line 130 of file RecHitsSortedInPhi.h.

◆ Hit

Definition at line 129 of file RecHitsSortedInPhi.h.

◆ HitLayer

Definition at line 128 of file RecHitsSortedInPhi.h.

Member Enumeration Documentation

◆ layer

Enumerator
inner 
outer 

Definition at line 126 of file RecHitsSortedInPhi.h.

Constructor & Destructor Documentation

◆ HitDoublets() [1/2]

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

Definition at line 132 of file RecHitsSortedInPhi.h.

References recoMuon::in, and MillePedeFileConverter_cfg::out.

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

◆ HitDoublets() [2/2]

HitDoublets::HitDoublets ( HitDoublets &&  rh)
inline

Definition at line 134 of file RecHitsSortedInPhi.h.

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

Member Function Documentation

◆ add()

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

Definition at line 142 of file RecHitsSortedInPhi.h.

References indeces.

Referenced by counter.Counter::register().

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

◆ clear()

void HitDoublets::clear ( void  )
inline

Definition at line 139 of file RecHitsSortedInPhi.h.

References indeces.

139 { indeces.clear(); }
std::vector< ADoublet > indeces

◆ detLayer()

DetLayer const* HitDoublets::detLayer ( layer  l) const
inline

Definition at line 145 of file RecHitsSortedInPhi.h.

References MainPageGenerator::l, and layers.

Referenced by CACell::getInnerLayer(), and CACell::getOuterLayer().

145 { return layers[l]->layer; }
std::array< RecHitsSortedInPhi const *, 2 > layers

◆ empty()

bool HitDoublets::empty ( void  ) const
inline

Definition at line 138 of file RecHitsSortedInPhi.h.

References indeces.

138 { return indeces.empty(); }
std::vector< ADoublet > indeces

◆ gp()

GlobalPoint HitDoublets::gp ( int  i,
layer  l 
) const
inline

Definition at line 161 of file RecHitsSortedInPhi.h.

References mps_fire::i, MainPageGenerator::l, x(), y(), and z().

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

Hit const& HitDoublets::hit ( int  i,
layer  l 
) const
inline

Definition at line 150 of file RecHitsSortedInPhi.h.

References mps_fire::i, index(), MainPageGenerator::l, and layers.

Referenced by CACell::getInnerHit(), and CACell::getOuterHit().

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

◆ index()

int HitDoublets::index ( int  i,
layer  l 
) const
inline

Definition at line 144 of file RecHitsSortedInPhi.h.

References mps_fire::i, inner, innerHitId(), MainPageGenerator::l, and outerHitId().

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

◆ innerHitId()

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

◆ innerLayer()

HitLayer const& HitDoublets::innerLayer ( ) const
inline

Definition at line 146 of file RecHitsSortedInPhi.h.

References inner, and layers.

146 { return *layers[inner]; }
std::array< RecHitsSortedInPhi const *, 2 > layers

◆ outerHitId()

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

◆ outerLayer()

HitLayer const& HitDoublets::outerLayer ( ) const
inline

Definition at line 147 of file RecHitsSortedInPhi.h.

References layers, and outer.

147 { return *layers[outer]; }
std::array< RecHitsSortedInPhi const *, 2 > layers

◆ phi()

float HitDoublets::phi ( int  i,
layer  l 
) const
inline

◆ r()

float HitDoublets::r ( int  i,
layer  l 
) const
inline

Definition at line 153 of file RecHitsSortedInPhi.h.

References mps_fire::i, MainPageGenerator::l, 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:23
float y(int i, layer l) const

◆ reserve()

void HitDoublets::reserve ( std::size_t  s)
inline

Definition at line 136 of file RecHitsSortedInPhi.h.

References indeces, and alignCSCRings::s.

136 { indeces.reserve(s); }
std::vector< ADoublet > indeces

◆ rv()

float HitDoublets::rv ( int  i,
layer  l 
) const
inline

Definition at line 152 of file RecHitsSortedInPhi.h.

References mps_fire::i, index(), MainPageGenerator::l, and layers.

Referenced by CACell::getOuterR().

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

◆ shrink_to_fit()

void HitDoublets::shrink_to_fit ( )
inline

Definition at line 140 of file RecHitsSortedInPhi.h.

References indeces.

140 { indeces.shrink_to_fit(); }
std::vector< ADoublet > indeces

◆ size()

std::size_t HitDoublets::size ( void  ) const
inline

◆ x()

float HitDoublets::x ( int  i,
layer  l 
) const
inline

◆ y()

float HitDoublets::y ( int  i,
layer  l 
) const
inline

◆ z()

float HitDoublets::z ( int  i,
layer  l 
) const
inline

Definition at line 158 of file RecHitsSortedInPhi.h.

References mps_fire::i, index(), MainPageGenerator::l, and layers.

Referenced by CACell::getOuterZ(), gp(), geometryXMLparser.Alignable::pos(), and ntupleDataFormat._HitObject::r3D().

158 { return layers[l]->z[index(i, l)]; }
int index(int i, layer l) const
std::array< RecHitsSortedInPhi const *, 2 > layers

Member Data Documentation

◆ indeces

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

◆ layers

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