ATLAS Offline Software
Loading...
Searching...
No Matches
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.
virtual ~NPVBeamspotCorrection ()
void initNPVBeamspotCorrection ()
double GetNVertexBsCorrection (double nRecoVtx)

Private Member Functions

void error (TString msg)
std::unique_ptr< TGraph > NVtx_NReconstructible_bs66mm ()
std::unique_ptr< TGraph > NVtx_NReconstructible_bs47mm ()

Private Attributes

std::unique_ptr< TGraph > m_g_nvtx_nreco_bs66mm
std::unique_ptr< TGraph > m_g_nvtx_nreco_bs47mm
std::unique_ptr< TGraph > m_invGraph
double m_NPVmin
double m_NPVmax

Detailed Description

Definition at line 22 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.

◆ ~NPVBeamspotCorrection()

NPVBeamspotCorrection::~NPVBeamspotCorrection ( )
virtual

Definition at line 39 of file NPVBeamspotCorrection.cxx.

40{
41}

Member Function Documentation

◆ error()

void NPVBeamspotCorrection::error ( TString msg)
inlineprivate

Definition at line 34 of file NPVBeamspotCorrection.h.

35 { printf("\nERROR - NPVBeamspotCorrection:\n\n %s\n\n",msg.Data()); abort(); }
MsgStream & msg
Definition testRead.cxx:32

◆ GetNVertexBsCorrection()

double NPVBeamspotCorrection::GetNVertexBsCorrection ( double nRecoVtx)

Definition at line 59 of file NPVBeamspotCorrection.cxx.

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

◆ initNPVBeamspotCorrection()

void NPVBeamspotCorrection::initNPVBeamspotCorrection ( )

Definition at line 43 of file NPVBeamspotCorrection.cxx.

43 {
44
45 printf(" \n\nInitializing the NPV Beamspot correction tool\n");
46
49
50 if (!m_invGraph) {
51 m_invGraph = std::make_unique<TGraph>();
52 for (int i=0;i<m_g_nvtx_nreco_bs66mm->GetN();++i)
53 m_invGraph->SetPoint(i,m_g_nvtx_nreco_bs66mm->GetY()[i],m_g_nvtx_nreco_bs66mm->GetX()[i]);
54 }
57}
std::unique_ptr< TGraph > m_g_nvtx_nreco_bs66mm
std::unique_ptr< TGraph > NVtx_NReconstructible_bs66mm()
std::unique_ptr< TGraph > NVtx_NReconstructible_bs47mm()

◆ NVtx_NReconstructible_bs47mm()

std::unique_ptr< TGraph > NPVBeamspotCorrection::NVtx_NReconstructible_bs47mm ( )
private

Definition at line 68 of file NPVBeamspotCorrection.cxx.

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

◆ NVtx_NReconstructible_bs66mm()

std::unique_ptr< TGraph > NPVBeamspotCorrection::NVtx_NReconstructible_bs66mm ( )
private

Definition at line 115 of file NPVBeamspotCorrection.cxx.

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

Member Data Documentation

◆ m_g_nvtx_nreco_bs47mm

std::unique_ptr<TGraph> NPVBeamspotCorrection::m_g_nvtx_nreco_bs47mm
private

Definition at line 43 of file NPVBeamspotCorrection.h.

◆ m_g_nvtx_nreco_bs66mm

std::unique_ptr<TGraph> NPVBeamspotCorrection::m_g_nvtx_nreco_bs66mm
private

Definition at line 41 of file NPVBeamspotCorrection.h.

◆ m_invGraph

std::unique_ptr<TGraph> NPVBeamspotCorrection::m_invGraph
private

Definition at line 45 of file NPVBeamspotCorrection.h.

◆ m_NPVmax

double NPVBeamspotCorrection::m_NPVmax
private

Definition at line 47 of file NPVBeamspotCorrection.h.

◆ m_NPVmin

double NPVBeamspotCorrection::m_NPVmin
private

Definition at line 47 of file NPVBeamspotCorrection.h.


The documentation for this class was generated from the following files: