Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
FPGATrackSimKeyLayerBinDesc Class Reference

#include <FPGATrackSimKeyLayerBinDesc.h>

Inheritance diagram for FPGATrackSimKeyLayerBinDesc:
Collaboration diagram for FPGATrackSimKeyLayerBinDesc:

Public Member Functions

 FPGATrackSimKeyLayerBinDesc (const std::string &algname, const std::string &name, const IInterface *ifc)
 
virtual StatusCode initialize () override
 
virtual const std::string & parNames (unsigned i) const override
 
virtual const ParSet trackParsToParSet (const FPGATrackSimTrackPars &pars) const override
 
virtual const FPGATrackSimTrackPars parSetToTrackPars (const ParSet &parset) const override
 
virtual double phiResidual (const ParSet &parset, FPGATrackSimHit const *hit) const override
 
virtual double etaResidual (const ParSet &parset, FPGATrackSimHit const *hit) const override
 
bool stepIsRPhi (const FPGATrackSimBinStep &step) const
 
bool stepIsREta (const FPGATrackSimBinStep &step) const
 
virtual bool hitInBin (const FPGATrackSimBinStep &step, const IdxSet &idx, StoredHit &storedhit) const override
 

Private Member Functions

ParSet keyparsToParSet (const FPGATrackSimKeyLayerTool::KeyLyrPars &keypars) const
 
FPGATrackSimKeyLayerTool::KeyLyrPars parSetToKeyPars (const ParSet &parset) const
 

Private Attributes

Gaudi::Property< double > m_rin {this, "rin", {-1.0}, "Radius of inner layer for keylayer definition"}
 
Gaudi::Property< double > m_rout {this, "rout", {-1.0}, "Radius of outer layer for keylayer definition"}
 
Gaudi::Property< bool > m_approxMath {this, "approxMath", {false}, "Use approximate math to emulate possible firmware"}
 
FPGATrackSimKeyLayerTool m_keylyrtool
 
const std::vector< std::string > m_parNames
 
const std::vector< unsigned > m_phipars {2, 3, 4}
 
const std::vector< unsigned > m_etapars {1, 2}
 

Detailed Description

Definition at line 44 of file FPGATrackSimKeyLayerBinDesc.h.

Constructor & Destructor Documentation

◆ FPGATrackSimKeyLayerBinDesc()

FPGATrackSimKeyLayerBinDesc::FPGATrackSimKeyLayerBinDesc ( const std::string &  algname,
const std::string &  name,
const IInterface *  ifc 
)
inline

Definition at line 47 of file FPGATrackSimKeyLayerBinDesc.h.

47  :
48  base_class(algname, name, ifc), m_parNames({"zR1", "zR2", "phiR1", "phiR2", "xm"})
49  {
50  declareInterface<IFPGATrackSimBinDesc>(this);
51  }

Member Function Documentation

◆ etaResidual()

virtual double FPGATrackSimKeyLayerBinDesc::etaResidual ( const ParSet parset,
FPGATrackSimHit const hit 
) const
inlineoverridevirtual

Definition at line 73 of file FPGATrackSimKeyLayerBinDesc.h.

73  {
74  return hit->getZ()- m_keylyrtool.zExpected(parSetToKeyPars(parset),hit->getR());
75  }

◆ hitInBin()

bool FPGATrackSimKeyLayerBinDesc::hitInBin ( const FPGATrackSimBinStep step,
const IdxSet idx,
StoredHit storedhit 
) const
overridevirtual

Definition at line 31 of file FPGATrackSimKeyLayerBinDesc.cxx.

