ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
NPVBeamspotCorrection Class Reference

#include <NPVBeamspotCorrection.h>

Collaboration diagram for NPVBeamspotCorrection:

Public Member Functions

 NPVBeamspotCorrection ()
 Return approximate correction on the number of reconstructed vertices due to different beamspot longitudinal lengths. More...
 
virtual ~NPVBeamspotCorrection ()
 
void initNPVBeamspotCorrection ()
 
double GetNVertexBsCorrection (double nRecoVtx)
 

Private Member Functions

void error (TString msg)
 
TGraph * NVtx_NReconstructible_bs66mm ()
 
TGraph * NVtx_NReconstructible_bs47mm ()
 

Private Attributes

TGraph * m_g_nvtx_nreco_bs66mm
 
TGraph * m_g_nvtx_nreco_bs47mm
 
TGraph * m_invGraph
 
double m_NPVmin
 
double m_NPVmax
 

Detailed Description

Definition at line 21 of file NPVBeamspotCorrection.h.

Constructor & Destructor Documentation

◆ NPVBeamspotCorrection()

NPVBeamspotCorrection::NPVBeamspotCorrection ( )

Return approximate correction on the number of reconstructed vertices due to different beamspot longitudinal lengths.

Author: S. Pagan Griso spaga.nosp@m.ngri.nosp@m.so@lb.nosp@m.l.go.nosp@m.v Adapted for ApplyJetCalibration/JetCalibTools by Joe Taenzer josep.nosp@m.h.ta.nosp@m.enzer.nosp@m.@cer.nosp@m.n.ch

Description: Use GetNVertexBsCorrected(...) to get the corrected number of vertices expected on average with a beamspot length of 47mm, assuming your input value refers to a sample with beamspot length of 66mm (MC12a).

Disclaimer: The following is based on a statistical extrapolation based on low-mu data. This is meant to give a feeling of the magnitude of the effect on average. This function can be used as a "x-axis" scaling in order to see the magnitude of the effect on quantities depending on the number of vertices, or to roughly estimate if the residual discrepancy observed in the number of reconstructed vertices after a <mu> re-weighting is consistent with this effect.

Other notes: If you are in need to get the correction for different beamspot sizes, please just get in contact with me and I can easily provide you with a more comphrensive set of simple tools to do that.

Definition at line 33 of file NPVBeamspotCorrection.cxx.

34  : m_g_nvtx_nreco_bs66mm(nullptr), m_g_nvtx_nreco_bs47mm(nullptr), m_invGraph(nullptr), m_NPVmin(0), m_NPVmax(0)
35 {
37 }

◆ ~NPVBeamspotCorrection()

NPVBeamspotCorrection::~NPVBeamspotCorrection ( )
virtual

Definition at line 39 of file NPVBeamspotCorrection.cxx.

40 {
43  if (m_invGraph) delete m_invGraph;
44 }

Member Function Documentation

◆ error()

void NPVBeamspotCorrection::error ( TString  msg)
inlineprivate

Definition at line 33 of file NPVBeamspotCorrection.h.

34  { printf("\nERROR - NPVBeamspotCorrection:\n\n %s\n\n",msg.Data()); abort(); }

◆ GetNVertexBsCorrection()

double NPVBeamspotCorrection::GetNVertexBsCorrection ( double  nRecoVtx)

Definition at line 62 of file NPVBeamspotCorrection.cxx.

63 {
64  if (nRecoVtx<m_NPVmin) error(Form("Nonsense input to GetNVertexBsCorrection: NPV=%.2f",nRecoVtx));
65  // if outside range, linear extrapolation from last valid value
66  if (nRecoVtx>=m_NPVmax) return m_g_nvtx_nreco_bs47mm->Eval(m_invGraph->Eval(m_NPVmax))/m_NPVmax*nRecoVtx;
67 
68  return m_g_nvtx_nreco_bs47mm->Eval(m_invGraph->Eval(nRecoVtx));
69 }

◆ initNPVBeamspotCorrection()

void NPVBeamspotCorrection::initNPVBeamspotCorrection ( )

Definition at line 46 of file NPVBeamspotCorrection.cxx.

