|
ATLAS Offline Software
|
Go to the documentation of this file.
3 #ifndef FPGATrackSimGenScanBinning_H
4 #define FPGATrackSimGenScanBinning_H
60 #include "GaudiKernel/StatusCode.h"
79 typedef std::vector<unsigned int>
IdxSet;
88 virtual const std::string &
parNames(
unsigned i)
const = 0;
93 virtual std::vector<unsigned>
slicePars()
const = 0;
94 virtual std::vector<unsigned>
scanPars()
const = 0;
140 std::vector<unsigned> retv =
slicePars();
142 retv.insert(retv.end(),
scan.begin(),
scan.end());
189 std::vector<unsigned>
subVec(
const std::vector<unsigned>& elems,
const std::vector<unsigned>& invec)
const;
201 static constexpr
unsigned NPars = 5;
252 virtual unsigned rowParIdx()
const override {
return 4;}
254 virtual std::vector<unsigned>
slicePars()
const override {
return std::vector<unsigned>({0,1}); }
255 virtual std::vector<unsigned>
scanPars()
const override {
return std::vector<unsigned>({2,3}); }
327 std::pair<double, double>
getXY(
double r,
double phi)
const;
331 std::pair<double, double>
getRotationAngles(
const std::pair<double, double>& xy1,
const std::pair<double, double>& xy2)
const;
334 std::pair<double, double>
rotateXY(
const std::pair<double, double>& xy,
const std::pair<double, double>& ang)
const;
339 std::pair<double, double>
xy1p;
340 std::pair<double, double>
xy2p;
389 virtual unsigned rowParIdx()
const override {
return 4;}
390 virtual std::vector<unsigned>
slicePars()
const override {
return std::vector<unsigned>({0,1}); }
391 virtual std::vector<unsigned>
scanPars()
const override {
return std::vector<unsigned>({2,3}); }
402 keypars.
z1 = parset[0];
403 keypars.
z2 = parset[1];
404 keypars.
phi1 = parset[2];
405 keypars.
phi2 = parset[3];
406 keypars.
xm = parset[4];
458 virtual unsigned rowParIdx()
const override {
return 4;}
459 virtual std::vector<unsigned>
slicePars()
const override {
return std::vector<unsigned>({2,3,4}); }
460 virtual std::vector<unsigned>
scanPars()
const override {
return std::vector<unsigned>({0,1}); }
471 keypars.
z1 = parset[0];
472 keypars.
z2 = parset[1];
473 keypars.
phi1 = parset[2];
474 keypars.
phi2 = parset[3];
475 keypars.
xm = parset[4];
497 auto tmppars = keypars;
514 if (hit->getZ() < lowz_in + (lowz_out-lowz_in) * (hit->getR()-r1)/(r2-r1))
515 return std::pair<unsigned, unsigned>(0, 0);
517 if (hit->getZ() > highz_in + (highz_out-highz_in) * (hit->getR()-r1)/(r2-r1))
518 return std::pair<unsigned, unsigned>(0, 0);
530 #endif // FPGATrackSimGenScanBinning_H
std::vector< unsigned int > IdxSet
void xrange(TH1 *h, bool symmetric)
static double phiFromPars(double r, const FPGATrackSimTrackPars &pars)
std::pair< double, double > xy1p
virtual std::vector< unsigned > scanBins() const
virtual std::vector< unsigned > slicePars() const override
std::vector< double > m_parStep
std::pair< double, double > rotateXY(const std::pair< double, double > &xy, const std::pair< double, double > &ang) const
Scalar phi() const
phi method
FPGATrackSimGenScanPhiSlicedKeyLyrBinning(double r_in, double r_out)
std::vector< double > ParSet
StatusCode setIdxSubVec(IdxSet &idx, const std::vector< unsigned > &subvecelems, const std::vector< unsigned > &subvecidx) const
virtual double phiHistScale() const override
static constexpr double CurvatureConstant
virtual double rowPar([[maybe_unused]] const ParSet &pars, [[maybe_unused]] FPGATrackSimHit const *hit) const
virtual double etaResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug=false) const override
std::pair< double, double > getXY(double r, double phi) const
double deltaX(KeyLyrPars keypars, const FPGATrackSimHit *hit) const
bool inRange(unsigned par, double val) const
Scalar eta() const
pseudorapidity method
virtual std::pair< unsigned, unsigned > idxsetToRowParBinRange(const IdxSet &idx, [[maybe_unused]] FPGATrackSimHit const *hit) const override
virtual double sliceVar(FPGATrackSimHit const *hit) const override
static double ThetaFromEta(double eta)
virtual double sliceVar(FPGATrackSimHit const *hit) const override
Scalar theta() const
theta method
FPGATrackSimGenScanKeyLyrHelper(double r1, double r2)
virtual std::vector< unsigned > sliceAndScanIdx(const IdxSet &idx) const
double xmForHit(KeyLyrPars keypars, const FPGATrackSimHit *hit) const
virtual bool hitInSlice(const IdxSet &idx, FPGATrackSimHit const *hit) const
virtual const ParSet trackParsToParSet(const FPGATrackSimTrackPars &pars) const override
FPGATrackSimTrackPars keyParsToTrackPars(const KeyLyrPars &keypars) const
virtual double etaHistScale() const override
virtual const std::string & parNames(unsigned i) const =0
std::vector< unsigned > m_parBins
virtual unsigned rowParIdx() const override
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
const std::vector< std::string > m_parNames
virtual double etaResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug=false) const =0
unsigned binIdx(unsigned par, double val) const
const std::vector< unsigned > m_invalidBin
virtual const std::string & parNames(unsigned i) const override
virtual double phiResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug=false) const override
virtual std::pair< unsigned, unsigned > idxsetToRowParBinRange(const IdxSet &idx, FPGATrackSimHit const *hit) const
virtual double phiHistScale() const =0
virtual double rowPar(const ParSet &parset, FPGATrackSimHit const *hit) const override
virtual std::vector< unsigned > scanIdx(const IdxSet &idx) const
virtual double phiResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug=false) const override
virtual const ParSet trackParsToParSet(const FPGATrackSimTrackPars &pars) const =0
std::pair< double, double > rotang
virtual double etaResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug=false) const override
virtual double phiHistScale() const override
virtual double sliceVar([[maybe_unused]] FPGATrackSimHit const *hit) const
virtual const std::string & parNames(unsigned i) const override
std::vector< double > m_parMax
unsigned rowParBinIdx(double val) const
std::vector< unsigned > sliceAndScanPars() const
virtual std::vector< unsigned > scanPars() const override
std::vector< double > m_parMin
double xExpected(KeyLyrPars keypars, const FPGATrackSimHit *hit) const
virtual double etaHistScale() const =0
static constexpr unsigned NPars
virtual std::vector< unsigned > sliceIdx(const IdxSet &idx) const
virtual double sliceVarExpected(const ParSet &pars, FPGATrackSimHit const *hit) const override
virtual std::vector< unsigned > scanPars() const =0
virtual std::vector< unsigned > slicePars() const =0
virtual double etaResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug) const override
virtual double phiResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug=false) const =0
ParSet keyparsToParSet(const FPGATrackSimGenScanKeyLyrHelper::KeyLyrPars &keypars) const
virtual unsigned rowParIdx() const override
virtual std::vector< unsigned > scanPars() const override
::StatusCode StatusCode
StatusCode definition for legacy code.
FPGATrackSimGenScanKeyLyrHelper m_keylyrtool
FPGATrackSimGenScanKeyLyrBinning(double r_in, double r_out)
virtual double phiResidual(const ParSet &parset, FPGATrackSimHit const *hit, [[maybe_unused]] bool debug) const override
std::pair< double, double > getRotatedHit(const std::pair< double, double > &rotang, const FPGATrackSimHit *hit) const
std::pair< double, double > xy2p
virtual unsigned rowIdx(const IdxSet &idx) const
virtual std::vector< unsigned > sliceAndScanBins() const
const std::vector< std::string > m_parNames
virtual const FPGATrackSimTrackPars parSetToTrackPars(const ParSet &parset) const override
std::pair< double, double > getRotationAngles(const std::pair< double, double > &xy1, const std::pair< double, double > &xy2) const
const std::vector< std::string > m_parNames
FPGATrackSimGenScanKeyLyrHelper m_keylyrtool
virtual double etaHistScale() const override
virtual const FPGATrackSimTrackPars parSetToTrackPars(const ParSet &parset) const override
: FPGATrackSim-specific class to represent an hit in the detector.
double zExpected(KeyLyrPars keypars, double r) const
static double parsToTrkPhi(const FPGATrackSimTrackPars &pars, FPGATrackSimHit const *hit)
rotatedConfig getRotatedConfig(const KeyLyrPars &keypars) const
virtual const ParSet trackParsToParSet(const FPGATrackSimTrackPars &pars) const override
double etaShift(const IdxSet &idx, FPGATrackSimHit const *hit, bool debug=false) const
virtual unsigned rowBin() const
const IdxSet parsToBin(FPGATrackSimTrackPars &pars) const
virtual bool hitInSlice(const IdxSet &idx, FPGATrackSimHit const *hit) const override
virtual double sliceVarExpected(const ParSet &pars, FPGATrackSimHit const *hit) const override
virtual double phiHistScale() const override
void scan(TDirectory *td=0, int depth=0)
virtual std::vector< unsigned > scanPars() const override
virtual const FPGATrackSimTrackPars parSetToTrackPars(const ParSet &parset) const =0
virtual const FPGATrackSimTrackPars parSetToTrackPars(const ParSet &parset) const override
double binLowEdge(unsigned par, unsigned bin) const
std::vector< unsigned > subVec(const std::vector< unsigned > &elems, const std::vector< unsigned > &invec) const
virtual unsigned rowParIdx() const =0
virtual unsigned rowParIdx() const override
virtual double rowPar(const ParSet &pars, FPGATrackSimHit const *hit) const override
virtual double etaHistScale() const override
virtual const ParSet trackParsToParSet(const FPGATrackSimTrackPars &pars) const override
double phiShift(const IdxSet &idx, FPGATrackSimHit const *hit, bool debug=false) const
virtual double sliceVarExpected([[maybe_unused]] const ParSet &pars, [[maybe_unused]] FPGATrackSimHit const *hit) const
KeyLyrPars trackParsToKeyPars(const FPGATrackSimTrackPars &pars) const
virtual const std::string & parNames(unsigned i) const override
std::vector< ParSet > makeVariationSet(const std::vector< unsigned > &scanpars, const IdxSet &idx) const
virtual std::vector< unsigned > slicePars() const override
virtual std::vector< unsigned > sliceBins() const
FPGATrackSimGenScanKeyLyrHelper::KeyLyrPars parSetToKeyPars(const ParSet &parset) const
FPGATrackSimGenScanStdTrkBinning()
double binCenter(unsigned par, unsigned bin) const
virtual std::vector< unsigned > slicePars() const override
ParSet keyparsToParSet(const FPGATrackSimGenScanKeyLyrHelper::KeyLyrPars &keypars) const
Structs that store the 5 track parameters.
static double EtaFromTheta(double theta)
double binHighEdge(unsigned par, unsigned bin) const
static double zFromPars(double r, const FPGATrackSimTrackPars &pars)
FPGATrackSimGenScanKeyLyrHelper::KeyLyrPars parSetToKeyPars(const ParSet &parset) const