34 {
35  double r1 = m_keylyrtool.R1();
36  double r2 = m_keylyrtool.R2();
37  double hitr= storedhit.hitptr->getR();
38 
39  bool passesPhi = true;
40  bool passesEta = true;
41 
42  if (stepIsRPhi(step)) {
43  // distance of hit from bin center
44  storedhit.phiShift =
45  phiResidual(step.binCenter(idx), storedhit.hitptr.get());
46 
47  // Get expected curvature shift from bin center
48  auto half_xm_bin_pars = parSetToKeyPars(step.binCenter(idx));
49  half_xm_bin_pars.xm = step.binWidth(4)/2.0; // 4 = xm par
50  double xshift =
51  m_keylyrtool.xExpected(half_xm_bin_pars, storedhit.hitptr.get());
52  double xrange = xshift + r1 * step.binWidth(2) / 2.0
53  + ((r2*step.binWidth(3) - r1*step.binWidth(2)) / (r2 - r1) * (hitr - r1))/2.0;
54 
55  passesPhi = std::abs(storedhit.phiShift) < xrange;
56  }
57 
58  if (stepIsREta(step)) {
59  // distance of hit from bin center
60  storedhit.etaShift = etaResidual(step.binCenter(idx),storedhit.hitptr.get());
61 
62  double width_z_in = step.binWidth(0)/2.0;
63  double width_z_out = step.binWidth(1)/2.0;
64  double zrange = width_z_in + (width_z_out-width_z_in) * (hitr-r1)/(r2-r1);
65 
66  passesEta = std::abs(storedhit.etaShift) < zrange;
67 
68  }
69 
70  return passesPhi && passesEta;
71 }

◆ initialize()

StatusCode FPGATrackSimKeyLayerBinDesc::initialize ( )
overridevirtual

Definition at line 15 of file FPGATrackSimKeyLayerBinDesc.cxx.

16 {
17  // Dump the configuration to make sure it propagated through right
18  const std::vector<Gaudi::Details::PropertyBase*> props = this->getProperties();
19  for( Gaudi::Details::PropertyBase* prop : props ) {
20  if (prop->ownerTypeName()==this->type()) {
21  ATH_MSG_DEBUG("Property:\t" << prop->name() << "\t : \t" << prop->toString());
22  }
23  }
24 
27 
28  return StatusCode::SUCCESS;
29 }

◆ keyparsToParSet()

ParSet FPGATrackSimKeyLayerBinDesc::keyparsToParSet ( const FPGATrackSimKeyLayerTool::KeyLyrPars keypars) const
inlineprivate

Definition at line 93 of file FPGATrackSimKeyLayerBinDesc.h.

93  {
94  return ParSet({keypars.z1,keypars.z2,keypars.phi1,keypars.phi2,keypars.xm});
95  }

◆ parNames()

virtual const std::string& FPGATrackSimKeyLayerBinDesc::parNames ( unsigned  i) const
inlineoverridevirtual

Definition at line 55 of file FPGATrackSimKeyLayerBinDesc.h.

55 { return m_parNames[i]; }

◆ parSetToKeyPars()

FPGATrackSimKeyLayerTool::KeyLyrPars FPGATrackSimKeyLayerBinDesc::parSetToKeyPars ( const ParSet parset) const
inlineprivate

Definition at line 96 of file FPGATrackSimKeyLayerBinDesc.h.

96  {
98  }

◆ parSetToTrackPars()

virtual const FPGATrackSimTrackPars FPGATrackSimKeyLayerBinDesc::parSetToTrackPars ( const ParSet parset) const
inlineoverridevirtual

Definition at line 62 of file FPGATrackSimKeyLayerBinDesc.h.

62  {
64  }

◆ phiResidual()

virtual double FPGATrackSimKeyLayerBinDesc::phiResidual ( const ParSet parset,
FPGATrackSimHit const hit 
) const
inlineoverridevirtual

Definition at line 69 of file FPGATrackSimKeyLayerBinDesc.h.

69  {
70  return m_keylyrtool.deltaX(parSetToKeyPars(parset), hit);
71  }

◆ stepIsREta()

bool FPGATrackSimKeyLayerBinDesc::stepIsREta ( const FPGATrackSimBinStep step) const

Definition at line 85 of file FPGATrackSimKeyLayerBinDesc.cxx.

86  {
87  for (const unsigned &steppar : step.stepPars()) {
88  for (const unsigned &etapar : m_etapars) {
89  if (steppar == etapar)
90  return true;
91  }
92  }
93  return false;
94 }

◆ stepIsRPhi()

bool FPGATrackSimKeyLayerBinDesc::stepIsRPhi ( const FPGATrackSimBinStep step) const

Definition at line 74 of file FPGATrackSimKeyLayerBinDesc.cxx.

