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 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 45 of file TrigBjetMonitorAlgorithm.cxx.

45  {
46 
47  bool r = false;
48  RelPt = -20.;
49 
50  float muonT, muonX, muonY, muonZ, muon, jetT, jetX, jetY, jetZ, jet, scprod;
51 
52  muonT = 2.*atan( exp(-muonEta) );
53  jetT = 2.*atan( exp(-jetEta) );
54  if ( (std::abs(muonT) > 0.) && (std::abs(jetT) > 0.) ) {
55  muon = muonPt/std::abs( sin(muonT) );
56  muonX = muonPt*cos(muonPhi);
57  muonY = muonPt*sin(muonPhi);
58  muonZ = muon*cos(muonT);
59  jet = jetPt/std::abs( sin(jetT) );
60  jetX = jetPt*cos(jetPhi);
61  jetY = jetPt*sin(jetPhi);
62  jetZ = jet*cos(jetT);
63  scprod = (muonX*jetX + muonY*jetY + muonZ*jetZ)/(muon*jet);
64  scprod *= scprod;
65  if ( (1. - scprod) > 0. ) {
66  RelPt = muon * sqrt(1. - scprod);
67  r = true;
68  }
69  }
70 
71  return r;
72 
73 }

◆ LLR()

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

Definition at line 29 of file TrigBjetMonitorAlgorithm.cxx.

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

◆ phiCorr()

float phiCorr ( float  phi)

Definition at line 75 of file TrigBjetMonitorAlgorithm.cxx.

75  {
76  if (phi < -M_PI) phi += 2*M_PI;
77  if (phi > M_PI) phi -= 2*M_PI;
78  return phi;
79 }
beamspotman.r
def r
Definition: beamspotman.py:676
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
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:200
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:99