ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
FPGATrackSimGenScanTool::HitPairSet Struct Reference

#include <FPGATrackSimGenScanTool.h>

Collaboration diagram for FPGATrackSimGenScanTool::HitPairSet:

Public Member Functions

int addPair (const HitPair &pair)
 
const HitPairlastpair () const
 
const HitPairsecondtolastpair () const
 
bool hasHit (const StoredHit *hit) const
 
bool hasLayer (int layer) const
 
unsigned int lyrCnt () const
 
double MatchPhi (const HitPair &pair) const
 
double MatchEta (const HitPair &pair) const
 
double DeltaDeltaPhi (const HitPair &pair) const
 
double DeltaDeltaEta (const HitPair &pair) const
 
double PhiCurvature (const HitPair &pair) const
 
double EtaCurvature (const HitPair &pair) const
 
double DeltaPhiCurvature (const HitPair &pair) const
 
double DeltaEtaCurvature (const HitPair &pair) const
 
double PhiInExtrapCurved (const HitPair &pair, double r_in) const
 
double PhiOutExtrapCurved (const HitPair &pair, double r_out) const
 

Public Attributes

std::vector< HitPairpairList {}
 
layer_bitmask_t hitLayers = 0
 
std::vector< const StoredHit * > hitlist {}
 
double LastPhiCurvature = 0.
 
double LastEtaCurvature = 0.
 

Detailed Description

Definition at line 253 of file FPGATrackSimGenScanTool.h.

Member Function Documentation

◆ addPair()

int FPGATrackSimGenScanTool::HitPairSet::addPair ( const HitPair pair)

Definition at line 743 of file FPGATrackSimGenScanTool.cxx.

744 {
745  if (pairList.size() > 0)
746  {
747  // these need to be done before the pair is added
750  }
751 
752  pairList.push_back(pair);
753 
754  hitLayers |= (0x1 << pair.first->hitptr->getLayer());
755  hitLayers |= (0x1 << pair.second->hitptr->getLayer());
756  if (!hasHit(pair.first))
757  hitlist.push_back(pair.first);
758  if (!hasHit(pair.second))
759  hitlist.push_back(pair.second);
760  return this->pairList.size();
761 }

◆ DeltaDeltaEta()

double FPGATrackSimGenScanTool::HitPairSet::DeltaDeltaEta ( const HitPair pair) const

Definition at line 797 of file FPGATrackSimGenScanTool.cxx.

798 {
799  return (pair.dEta() * lastpair().dR() - lastpair().dEta() * pair.dR()) / (lastpair().dR() * pair.dR());
800 }

◆ DeltaDeltaPhi()

double FPGATrackSimGenScanTool::HitPairSet::DeltaDeltaPhi ( const HitPair pair) const

Definition at line 793 of file FPGATrackSimGenScanTool.cxx.

793  {
794  return (pair.dPhi() * lastpair().dR() - lastpair().dPhi() * pair.dR()) / (lastpair().dR() * pair.dR());
795 }

◆ DeltaEtaCurvature()

double FPGATrackSimGenScanTool::HitPairSet::DeltaEtaCurvature ( const HitPair pair) const

Definition at line 814 of file FPGATrackSimGenScanTool.cxx.

815 {
816  return EtaCurvature(pair) - LastEtaCurvature;
817 }

◆ DeltaPhiCurvature()

double FPGATrackSimGenScanTool::HitPairSet::DeltaPhiCurvature ( const HitPair pair) const

Definition at line 810 of file FPGATrackSimGenScanTool.cxx.

811 {
812  return PhiCurvature(pair) - LastPhiCurvature;
813 }

◆ EtaCurvature()

double FPGATrackSimGenScanTool::HitPairSet::EtaCurvature ( const HitPair pair) const

Definition at line 806 of file FPGATrackSimGenScanTool.cxx.

807 {
808  return 2 * DeltaDeltaEta(pair) / (lastpair().dR() + pair.dR());
809 }

◆ hasHit()

bool FPGATrackSimGenScanTool::HitPairSet::hasHit ( const StoredHit hit) const

