ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
L0Muon::TruthTrackSmearer Class Reference

#include <TruthTrackSmearer.h>

Collaboration diagram for L0Muon::TruthTrackSmearer:

Public Member Functions

 TruthTrackSmearer (ATHRNG::RNGWrapper *rndWrapper)
 
 ~TruthTrackSmearer ()=default
 
 TruthTrackSmearer (const TruthTrackSmearer &other)=delete
 
TruthTrackSmeareroperator= (const TruthTrackSmearer &other)=delete
 
double effFunc (double pt) const
 
bool emulateL0MuonTrack (double curv, float eta, float phi, L0MuonTrack &otrack) const
 

Private Attributes

ATHRNG::RNGWrapperm_rngWrapper
 
std::array< float, 2 > m_efficiencyMap
 

Detailed Description

Definition at line 17 of file TruthTrackSmearer.h.

Constructor & Destructor Documentation

◆ TruthTrackSmearer() [1/2]

L0Muon::TruthTrackSmearer::TruthTrackSmearer ( ATHRNG::RNGWrapper rndWrapper)

Definition at line 11 of file TruthTrackSmearer.cxx.

12 : m_rngWrapper(rngWrapper) {
13  m_efficiencyMap[0] = 0.0; // pT < 3 GeV
14  m_efficiencyMap[1] = 0.95; // pT > 3 GeV
15 }

◆ ~TruthTrackSmearer()

L0Muon::TruthTrackSmearer::~TruthTrackSmearer ( )
default

◆ TruthTrackSmearer() [2/2]

L0Muon::TruthTrackSmearer::TruthTrackSmearer ( const TruthTrackSmearer other)
delete

Member Function Documentation

◆ effFunc()

double L0Muon::TruthTrackSmearer::effFunc ( double  pt) const

Definition at line 17 of file TruthTrackSmearer.cxx.

17  {
18  // TODO: Efficiency is changed at only 3 GeV...
19  return (pt < 3000.) ? m_efficiencyMap[0] : m_efficiencyMap[1];
20 }

◆ emulateL0MuonTrack()

bool L0Muon::TruthTrackSmearer::emulateL0MuonTrack ( double  curv,
float  eta,
float  phi,
L0MuonTrack otrack 
) const

Definition at line 22 of file TruthTrackSmearer.cxx.

22  {
23  // input curv(q/pT) is in MeV
24  CLHEP::HepRandomEngine* engine = m_rngWrapper->getEngine(Gaudi::Hive::currentContext());
25 
26  // efficiency emulation
27  double abspt = std::abs(1.0 / curv);
28  if (CLHEP::RandFlat::shoot(engine) > effFunc(abspt)) return false;
29 
30  // TODO: extrapolate to the pivot plane
31 
32  // position efficiency map
33  if (std::abs(eta) > 2.41) return false; // for the time being...
34 
35  // TODO: The position is NOT smeared here - since the binning of RoIs could be larger. To be checked.
36 
37  // pt smearing
38  double sigma = curv * 0.05; // TODO: 5% uniform for the time being...
39 
40  double gencurv = CLHEP::RandGauss::shoot(engine, curv, sigma);
41 
42  otrack.setTrack(gencurv, eta, phi);
43 
44  return true;
45 }

◆ operator=()

TruthTrackSmearer& L0Muon::TruthTrackSmearer::operator= ( const TruthTrackSmearer other)
delete

Member Data Documentation

◆ m_efficiencyMap

std::array<float, 2> L0Muon::TruthTrackSmearer::m_efficiencyMap
private

Definition at line 31 of file TruthTrackSmearer.h.

◆ m_rngWrapper

ATHRNG::RNGWrapper* L0Muon::TruthTrackSmearer::m_rngWrapper
private

Definition at line 30 of file TruthTrackSmearer.h.


The documentation for this class was generated from the following files:
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
test_pyathena.pt
pt
Definition: test_pyathena.py:11
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
L0Muon::TruthTrackSmearer::effFunc
double effFunc(double pt) const
Definition: TruthTrackSmearer.cxx:17
L0Muon::TruthTrackSmearer::m_efficiencyMap
std::array< float, 2 > m_efficiencyMap
Definition: TruthTrackSmearer.h:31
L0Muon::TruthTrackSmearer::m_rngWrapper
ATHRNG::RNGWrapper * m_rngWrapper
Definition: TruthTrackSmearer.h:30