ATLAS Offline Software
Classes | Functions | Variables
FPGATrackSimBinUtil Namespace Reference

Classes

class  GeomHelpers
 
struct  IdxSet
 
struct  ParSet
 
struct  StoredHit
 
struct  StreamManager
 

Functions

std::vector< unsigned > subVec (const std::vector< unsigned > &elems, const IdxSet &invec)
 
void setIdxSubVec (IdxSet &idx, const std::vector< unsigned > &subvecelems, const std::vector< unsigned > &subvecidx)
 
std::vector< IdxSetmakeVariationSet (const std::vector< unsigned > &scanpars, const IdxSet &idx)
 
std::ostream & operator<< (std::ostream &os, const std::vector< unsigned > &idx)
 
std::ostream & operator<< (std::ostream &os, const StoredHit &hit)
 

Variables

const IdxSet invalidBin
 

Function Documentation

◆ makeVariationSet()

std::vector< IdxSet > FPGATrackSimBinUtil::makeVariationSet ( const std::vector< unsigned > &  scanpars,
const IdxSet idx 
)

Definition at line 93 of file FPGATrackSimBinUtil.cxx.

94  {
95  std::vector<IdxSet> retv;
96  for (unsigned corners = 0; corners < unsigned((1 << scanpars.size()));
97  corners++) {
98  IdxSet newidx = idx;
99  int scanDimCnt = 0;
100  for (auto &par : scanpars) {
101  newidx[par] = idx[par] + ((corners >> scanDimCnt) & 1);
102  scanDimCnt++;
103  }
104  retv.push_back(newidx);
105  }
106  return retv;
107 }

◆ operator<<() [1/2]

std::ostream & FPGATrackSimBinUtil::operator<< ( std::ostream &  os,
const std::vector< unsigned > &  idx 
)

Definition at line 120 of file FPGATrackSimBinUtil.cxx.

120  {
121  bool first = true;
122  for (auto &val : idx) {
123  if (!first)
124  os << ",";
125  os << val;
126  first = false;
127  }
128  return os;
129 }

◆ operator<<() [2/2]

std::ostream & FPGATrackSimBinUtil::operator<< ( std::ostream &  os,
const StoredHit hit 
)

Definition at line 44 of file FPGATrackSimBinUtil.cxx.

45 {
46  os << " lyr: " << hit.layer << " ";
47  os << " hash: " << hit.hitptr->getIdentifierHash() << " ";
48  os << "(" << hit.hitptr->getR() << ", " << hit.hitptr->getGPhi() << ", " << hit.hitptr->getZ() << ") ";
49  os << "[" << hit.phiShift << ", " << hit.etaShift << "]";
50  return os;
51 }

◆ setIdxSubVec()

void FPGATrackSimBinUtil::setIdxSubVec ( IdxSet idx,
const std::vector< unsigned > &  subvecelems,
const std::vector< unsigned > &  subvecidx 
)

Definition at line 70 of file FPGATrackSimBinUtil.cxx.

71  {
72 
73  if (subvecelems.size() != subvecidx.size()) {
74  throw std::invalid_argument(
75  "Setting FPGATrackSimGenScanBinningBase::setIdxSubVec with mismatched "
76  "sizes");
77  }
78 
79  for (unsigned i = 0; i < subvecelems.size(); i++) {
80  if (subvecelems[i] >= idx.size()) {
81  throw std::invalid_argument(
82  "FPGATrackSimGenScanBinningBase::setIdxSubVec input out of range");
83  }
84  idx[subvecelems[i]] = subvecidx[i];
85  }
86 }

◆ subVec()

std::vector< unsigned > FPGATrackSimBinUtil::subVec ( const std::vector< unsigned > &  elems,
const IdxSet invec 
)

Definition at line 61 of file FPGATrackSimBinUtil.cxx.

62  {
63  std::vector<unsigned> retv;
64  for (auto elem : elems) {
65  retv.push_back(invec[elem]);
66  }
67  return retv;
68 }

Variable Documentation

◆ invalidBin

const IdxSet FPGATrackSimBinUtil::invalidBin
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:28
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
DeMoScan.first
bool first
Definition: DeMoScan.py:534
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69