Definition at line 734 of file FPGATrackSimGenScanTool.cxx.

736  {
737  if (hit == newhit)
738  return true;
739  }
740  return false;
741 }

◆ hasLayer()

bool FPGATrackSimGenScanTool::HitPairSet::hasLayer ( int  layer) const
inline

Definition at line 278 of file FPGATrackSimGenScanTool.h.

278 { return ((hitLayers & (0x1 << layer)) != 0); }

◆ lastpair()

const HitPair& FPGATrackSimGenScanTool::HitPairSet::lastpair ( ) const
inline

Definition at line 274 of file FPGATrackSimGenScanTool.h.

274 { return pairList.back(); }

◆ lyrCnt()

unsigned int FPGATrackSimGenScanTool::HitPairSet::lyrCnt ( ) const
inline

Definition at line 279 of file FPGATrackSimGenScanTool.h.

279 { return __builtin_popcount(hitLayers); }

◆ MatchEta()

double FPGATrackSimGenScanTool::HitPairSet::MatchEta ( const HitPair pair) const

Definition at line 778 of file FPGATrackSimGenScanTool.cxx.

779 {
780  if ((lastpair().first->hitptr==pair.first->hitptr)||
781  (lastpair().first->hitptr==pair.second->hitptr)||
782  (lastpair().second->hitptr==pair.first->hitptr)||
783  (lastpair().second->hitptr==pair.second->hitptr))
784  return 0.0;
785 
786  double dr = (lastpair().second->hitptr->getR() - pair.first->hitptr->getR()) / 2.0;
787  double lastpairextrap = lastpair().second->etaShift - lastpair().dEta() / lastpair().dR() * dr;
788  double newpairextrap = pair.first->etaShift + pair.dEta() / pair.dR() * dr;
789  return lastpairextrap - newpairextrap;
790 }

◆ MatchPhi()

double FPGATrackSimGenScanTool::HitPairSet::MatchPhi ( const HitPair pair) const

Definition at line 764 of file FPGATrackSimGenScanTool.cxx.

765 {
766  if ((lastpair().first->hitptr==pair.first->hitptr)||
767  (lastpair().first->hitptr==pair.second->hitptr)||
768  (lastpair().second->hitptr==pair.first->hitptr)||
769  (lastpair().second->hitptr==pair.second->hitptr))
770  return 0.0;
771 
772  double dr = (lastpair().second->hitptr->getR() - pair.first->hitptr->getR()) / 2.0;
773  double lastpairextrap = lastpair().second->phiShift - lastpair().dPhi() / lastpair().dR() * dr;
774  double newpairextrap = pair.first->phiShift + pair.dPhi() / pair.dR() * dr;
775  return lastpairextrap - newpairextrap;
776 }

◆ PhiCurvature()

double FPGATrackSimGenScanTool::HitPairSet::PhiCurvature ( const HitPair pair) const

Definition at line 802 of file FPGATrackSimGenScanTool.cxx.

803 {
804  return 2 * DeltaDeltaPhi(pair) / (lastpair().dR() + pair.dR());
805 }

◆ PhiInExtrapCurved()

double FPGATrackSimGenScanTool::HitPairSet::PhiInExtrapCurved ( const HitPair pair,
double  r_in 
) const

Definition at line 818 of file FPGATrackSimGenScanTool.cxx.

819 {
820  double r = std::min(lastpair().first->hitptr->getR(),lastpair().second->hitptr->getR());
821  return lastpair().PhiInExtrap(r_in) + 0.5 * PhiCurvature(pair) * (r_in - r) * (r_in - r);
822 }

◆ PhiOutExtrapCurved()

double FPGATrackSimGenScanTool::HitPairSet::PhiOutExtrapCurved ( const HitPair pair,
double  r_out 
) const

Definition at line 823 of file FPGATrackSimGenScanTool.cxx.

824 {
825  double r = std::max(lastpair().first->hitptr->getR(),lastpair().second->hitptr->getR());
826  return pair.PhiOutExtrap(r_out) + 0.5 * PhiCurvature(pair) * (r_out - r) * (r_out - r);
827 }

◆ secondtolastpair()

