ATLAS Offline Software
Functions
TrigBjetMonitorAlgorithm.cxx File Reference
#include "TrigBjetMonitorAlgorithm.h"
#include "EventPrimitives/EventPrimitivesHelpers.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
#include "TrigDecisionTool/TrigDecisionTool.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 63 of file TrigBjetMonitorAlgorithm.cxx.

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

◆ LLR()

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

Definition at line 34 of file TrigBjetMonitorAlgorithm.cxx.

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

◆ LLRW()

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

Definition at line 48 of file TrigBjetMonitorAlgorithm.cxx.

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

◆ phiCorr()

float phiCorr ( float  phi)

Definition at line 93 of file TrigBjetMonitorAlgorithm.cxx.

93  {
94  if (phi < -M_PI) phi += 2*M_PI;
95  if (phi > M_PI) phi -= 2*M_PI;
96  return phi;
97 }
beamspotman.r
def r
Definition: beamspotman.py:672
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