ATLAS Offline Software
Classes | Functions
TrigL2Bjet.h File Reference
#include <vector>
#include <iostream>
#include <string>
#include "FourMom/P4PtEtaPhiM.h"
#include "Navigation/Navigable.h"
#include "EventKernel/INavigable4Momentum.h"
#include "TrigInDetEvent/TrigInDetTrackCollection.h"
#include "TrigInDetEvent/TrigVertexCollection.h"
Include dependency graph for TrigL2Bjet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TrigL2Bjet
 Class representing a b-jet candidate created at L2. More...
 

Functions

std::string str (const TrigL2Bjet &a)
 
MsgStream & operator<< (MsgStream &m, const TrigL2Bjet &a)
 
bool operator== (const TrigL2Bjet &a, const TrigL2Bjet &b)
 
bool operator!= (const TrigL2Bjet &a, const TrigL2Bjet &b)
 
void diff (const TrigL2Bjet &a, const TrigL2Bjet &b, std::map< std::string, double > &variableChange)
 

Function Documentation

◆ diff()

void diff ( const TrigL2Bjet a,
const TrigL2Bjet b,
std::map< std::string, double > &  variableChange 
)

Definition at line 141 of file TrigL2Bjet.cxx.

141  {
142 
143  if(a.prmVtx() != b.prmVtx()) variableChange[ "prmVtx" ] = static_cast< double >( a.prmVtx() - b.prmVtx() );
144 
145  if(a.xComb() != b.xComb()) variableChange["xComb"] = static_cast<double>(a.xComb() - b.xComb());
146  if(a.xIP1D() != b.xIP1D()) variableChange["xIP1D"] = static_cast<double>(a.xIP1D() - b.xIP1D());
147  if(a.xIP2D() != b.xIP2D()) variableChange["xIP2D"] = static_cast<double>(a.xIP2D() - b.xIP2D());
148  if(a.xIP3D() != b.xIP3D()) variableChange["xIP3D"] = static_cast<double>(a.xIP3D() - b.xIP3D());
149  if(a.xCHI2() != b.xCHI2()) variableChange["xCHI2"] = static_cast<double>(a.xCHI2() - b.xCHI2());
150  if(a.xSV() != b.xSV()) variableChange["xSV"] = static_cast<double>(a.xSV() - b.xSV());
151  if(a.xMVtx() != b.xMVtx()) variableChange["xMVtx"] = static_cast<double>(a.xMVtx() - b.xMVtx());
152  if(a.xEVtx() != b.xEVtx()) variableChange["xEVtx"] = static_cast<double>(a.xEVtx() - b.xEVtx());
153  if(a.xNVtx() != b.xNVtx()) variableChange["xNVtx"] = static_cast<double>(a.xNVtx() - b.xNVtx());
154 
155  return;
156 }

◆ operator!=()

bool operator!= ( const TrigL2Bjet a,
const TrigL2Bjet b 
)
inline

Definition at line 141 of file TrigL2Bjet.h.

141 {return !(a == b);}

◆ operator<<()

MsgStream& operator<< ( MsgStream &  m,
const TrigL2Bjet a 
)

Definition at line 111 of file TrigL2Bjet.cxx.

111  {
112 
113  return (m << str(a));
114 }

◆ operator==()

bool operator== ( const TrigL2Bjet a,
const TrigL2Bjet b 
)

Definition at line 117 of file TrigL2Bjet.cxx.

117  {
118 
119  //* distance used to compare floats *//
120  const double DELTA=1e-3;
121 
122  if(std::abs(a.eta() - b.eta()) > DELTA) return false;
123  if(std::abs(a.phi() - b.phi()) > DELTA) return false;
124 
125  if(std::abs(a.prmVtx() - b.prmVtx()) > DELTA) return false;
126 
127  if(std::abs(a.xComb() - b.xComb()) > DELTA) return false;
128  if(std::abs(a.xIP1D() - b.xIP1D()) > DELTA) return false;
129  if(std::abs(a.xIP2D() - b.xIP2D()) > DELTA) return false;
130  if(std::abs(a.xIP3D() - b.xIP3D()) > DELTA) return false;
131  if(std::abs(a.xCHI2() - b.xCHI2()) > DELTA) return false;
132  if(std::abs(a.xSV() - b.xSV()) > DELTA) return false;
133  if(std::abs(a.xMVtx() - b.xMVtx()) > DELTA) return false;
134  if(std::abs(a.xEVtx() - b.xEVtx()) > DELTA) return false;
135  if(std::abs(a.xNVtx() - b.xNVtx()) > DELTA) return false;
136 
137  return true;
138 }

◆ str()

std::string str ( const TrigL2Bjet a)

Definition at line 91 of file TrigL2Bjet.cxx.

91  {
92 
93  std::stringstream ss;
94 
95  ss << "RoI index = " << a.roiId()
96  << "; prmVtx = " << a.prmVtx()
97  << "; xComb = " << a.xComb()
98  << "; xIP1D = " << a.xIP1D()
99  << "; xIP2D = " << a.xIP2D()
100  << "; xIP3D = " << a.xIP3D()
101  << "; xCHI2 = " << a.xCHI2()
102  << "; xSV = " << a.xSV()
103  << "; xMVtx = " << a.xMVtx()
104  << "; xEVtx = " << a.xEVtx()
105  << "; xNVtx = " << a.xNVtx();
106 
107  return ss.str();
108 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
str
std::string str(const TrigL2Bjet &a)
Definition: TrigL2Bjet.cxx:91
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10