const HitPair& FPGATrackSimGenScanTool::HitPairSet::secondtolastpair ( ) const
inline

Definition at line 275 of file FPGATrackSimGenScanTool.h.

275 { return *std::prev(pairList.end(), 2); }

Member Data Documentation

◆ hitLayers

layer_bitmask_t FPGATrackSimGenScanTool::HitPairSet::hitLayers = 0

Definition at line 262 of file FPGATrackSimGenScanTool.h.

◆ hitlist

std::vector<const StoredHit *> FPGATrackSimGenScanTool::HitPairSet::hitlist {}

Definition at line 265 of file FPGATrackSimGenScanTool.h.

◆ LastEtaCurvature

double FPGATrackSimGenScanTool::HitPairSet::LastEtaCurvature = 0.

Definition at line 269 of file FPGATrackSimGenScanTool.h.

◆ LastPhiCurvature

double FPGATrackSimGenScanTool::HitPairSet::LastPhiCurvature = 0.

Definition at line 268 of file FPGATrackSimGenScanTool.h.

◆ pairList

std::vector<HitPair> FPGATrackSimGenScanTool::HitPairSet::pairList {}

Definition at line 259 of file FPGATrackSimGenScanTool.h.


The documentation for this struct was generated from the following files:
FPGATrackSimGenScanTool::HitPairSet::LastEtaCurvature
double LastEtaCurvature
Definition: FPGATrackSimGenScanTool.h:269
beamspotman.r
def r
Definition: beamspotman.py:676
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
FPGATrackSimGenScanTool::HitPair::PhiInExtrap
double PhiInExtrap(double r_in) const
Definition: FPGATrackSimGenScanTool.h:238
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
FPGATrackSimGenScanTool::StoredHit
Definition: FPGATrackSimGenScanTool.h:196
FPGATrackSimGenScanTool::HitPairSet::DeltaDeltaPhi
double DeltaDeltaPhi(const HitPair &pair) const
Definition: FPGATrackSimGenScanTool.cxx:793
FPGATrackSimGenScanTool::HitPairSet::hitLayers
layer_bitmask_t hitLayers
Definition: FPGATrackSimGenScanTool.h:262
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
FPGATrackSimGenScanTool::HitPairSet::hasHit
bool hasHit(const StoredHit *hit) const
Definition: FPGATrackSimGenScanTool.cxx:734
FPGATrackSimGenScanTool::HitPair::dR
double dR() const
Definition: FPGATrackSimGenScanTool.h:226
FPGATrackSimGenScanTool::HitPairSet::LastPhiCurvature
double LastPhiCurvature
Definition: FPGATrackSimGenScanTool.h:268
FPGATrackSimGenScanTool::HitPairSet::PhiCurvature
double PhiCurvature(const HitPair &pair) const
Definition: FPGATrackSimGenScanTool.cxx:802
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
FPGATrackSimGenScanTool::HitPairSet::DeltaDeltaEta
double DeltaDeltaEta(const HitPair &pair) const
Definition: FPGATrackSimGenScanTool.cxx:797
FPGATrackSimGenScanTool::HitPair::dPhi
double dPhi() const
Definition: FPGATrackSimGenScanTool.h:224
FPGATrackSimGenScanTool::HitPairSet::pairList
std::vector< HitPair > pairList
Definition: FPGATrackSimGenScanTool.h:259
FPGATrackSimGenScanTool::HitPair::dEta
double dEta() const
Definition: FPGATrackSimGenScanTool.h:225
FPGATrackSimGenScanTool::HitPairSet::lastpair
const HitPair & lastpair() const
Definition: FPGATrackSimGenScanTool.h:274
FPGATrackSimGenScanTool::HitPairSet::EtaCurvature
double EtaCurvature(const HitPair &pair) const
Definition: FPGATrackSimGenScanTool.cxx:806
DeMoScan.first
bool first
Definition: DeMoScan.py:536
FPGATrackSimGenScanTool::HitPairSet::hitlist
std::vector< const StoredHit * > hitlist
Definition: FPGATrackSimGenScanTool.h:265
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:527