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 130 of file FTSCAHitsV.h.

Member Typedef Documentation

◆ T

Definition at line 132 of file FTSCAHitsV.h.

Constructor & Destructor Documentation

◆ FTSCAHitsV() [1/2]

FTSCAHitsV::FTSCAHitsV ( const FTSCAHits hits)
inline

Definition at line 365 of file FTSCAHitsV.h.

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

366 {
367  fElement.resize(hits.NStations());
368  for (int i = 0; i < hits.NStations(); ++i) {
369  fElement[i].IStation() = i;
370  const FTSCAElementsOnStation<FTSCAHit> &hs = hits.OnStation(i);
371  for (unsigned int iH = 0; iH < hs.size(); iH += float_v::Size) {
372  float_m valid = static_cast<float_m>(uint_v::IndexesFromZero() < uint_v(hs.size() - iH));
373  fElement[i].push_back(FTSCAHitV(&(hs[iH]), valid));
374  }
375  }
376 }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:178
unsigned int i
Definition: P4_F32vec4.h:21
char NStations() const
Definition: FTSCAHits.h:179
FTSCAElementsOnStation< T > & OnStation(char i)
Definition: FTSCAHits.h:145

◆ FTSCAHitsV() [2/2]

FTSCAHitsV::FTSCAHitsV ( int  nSta)
inline

Definition at line 157 of file FTSCAHitsV.h.

References i, and FTSCAHitV::IStation().

158  {
159  fElement.resize(nSta);
160  for (int i = 0; i < nSta; ++i)
161  fElement[i].IStation() = i;
162  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:178
unsigned int i
Definition: P4_F32vec4.h:21

Member Function Documentation

◆ Add()

void FTSCAHitsV::Add ( const T hit)
inline

Definition at line 169 of file FTSCAHitsV.h.

References FTSCAHitV::IStation().

170  {
171  const int iSta = hit.IStation();
172  fElement[iSta].push_back(hit);
173  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:178

◆ Clean()

void FTSCAHitsV::Clean ( )
inline

Definition at line 378 of file FTSCAHitsV.h.

379 { // remove used hits TODO
380  // for( unsigned int i = 0; i < fElement.size(); ++i ) {
381  // FTSCAElementsOnStation<T>& hits = fElement[i];
382  // FTSCAElementsOnStation<T> tmp;
383  // tmp.IStation() = i;
384  // tmp.resize( hits.size() );
385  // for( unsigned int iH = 0; iH < hits.size(); ++iH ) {
386  // if ( hits[iH].IsUsed() ) continue;
387  // tmp.push_back( hits[iH] );
388  // }
389  // hits = tmp;
390  // tmp.clear();
391  // }
392 }

◆ NStations()

int FTSCAHitsV::NStations ( ) const
inline

Definition at line 164 of file FTSCAHitsV.h.

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

◆ OnStation() [1/2]

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

Definition at line 134 of file FTSCAHitsV.h.

References i.

135  {
136  assert((unsigned char)i < fElement.size());
137  return fElement[i];
138  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:178
unsigned int i
Definition: P4_F32vec4.h:21

◆ OnStation() [2/2]

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

Definition at line 139 of file FTSCAHitsV.h.

References i.

140  {
141  assert((unsigned char)i < fElement.size());
142  return fElement[i];
143  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:178
unsigned int i
Definition: P4_F32vec4.h:21

◆ operator[]() [1/4]

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

Definition at line 144 of file FTSCAHitsV.h.

References i.

145  {
146  assert((unsigned char)i < fElement.size());
147  return fElement[i];
148  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:178
unsigned int i
Definition: P4_F32vec4.h:21

◆ operator[]() [2/4]

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

Definition at line 149 of file FTSCAHitsV.h.

References i.

150  {
151  assert((unsigned char)i < fElement.size());
152  return fElement[i];
153  }
vector< FTSCAElementsOnStation< T > > fElement
Definition: FTSCAHitsV.h:178
unsigned int i
Definition: P4_F32vec4.h:21

◆ operator[]() [3/4]

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

Definition at line 166 of file FTSCAHitsV.h.

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

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

◆ operator[]() [4/4]

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

Definition at line 167 of file FTSCAHitsV.h.

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

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

Member Data Documentation

◆ fElement

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

Definition at line 178 of file FTSCAHitsV.h.


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