ATLAS Offline Software
Static Public Member Functions | Static Private Member Functions | Friends | List of all members
jet::JetCaloQualityUtils Class Reference

#include <JetCaloQualityUtils.h>

Collaboration diagram for jet::JetCaloQualityUtils:

Static Public Member Functions

static double emFraction (const std::vector< float > &ePerSampling)
 
static double fracSamplingMax (const Jet *jet, int &SamplingMax)
 
static double jetOutOfTimeEnergyFractionClusters (const Jet *, const double, const bool)
 
static double hecF (const Jet *jet)
 
static double presamplerFraction (const Jet *jet)
 
static double tileGap3F (const Jet *jet)
 
static double jetNegativeEnergy (const Jet *jet)
 
static bool isUgly (const Jet *jet, const bool recalculateQuantities=false)
 

Static Private Member Functions

static int compute_nLeading (std::vector< double > &cell_energies, const float &e, const float &frac)
 

Friends

class JetCalcnLeadingCells
 

Detailed Description

Definition at line 28 of file JetCaloQualityUtils.h.

Member Function Documentation

◆ compute_nLeading()

int jet::JetCaloQualityUtils::compute_nLeading ( std::vector< double > &  cell_energies,
const float &  e,
const float &  frac 
)
staticprivate

Definition at line 37 of file JetCaloQualityUtils.cxx.

38  {
39  std::sort(cell_energies.rbegin(),cell_energies.rend());
40  int counter =0;
41  float sum = 0;
42  for(unsigned int i=0;i<cell_energies.size();i++)
43  {
44  sum += cell_energies[i];
45  counter++;
46  if(sum>frac*e) break;
47  }
48  return counter;
49  }

◆ emFraction()

double jet::JetCaloQualityUtils::emFraction ( const std::vector< float > &  ePerSampling)
static

Definition at line 56 of file JetCaloQualityUtils.cxx.

56  {
57  double e_EM = 0;
58  for(int i=0; i<9; i++) e_EM += e_sampling[ ::em_calosample[i] ];
59 
60  double e_HAD = 0;
61  for(int i=0; i<15; i++) e_HAD += e_sampling[ ::had_calosample[i] ];
62  if( (e_EM==0) || ((e_EM+e_HAD)==0) ) return 0.;
63  return (e_EM / (e_EM+e_HAD));
64  }

◆ fracSamplingMax()

double jet::JetCaloQualityUtils::fracSamplingMax ( const Jet jet,
int &  SamplingMax 
)
static

Definition at line 107 of file JetCaloQualityUtils.cxx.

108  {
109  const std::vector<float> & einsampling = eperSamplAcc(*jet);
110 
111  double fracSamplingMax=-999999999.;
112  double sumE_samplings=0.;
113  for ( unsigned int i(0); i < einsampling.size(); ++i )
114  {
115  double e = einsampling[i];
116  sumE_samplings+=e;
117  if (e>fracSamplingMax)
118  {
120  SamplingMax=i;
121  }
122  }
123 
124  if(sumE_samplings!=0)
125  fracSamplingMax/=sumE_samplings;
126  else fracSamplingMax=0;
127 
128  return fracSamplingMax;
129  }

◆ hecF()

double jet::JetCaloQualityUtils::hecF ( const Jet jet)
static

Definition at line 67 of file JetCaloQualityUtils.cxx.

68  {
69 
70  const std::vector<float> & einsampling = eperSamplAcc(*jet);
71 
72  double e_hec =einsampling[CaloSampling::HEC0]
73  +einsampling[CaloSampling::HEC1]
74  +einsampling[CaloSampling::HEC2]
75  +einsampling[CaloSampling::HEC3];
76 
77  double e_jet = jet->jetP4(xAOD::JetEMScaleMomentum).E();
78 
79  if(e_jet!=0) return e_hec/e_jet;
80  else return -999;
81  }

◆ isUgly()

bool jet::JetCaloQualityUtils::isUgly ( const Jet jet,
const bool  recalculateQuantities = false 
)
static

Definition at line 144 of file JetCaloQualityUtils.cxx.

144  {
145  double fcor = jet->getAttribute<float>(xAOD::JetAttribute::BchCorrCell);
146  double tileGap3f = JetCaloQualityUtils::tileGap3F(jet);
147 
148  if (fcor>0.5) return true;
149  if (tileGap3f >0.5) return true;
150 
151  return false;
152  }

◆ jetNegativeEnergy()

double jet::JetCaloQualityUtils::jetNegativeEnergy ( const Jet jet)
static

Definition at line 137 of file JetCaloQualityUtils.cxx.

138  {
139  JetCalcNegativeEnergy negE;
140  return negE(jet);
141  }

◆ jetOutOfTimeEnergyFractionClusters()

static double jet::JetCaloQualityUtils::jetOutOfTimeEnergyFractionClusters ( const Jet ,
const double  ,
const bool   
)
inlinestatic

Definition at line 42 of file JetCaloQualityUtils.h.

42 {return 0;}

◆ presamplerFraction()

double jet::JetCaloQualityUtils::presamplerFraction ( const Jet jet)
static

Definition at line 83 of file JetCaloQualityUtils.cxx.

84  {
85  const std::vector<float>& einsampling = eperSamplAcc(*jet);
86 
87  double e_pres = einsampling[CaloSampling::PreSamplerB] + einsampling[CaloSampling::PreSamplerE];
88 
89  double e_jet = jet->jetP4(xAOD::JetEMScaleMomentum).E();
90 
91  if(e_jet!=0) return e_pres/e_jet;
92  else return -999;
93  }

◆ tileGap3F()

double jet::JetCaloQualityUtils::tileGap3F ( const Jet jet)
static

Definition at line 95 of file JetCaloQualityUtils.cxx.

96  {
97  const std::vector<float> & einsampling = eperSamplAcc(*jet);
98 
99  double e_tileGap3 =einsampling[CaloSampling::TileGap3];
100  double e_jet = jet->jetP4(xAOD::JetEMScaleMomentum).E();
101 
102  if(e_jet!=0) return e_tileGap3/e_jet;
103  else return -999;
104  }

Friends And Related Function Documentation

◆ JetCalcnLeadingCells

friend class JetCalcnLeadingCells
friend

Definition at line 30 of file JetCaloQualityUtils.h.


The documentation for this class was generated from the following files:
xAOD::JetAttribute::BchCorrCell
@ BchCorrCell
Definition: JetAttributes.h:94
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
jet::JetCaloQualityUtils::tileGap3F
static double tileGap3F(const Jet *jet)
Definition: JetCaloQualityUtils.cxx:95
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
lumiFormat.i
int i
Definition: lumiFormat.py:85
checkxAOD.frac
frac
Definition: Tools/PyUtils/bin/checkxAOD.py:257
xAOD::JetEMScaleMomentum
@ JetEMScaleMomentum
Definition: JetTypes.h:28
jet::JetCaloQualityUtils::fracSamplingMax
static double fracSamplingMax(const Jet *jet, int &SamplingMax)
Definition: JetCaloQualityUtils.cxx:107
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
test_pyathena.counter
counter
Definition: test_pyathena.py:15