 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 if (
val.size() != 5) {
21 throw std::invalid_argument(
22 "Not enough parameters in ParSet initialization");
26 ParSet::operator
const std::vector<double>()
const {
27 return std::vector<double>(this->
begin(), this->
end());
31 if (
val.size() != 5) {
32 throw std::invalid_argument(
33 "Not enough parameters in IdxSet initialization");
37 IdxSet::operator
const std::vector<unsigned>()
const {
38 return std::vector<unsigned>(this->
begin(), this->
end());
46 os <<
" lyr: " << hit.
layer <<
" ";
47 os <<
" hash: " << hit.
hitptr->getIdentifierHash() <<
" ";
48 os <<
"(" << hit.
hitptr->getR() <<
", " << hit.
hitptr->getGPhi() <<
", " << hit.
hitptr->getZ() <<
") ";
61 std::vector<unsigned>
subVec(
const std::vector<unsigned> &elems,
63 std::vector<unsigned> retv;
64 for (
auto elem : elems) {
65 retv.push_back(invec[elem]);
71 const std::vector<unsigned> &subvecidx) {
73 if (subvecelems.size() != subvecidx.size()) {
74 throw std::invalid_argument(
75 "Setting FPGATrackSimGenScanBinningBase::setIdxSubVec with mismatched "
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");
84 idx[subvecelems[
i]] = subvecidx[
i];
95 std::vector<IdxSet> retv;
96 for (
unsigned corners = 0; corners <
unsigned((1 << scanpars.size()));
100 for (
auto &
par : scanpars) {
101 newidx[
par] =
idx[
par] + ((corners >> scanDimCnt) & 1);
104 retv.push_back(newidx);
140 return 2.0 *
atan(
exp(-1.0 * eta));
145 return -
log(
tan(theta / 2.0));
154 double zhit =
pars.z0 +
r /
tan(theta);
155 if (std::abs(
pars.qOverPt) > 0)
173 double r = hit->
getR();
174 double phi_hit = hit->
getGPhi();
std::ostream & operator<<(std::ostream &os, const std::vector< unsigned > &idx)
std::shared_ptr< const FPGATrackSimHit > hitptr
IdxSet(const std::vector< unsigned > &val)
static double phiFromPars(double r, const FPGATrackSimTrackPars &pars)
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
std::vector< unsigned > subVec(const std::vector< unsigned > &elems, const IdxSet &invec)
static double dPhidQOverPt(double hitr)
static double dPhiHitTrkFromPars(double r, const FPGATrackSimTrackPars &pars)
static double ThetaFromEta(double eta)
static constexpr double CurvatureConstant
Binning Utilities for GenScanTool.
static double parsToTrkPhi(const FPGATrackSimTrackPars &pars, FPGATrackSimHit const *hit)
void setIdxSubVec(IdxSet &idx, const std::vector< unsigned > &subvecelems, const std::vector< unsigned > &subvecidx)
static double EtaFromTheta(double theta)
std::vector< IdxSet > makeVariationSet(const std::vector< unsigned > &scanpars, const IdxSet &idx)
std::map< std::string, std::fstream > m_map
static double dZdEta(double eta)
static double zFromPars(double r, const FPGATrackSimTrackPars &pars)
ParSet(const std::vector< double > &val)