75  {
76  for (const unsigned &steppar : step.stepPars()) {
77  for (const unsigned &phipar : m_phipars) {
78  if (steppar == phipar)
79  return true;
80  }
81  }
82  return false;
83 }

◆ trackParsToParSet()

virtual const ParSet FPGATrackSimKeyLayerBinDesc::trackParsToParSet ( const FPGATrackSimTrackPars pars) const
inlineoverridevirtual

Definition at line 59 of file FPGATrackSimKeyLayerBinDesc.h.

59  {
61  }

Member Data Documentation

◆ m_approxMath

Gaudi::Property<bool> FPGATrackSimKeyLayerBinDesc::m_approxMath {this, "approxMath", {false}, "Use approximate math to emulate possible firmware"}
private

Definition at line 90 of file FPGATrackSimKeyLayerBinDesc.h.

◆ m_etapars

const std::vector<unsigned> FPGATrackSimKeyLayerBinDesc::m_etapars {1, 2}
private

Definition at line 105 of file FPGATrackSimKeyLayerBinDesc.h.

◆ m_keylyrtool

FPGATrackSimKeyLayerTool FPGATrackSimKeyLayerBinDesc::m_keylyrtool
private

Definition at line 101 of file FPGATrackSimKeyLayerBinDesc.h.

◆ m_parNames

const std::vector<std::string> FPGATrackSimKeyLayerBinDesc::m_parNames
private

Definition at line 102 of file FPGATrackSimKeyLayerBinDesc.h.

◆ m_phipars

const std::vector<unsigned> FPGATrackSimKeyLayerBinDesc::m_phipars {2, 3, 4}
private

Definition at line 104 of file FPGATrackSimKeyLayerBinDesc.h.

◆ m_rin

Gaudi::Property<double> FPGATrackSimKeyLayerBinDesc::m_rin {this, "rin", {-1.0}, "Radius of inner layer for keylayer definition"}
private

Definition at line 88 of file FPGATrackSimKeyLayerBinDesc.h.

◆ m_rout

Gaudi::Property<double> FPGATrackSimKeyLayerBinDesc::m_rout {this, "rout", {-1.0}, "Radius of outer layer for keylayer definition"}
private

Definition at line 89 of file FPGATrackSimKeyLayerBinDesc.h.