46  {
47 
48  printf(" \n\nInitializing the NPV Beamspot correction tool\n");
49 
52 
53  if (m_invGraph==nullptr) {
54  m_invGraph = new TGraph();
55  for (int i=0;i<m_g_nvtx_nreco_bs66mm->GetN();++i)
56  m_invGraph->SetPoint(i,m_g_nvtx_nreco_bs66mm->GetY()[i],m_g_nvtx_nreco_bs66mm->GetX()[i]);
57  }
58  m_NPVmin = m_g_nvtx_nreco_bs66mm->GetY()[0];
60 }

◆ NVtx_NReconstructible_bs47mm()

TGraph * NPVBeamspotCorrection::NVtx_NReconstructible_bs47mm ( )
private

Definition at line 71 of file NPVBeamspotCorrection.cxx.

71  {
72  TGraph *graph = new TGraph(41);
73  graph->SetName("g_shadowedAverage_bs47mm");
74  graph->SetPoint(0, 0, 0);
75  graph->SetPoint(1, 1, 1);
76  graph->SetPoint(2, 2, 1.97111);
77  graph->SetPoint(3, 3, 2.91499);
78  graph->SetPoint(4, 4, 3.83313);
79  graph->SetPoint(5, 5, 4.72692);
80  graph->SetPoint(6, 6, 5.59763);
81  graph->SetPoint(7, 7, 6.44645);
82  graph->SetPoint(8, 8, 7.27445);
83  graph->SetPoint(9, 9, 8.08265);
84  graph->SetPoint(10, 10, 8.87199);
85  graph->SetPoint(11, 11, 9.64332);
86  graph->SetPoint(12, 12, 10.3975);
87  graph->SetPoint(13, 13, 11.1352);
88  graph->SetPoint(14, 14, 11.8572);
89  graph->SetPoint(15, 15, 12.5641);
90  graph->SetPoint(16, 16, 13.2567);
91  graph->SetPoint(17, 17, 13.9353);
92  graph->SetPoint(18, 18, 14.6007);
93  graph->SetPoint(19, 19, 15.2532);
94  graph->SetPoint(20, 20, 15.8935);
95  graph->SetPoint(21, 21, 16.5219);
96  graph->SetPoint(22, 22, 17.1389);
97  graph->SetPoint(23, 23, 17.7449);
98  graph->SetPoint(24, 24, 18.3404);
99  graph->SetPoint(25, 25, 18.9255);
100  graph->SetPoint(26, 26, 19.5008);
101  graph->SetPoint(27, 27, 20.0665);
102  graph->SetPoint(28, 28, 20.623);
103  graph->SetPoint(29, 29, 21.1705);
104  graph->SetPoint(30, 30, 21.7094);
105  graph->SetPoint(31, 31, 22.2399);
106  graph->SetPoint(32, 32, 22.7622);
107  graph->SetPoint(33, 33, 23.2767);
108  graph->SetPoint(34, 34, 23.7835);
109  graph->SetPoint(35, 35, 24.2829);
110  graph->SetPoint(36, 36, 24.7751);
111  graph->SetPoint(37, 37, 25.2604);
112  graph->SetPoint(38, 38, 25.7388);
113  graph->SetPoint(39, 39, 26.2106);
114  graph->SetPoint(40, 40, 26.6759);
115  return graph;
116 }

◆ NVtx_NReconstructible_bs66mm()

TGraph * NPVBeamspotCorrection::NVtx_NReconstructible_bs66mm ( )
private

Definition at line 118 of file NPVBeamspotCorrection.cxx.

