ATLAS Offline Software
Functions
TrigBjetMonitorAlgorithm.cxx File Reference
#include "TrigBjetMonitorAlgorithm.h"
#include "EventPrimitives/EventPrimitivesHelpers.h"
#include "xAODJet/JetContainer.h"
#include "xAODBTagging/BTaggingContainer.h"
Include dependency graph for TrigBjetMonitorAlgorithm.cxx:

Go to the source code of this file.

Functions

bool LLR (double pu, double pc, double pb, double &w)
 
bool LLRW (float pqcd, float ptop, float phbb, float &w)
 
bool CalcRelPt (float muonPt, float muonEta, float muonPhi, float jetPt, float jetEta, float jetPhi, float &RelPt)
 
float phiCorr (float phi)
 

Function Documentation

◆ CalcRelPt()

bool CalcRelPt ( float  muonPt,
float  muonEta,
float  muonPhi,
float  jetPt,
float  jetEta,
float  jetPhi,
float &  RelPt 
)

Definition at line 62 of file TrigBjetMonitorAlgorithm.cxx.

62  {
63 
64  bool r = false;
65  RelPt = -20.;
66 
67  float muonT, muonX, muonY, muonZ, muon, jetT, jetX, jetY, jetZ, jet, scprod;
68 
69  muonT = 2.*atan( exp(-muonEta) );
70  jetT = 2.*atan( exp(-jetEta) );
71  if ( (std::abs(muonT) > 0.) && (std::abs(jetT) > 0.) ) {
72  muon = muonPt/std::abs( sin(muonT) );
73  muonX = muonPt*cos(muonPhi);
74  muonY = muonPt*sin(muonPhi);
75  muonZ = muon*cos(muonT);
76  jet = jetPt/std::abs( sin(jetT) );
77  jetX = jetPt*cos(jetPhi);
78  jetY = jetPt*sin(jetPhi);
79  jetZ = jet*cos(jetT);
80  scprod = (muonX*jetX + muonY*jetY + muonZ*jetZ)/(muon*jet);
81  scprod *= scprod;
82  if ( (1. - scprod) > 0. ) {
83  RelPt = muon * sqrt(1. - scprod);
84  r = true;
85  }
86  }
87 
88  return r;
89 
90 }

◆ LLR()

bool LLR ( double  pu,
double  pc,
double  pb,
double &  w 
)

Definition at line 31 of file TrigBjetMonitorAlgorithm.cxx.

31  {
32  w = -100.;
33  bool ll = false;
34  double denom;
35  float cfrac(0.018); // DG 2022/07/28
36  if (pb > 0.) {
37  denom = pu*(1.-cfrac)+pc*cfrac;
38  if (denom > 0.) {
39  w = log(pb/denom);
40  ll = true;
41  }
42  }
43  return ll;
44 }

◆ LLRW()

bool LLRW ( float  pqcd,
float  ptop,
float  phbb,
float &  w 
)

Definition at line 46 of file TrigBjetMonitorAlgorithm.cxx.

46  { // RJ 17/02/2025
47  w = -100.;
48  bool ll = false;
49  float denom;
50  float topfrac(0.25);
51  if (phbb > 0.) {
52  denom = pqcd*(1.-topfrac)+ptop*topfrac;
53  if (denom > 0.) {
54  w = log(phbb/denom);
55  ll = true;
56  }
57  }
58  return ll;
59 }

◆ phiCorr()

float phiCorr ( float  phi)

Definition at line 92 of file TrigBjetMonitorAlgorithm.cxx.

92  {
93  if (phi < -M_PI) phi += 2*M_PI;
94  if (phi > M_PI) phi -= 2*M_PI;
95  return phi;
96 }
beamspotman.r
def r
Definition: beamspotman.py:674
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
detail::ll
long long ll
Definition: PrimitiveHelpers.h:47
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
M_PI
#define M_PI
Definition: ActiveFraction.h:11
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
compute_lumi.denom
denom
Definition: compute_lumi.py:76
CheckAppliedSFs.pu
pu
Definition: CheckAppliedSFs.py:311
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:198
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:114