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 (HitDoublets &&rh)
 
 HitDoublets (RecHitsSortedInPhi const &in, RecHitsSortedInPhi const &out)
 
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.

126 { inner = 0, outer = 1 };

Constructor & Destructor Documentation

◆ HitDoublets() [1/2]

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

Definition at line 132 of file RecHitsSortedInPhi.h.

132 : layers{{&in, &out}} {}

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

◆ 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)) {}

Member Function Documentation

◆ add()

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

Definition at line 142 of file RecHitsSortedInPhi.h.

142 { indeces.emplace_back(il, ol); }

References indeces.

Referenced by counter.Counter::register().

◆ clear()

void HitDoublets::clear ( void  )
inline

Definition at line 139 of file RecHitsSortedInPhi.h.

139 { indeces.clear(); }

References indeces.

◆ detLayer()

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

Definition at line 145 of file RecHitsSortedInPhi.h.

145 { return layers[l]->layer; }

References cmsLHEtoEOSManager::l, and layers.

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

◆ empty()

bool HitDoublets::empty ( void  ) const
inline

Definition at line 138 of file RecHitsSortedInPhi.h.

138 { return indeces.empty(); }

References indeces.

◆ gp()

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

Definition at line 161 of file RecHitsSortedInPhi.h.

161 { return GlobalPoint(x(i, l), y(i, l), z(i, l)); }

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

◆ hit()

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

Definition at line 150 of file RecHitsSortedInPhi.h.

150 { return layers[l]->theHits[index(i, l)].hit(); }

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

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

◆ index()

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

Definition at line 144 of file RecHitsSortedInPhi.h.

144 { return l == inner ? innerHitId(i) : outerHitId(i); }

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

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

◆ innerHitId()

int HitDoublets::innerHitId ( int  i) const
inline

Definition at line 148 of file RecHitsSortedInPhi.h.

148 { return indeces[i].first; }

References mps_fire::i, and indeces.

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

◆ innerLayer()

HitLayer const& HitDoublets::innerLayer ( ) const
inline

Definition at line 146 of file RecHitsSortedInPhi.h.

146 { return *layers[inner]; }

References inner, and layers.

◆ outerHitId()

int HitDoublets::outerHitId ( int  i) const
inline

Definition at line 149 of file RecHitsSortedInPhi.h.

149 { return indeces[i].second; }

References mps_fire::i, and indeces.

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

◆ outerLayer()

HitLayer const& HitDoublets::outerLayer ( ) const
inline

Definition at line 147 of file RecHitsSortedInPhi.h.

147 { return *layers[outer]; }

References layers, and outer.

◆ 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.

153  {
154  float xp = x(i, l);
155  float yp = y(i, l);
156  return std::sqrt(xp * xp + yp * yp);
157  }

References mps_fire::i, cmsLHEtoEOSManager::l, mathSSE::sqrt(), x(), and y().

◆ reserve()

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

Definition at line 136 of file RecHitsSortedInPhi.h.

136 { indeces.reserve(s); }

References indeces, and alignCSCRings::s.

◆ rv()

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

Definition at line 152 of file RecHitsSortedInPhi.h.

152 { return layers[l]->rv(index(i, l)); }

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

Referenced by CACell::getOuterR().

◆ shrink_to_fit()

void HitDoublets::shrink_to_fit ( )
inline

Definition at line 140 of file RecHitsSortedInPhi.h.

140 { indeces.shrink_to_fit(); }

References 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

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

mps_fire.i
i
Definition: mps_fire.py:428
HitDoublets::y
float y(int i, layer l) const
Definition: RecHitsSortedInPhi.h:160
HitDoublets::outer
Definition: RecHitsSortedInPhi.h:126
HitDoublets::x
float x(int i, layer l) const
Definition: RecHitsSortedInPhi.h:159
HitDoublets::indeces
std::vector< ADoublet > indeces
Definition: RecHitsSortedInPhi.h:166
HitDoublets::layers
std::array< RecHitsSortedInPhi const *, 2 > layers
Definition: RecHitsSortedInPhi.h:164
alignCSCRings.s
s
Definition: alignCSCRings.py:92
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
recoMuon::in
Definition: RecoMuonEnumerators.h:6
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
HitDoublets::z
float z(int i, layer l) const
Definition: RecHitsSortedInPhi.h:158
HitDoublets::outerHitId
int outerHitId(int i) const
Definition: RecHitsSortedInPhi.h:149
eostools.move
def move(src, dest)
Definition: eostools.py:511
HitDoublets::inner
Definition: RecHitsSortedInPhi.h:126
HitDoublets::innerHitId
int innerHitId(int i) const
Definition: RecHitsSortedInPhi.h:148
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HitDoublets::index
int index(int i, layer l) const
Definition: RecHitsSortedInPhi.h:144