118  {
119  TGraph *graph = new TGraph(41);
120  graph->SetName("g_shadowedAverage_bs66mm");
121  graph->SetPoint(0, 0, 0);
122  graph->SetPoint(1, 1, 1);
123  graph->SetPoint(2, 2, 1.97943);
124  graph->SetPoint(3, 3, 2.93912);
125  graph->SetPoint(4, 4, 3.87986);
126  graph->SetPoint(5, 5, 4.8024);
127  graph->SetPoint(6, 6, 5.70743);
128  graph->SetPoint(7, 7, 6.59561);
129  graph->SetPoint(8, 8, 7.46756);
130  graph->SetPoint(9, 9, 8.32386);
131  graph->SetPoint(10, 10, 9.16509);
132  graph->SetPoint(11, 11, 9.99175);
133  graph->SetPoint(12, 12, 10.8044);
134  graph->SetPoint(13, 13, 11.6034);
135  graph->SetPoint(14, 14, 12.3893);
136  graph->SetPoint(15, 15, 13.1624);
137  graph->SetPoint(16, 16, 13.9233);
138  graph->SetPoint(17, 17, 14.6723);
139  graph->SetPoint(18, 18, 15.4097);
140  graph->SetPoint(19, 19, 16.136);
141  graph->SetPoint(20, 20, 16.8514);
142  graph->SetPoint(21, 21, 17.5562);
143  graph->SetPoint(22, 22, 18.2509);
144  graph->SetPoint(23, 23, 18.9356);
145  graph->SetPoint(24, 24, 19.6106);
146  graph->SetPoint(25, 25, 20.2763);
147  graph->SetPoint(26, 26, 20.9329);
148  graph->SetPoint(27, 27, 21.5806);
149  graph->SetPoint(28, 28, 22.2197);
150  graph->SetPoint(29, 29, 22.8504);
151  graph->SetPoint(30, 30, 23.4729);
152  graph->SetPoint(31, 31, 24.0874);
153  graph->SetPoint(32, 32, 24.6941);
154  graph->SetPoint(33, 33, 25.2933);
155  graph->SetPoint(34, 34, 25.8851);
156  graph->SetPoint(35, 35, 26.4697);
157  graph->SetPoint(36, 36, 27.0473);
158  graph->SetPoint(37, 37, 27.6179);
159  graph->SetPoint(38, 38, 28.1819);
160  graph->SetPoint(39, 39, 28.7394);
161  graph->SetPoint(40, 40, 29.2904);
162  return graph;
163 }

Member Data Documentation

◆ m_g_nvtx_nreco_bs47mm

TGraph* NPVBeamspotCorrection::m_g_nvtx_nreco_bs47mm
private

Definition at line 42 of file NPVBeamspotCorrection.h.

◆ m_g_nvtx_nreco_bs66mm

TGraph* NPVBeamspotCorrection::m_g_nvtx_nreco_bs66mm
private

Definition at line 40 of file NPVBeamspotCorrection.h.

◆ m_invGraph

TGraph* NPVBeamspotCorrection::m_invGraph
private

Definition at line 44 of file NPVBeamspotCorrection.h.

◆ m_NPVmax

double NPVBeamspotCorrection::m_NPVmax
private

Definition at line 46 of file NPVBeamspotCorrection.h.

◆ m_NPVmin

double NPVBeamspotCorrection::m_NPVmin
private

Definition at line 46 of file NPVBeamspotCorrection.h.


The documentation for this class was generated from the following files:
NPVBeamspotCorrection::m_NPVmin
double m_NPVmin
Definition: NPVBeamspotCorrection.h:46
NPVBeamspotCorrection::m_invGraph
TGraph * m_invGraph
Definition: NPVBeamspotCorrection.h:44
NPVBeamspotCorrection::NVtx_NReconstructible_bs47mm
TGraph * NVtx_NReconstructible_bs47mm()
Definition: NPVBeamspotCorrection.cxx:71
NPVBeamspotCorrection::initNPVBeamspotCorrection
void initNPVBeamspotCorrection()
Definition: NPVBeamspotCorrection.cxx:46
lumiFormat.i
int i
Definition: lumiFormat.py:92
NPVBeamspotCorrection::error
void error(TString msg)
Definition: NPVBeamspotCorrection.h:33
NPVBeamspotCorrection::m_g_nvtx_nreco_bs66mm
TGraph * m_g_nvtx_nreco_bs66mm
Definition: NPVBeamspotCorrection.h:40
NPVBeamspotCorrection::NVtx_NReconstructible_bs66mm
TGraph * NVtx_NReconstructible_bs66mm()
Definition: NPVBeamspotCorrection.cxx:118
NPVBeamspotCorrection::m_NPVmax
double m_NPVmax
Definition: NPVBeamspotCorrection.h:46
NPVBeamspotCorrection::m_g_nvtx_nreco_bs47mm
TGraph * m_g_nvtx_nreco_bs47mm
Definition: NPVBeamspotCorrection.h:42
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7