The documentation for this class was generated from the following files:
FPGATrackSimKeyLayerTool::setR1
void setR1(const double r1)
Definition: FPGATrackSimKeyLayerTool.h:105
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
xrange
void xrange(TH1 *h, bool symmetric)
Definition: computils.cxx:516
FPGATrackSimKeyLayerBinDesc::keyparsToParSet
ParSet keyparsToParSet(const FPGATrackSimKeyLayerTool::KeyLyrPars &keypars) const
Definition: FPGATrackSimKeyLayerBinDesc.h:93
FPGATrackSimKeyLayerBinDesc::m_etapars
const std::vector< unsigned > m_etapars
Definition: FPGATrackSimKeyLayerBinDesc.h:105
FPGATrackSimBinUtil::StoredHit::hitptr
std::shared_ptr< const FPGATrackSimHit > hitptr
Definition: FPGATrackSimBinUtil.h:92
getMenu.algname
algname
Definition: getMenu.py:54
FPGATrackSimKeyLayerBinDesc::parSetToKeyPars
FPGATrackSimKeyLayerTool::KeyLyrPars parSetToKeyPars(const ParSet &parset) const
Definition: FPGATrackSimKeyLayerBinDesc.h:96
FPGATrackSimKeyLayerTool::R2
double R2() const
Definition: FPGATrackSimKeyLayerTool.h:104
FPGATrackSimKeyLayerBinDesc::m_rout
Gaudi::Property< double > m_rout
Definition: FPGATrackSimKeyLayerBinDesc.h:89
FPGATrackSimKeyLayerBinDesc::m_parNames
const std::vector< std::string > m_parNames
Definition: FPGATrackSimKeyLayerBinDesc.h:102
FPGATrackSimKeyLayerTool::KeyLyrPars::xm
double xm
Definition: FPGATrackSimKeyLayerTool.h:60
MCP::ScaleSmearParam::r2
@ r2
FPGATrackSimKeyLayerTool::KeyLyrPars::phi2
double phi2
Definition: FPGATrackSimKeyLayerTool.h:59
FPGATrackSimKeyLayerBinDesc::m_phipars
const std::vector< unsigned > m_phipars
Definition: FPGATrackSimKeyLayerBinDesc.h:104
FPGATrackSimKeyLayerTool::deltaX
double deltaX(const KeyLyrPars &keypars, const FPGATrackSimHit *hit) const
Definition: FPGATrackSimKeyLayerTool.cxx:156
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FPGATrackSimKeyLayerBinDesc::m_rin
Gaudi::Property< double > m_rin
Definition: FPGATrackSimKeyLayerBinDesc.h:88
FPGATrackSimKeyLayerBinDesc::stepIsREta
bool stepIsREta(const FPGATrackSimBinStep &step) const
Definition: FPGATrackSimKeyLayerBinDesc.cxx:85
FPGATrackSimBinUtil::ParSet
Definition: FPGATrackSimBinUtil.h:45
FPGATrackSimKeyLayerTool::KeyLyrPars::z2
double z2
Definition: FPGATrackSimKeyLayerTool.h:57
FPGATrackSimKeyLayerBinDesc::phiResidual
virtual double phiResidual(const ParSet &parset, FPGATrackSimHit const *hit) const override
Definition: FPGATrackSimKeyLayerBinDesc.h:69
FPGATrackSimKeyLayerTool::KeyLyrPars::phi1
double phi1
Definition: FPGATrackSimKeyLayerTool.h:58
FPGATrackSimKeyLayerTool::setR2
void setR2(const double r2)
Definition: FPGATrackSimKeyLayerTool.h:106
FPGATrackSimKeyLayerTool::trackParsToKeyPars
KeyLyrPars trackParsToKeyPars(const FPGATrackSimTrackPars &pars) const
Definition: FPGATrackSimKeyLayerTool.cxx:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
FPGATrackSimKeyLayerTool::R1
double R1() const
Definition: FPGATrackSimKeyLayerTool.h:103
zrange
void zrange(double nsigma, double fence, double &zed, double &zedMinus, double &zedPlus, const SG::ReadCondHandleKey< InDet::BeamSpotData > &bs, const EventContext &ctx)
Definition: RoiUpdaterTool.cxx:33
FPGATrackSimKeyLayerTool::KeyLyrPars::z1
double z1
Definition: FPGATrackSimKeyLayerTool.h:56
FPGATrackSimKeyLayerTool::xExpected
double xExpected(const KeyLyrPars &keypars, const FPGATrackSimHit *hit) const
Definition: FPGATrackSimKeyLayerTool.cxx:170
FPGATrackSimKeyLayerBinDesc::m_keylyrtool
FPGATrackSimKeyLayerTool m_keylyrtool
Definition: FPGATrackSimKeyLayerBinDesc.h:101
FPGATrackSimKeyLayerBinDesc::stepIsRPhi
bool stepIsRPhi(const FPGATrackSimBinStep &step) const
Definition: FPGATrackSimKeyLayerBinDesc.cxx:74
FPGATrackSimKeyLayerTool::zExpected
double zExpected(const KeyLyrPars &keypars, double r) const
Definition: FPGATrackSimKeyLayerTool.cxx:126
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
LArCellBinning.step
step
Definition: LArCellBinning.py:158
FPGATrackSimBinUtil::StoredHit::etaShift
double etaShift
Definition: FPGATrackSimBinUtil.h:94
FPGATrackSimBinUtil::StoredHit::phiShift
double phiShift
Definition: FPGATrackSimBinUtil.h:93
MCP::ScaleSmearParam::r1
@ r1
FPGATrackSimKeyLayerBinDesc::etaResidual
virtual double etaResidual(const ParSet &parset, FPGATrackSimHit const *hit) const override
Definition: FPGATrackSimKeyLayerBinDesc.h:73
FPGATrackSimKeyLayerTool::keyParsToTrackPars
FPGATrackSimTrackPars keyParsToTrackPars(const KeyLyrPars &keypars) const
Definition: FPGATrackSimKeyLayerTool.cxx:79
FPGATrackSimKeyLayerTool::KeyLyrPars
Definition: FPGATrackSimKeyLayerTool.h:52