PandaRoot
FTSCAHitsV Class Reference

#include <FTSCAHitsV.h>

Public Types

typedef FTSCAHitV T
 

Public Member Functions

FTSCAElementsOnStation< T > & OnStation (char i)
 
const FTSCAElementsOnStation< T > & OnStation (char i) const
 
FTSCAElementsOnStation< T > & operator[] (char i)
 
const FTSCAElementsOnStation< T > & operator[] (char i) const
 
 FTSCAHitsV (const FTSCAHits &hits)
 
 FTSCAHitsV (int nSta)
 
int NStations () const
 
Toperator[] (TES i)
 
const Toperator[] (TES i) const
 
void Add (const T &hit)
 
void Clean ()
 

Protected Attributes

vector< FTSCAElementsOnStation< T > > fElement
 

Detailed Description

Definition at line 142 of file FTSCAHitsV.h.

Member Typedef Documentation

◆ T

Definition at line 144 of file FTSCAHitsV.h.

Constructor & Destructor Documentation

◆ FTSCAHitsV() [1/2]

FTSCAHitsV::FTSCAHitsV ( const FTSCAHits hits)
inline

Definition at line 377 of file FTSCAHitsV.h.

References FTSCAHitV::FTSCAHitV(), i, FTSCAHits::NStations(), and FTSCAHits::OnStation().

378 {
379  fElement.resize(hits.NStations());
380  for (int i = 0; i < hits.NStations(); ++i) {
381  fElement[i].IStation() = i;
382  const FTSCAElementsOnStation<FTSCAHit> &hs = hits.OnStation(i);
383  for (unsigned int iH = 0; iH < hs.size(); iH += float_v::Size) {
384  float_m valid = static_cast<float_m>(uint_v::IndexesFromZero() < uint_v(hs.size() - iH));
385  fElement[i].push_back(FTSCAHitV(&(hs[iH]), valid));
386  }
387  }
388 }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
unsigned int i
Definition: P4_F32vec4.h:33
char NStations() const
Definition: FTSCAHits.h:191
FTSCAElementsOnStation< T > & OnStation(char i)
Definition: FTSCAHits.h:157

◆ FTSCAHitsV() [2/2]

FTSCAHitsV::FTSCAHitsV ( int  nSta)
inline

Definition at line 169 of file FTSCAHitsV.h.

References i, and FTSCAHitV::IStation().

170  {
171  fElement.resize(nSta);
172  for (int i = 0; i < nSta; ++i)
173  fElement[i].IStation() = i;
174  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
unsigned int i
Definition: P4_F32vec4.h:33

Member Function Documentation

◆ Add()

void FTSCAHitsV::Add ( const T hit)
inline

Definition at line 181 of file FTSCAHitsV.h.

References FTSCAHitV::IStation().

182  {
183  const int iSta = hit.IStation();
184  fElement[iSta].push_back(hit);
185  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190

◆ Clean()

void FTSCAHitsV::Clean ( )
inline

Definition at line 390 of file FTSCAHitsV.h.

391 { // remove used hits TODO
392  // for( unsigned int i = 0; i < fElement.size(); ++i ) {
393  // FTSCAElementsOnStation<T>& hits = fElement[i];
394  // FTSCAElementsOnStation<T> tmp;
395  // tmp.IStation() = i;
396  // tmp.resize( hits.size() );
397  // for( unsigned int iH = 0; iH < hits.size(); ++iH ) {
398  // if ( hits[iH].IsUsed() ) continue;
399  // tmp.push_back( hits[iH] );
400  // }
401  // hits = tmp;
402  // tmp.clear();
403  // }
404 }

◆ NStations()

int FTSCAHitsV::NStations ( ) const
inline

Definition at line 176 of file FTSCAHitsV.h.

176 { return fElement.size(); }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190

◆ OnStation() [1/2]

FTSCAElementsOnStation<T>& FTSCAHitsV::OnStation ( char  i)
inline

Definition at line 146 of file FTSCAHitsV.h.

References i.

147  {
148  assert((unsigned char)i < fElement.size());
149  return fElement[i];
150  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
unsigned int i
Definition: P4_F32vec4.h:33

◆ OnStation() [2/2]

const FTSCAElementsOnStation<T>& FTSCAHitsV::OnStation ( char  i) const
inline

Definition at line 151 of file FTSCAHitsV.h.

References i.

152  {
153  assert((unsigned char)i < fElement.size());
154  return fElement[i];
155  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
unsigned int i
Definition: P4_F32vec4.h:33

◆ operator[]() [1/4]

FTSCAElementsOnStation<T>& FTSCAHitsV::operator[] ( char  i)
inline

Definition at line 156 of file FTSCAHitsV.h.

References i.

157  {
158  assert((unsigned char)i < fElement.size());
159  return fElement[i];
160  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
unsigned int i
Definition: P4_F32vec4.h:33

◆ operator[]() [2/4]

const FTSCAElementsOnStation<T>& FTSCAHitsV::operator[] ( char  i) const
inline

Definition at line 161 of file FTSCAHitsV.h.

References i.

162  {
163  assert((unsigned char)i < fElement.size());
164  return fElement[i];
165  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
unsigned int i
Definition: P4_F32vec4.h:33

◆ operator[]() [3/4]

T& FTSCAHitsV::operator[] ( TES  i)
inline

Definition at line 178 of file FTSCAHitsV.h.

References TES::e, and TES::s.

178 { return fElement[i.s][i.e]; }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
char s
Definition: FTSCATES.h:33
unsigned int e
Definition: FTSCATES.h:34

◆ operator[]() [4/4]

const T& FTSCAHitsV::operator[] ( TES  i) const
inline

Definition at line 179 of file FTSCAHitsV.h.

References TES::e, and TES::s.

179 { return fElement[i.s][i.e]; }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:190
char s
Definition: FTSCATES.h:33
unsigned int e
Definition: FTSCATES.h:34

Member Data Documentation

◆ fElement

vector<FTSCAElementsOnStation<T> > FTSCAHitsV::fElement
protected

Definition at line 190 of file FTSCAHitsV.h.


The documentation for this class was generated from the following file: